* Use arrayCopy * Avoid redundant String.format * Exit the loop earlymaster
@@ -36,6 +36,7 @@ Arcadius Ahouansou | |||||
Arjan Veenstra | Arjan Veenstra | ||||
Arnaud Vandyck | Arnaud Vandyck | ||||
Arnout J. Kuiper | Arnout J. Kuiper | ||||
Arturo Bernal | |||||
Arun Jamwal | Arun Jamwal | ||||
Aslak Hellesôy | Aslak Hellesôy | ||||
Atsuhiko Yamanaka | Atsuhiko Yamanaka | ||||
@@ -172,6 +172,10 @@ | |||||
<middle>J.</middle> | <middle>J.</middle> | ||||
<last>Kuiper</last> | <last>Kuiper</last> | ||||
</name> | </name> | ||||
<name> | |||||
<first>Arturo</first> | |||||
<last>Bernal</last> | |||||
</name> | |||||
<name> | <name> | ||||
<first>Arun</first> | <first>Arun</first> | ||||
<last>Jamwal</last> | <last>Jamwal</last> | ||||
@@ -88,7 +88,7 @@ public class NoBannerLogger extends DefaultLogger { | |||||
synchronized (this) { | synchronized (this) { | ||||
if (null != targetName) { | if (null != targetName) { | ||||
out.println(String.format("%n%s:", targetName)); | |||||
out.printf("%n%s:%n", targetName); | |||||
targetName = null; | targetName = null; | ||||
} | } | ||||
} | } | ||||
@@ -107,9 +107,9 @@ public class RecorderEntry implements BuildLogger, SubBuildListener { | |||||
Throwable error = event.getException(); | Throwable error = event.getException(); | ||||
if (error == null) { | if (error == null) { | ||||
out.println(String.format("%nBUILD SUCCESSFUL")); | |||||
out.printf("%nBUILD SUCCESSFUL%n"); | |||||
} else { | } else { | ||||
out.println(String.format("%nBUILD FAILED%n")); | |||||
out.printf("%nBUILD FAILED%n%n"); | |||||
error.printStackTrace(out); //NOSONAR | error.printStackTrace(out); //NOSONAR | ||||
} | } | ||||
} | } | ||||
@@ -94,8 +94,8 @@ public class JavacExternal extends DefaultCompilerAdapter { | |||||
for(int i = nonArgFileOptionIdx + 1; i < commandLine.length; i++) { | for(int i = nonArgFileOptionIdx + 1; i < commandLine.length; i++) { | ||||
if (!isArgFileEligible(commandLine[i])) { | if (!isArgFileEligible(commandLine[i])) { | ||||
String option = commandLine[i]; | String option = commandLine[i]; | ||||
for(int j = i - 1; j >= nonArgFileOptionIdx; j--) { | |||||
commandLine[j + 1] = commandLine[j]; | |||||
if (i - nonArgFileOptionIdx >= 0) { | |||||
System.arraycopy( commandLine, nonArgFileOptionIdx, commandLine, nonArgFileOptionIdx + 1, i - nonArgFileOptionIdx ); | |||||
} | } | ||||
commandLine[nonArgFileOptionIdx] = option; | commandLine[nonArgFileOptionIdx] = option; | ||||
nonArgFileOptionIdx++; | nonArgFileOptionIdx++; | ||||
@@ -1210,6 +1210,7 @@ public class CBZip2OutputStream extends OutputStream | |||||
for (int j = 16; --j >= 0;) { | for (int j = 16; --j >= 0;) { | ||||
if (inUse[i16 + j]) { | if (inUse[i16 + j]) { | ||||
inUse16[i] = true; | inUse16[i] = true; | ||||
break; | |||||
} | } | ||||
} | } | ||||
} | } | ||||