// disabling sonar because this code tests the equals() method
assertEquals(dummyMessage, dummyMessage); // NOSONAR
assertNotNull(dummyMessage);
- assertNotEquals(dummyMessage, new StartEngine(new AxArtifactKey()));
+ assertNotEquals(dummyMessage, (Object) new StartEngine(new AxArtifactKey()));
dummyMessage = new DummyMessage(new DummyAction(null), null, null);
DummyMessage otherDummyMessage = new DummyMessage(null, null, null);
// disabling sonar because this code tests the equals() method
assertEquals(message, message); // NOSONAR
assertNotNull(message);
- assertNotEquals(message, new StartEngine(new AxArtifactKey()));
+ assertNotEquals(message, (Object) new StartEngine(new AxArtifactKey()));
message = new Response(null, false, responseTo);
Response otherMessage = new Response(null, false, null);
// disabling sonar because this code tests the equals() method
assertEquals(message, message); // NOSONAR
assertNotNull(message);
- assertNotEquals(message, new StartEngine(new AxArtifactKey()));
+ assertNotEquals(message, (Object) new StartEngine(new AxArtifactKey()));
message = new UpdateModel(null, null, false, false);
UpdateModel otherMessage = new UpdateModel(null, null, false, false);
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2020 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.text.StrBuilder;
import org.slf4j.ext.XLoggerFactory;
import org.slf4j.helpers.MessageFormatter;
return;
}
- final StrBuilder err = new StrBuilder();
+ final StringBuilder err = new StringBuilder();
if (appName != null) {
err.append(this.getAppName()).append(": ");
}
err.append(MessageFormatter.arrayFormat(message, objects).getMessage());
if ((types & TYPE_ERROR) == TYPE_ERROR) {
- ERR_STREAM.println(err.build());
+ ERR_STREAM.println(err.toString());
}
if ((configuration & CONFIG_COLLECT_ERRORS) == CONFIG_COLLECT_ERRORS) {
- errors.add(err.build());
+ errors.add(err.toString());
}
}
return;
}
- final StrBuilder warn = new StrBuilder();
+ final StringBuilder warn = new StringBuilder();
if (appName != null) {
warn.append(this.getAppName()).append(": ");
}
warn.append(MessageFormatter.arrayFormat(message, objects).getMessage());
if ((types & TYPE_WARNING) == TYPE_WARNING) {
- ERR_STREAM.println(warn.build());
+ ERR_STREAM.println(warn.toString());
}
if ((configuration & CONFIG_COLLECT_WARNINGS) == CONFIG_COLLECT_WARNINGS) {
- warnings.add(warn.build());
+ warnings.add(warn.toString());
}
}