Skip to content

Commit de88b87

Browse files
committed
Fix varargs type mismatch in NLS.bind invocation
Replaced String[] array with individual Object arguments in NLS.bind calls to resolve type mismatch warnings and add (Object[]) cast
1 parent d239749 commit de88b87

File tree

80 files changed

+535
-435
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+535
-435
lines changed

ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePreferences.java

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2000, 2018 IBM Corporation and others.
2+
* Copyright (c) 2000, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -607,9 +607,7 @@ private void addURLToExtraClasspathEntries(URL url, IConfigurationElement elemen
607607
if (eclipseRuntime != null) {
608608
eclipseRuntimeRequired = Boolean.parseBoolean(eclipseRuntime);
609609
}
610-
Iterator<AntClasspathEntry> itr = extraClasspathURLs.iterator();
611-
while (itr.hasNext()) {
612-
IAntClasspathEntry entry = itr.next();
610+
for (IAntClasspathEntry entry : extraClasspathURLs) {
613611
if (entry.getEntryURL().equals(url)) {
614612
return;
615613
}
@@ -688,8 +686,7 @@ private boolean configureAntObject(IConfigurationElement element, AntObject antO
688686

689687
String library = element.getAttribute(AntCorePlugin.LIBRARY);
690688
if (library == null) {
691-
IStatus status = new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_LIBRARY_NOT_SPECIFIED, NLS.bind(InternalCoreAntMessages.AntCorePreferences_Library_not_specified_for___0__4, new String[] {
692-
objectName }), null);
689+
IStatus status = new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_LIBRARY_NOT_SPECIFIED, NLS.bind(InternalCoreAntMessages.AntCorePreferences_Library_not_specified_for___0__4, objectName), null);
693690
AntCorePlugin.getPlugin().getLog().log(status);
694691
return false;
695692
}
@@ -707,8 +704,7 @@ private boolean configureAntObject(IConfigurationElement element, AntObject antO
707704
}
708705

709706
// type specifies a library that does not exist
710-
IStatus status = new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_LIBRARY_NOT_SPECIFIED, NLS.bind(errorMessage, new String[] {
711-
library, element.getContributor().getName() }), null);
707+
IStatus status = new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_LIBRARY_NOT_SPECIFIED, NLS.bind(errorMessage, library, element.getContributor().getName()), null);
712708
AntCorePlugin.getPlugin().getLog().log(status);
713709
return false;
714710
}
@@ -719,8 +715,7 @@ private boolean configureAntObject(IConfigurationElement element, AntObject antO
719715
}
720716
catch (Exception e) {
721717
// likely extra classpath entry library that does not exist
722-
IStatus status = new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_LIBRARY_NOT_SPECIFIED, NLS.bind(InternalCoreAntMessages.AntCorePreferences_8, new String[] {
723-
library, element.getContributor().getName() }), null);
718+
IStatus status = new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_LIBRARY_NOT_SPECIFIED, NLS.bind(InternalCoreAntMessages.AntCorePreferences_8, library, element.getContributor().getName()), null);
724719
AntCorePlugin.getPlugin().getLog().log(status);
725720
}
726721
return false;
@@ -743,8 +738,7 @@ protected void computeDefaultExtraClasspathEntries(List<IConfigurationElement> e
743738
addPluginClassLoader(bundle);
744739
} else {
745740
// extra classpath entry that does not exist
746-
IStatus status = new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_LIBRARY_NOT_SPECIFIED, NLS.bind(InternalCoreAntMessages.AntCorePreferences_6, new String[] {
747-
library, element.getContributor().getName() }), null);
741+
IStatus status = new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_LIBRARY_NOT_SPECIFIED, NLS.bind(InternalCoreAntMessages.AntCorePreferences_6, library, element.getContributor().getName()), null);
748742
AntCorePlugin.getPlugin().getLog().log(status);
749743
continue;
750744
}
@@ -757,8 +751,7 @@ protected void computeDefaultExtraClasspathEntries(List<IConfigurationElement> e
757751
}
758752
catch (Exception e) {
759753
// likely extra classpath entry that does not exist
760-
IStatus status = new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_LIBRARY_NOT_SPECIFIED, NLS.bind(InternalCoreAntMessages.AntCorePreferences_6, new String[] {
761-
library, element.getContributor().getName() }), null);
754+
IStatus status = new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_LIBRARY_NOT_SPECIFIED, NLS.bind(InternalCoreAntMessages.AntCorePreferences_6, library, element.getContributor().getName()), null);
762755
AntCorePlugin.getPlugin().getLog().log(status);
763756
continue;
764757
}
@@ -1068,11 +1061,9 @@ private void addEntryURLs(List<URL> result, IAntClasspathEntry[] entries) {
10681061

10691062
protected ClassLoader[] getPluginClassLoaders() {
10701063
if (orderedPluginClassLoaders == null) {
1071-
Iterator<WrappedClassLoader> classLoaders = pluginClassLoaders.iterator();
10721064
Map<String, WrappedClassLoader> idToLoader = new HashMap<>(pluginClassLoaders.size());
10731065
List<BundleRevision> bundles = new ArrayList<>(pluginClassLoaders.size());
1074-
while (classLoaders.hasNext()) {
1075-
WrappedClassLoader loader = classLoaders.next();
1066+
for (WrappedClassLoader loader : pluginClassLoaders) {
10761067
idToLoader.put(loader.bundle.getSymbolicName(), loader);
10771068
BundleRevision revision = loader.bundle.adapt(BundleRevision.class);
10781069
if (revision != null) {
@@ -1133,8 +1124,7 @@ private List<BundleRevision> computePrerequisiteOrder(List<BundleRevision> plugi
11331124
prereqs.add(new Relation(currentFrag, hostWires.get(0).getProvider()));
11341125
}
11351126
} else {
1136-
AntCorePlugin.getPlugin().getLog().log(new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_MALFORMED_URL, NLS.bind(InternalCoreAntMessages.AntCorePreferences_1, new String[] {
1137-
currentFrag.getSymbolicName() }), null));
1127+
AntCorePlugin.getPlugin().getLog().log(new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_MALFORMED_URL, NLS.bind(InternalCoreAntMessages.AntCorePreferences_1, currentFrag.getSymbolicName()), null));
11381128
}
11391129
}
11401130

@@ -1287,9 +1277,7 @@ public List<Task> getTasks() {
12871277
public List<Task> getRemoteTasks() {
12881278
List<Task> result = new ArrayList<>(10);
12891279
if (defaultTasks != null && !defaultTasks.isEmpty()) {
1290-
Iterator<Task> iter = defaultTasks.iterator();
1291-
while (iter.hasNext()) {
1292-
Task task = iter.next();
1280+
for (Task task : defaultTasks) {
12931281
if (!task.isEclipseRuntimeRequired()) {
12941282
result.add(task);
12951283
}
@@ -1354,9 +1342,7 @@ public List<Property> getProperties() {
13541342
public List<Property> getRemoteAntProperties() {
13551343
List<Property> result = new ArrayList<>(10);
13561344
if (defaultProperties != null && !defaultProperties.isEmpty()) {
1357-
Iterator<Property> iter = defaultProperties.iterator();
1358-
while (iter.hasNext()) {
1359-
Property property = iter.next();
1345+
for (Property property : defaultProperties) {
13601346
if (!property.isEclipseRuntimeRequired()) {
13611347
result.add(property);
13621348
}
@@ -1525,9 +1511,7 @@ public List<Type> getTypes() {
15251511
public List<Type> getRemoteTypes() {
15261512
List<Type> result = new ArrayList<>(10);
15271513
if (defaultTypes != null && !defaultTypes.isEmpty()) {
1528-
Iterator<Type> iter = defaultTypes.iterator();
1529-
while (iter.hasNext()) {
1530-
Type type = iter.next();
1514+
for (Type type : defaultTypes) {
15311515
if (!type.isEclipseRuntimeRequired()) {
15321516
result.add(type);
15331517
}

ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntRunner.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,7 @@ private void basicConfigure(Class<?> classInternalAntRunner, Object runner) thro
302302
*/
303303
public void run(IProgressMonitor monitor) throws CoreException {
304304
if (buildRunning) {
305-
IStatus status = new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_RUNNING_BUILD, NLS.bind(InternalCoreAntMessages.AntRunner_Already_in_progess, new String[] {
306-
buildFileLocation }), null);
305+
IStatus status = new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_RUNNING_BUILD, NLS.bind(InternalCoreAntMessages.AntRunner_Already_in_progess, buildFileLocation), null);
307306
throw new CoreException(status);
308307
}
309308
buildRunning = true;
@@ -449,7 +448,7 @@ protected void problemLoadingClass(Throwable e) throws CoreException {
449448
if (missingClassName != null) {
450449
missingClassName = missingClassName.replace('/', '.');
451450
message = InternalCoreAntMessages.AntRunner_Could_not_find_one_or_more_classes__Please_check_the_Ant_classpath__2;
452-
message = NLS.bind(message, new String[] { missingClassName });
451+
message = NLS.bind(message, missingClassName);
453452
} else {
454453
message = InternalCoreAntMessages.AntRunner_Could_not_find_one_or_more_classes__Please_check_the_Ant_classpath__1;
455454
}

debug/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsCoreUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ protected static void abort(String message, Throwable exception, int code) throw
7070
public static IPath getLocation(ILaunchConfiguration configuration) throws CoreException {
7171
String location = configuration.getAttribute(IExternalToolConstants.ATTR_LOCATION, (String) null);
7272
if (location == null) {
73-
abort(NLS.bind(ExternalToolsProgramMessages.ExternalToolsUtil_Location_not_specified_by__0__1, new String[] { configuration.getName()}), null, 0);
73+
abort(NLS.bind(ExternalToolsProgramMessages.ExternalToolsUtil_Location_not_specified_by__0__1, configuration.getName()), null, 0);
7474
} else {
7575
String expandedLocation = getStringVariableManager().performStringSubstitution(location);
7676
if (expandedLocation == null || expandedLocation.length() == 0) {

debug/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ProgramLaunchDelegate.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public void launch(ILaunchConfiguration configuration, String mode,
117117
if (p != null) {
118118
monitor.beginTask(NLS.bind(
119119
ExternalToolsProgramMessages.ProgramLaunchDelegate_3,
120-
new String[] { configuration.getName() }),
120+
configuration.getName()),
121121
IProgressMonitor.UNKNOWN);
122122
String label = getProcessLabel(location, p);
123123
process = DebugPlugin.newProcess(launch, p, label, processAttributes);

debug/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/model/ExternalToolBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ private void doBuildBasedOnScope(IResource[] resources, int kind, ILaunchConfigu
178178
}
179179

180180
private void launchBuild(int kind, ILaunchConfiguration config, Map<String, String> args, IProgressMonitor monitor) throws CoreException {
181-
monitor.subTask(NLS.bind(ExternalToolsModelMessages.ExternalToolBuilder_Running__0_____1, new String[] { config.getName()}));
181+
monitor.subTask(NLS.bind(ExternalToolsModelMessages.ExternalToolBuilder_Running__0_____1, config.getName()));
182182
buildStarted(kind, args);
183183
// The default value for "launch in background" is true in debug core. If
184184
// the user doesn't go through the UI, the new attribute won't be set. This means

debug/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/ContributedValueVariable.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ private void initialize() {
8989
IValueVariableInitializer initializer = (IValueVariableInitializer)object;
9090
initializer.initialize(this);
9191
} else {
92-
VariablesPlugin.logMessage(NLS.bind("Unable to initialize variable {0} - initializer must be an instance of IValueVariableInitializer.", new String[]{getName()}), null); //$NON-NLS-1$
92+
VariablesPlugin.logMessage(NLS.bind("Unable to initialize variable {0} - initializer must be an instance of IValueVariableInitializer.", getName()), null); //$NON-NLS-1$
9393
}
9494
} catch (CoreException e) {
95-
VariablesPlugin.logMessage(NLS.bind("Unable to initialize variable {0}",new String[]{getName()}), e); //$NON-NLS-1$
95+
VariablesPlugin.logMessage(NLS.bind("Unable to initialize variable {0}", getName()), e); //$NON-NLS-1$
9696
}
9797
}
9898
} else {

debug/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/DynamicVariable.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,25 +37,25 @@ public String getValue(String argument) throws CoreException {
3737
if (!supportsArgument()) {
3838
// check for an argument - not supported
3939
if (argument != null && argument.length() > 0) {
40-
throw new CoreException(new Status(IStatus.ERROR, VariablesPlugin.getUniqueIdentifier(), VariablesPlugin.INTERNAL_ERROR, NLS.bind(VariablesMessages.DynamicVariable_0, new String[]{argument, getName()}), null));
40+
throw new CoreException(new Status(IStatus.ERROR, VariablesPlugin.getUniqueIdentifier(), VariablesPlugin.INTERNAL_ERROR, NLS.bind(VariablesMessages.DynamicVariable_0, argument, getName()), null));
4141
}
4242
}
4343
if (fResolver == null) {
4444
String name = getConfigurationElement().getAttribute("resolver"); //$NON-NLS-1$
4545
if (name == null) {
46-
throw new CoreException(new Status(IStatus.ERROR, VariablesPlugin.getUniqueIdentifier(), VariablesPlugin.INTERNAL_ERROR, NLS.bind("Contributed context variable {0} must specify a resolver.",new String[]{getName()}), null)); //$NON-NLS-1$
46+
throw new CoreException(new Status(IStatus.ERROR, VariablesPlugin.getUniqueIdentifier(), VariablesPlugin.INTERNAL_ERROR, NLS.bind("Contributed context variable {0} must specify a resolver.", getName()), null)); //$NON-NLS-1$
4747
}
4848
Object object = getConfigurationElement().createExecutableExtension("resolver"); //$NON-NLS-1$
4949
if (object instanceof IDynamicVariableResolver) {
5050
fResolver = (IDynamicVariableResolver)object;
5151
} else {
52-
throw new CoreException(new Status(IStatus.ERROR, VariablesPlugin.getUniqueIdentifier(), VariablesPlugin.INTERNAL_ERROR, NLS.bind("Contributed context variable resolver for {0} must be an instance of IContextVariableResolver.",new String[]{getName()}), null)); //$NON-NLS-1$
52+
throw new CoreException(new Status(IStatus.ERROR, VariablesPlugin.getUniqueIdentifier(), VariablesPlugin.INTERNAL_ERROR, NLS.bind("Contributed context variable resolver for {0} must be an instance of IContextVariableResolver.", getName()), null)); //$NON-NLS-1$
5353
}
5454
}
5555
try {
5656
return fResolver.resolveValue(this, argument);
5757
} catch (RuntimeException e) {
58-
throw new CoreException(new Status(IStatus.ERROR, VariablesPlugin.getUniqueIdentifier(), VariablesPlugin.INTERNAL_ERROR, NLS.bind("Error while evaluating variable {0}.",new String[]{getName()}), e)); //$NON-NLS-1$
58+
throw new CoreException(new Status(IStatus.ERROR, VariablesPlugin.getUniqueIdentifier(), VariablesPlugin.INTERNAL_ERROR, NLS.bind("Error while evaluating variable {0}.", getName()), e)); //$NON-NLS-1$
5959
}
6060
}
6161

debug/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringSubstitutionEngine.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public String performStringSubstitution(String expression, boolean reportUndefin
105105
problemVariableList.append(", "); //$NON-NLS-1$
106106
}
107107
problemVariableList.setLength(problemVariableList.length()-2); //truncate the last ", "
108-
throw new CoreException(new Status(IStatus.ERROR, VariablesPlugin.getUniqueIdentifier(), VariablesPlugin.REFERENCE_CYCLE_ERROR, NLS.bind(VariablesMessages.StringSubstitutionEngine_4, new String[]{problemVariableList.toString()}), null));
108+
throw new CoreException(new Status(IStatus.ERROR, VariablesPlugin.getUniqueIdentifier(), VariablesPlugin.REFERENCE_CYCLE_ERROR, NLS.bind(VariablesMessages.StringSubstitutionEngine_4, problemVariableList.toString()), null));
109109
}
110110
}
111111

@@ -260,7 +260,7 @@ private String resolve(VariableReference var, boolean reportUndefinedVariables,
260260
if (dynamicVariable == null) {
261261
// no variables with the given name
262262
if (reportUndefinedVariables) {
263-
throw new CoreException(new Status(IStatus.ERROR, VariablesPlugin.getUniqueIdentifier(), VariablesPlugin.INTERNAL_ERROR, NLS.bind(VariablesMessages.StringSubstitutionEngine_3, new String[]{name}), null));
263+
throw new CoreException(new Status(IStatus.ERROR, VariablesPlugin.getUniqueIdentifier(), VariablesPlugin.INTERNAL_ERROR, NLS.bind(VariablesMessages.StringSubstitutionEngine_3, name), null));
264264
}
265265
// leave as is
266266
return getOriginalVarText(var);
@@ -283,7 +283,7 @@ private String resolve(VariableReference var, boolean reportUndefinedVariables,
283283
return getOriginalVarText(var);
284284
}
285285
// error - an argument specified for a value variable
286-
throw new CoreException(new Status(IStatus.ERROR, VariablesPlugin.getUniqueIdentifier(), VariablesPlugin.INTERNAL_ERROR, NLS.bind(VariablesMessages.StringSubstitutionEngine_4, new String[]{valueVariable.getName()}), null));
286+
throw new CoreException(new Status(IStatus.ERROR, VariablesPlugin.getUniqueIdentifier(), VariablesPlugin.INTERNAL_ERROR, NLS.bind(VariablesMessages.StringSubstitutionEngine_4, valueVariable.getName()), null));
287287
}
288288

289289
private String getOriginalVarText(VariableReference var) {

debug/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariableManager.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ private void loadDynamicVariables() {
223223
for (IConfigurationElement element : elements) {
224224
String name= element.getAttribute(ATTR_NAME);
225225
if (name == null) {
226-
VariablesPlugin.logMessage(NLS.bind("Variable extension missing required 'name' attribute: {0}", new String[] {element.getDeclaringExtension().getLabel()}), null); //$NON-NLS-1$
226+
VariablesPlugin.logMessage(NLS.bind("Variable extension missing required 'name' attribute: {0}", element.getDeclaringExtension().getLabel()), null); //$NON-NLS-1$
227227
continue;
228228
}
229229
String description= element.getAttribute(ATTR_DESCRIPTION);
@@ -232,8 +232,7 @@ private void loadDynamicVariables() {
232232
if (old != null) {
233233
DynamicVariable oldVariable = (DynamicVariable)old;
234234
VariablesPlugin.logMessage(NLS.bind("Dynamic variable extension from bundle ''{0}'' overrides existing extension variable ''{1}'' from bundle ''{2}''", //$NON-NLS-1$
235-
new String[] {element.getDeclaringExtension().getContributor().getName(),oldVariable.getName(),
236-
oldVariable.getConfigurationElement().getDeclaringExtension().getContributor().getName()}), null);
235+
element.getDeclaringExtension().getContributor().getName(), oldVariable.getName(), oldVariable.getConfigurationElement().getDeclaringExtension().getContributor().getName()), null);
237236
}
238237
}
239238
}
@@ -247,7 +246,7 @@ private void loadContributedValueVariables() {
247246
for (IConfigurationElement element : elements) {
248247
String name= element.getAttribute(ATTR_NAME);
249248
if (name == null) {
250-
VariablesPlugin.logMessage(NLS.bind("Variable extension missing required 'name' attribute: {0}", new String[] {element.getDeclaringExtension().getLabel()}), null); //$NON-NLS-1$
249+
VariablesPlugin.logMessage(NLS.bind("Variable extension missing required 'name' attribute: {0}", element.getDeclaringExtension().getLabel()), null); //$NON-NLS-1$
251250
continue;
252251
}
253252
String description= element.getAttribute(ATTR_DESCRIPTION);
@@ -258,8 +257,7 @@ private void loadContributedValueVariables() {
258257
if (old != null) {
259258
StringVariable oldVariable = (StringVariable)old;
260259
VariablesPlugin.logMessage(NLS.bind("Contributed variable extension from bundle ''{0}'' overrides existing extension variable ''{1}'' from bundle ''{2}''", //$NON-NLS-1$
261-
new String[] {element.getDeclaringExtension().getContributor().getName(),oldVariable.getName(),
262-
oldVariable.getConfigurationElement().getDeclaringExtension().getContributor().getName()}), null);
260+
element.getDeclaringExtension().getContributor().getName(), oldVariable.getName(), oldVariable.getConfigurationElement().getDeclaringExtension().getContributor().getName()), null);
263261
}
264262
}
265263
}
@@ -297,7 +295,7 @@ private void loadPersistedValueVariables() {
297295
if (node.getNodeType() == Node.ELEMENT_NODE) {
298296
Element element= (Element) node;
299297
if (!element.getNodeName().equals(VALUE_VARIABLE_TAG)) {
300-
VariablesPlugin.logMessage(NLS.bind("Invalid XML element encountered while loading value variables: {0}", new String[] {node.getNodeName()}), null); //$NON-NLS-1$
298+
VariablesPlugin.logMessage(NLS.bind("Invalid XML element encountered while loading value variables: {0}", node.getNodeName()), null); //$NON-NLS-1$
301299
continue;
302300
}
303301
String name= element.getAttribute(NAME_TAG);
@@ -362,7 +360,7 @@ public synchronized void addVariables(IValueVariable[] variables) throws CoreExc
362360
MultiStatus status = new MultiStatus(VariablesPlugin.getUniqueIdentifier(), VariablesPlugin.INTERNAL_ERROR, VariablesMessages.StringVariableManager_26, null);
363361
for (IValueVariable variable : variables) {
364362
if (getValueVariable(variable.getName()) != null) {
365-
status.add(new Status(IStatus.ERROR, VariablesPlugin.getUniqueIdentifier(), VariablesPlugin.INTERNAL_ERROR, NLS.bind(VariablesMessages.StringVariableManager_27, new String[]{variable.getName()}), null));
363+
status.add(new Status(IStatus.ERROR, VariablesPlugin.getUniqueIdentifier(), VariablesPlugin.INTERNAL_ERROR, NLS.bind(VariablesMessages.StringVariableManager_27, variable.getName()), null));
366364
}
367365
}
368366
if (status.isOK()) {

0 commit comments

Comments
 (0)