| @@ -317,7 +317,7 @@ public final class SortFilter extends BaseParamFilterReader | |||||
| for (Parameter param : params) { | for (Parameter param : params) { | ||||
| final String paramName = param.getName(); | final String paramName = param.getName(); | ||||
| if (REVERSE_KEY.equals(paramName)) { | if (REVERSE_KEY.equals(paramName)) { | ||||
| setReverse(Boolean.valueOf(param.getValue())); | |||||
| setReverse(Boolean.parseBoolean(param.getValue())); | |||||
| } else if (COMPARATOR_KEY.equals(paramName)) { | } else if (COMPARATOR_KEY.equals(paramName)) { | ||||
| try { | try { | ||||
| String className = param.getValue(); | String className = param.getValue(); | ||||
| @@ -306,14 +306,14 @@ public abstract class AbstractCvsTask extends Task { | |||||
| var.setKey("CVS_PASSFILE"); | var.setKey("CVS_PASSFILE"); | ||||
| var.setValue(String.valueOf(passFile)); | var.setValue(String.valueOf(passFile)); | ||||
| env.addVariable(var); | env.addVariable(var); | ||||
| log("Using cvs passfile: " + String.valueOf(passFile), | |||||
| log("Using cvs passfile: " + passFile, | |||||
| Project.MSG_VERBOSE); | Project.MSG_VERBOSE); | ||||
| } else if (!passFile.canRead()) { | } else if (!passFile.canRead()) { | ||||
| log("cvs passfile: " + String.valueOf(passFile) | |||||
| log("cvs passfile: " + passFile | |||||
| + " ignored as it is not readable", | + " ignored as it is not readable", | ||||
| Project.MSG_WARN); | Project.MSG_WARN); | ||||
| } else { | } else { | ||||
| log("cvs passfile: " + String.valueOf(passFile) | |||||
| log("cvs passfile: " + passFile | |||||
| + " ignored as it is not a file", | + " ignored as it is not a file", | ||||
| Project.MSG_WARN); | Project.MSG_WARN); | ||||
| } | } | ||||
| @@ -46,7 +46,7 @@ public class AugmentReference extends Task implements TypeAdapter { | |||||
| hijackId(); | hijackId(); | ||||
| if (getProject().hasReference(id)) { | if (getProject().hasReference(id)) { | ||||
| Object result = getProject().getReference(id); | Object result = getProject().getReference(id); | ||||
| log("project reference " + id + "=" + String.valueOf(result), Project.MSG_DEBUG); | |||||
| log("project reference " + id + "=" + result, Project.MSG_DEBUG); | |||||
| return result; | return result; | ||||
| } | } | ||||
| throw new BuildException("Unknown reference \"" + id + "\""); | throw new BuildException("Unknown reference \"" + id + "\""); | ||||
| @@ -504,7 +504,7 @@ public class Concat extends Task implements ResourceCollection { | |||||
| @Override | @Override | ||||
| public String getName() { | public String getName() { | ||||
| return resourceName == null | return resourceName == null | ||||
| ? "concat (" + String.valueOf(c) + ")" : resourceName; | |||||
| ? "concat (" + c + ")" : resourceName; | |||||
| } | } | ||||
| } | } | ||||
| @@ -272,12 +272,12 @@ public class RecorderEntry implements BuildLogger, SubBuildListener { | |||||
| if (minutes > 0) { | if (minutes > 0) { | ||||
| return Long.toString(minutes) + " minute" | |||||
| return minutes + " minute" | |||||
| + (minutes == 1 ? " " : "s ") | + (minutes == 1 ? " " : "s ") | ||||
| + Long.toString(seconds % 60) + " second" | |||||
| + seconds % 60 + " second" | |||||
| + (seconds % 60 == 1 ? "" : "s"); | + (seconds % 60 == 1 ? "" : "s"); | ||||
| } else { | } else { | ||||
| return Long.toString(seconds) + " second" | |||||
| return seconds + " second" | |||||
| + (seconds % 60 == 1 ? "" : "s"); | + (seconds % 60 == 1 ? "" : "s"); | ||||
| } | } | ||||
| // CheckStyle:MagicNumber ON | // CheckStyle:MagicNumber ON | ||||
| @@ -434,7 +434,7 @@ public class GenericDeploymentTool implements EJBDeploymentTool { | |||||
| log("building " | log("building " | ||||
| + jarFile.getName() | + jarFile.getName() | ||||
| + " with " | + " with " | ||||
| + String.valueOf(ejbFiles.size()) | |||||
| + ejbFiles.size() | |||||
| + " files", | + " files", | ||||
| Project.MSG_INFO); | Project.MSG_INFO); | ||||
| @@ -260,7 +260,7 @@ public class AggregateTransformer { | |||||
| xsltTask.setIn(((XMLResultAggregator) task).getDestinationFile()); | xsltTask.setIn(((XMLResultAggregator) task).getDestinationFile()); | ||||
| File outputFile; | File outputFile; | ||||
| if (FRAMES.equals(format)) { | if (FRAMES.equals(format)) { | ||||
| String tempFileProperty = getClass().getName() + String.valueOf(counter++); //NOSONAR | |||||
| String tempFileProperty = getClass().getName() + counter++; //NOSONAR | |||||
| File tmp = FILE_UTILS.resolveFile(project.getBaseDir(), project | File tmp = FILE_UTILS.resolveFile(project.getBaseDir(), project | ||||
| .getProperty("java.io.tmpdir")); | .getProperty("java.io.tmpdir")); | ||||
| tempFileTask.setDestDir(tmp); | tempFileTask.setDestDir(tmp); | ||||
| @@ -1174,7 +1174,7 @@ public class JUnitTask extends Task { | |||||
| cmd.createArgument().setValue(Constants.TESTSFILE + casesFile); | cmd.createArgument().setValue(Constants.TESTSFILE + casesFile); | ||||
| } | } | ||||
| cmd.createArgument().setValue(Constants.SKIP_NON_TESTS + String.valueOf(test.isSkipNonTests())); | |||||
| cmd.createArgument().setValue(Constants.SKIP_NON_TESTS + test.isSkipNonTests()); | |||||
| cmd.createArgument().setValue(Constants.FILTERTRACE + test.getFiltertrace()); | cmd.createArgument().setValue(Constants.FILTERTRACE + test.getFiltertrace()); | ||||
| cmd.createArgument().setValue(Constants.HALT_ON_ERROR + test.getHaltonerror()); | cmd.createArgument().setValue(Constants.HALT_ON_ERROR + test.getHaltonerror()); | ||||
| cmd.createArgument().setValue(Constants.HALT_ON_FAILURE | cmd.createArgument().setValue(Constants.HALT_ON_FAILURE | ||||
| @@ -1184,17 +1184,17 @@ public class JUnitTask extends Task { | |||||
| checkIncludeSummary(cmd); | checkIncludeSummary(cmd); | ||||
| cmd.createArgument().setValue(Constants.SHOWOUTPUT | cmd.createArgument().setValue(Constants.SHOWOUTPUT | ||||
| + String.valueOf(showOutput)); | |||||
| + showOutput); | |||||
| cmd.createArgument().setValue(Constants.OUTPUT_TO_FORMATTERS | cmd.createArgument().setValue(Constants.OUTPUT_TO_FORMATTERS | ||||
| + String.valueOf(outputToFormatters)); | |||||
| + outputToFormatters); | |||||
| cmd.createArgument().setValue(Constants.LOG_FAILED_TESTS | cmd.createArgument().setValue(Constants.LOG_FAILED_TESTS | ||||
| + String.valueOf(logFailedTests)); | |||||
| + logFailedTests); | |||||
| cmd.createArgument().setValue(Constants.THREADID | cmd.createArgument().setValue(Constants.THREADID | ||||
| + String.valueOf(test.getThread())); | |||||
| + test.getThread()); | |||||
| // #31885 | // #31885 | ||||
| cmd.createArgument().setValue(Constants.LOGTESTLISTENEREVENTS | cmd.createArgument().setValue(Constants.LOGTESTLISTENEREVENTS | ||||
| + String.valueOf(getEnableTestListenerEvents())); | |||||
| + getEnableTestListenerEvents()); | |||||
| StringBuilder formatterArg = new StringBuilder(STRING_BUFFER_SIZE); | StringBuilder formatterArg = new StringBuilder(STRING_BUFFER_SIZE); | ||||
| final FormatterElement[] feArray = mergeFormatters(test); | final FormatterElement[] feArray = mergeFormatters(test); | ||||
| @@ -2056,7 +2056,7 @@ public class FTP extends Task implements FTPTaskConfig { | |||||
| final int maxIterations = 1000; | final int maxIterations = 1000; | ||||
| for (int counter = 1; counter < maxIterations; counter++) { | for (int counter = 1; counter < maxIterations; counter++) { | ||||
| File localFile = FILE_UTILS.createTempFile(getProject(), | File localFile = FILE_UTILS.createTempFile(getProject(), | ||||
| "ant" + Integer.toString(counter), ".tmp", | |||||
| "ant" + counter, ".tmp", | |||||
| null, false, false); | null, false, false); | ||||
| String fileName = localFile.getName(); | String fileName = localFile.getName(); | ||||
| boolean found = false; | boolean found = false; | ||||
| @@ -1372,7 +1372,7 @@ public class FTPTaskMirrorImpl implements FTPTaskMirror { | |||||
| final int maxIterations = 1000; | final int maxIterations = 1000; | ||||
| for (int counter = 1; counter < maxIterations; counter++) { | for (int counter = 1; counter < maxIterations; counter++) { | ||||
| File localFile = FILE_UTILS.createTempFile(task.getProject(), | File localFile = FILE_UTILS.createTempFile(task.getProject(), | ||||
| "ant" + Integer.toString(counter), ".tmp", | |||||
| "ant" + counter, ".tmp", | |||||
| null, false, false); | null, false, false); | ||||
| String fileName = localFile.getName(); | String fileName = localFile.getName(); | ||||
| boolean found = false; | boolean found = false; | ||||
| @@ -87,7 +87,7 @@ public class Mapper extends DataType { | |||||
| if (m instanceof ContainerMapper) { | if (m instanceof ContainerMapper) { | ||||
| container = (ContainerMapper) m; | container = (ContainerMapper) m; | ||||
| } else { | } else { | ||||
| throw new BuildException(String.valueOf(m) | |||||
| throw new BuildException(m | |||||
| + " mapper implementation does not support nested mappers!"); | + " mapper implementation does not support nested mappers!"); | ||||
| } | } | ||||
| } | } | ||||
| @@ -49,7 +49,7 @@ public class ExecStreamRedirectorTest { | |||||
| @Before | @Before | ||||
| public void setUp() throws IOException { | public void setUp() throws IOException { | ||||
| buildRule.configureProject("src/etc/testcases/taskdefs/exec/exec-with-redirector.xml"); | buildRule.configureProject("src/etc/testcases/taskdefs/exec/exec-with-redirector.xml"); | ||||
| outputDir = folder.newFolder(String.valueOf("temp-" + System.nanoTime())); | |||||
| outputDir = folder.newFolder("temp-" + System.nanoTime()); | |||||
| buildRule.getProject().setUserProperty("output", outputDir.toString()); | buildRule.getProject().setUserProperty("output", outputDir.toString()); | ||||
| buildRule.executeTarget("setUp"); | buildRule.executeTarget("setUp"); | ||||
| } | } | ||||
| @@ -337,8 +337,7 @@ public class SOSTest { | |||||
| int length = sTestCmdLine.length; | int length = sTestCmdLine.length; | ||||
| assertEquals("number of arguments doesn't match", length, sGeneratedCmdLine.length); | assertEquals("number of arguments doesn't match", length, sGeneratedCmdLine.length); | ||||
| for (int i = 0; i < length; i++) { | for (int i = 0; i < length; i++) { | ||||
| assertEquals("arg # " + String.valueOf(i), | |||||
| sTestCmdLine[i], sGeneratedCmdLine[i]); | |||||
| assertEquals("arg # " + i, sTestCmdLine[i], sGeneratedCmdLine[i]); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||