Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2017-09-25 07:05:12 +0000
committerAlexander Kurtakov2017-09-25 07:59:16 +0000
commiteaca4871a4010595e9990def02c0302429a0f5a8 (patch)
tree0e8bb7503dbc9803d8f08c9dce1c178857249d36
parentcf07fc23523312f1c90897df45b5d892efb7e991 (diff)
downloadrt.equinox.p2-eaca4871a4010595e9990def02c0302429a0f5a8.tar.gz
rt.equinox.p2-eaca4871a4010595e9990def02c0302429a0f5a8.tar.xz
rt.equinox.p2-eaca4871a4010595e9990def02c0302429a0f5a8.zip
Use varargs Collections.addAll.I20170927-0420I20170926-2000I20170925-2000
Change-Id: I37ae7c578281c9da2f6faf465bbaacb8c0732b1e Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractReconcilerTest.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/BaseChangeExtendedConfigured.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/BaseChangeExtendedConflicts.java8
3 files changed, 11 insertions, 11 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractReconcilerTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractReconcilerTest.java
index bf1caa052..a240e33dc 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractReconcilerTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractReconcilerTest.java
@@ -607,12 +607,12 @@ public class AbstractReconcilerTest extends AbstractProvisioningTest {
exe = new File(root, "java");
assertTrue("Java executable not found in: " + exe.getAbsolutePath(), exe.exists());
List<String> command = new ArrayList<>();
- Collections.addAll(command, new String[] {(new File(location == null ? output : location, getExeFolder() + "eclipse")).getAbsolutePath(), "--launcher.suppressErrors", "-nosplash", "-vm", exe.getAbsolutePath()});
+ Collections.addAll(command, (new File(location == null ? output : location, getExeFolder() + "eclipse")).getAbsolutePath(), "--launcher.suppressErrors", "-nosplash", "-vm", exe.getAbsolutePath());
Collections.addAll(command, args);
- Collections.addAll(command, new String[] {"-vmArgs", "-Dosgi.checkConfiguration=true", "-Dosgi.dataAreaRequiresExplicitInit=false"});
+ Collections.addAll(command, "-vmArgs", "-Dosgi.checkConfiguration=true", "-Dosgi.dataAreaRequiresExplicitInit=false");
// command-line if you want to run and allow a remote debugger to connect
if (debug)
- Collections.addAll(command, new String[] {"-Xdebug", "-Xnoagent", "-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8787"});
+ Collections.addAll(command, "-Xdebug", "-Xnoagent", "-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8787");
int result = run(message, command.toArray(new String[command.size()]));
// 13 means that we wrote something out in the log file.
// so try and parse it and fail via that message if we can.
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/BaseChangeExtendedConfigured.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/BaseChangeExtendedConfigured.java
index bef3493df..ee1c43c16 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/BaseChangeExtendedConfigured.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/BaseChangeExtendedConfigured.java
@@ -64,21 +64,21 @@ public class BaseChangeExtendedConfigured extends BaseChange {
exe = new File(root, "java");
assertTrue("Java executable not found in: " + exe.getAbsolutePath(), exe.exists());
List<String> command = new ArrayList<>();
- Collections.addAll(command, new String[] {(new File(location == null ? output : location, getExeFolder() + "eclipse")).getAbsolutePath(), "--launcher.suppressErrors", "-nosplash", "-vm", exe.getAbsolutePath()});
+ Collections.addAll(command, (new File(location == null ? output : location, getExeFolder() + "eclipse")).getAbsolutePath(), "--launcher.suppressErrors", "-nosplash", "-vm", exe.getAbsolutePath());
Collections.addAll(command, args);
- Collections.addAll(command, new String[] {"-vmArgs", "-Dosgi.checkConfiguration=true", "-Dosgi.dataAreaRequiresExplicitInit=false"});
+ Collections.addAll(command, "-vmArgs", "-Dosgi.checkConfiguration=true", "-Dosgi.dataAreaRequiresExplicitInit=false");
if (extensions != null) {
String extensionParameter = "";
for (File f : extensions) {
extensionParameter += f.toString() + ",";
}
extensionParameter = extensionParameter.substring(0, extensionParameter.length() - 1);
- Collections.addAll(command, new String[] {"-Dp2.fragments=" + extensionParameter});
+ Collections.addAll(command, "-Dp2.fragments=" + extensionParameter);
}
// command-line if you want to run and allow a remote debugger to connect
if (debug)
- Collections.addAll(command, new String[] {"-Xdebug", "-Xnoagent", "-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"});
+ Collections.addAll(command, "-Xdebug", "-Xnoagent", "-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000");
int result = run(message, command.toArray(new String[command.size()]));
// 13 means that we wrote something out in the log file.
// so try and parse it and fail via that message if we can.
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/BaseChangeExtendedConflicts.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/BaseChangeExtendedConflicts.java
index 24a0020cc..f738aef39 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/BaseChangeExtendedConflicts.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/BaseChangeExtendedConflicts.java
@@ -64,21 +64,21 @@ public class BaseChangeExtendedConflicts extends BaseChange {
exe = new File(root, "java");
assertTrue("Java executable not found in: " + exe.getAbsolutePath(), exe.exists());
List<String> command = new ArrayList<>();
- Collections.addAll(command, new String[] {(new File(location == null ? output : location, getExeFolder() + "eclipse")).getAbsolutePath(), "--launcher.suppressErrors", "-nosplash", "-vm", exe.getAbsolutePath()});
+ Collections.addAll(command, (new File(location == null ? output : location, getExeFolder() + "eclipse")).getAbsolutePath(), "--launcher.suppressErrors", "-nosplash", "-vm", exe.getAbsolutePath());
Collections.addAll(command, args);
- Collections.addAll(command, new String[] {"-vmArgs", "-Dosgi.checkConfiguration=true", "-Dosgi.dataAreaRequiresExplicitInit=false"});
+ Collections.addAll(command, "-vmArgs", "-Dosgi.checkConfiguration=true", "-Dosgi.dataAreaRequiresExplicitInit=false");
if (extensions != null) {
String extensionParameter = "";
for (File f : extensions) {
extensionParameter += f.toString() + ",";
}
extensionParameter = extensionParameter.substring(0, extensionParameter.length() - 1);
- Collections.addAll(command, new String[] {"-Dp2.fragments=" + extensionParameter});
+ Collections.addAll(command, "-Dp2.fragments=" + extensionParameter);
}
// command-line if you want to run and allow a remote debugger to connect
if (debug)
- Collections.addAll(command, new String[] {"-Xdebug", "-Xnoagent", "-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"});
+ Collections.addAll(command, "-Xdebug", "-Xnoagent", "-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000");
int result = run(message, command.toArray(new String[command.size()]));
// 13 means that we wrote something out in the log file.
// so try and parse it and fail via that message if we can.

Back to the top