Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Commit 058cd76

Browse files
committed
Fixed 371
1 parent aa291d8 commit 058cd76

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/main/java/com/mathworks/ci/tools/MatlabInstaller.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,7 @@ private void appendReleaseToArguments(String release, ArgumentListBuilder args,
148148
}
149149
args.add("--release=" + actualRelease);
150150
}
151-
152-
synchronized private void getFreshCopyOfExecutables(String platform, FilePath expectedPath)
151+
private void getFreshCopyOfExecutables(String platform, FilePath expectedPath)
153152
throws IOException, InterruptedException {
154153
FilePath matlabBatchPath = new FilePath(expectedPath, "matlab-batch");
155154
FilePath mpmPath = new FilePath(expectedPath, "mpm");
@@ -174,10 +173,12 @@ synchronized private void getFreshCopyOfExecutables(String platform, FilePath ex
174173
throw new InstallationFailedException("Unsupported OS");
175174
}
176175

177-
mpmPath.copyFrom(mpmUrl.openStream());
178-
mpmPath.chmod(0777);
179-
matlabBatchPath.copyFrom(matlabBatchUrl.openStream());
180-
matlabBatchPath.chmod(0777);
176+
synchronized(this){
177+
mpmPath.copyFrom(mpmUrl.openStream());
178+
mpmPath.chmod(0777);
179+
matlabBatchPath.copyFrom(matlabBatchUrl.openStream());
180+
matlabBatchPath.chmod(0777);
181+
}
181182
}
182183

183184
@SuppressFBWarnings(value = {"NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"},

0 commit comments

Comments
 (0)