Bug 553514 - Ant Remote folder classes should remain at 1.6 level
Change-Id: I52591ecdef6a73654bcbe9eb61cd902ee7754aac
diff --git a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/EclipseDefaultExecutor.java b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/EclipseDefaultExecutor.java
index 309a0d8..320ca41 100644
--- a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/EclipseDefaultExecutor.java
+++ b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/EclipseDefaultExecutor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2016 IBM Corporation and others.
+ * Copyright (c) 2005, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -33,7 +33,7 @@
@SuppressWarnings("unused")
@Override
public void executeTargets(Project project, String[] targetNames) throws BuildException {
- Vector<String> v = new Vector<>();
+ Vector<String> v = new Vector<String>();
v.addAll(Arrays.asList(targetNames));
project.addReference(IAntCoreConstants.TARGET_VECTOR_NAME, v);
super.executeTargets(project, targetNames);
diff --git a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/EclipseSingleCheckExecutor.java b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/EclipseSingleCheckExecutor.java
index 5199367..4cd111f 100644
--- a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/EclipseSingleCheckExecutor.java
+++ b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/EclipseSingleCheckExecutor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2016 IBM Corporation and others.
+ * Copyright (c) 2005, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -31,7 +31,7 @@
@SuppressWarnings("unused")
@Override
public void executeTargets(Project project, String[] targetNames) throws BuildException {
- Vector<String> v = new Vector<>();
+ Vector<String> v = new Vector<String>();
v.addAll(Arrays.asList(targetNames));
project.addReference(IAntCoreConstants.TARGET_VECTOR_NAME, v);
super.executeTargets(project, targetNames);
diff --git a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/InternalAntRunner.java b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/InternalAntRunner.java
index ed46ac4..5406872 100644
--- a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/InternalAntRunner.java
+++ b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/InternalAntRunner.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
* Portions Copyright 2000-2005 The Apache Software Foundation
*
* This program and the accompanying materials are made
@@ -115,7 +115,7 @@
private boolean scriptExecuted = false;
@SuppressWarnings("unused")
- private List<String> propertyFiles = new ArrayList<>();
+ private List<String> propertyFiles = new ArrayList<String>();
/**
* The Ant InputHandler class. There may be only one input handler.
@@ -160,7 +160,7 @@
// We could be using Arrays.asList() here, but it does not specify
// what kind of list it will return. We need a list that
// implements the method List.remove(Object) and ArrayList does.
- ArrayList<String> result = new ArrayList<>(args.length);
+ ArrayList<String> result = new ArrayList<String>(args.length);
for (int i = 0; i < args.length; i++) {
result.add(args[i]);
}
@@ -262,9 +262,9 @@
Target currentTarget;
// split the targets in top-level and sub-targets depending
// on the presence of a description
- List<String> topNames = new ArrayList<>();
- List<String> topDescriptions = new ArrayList<>();
- List<String> subNames = new ArrayList<>();
+ List<String> topNames = new ArrayList<String>();
+ List<String> topDescriptions = new ArrayList<String>();
+ List<String> subNames = new ArrayList<String>();
while (ptargets.hasMoreElements()) {
currentTarget = ptargets.nextElement();
@@ -287,13 +287,13 @@
String defaultTargetName = project.getDefaultTarget();
if (defaultTargetName != null && !IAntCoreConstants.EMPTY_STRING.equals(defaultTargetName)) { // shouldn't need to check but...
- List<String> defaultName = new ArrayList<>(1);
+ List<String> defaultName = new ArrayList<String>(1);
List<String> defaultDesc = null;
defaultName.add(defaultTargetName);
int indexOfDefDesc = topNames.indexOf(defaultTargetName);
if (indexOfDefDesc >= 0) {
- defaultDesc = new ArrayList<>(1);
+ defaultDesc = new ArrayList<String>(1);
defaultDesc.add(topDescriptions.get(indexOfDefDesc));
}
printTargets(project, defaultName, defaultDesc, RemoteAntMessages.getString("InternalAntRunner.Default_target__3"), maxLength); //$NON-NLS-1$
@@ -450,7 +450,7 @@
System.setSecurityManager(new AntSecurityManager(originalSM, Thread.currentThread()));
if (targets == null) {
- targets = new Vector<>(1);
+ targets = new Vector<String>(1);
}
if (targets.isEmpty() && getCurrentProject().getDefaultTarget() != null) {
targets.add(getCurrentProject().getDefaultTarget());
@@ -797,7 +797,7 @@
throw new BuildException(RemoteAntMessages.getString("InternalAntRunner.You_must_specify_a_classname_when_using_the_-listener_argument_1")); //$NON-NLS-1$
}
if (buildListeners == null) {
- buildListeners = new ArrayList<>(1);
+ buildListeners = new ArrayList<String>(1);
}
buildListeners.add(arg);
arg = getArgument(commands, "-listener"); //$NON-NLS-1$
@@ -956,7 +956,7 @@
String arg = getArgument(commands, "-eclipseTask"); //$NON-NLS-1$
while (arg != null) {
if (eclipseSpecifiedTasks == null) {
- eclipseSpecifiedTasks = new HashMap<>();
+ eclipseSpecifiedTasks = new HashMap<String, String>();
}
int index = arg.indexOf(',');
if (index != -1) {
@@ -970,7 +970,7 @@
arg = getArgument(commands, "-eclipseType"); //$NON-NLS-1$
while (arg != null) {
if (eclipseSpecifiedTypes == null) {
- eclipseSpecifiedTypes = new HashMap<>();
+ eclipseSpecifiedTypes = new HashMap<String, String>();
}
int index = arg.indexOf(',');
if (index != -1) {
@@ -1020,7 +1020,7 @@
@SuppressWarnings("unused")
private void processTargets(List<String> commands) {
if (targets == null) {
- targets = new Vector<>(commands.size());
+ targets = new Vector<String>(commands.size());
}
for (String string : commands) {
targets.add(string);
@@ -1115,7 +1115,7 @@
continue;
}
if (userProperties == null) {
- userProperties = new HashMap<>();
+ userProperties = new HashMap<String, String>();
}
userProperties.put(name, value);
commands.remove(args[i]);
@@ -1295,7 +1295,7 @@
filename, e.getMessage() });
}
if (userProperties == null) {
- userProperties = new HashMap<>();
+ userProperties = new HashMap<String, String>();
}
Enumeration<?> propertyNames = props.propertyNames();
while (propertyNames.hasMoreElements()) {
diff --git a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/RemoteAntDebugBuildLogger.java b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/RemoteAntDebugBuildLogger.java
index 129dcb6..25ce3cf 100644
--- a/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/RemoteAntDebugBuildLogger.java
+++ b/ant/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/RemoteAntDebugBuildLogger.java
@@ -366,7 +366,7 @@
@SuppressWarnings("unused")
protected void addBreakpoint(String breakpointRepresentation) {
if (fBreakpoints == null) {
- fBreakpoints = new ArrayList<>();
+ fBreakpoints = new ArrayList<RemoteAntBreakpoint>();
}
RemoteAntBreakpoint newBreakpoint = new RemoteAntBreakpoint(breakpointRepresentation);
if (!fBreakpoints.contains(newBreakpoint)) {