Use Bulk operation instead of iteration.master
| @@ -470,7 +470,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { | |||||
| try (InputStream in = Files.newInputStream(weblogicDD.toPath())) { | try (InputStream in = Files.newInputStream(weblogicDD.toPath())) { | ||||
| saxParser.parse(new InputSource(in), handler); | saxParser.parse(new InputSource(in), handler); | ||||
| } | } | ||||
| handler.getFiles().forEach(ejbFiles::put); | |||||
| ejbFiles.putAll(handler.getFiles()); | |||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| throw new BuildException( | throw new BuildException( | ||||
| "Exception while adding Vendor specific files: " | "Exception while adding Vendor specific files: " | ||||
| @@ -1220,7 +1220,7 @@ public class JUnitTask extends Task { | |||||
| + propsFile.getAbsolutePath()); | + propsFile.getAbsolutePath()); | ||||
| final Hashtable<String, Object> p = getProject().getProperties(); | final Hashtable<String, Object> p = getProject().getProperties(); | ||||
| final Properties props = new Properties(); | final Properties props = new Properties(); | ||||
| p.forEach(props::put); | |||||
| props.putAll(p); | |||||
| try { | try { | ||||
| final OutputStream outstream = Files.newOutputStream(propsFile.toPath()); | final OutputStream outstream = Files.newOutputStream(propsFile.toPath()); | ||||
| props.store(outstream, "Ant JUnitTask generated properties file"); | props.store(outstream, "Ant JUnitTask generated properties file"); | ||||
| @@ -472,7 +472,7 @@ public class JUnitTest extends BaseTest implements Cloneable { | |||||
| */ | */ | ||||
| public void setProperties(Hashtable<?, ?> p) { | public void setProperties(Hashtable<?, ?> p) { | ||||
| props = new Properties(); | props = new Properties(); | ||||
| p.forEach(props::put); | |||||
| props.putAll(p); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -981,7 +981,7 @@ public class JUnitTestRunner implements TestListener, JUnitTaskMirror.JUnitTestR | |||||
| } | } | ||||
| // Add/overlay system properties on the properties from the Ant project | // Add/overlay system properties on the properties from the Ant project | ||||
| System.getProperties().forEach(props::put); | |||||
| props.putAll(System.getProperties()); | |||||
| int returnCode = SUCCESS; | int returnCode = SUCCESS; | ||||
| if (multipleTests) { | if (multipleTests) { | ||||
| @@ -29,6 +29,7 @@ import java.io.OutputStream; | |||||
| import java.io.StringWriter; | import java.io.StringWriter; | ||||
| import java.nio.ByteBuffer; | import java.nio.ByteBuffer; | ||||
| import java.nio.charset.StandardCharsets; | import java.nio.charset.StandardCharsets; | ||||
| import java.util.Arrays; | |||||
| import java.util.Date; | import java.util.Date; | ||||
| import java.util.HashMap; | import java.util.HashMap; | ||||
| import java.util.Map; | import java.util.Map; | ||||
| @@ -537,9 +538,7 @@ public class TarOutputStream extends FilterOutputStream { | |||||
| * An EOF record consists of a record of all zeros. | * An EOF record consists of a record of all zeros. | ||||
| */ | */ | ||||
| private void writeEOFRecord() throws IOException { | private void writeEOFRecord() throws IOException { | ||||
| for (int i = 0; i < recordBuf.length; ++i) { | |||||
| recordBuf[i] = 0; | |||||
| } | |||||
| Arrays.fill(recordBuf, (byte) 0); | |||||
| buffer.writeRecord(recordBuf); | buffer.writeRecord(recordBuf); | ||||
| } | } | ||||