Reports on declarations of Collection variables made by using the collection class as the type, rather than an appropriate interface.
Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
import java.awt.event.KeyEvent;
import java.io.IOException;
import java.util.ArrayList;
+import java.util.List;
import java.util.Vector;
import javax.swing.Box;
private EditorAdapter editor = null;
private BasicEditor basicEditor = null;
- private ArrayList<EditorListener> editorListeners = new ArrayList<>();
+ private List<EditorListener> editorListeners = new ArrayList<>();
private Vector<EditorAdapter> editors = new Vector<>();
private JPanel editor_panel = null;
private Box editors_box = Box.createVerticalBox();
}
}
if (0 < toAdd.size()) {
- ArrayList<String> both = new ArrayList<>(configClasspath.size() + toAdd.size());
+ List<String> both = new ArrayList<>(configClasspath.size() + toAdd.size());
both.addAll(configClasspath);
both.addAll(toAdd);
config.setClasspath(both);
// private String buildConfigFilePath = null;
private final NavigationHistoryModel historyModel = new NavigationHistoryModel();
- private final ArrayList structureViews = new ArrayList();
+ private final List structureViews = new ArrayList();
private FileStructureView defaultFileView = null;
private static final StructureViewProperties DEFAULT_VIEW_PROPERTIES;
import java.awt.BorderLayout;
//import java.awt.event.ActionEvent;
import java.util.ArrayList;
+import java.util.List;
import javax.swing.JButton;
import javax.swing.JCheckBox;
public PointcutWizard(java.util.List signatures) {
// this.signatures = signatures;
- ArrayList views = new ArrayList();
+ List views = new ArrayList();
views.add(StructureViewProperties.Hierarchy.INHERITANCE);
// typeTreeView = new BrowserViewPanel(AjdeUIManager.getDefault().getIconRegistry(), views, StructureViewProperties.Hierarchy.INHERITANCE);
*/
class JavadocRunner {
- public static void callJavadocViaToolProvider(Vector<String> options, List<String> files) {
+ public static void callJavadocViaToolProvider(Iterable<String> options, List<String> files) {
DocumentationTool doctool = ToolProvider.getSystemDocumentationTool();
StandardJavaFileManager fm = doctool.getStandardFileManager(null, null, null);
Iterable<? extends JavaFileObject> jfos = fm.getJavaFileObjects(files.toArray(new String[0]));
* package-summary properly.
*/
private static void packageHTML(AsmManager model, File[] inputFiles) throws IOException {
- ArrayList<String> dirList = new ArrayList<>();
+ List<String> dirList = new ArrayList<>();
for (File inputFile : inputFiles) {
String packageName = StructureUtil.getPackageDeclarationFromFile(model, inputFile);
// Only copy the package.html file once.
import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
import org.aspectj.asm.AsmManager;
import org.aspectj.asm.IProgramElement;
*/
class StubFileGenerator {
- static Hashtable declIDTable = null;
+ static Map declIDTable = null;
static void doFiles(AsmManager model, Hashtable table, File[] inputFiles, File[] signatureFiles) throws DocException {
declIDTable = table;
return null;
} else {
IProgramElement fileNode = node;
- ArrayList<IProgramElement> peNodes = new ArrayList<>();
+ List<IProgramElement> peNodes = new ArrayList<>();
getAllStructureChildren(fileNode, peNodes, showSubMember, showMemberAndType);
for (IProgramElement peNode : peNodes) {
List<IProgramElement> entries = new ArrayList<>();
public boolean removeFromFileMap(String canonicalFilePath);
- public void setFileMap(HashMap<String, IProgramElement> fileMap);
+ public void setFileMap(Map<String, IProgramElement> fileMap);
+
+ public default void setFileMap(HashMap<String, IProgramElement> fileMap) {
+ setFileMap((Map<String, IProgramElement>) fileMap);
+ }
public Object findInFileMap(Object key);
return fileMap.remove(canonicalFilePath) != null;
}
- public void setFileMap(HashMap<String, IProgramElement> fileMap) {
+ public void setFileMap(Map<String, IProgramElement> fileMap) {
this.fileMap = fileMap;
}
protected String name;
protected Type type;
protected ConstantPool cp;
- private ArrayList<Attribute> attributeList = new ArrayList<>();
- protected ArrayList<AnnotationGen> annotationList = new ArrayList<>();
+ private List<Attribute> attributeList = new ArrayList<>();
+ protected List<AnnotationGen> annotationList = new ArrayList<>();
protected FieldGenOrMethodGen() {
}
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Set;
+import java.util.*;
import org.aspectj.apache.bcel.Constants;
import org.aspectj.apache.bcel.classfile.Constant;
return;
}
- ArrayList<InstructionHandle> target_vec = new ArrayList<>();
+ List<InstructionHandle> target_vec = new ArrayList<>();
for (InstructionHandle ih = first; ih != null; ih = ih.next) {
ih.getInstruction().dispose(); // e.g. BranchInstructions release their targets
*/
public Instruction[] getInstructions() {
ByteSequence bytes = new ByteSequence(getByteCode());
- ArrayList<Instruction> instructions = new ArrayList<>();
+ List<Instruction> instructions = new ArrayList<>();
try {
while (bytes.available() > 0) {
* <http://www.apache.org/>.
*/
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Stack;
+import java.util.*;
import org.aspectj.apache.bcel.Constants;
import org.aspectj.apache.bcel.classfile.Attribute;
private int highestLineNumber = 0;
- private ArrayList<LocalVariableGen> localVariablesList = new ArrayList<>();
- private ArrayList<LineNumberGen> lineNumbersList = new ArrayList<>();
+ private List<LocalVariableGen> localVariablesList = new ArrayList<>();
+ private List<LineNumberGen> lineNumbersList = new ArrayList<>();
private ArrayList<CodeExceptionGen> exceptionsList = new ArrayList<>();
private ArrayList<String> exceptionsThrown = new ArrayList<>();
- private ArrayList<Attribute> codeAttributesList = new ArrayList<>();
+ private List<Attribute> codeAttributesList = new ArrayList<>();
private List<AnnotationGen>[] param_annotations; // Array of lists containing AnnotationGen objects
private boolean hasParameterAnnotations = false;
private boolean haveUnpackedParameterAnnotations = false;
static final class BranchStack {
Stack<BranchTarget> branchTargets = new Stack<>();
- Hashtable<InstructionHandle, BranchTarget> visitedTargets = new Hashtable<>();
+ Map<InstructionHandle, BranchTarget> visitedTargets = new Hashtable<>();
public void push(InstructionHandle target, int stackDepth) {
if (visited(target)) {
import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributeView;
import java.nio.file.attribute.BasicFileAttributes;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.StringTokenizer;
+import java.util.*;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
public ClassPath(String class_path) {
this.class_path = class_path;
- ArrayList<PathEntry> vec = new ArrayList<>();
+ List<PathEntry> vec = new ArrayList<>();
for (StringTokenizer tok = new StringTokenizer(class_path, System.getProperty("path.separator")); tok
.hasMoreTokens();) {
return false;
}
- private static final void getPathComponents(String path, ArrayList<String> list) {
+ private static final void getPathComponents(String path, List<String> list) {
if (path != null) {
StringTokenizer tok = new StringTokenizer(path, File.pathSeparator);
// Build a RV annotation of type 'SimpleAnnotation' with 'id=4' as the only value :)
AnnotationGen a = new AnnotationGen(t, elements, true, cp);
- Vector<AnnotationGen> v = new Vector<>();
+ List<AnnotationGen> v = new Vector<>();
v.add(a);
Collection<RuntimeAnnos> attributes = Utility.getAnnotationAttributes(cp, v);
boolean foundRV = false;
// Build a RIV annotation of type 'SimpleAnnotation' with 'id=4' as the only value :)
AnnotationGen a2 = new AnnotationGen(t, elements, false, cp);
- Vector<AnnotationGen> v2 = new Vector<>();
+ List<AnnotationGen> v2 = new Vector<>();
v2.add(a2);
Collection<RuntimeAnnos> attributes2 = Utility.getAnnotationAttributes(cp, v2);
boolean foundRIV = false;
package org.aspectj.apache.bcel.classfile.tests;
import java.util.ArrayList;
+import java.util.List;
import org.aspectj.apache.bcel.Constants;
import org.aspectj.apache.bcel.classfile.Attribute;
* @return Array of argument types
*/
public static final String[] methodSignatureArgumentTypes(String signature,boolean chopit) throws ClassFormatException {
- ArrayList<String> vec = new ArrayList<>();
+ List<String> vec = new ArrayList<>();
int index;
String[] types;
/** messages accumulated */
protected final ArrayList<IMessage> messages;
/** kinds of messages to be ignored */
- protected final ArrayList<IMessage.Kind> ignoring;
+ protected final List<IMessage.Kind> ignoring;
/** result of handleMessage(..) for messages not accumulated (ignored) */
protected boolean handleMessageResult;
/** listener which can halt processing by returning true */
if (null == kind) {
return messages;
}
- ArrayList<IMessage> result = new ArrayList<>();
+ List<IMessage> result = new ArrayList<>();
for (IMessage message : messages) {
if (kind == message.getKind()) {
result.add(message);
* Returns a string description of what the compiler/weaver is currently doing
*/
public static String getCurrentContext() {
- Stack<ContextStackEntry> contextStack = getContextStack();
+ Iterable<ContextStackEntry> contextStack = getContextStack();
Stack<String> explanationStack = new Stack<>();
for (ContextStackEntry entry : contextStack) {
Object data = entry.getData();
*
* @return true if this line has end-of-comment
*/
- private static boolean checkLine(String line, ArrayList<String> years) {
+ private static boolean checkLine(String line, List<String> years) {
if ((null == line) || (0 == line.length())) {
return false;
}
private final File tempDir;
- private final ArrayList tempFiles;
+ private final List tempFiles;
private final boolean useEclipseCompiles;
return buildProduct(buildSpec);
}
Result result = specifyResultFor(buildSpec);
- ArrayList<String> errors = new ArrayList<>();
+ List<String> errors = new ArrayList<>();
try {
return buildAll(result, errors);
} finally {
*/
protected final boolean buildAll(Result result, List<String> errors) {
Result[] buildList = skipUptodate(getAntecedantResults(result));
- ArrayList<String> doneList = new ArrayList<>();
+ List<String> doneList = new ArrayList<>();
if ((null != buildList) && (0 < buildList.length)) {
if (isLogging()) {
handler.log("modules to build: " + Arrays.asList(buildList));
}
protected final boolean buildProductModule(ProductModule module) {
- ArrayList<String> errors = new ArrayList<>();
+ List<String> errors = new ArrayList<>();
try {
Kind productKind = Result.kind(Result.NORMAL, Result.ASSEMBLE);
Result result = module.module.getResult(productKind);
* deliverables.
*/
protected ProductModule[] discoverModules(File productDir, Modules modules) {
- final ArrayList<File> found = new ArrayList<>();
+ final List<File> found = new ArrayList<>();
FileFilter filter = new FileFilter() {// empty jar files
public boolean accept(File file) {
if ((null != file) && file.canRead()
/** @return all source files under srcDir */
private static Iterator<File> sourceFiles(File srcDir) {
- ArrayList<File> result = new ArrayList<>();
+ List<File> result = new ArrayList<>();
sourceFiles(srcDir, result);
return result.iterator();
}
/** @return List (File) of jar's required */
public List<File> findJarRequirements() {
- ArrayList<File> result = new ArrayList<>();
+ List<File> result = new ArrayList<>();
Module.doFindJarRequirements(this, result);
return result;
}
}
List<Sample> getSortedSamples(Comparator<Sample> comparer) {
- ArrayList<Sample> result = new ArrayList<>(samples);
+ List<Sample> result = new ArrayList<>(samples);
result.sort(comparer);
return result;
}
/** unmodifiable list of all valid OSGIBundle Name's */
public static final List<Name> NAMES;
static {
- ArrayList<Name> names = new ArrayList<>();
+ List<Name> names = new ArrayList<>();
names.add(BUNDLE_NAME);
names.add(BUNDLE_SYMBOLIC_NAME);
names.add(BUNDLE_VERSION);
*/
static class UnknownFileCheck implements FileFilter {
private static final UnknownFileCheck SINGLETON = new UnknownFileCheck();
- private static final ArrayList<String> STATIC_ERRORS = new ArrayList<>();
+ private static final List<String> STATIC_ERRORS = new ArrayList<>();
// Builder.BINARY_SOURCE_PATTERN and Builder.RESOURCE_PATTERN
public static final List<String> KNOWN_SUFFIXES;
import java.io.File;
import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Enumeration;
-import java.util.Iterator;
+import java.util.*;
import java.util.zip.ZipEntry;
import java.util.zip.ZipException;
import java.util.zip.ZipFile;
}
}
- ArrayList<File> tempFiles = new ArrayList<>();
+ List<File> tempFiles = new ArrayList<>();
private File jarDir;
private boolean deleteJars;
boolean building; // must be enabled for tests to run
try {
zipFile = new ZipFile(weaverAllJar);
Enumeration e = zipFile.entries();
- ArrayList<String> entryNames = new ArrayList<>();
+ List<String> entryNames = new ArrayList<>();
while (e.hasMoreElements()) {
ZipEntry entry = (ZipEntry) e.nextElement();
String name = entry.getName();
}
}
- ArrayList<File> tempFiles = new ArrayList<>();
+ List<File> tempFiles = new ArrayList<>();
public ModulesTest(String name) {
super(name);
}
public void testAllModulesCreation() {
- ArrayList<Module> badModules = new ArrayList<>();
+ List<Module> badModules = new ArrayList<>();
for (String name: MODULE_NAMES) {
File dir = new File(BASE_DIR, name);
if (dir.isDirectory()) {
unparsedArgs.add(nextArg.getValue());
}
- private int indexOf(LinkedList<Arg> args, String arg) {
+ private int indexOf(Iterable<Arg> args, String arg) {
int index = 0;
for (Arg argument : args) {
if (arg.equals(argument.getValue())) {
}
public static List getAjSyntheticAttribute() {
- ArrayList ret = new ArrayList(1);
+ List ret = new ArrayList(1);
ret.add(new EclipseAttributeAdapter(new AjAttribute.AjSynthetic()));
return ret;
}
private List<String> classpath = new ArrayList<>();
private List<String> modulepath = new ArrayList<>();
// Expensive to compute (searching modules, parsing module-info)
- private ArrayList<Classpath> modulepathClasspathEntries = null;
+ private Collection<Classpath> modulepathClasspathEntries = null;
private List<String> modulesourcepath = new ArrayList<>();
// Expensive to compute (searching modules, parsing module-info)
- private ArrayList<Classpath> modulesourcepathClasspathEntries = null;
+ private Collection<Classpath> modulesourcepathClasspathEntries = null;
private Classpath[] checkedClasspaths = null;
private List<String> bootclasspath = new ArrayList<>();
private List<String> cpElementsWithModifiedContents = new ArrayList<>();
import java.io.PrintStream;
import java.io.PrintWriter;
import java.util.ArrayList;
+import java.util.List;
import java.util.ListIterator;
import junit.framework.TestCase;
*/
public class AjdtCommandTestCase extends TestCase {
- private ArrayList tempFiles = new ArrayList();
+ private List tempFiles = new ArrayList();
private StreamPrintWriter outputWriter = new StreamPrintWriter(new PrintWriter(System.out));
// private AjdtCommand command = new AjdtCommand();
private MessageWriter messageWriter = new MessageWriter(outputWriter, false);
if (null == targetClasses) {
return false;
}
- final ArrayList<File> files = new ArrayList<>();
+ final List<File> files = new ArrayList<>();
final FileFilter collector = new FileFilter() {
@Override
public boolean accept(File file) {
final ICommand compiler =
ReflectionFactory.makeCommand(cname, handler);
- ArrayList recompiled = null;
+ List recompiled = null;
boolean result = true;
final String toSuffix = ".java";
List<String> normalizeFilenames(String[] ra) { // XXX util
- ArrayList<String> result = new ArrayList<>();
+ List<String> result = new ArrayList<>();
if (null != ra) {
for (String s : ra) {
result.add(normalizeFilename(s));
/** @param list the List of File */
List<String> normalizeFilenames(List<File> list) { // XXX util
- ArrayList<String> result = new ArrayList<>();
+ List<String> result = new ArrayList<>();
for (File file: list) {
// for (Iterator<?> iter = list.iterator(); iter.hasNext();) {
result.add(normalizeFilename(file.getPath()));
private void checkJLS3(String source, String expectedOutput) {
ASTParser parser = ASTParser.newParser(AST.JLS3);
- HashMap<String,String> options = new HashMap<>();
+ Map<String,String> options = new HashMap<>();
options.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_5);
parser.setCompilerOptions(options);
parser.setSource(source.toCharArray());
private List<String >tokenizeCommand(String command) {
StringTokenizer st = new StringTokenizer(command," ", false);
- ArrayList<String> arguments = new ArrayList<>();
+ List<String> arguments = new ArrayList<>();
while(st.hasMoreElements()){
String nextToken =st.nextToken();
arguments.add(nextToken);
package org.aspectj.tools.ajc;
import java.util.ArrayList;
+import java.util.List;
import java.util.ResourceBundle;
import org.aspectj.bridge.AbortException;
public class MainTest extends AjcTestCase {
public void testMainbare() {
- ArrayList<String> list = new ArrayList<>();
+ List<String> list = new ArrayList<>();
// Usage now printed by Eclipse compiler so doesn't appear here in our message list
// Main.bareMain(new String[] {"-help"}, false, list, null, null, null);
// assertTrue(1 == list.size());
this.shouldConcretizeIfNeeded = shouldConcretizeIfNeeded;
}
- private final Hashtable<String, Object> cflowFields = new Hashtable<>();
- private final Hashtable<String, Object> cflowBelowFields = new Hashtable<>();
+ private final Map<String, Object> cflowFields = new Hashtable<>();
+ private final Map<String, Object> cflowBelowFields = new Hashtable<>();
// public void addConcreteShadowMungers(Collection c) {
// shadowMungers.addAll(c);
* ??? This method is O(N*M) where N = number of methods and M is number of inter-type declarations in my super
*/
public List<ConcreteTypeMunger> getInterTypeMungersIncludingSupers() {
- ArrayList<ConcreteTypeMunger> ret = new ArrayList<>();
+ List<ConcreteTypeMunger> ret = new ArrayList<>();
collectInterTypeMungers(ret);
return ret;
}
public List<ConcreteTypeMunger> getInterTypeParentMungersIncludingSupers() {
- ArrayList<ConcreteTypeMunger> ret = new ArrayList<>();
+ List<ConcreteTypeMunger> ret = new ArrayList<>();
collectInterTypeParentMungers(ret);
return ret;
}
// }
List extractArguments() {
- ArrayList result = new ArrayList();
+ List result = new ArrayList();
String[] cmds = command.getArguments();
if (!LangUtil.isEmpty(cmds)) {
result.addAll(Arrays.asList(cmds));
import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;
+import java.util.List;
import junit.framework.TestCase;
*/
public class Ajc11CompilerAdapterTest extends TestCase {
public static boolean LOGGING = false;
- ArrayList tempFiles = new ArrayList();
+ List tempFiles = new ArrayList();
public Ajc11CompilerAdapterTest(String name) {
super(name);
private static String[] diffIgnoreDups(Collection<String> set, String[] expected, String msg,
boolean ignoreDups) {
ArrayList<String> result = new ArrayList<>();
- ArrayList<String> actual = new ArrayList<>(set);
+ List<String> actual = new ArrayList<>(set);
BitSet hits = new BitSet();
for (int i = 0; i < expected.length; i++) {
if (!actual.remove(expected[i])) {
* @author isberg
*/
public static class MyTestReporter implements IMessageHandler {
- public ArrayList<IMessage> failures = new ArrayList<>();
- public ArrayList<IMessage> passes = new ArrayList<>();
+ public List<IMessage> failures = new ArrayList<>();
+ public List<IMessage> passes = new ArrayList<>();
public void clear() {
failures.clear();
/** just don't say anything! */
protected boolean silentHarness;
- private HashMap<String,Feature> features;
+ private Map<String,Feature> features;
/** if true, do not delete temporary files. */
private boolean keepTemp;
LangUtil.throwIaxIfFalse(!LangUtil.isEmpty(args), "empty args");
// read arguments
final ArrayList<String> globals = new ArrayList<>();
- final ArrayList<String> files = new ArrayList<>();
+ final List<String> files = new ArrayList<>();
final LinkedList<String> argList = new LinkedList<>(Arrays.asList(args));
for (int i = 0; i < argList.size(); i++) {
String arg = argList.get(i);
/** print known aliases at the end of the syntax message */
protected void printAliases(PrintStream out) {
LangUtil.throwIaxIfNull(out, "out");
- Properties props = getOptionAliases();
+ Map props = getOptionAliases();
if (null == props) {
return;
}
"-junit" + OPTION_DELIM + "-ajctestSkipKeywords=knownLimitation,purejava"
};
static {
- Properties optionAliases = Harness.getOptionAliases();
+ Map optionAliases = Harness.getOptionAliases();
if (null != optionAliases) {
for (int i = 1; i < ALIASES.length; i += 2) {
optionAliases.put(ALIASES[i-1], ALIASES[i]);
}
public Harness.RunResult run(AjcTest.Suite.Spec spec) {
- ArrayList<IRunSpec> kids = spec.getChildren();
+ Iterable<IRunSpec> kids = spec.getChildren();
for (IRunSpec iRunSpec : kids) {
makeTest( (AjcTest.Spec) iRunSpec);
}
private boolean skipAll;
protected String xmlElementName; // nonfinal only for clone()
- protected final ArrayList<String> keywords;
+ protected final List<String> keywords;
protected final IMessageHolder /* IMessage */messages;
protected final ArrayList<String> options;
protected final ArrayList<String> paths;
}
}
- public ArrayList<String> getKeywordsList() {
+ public List<String> getKeywordsList() {
return makeList(keywords);
}
// --------------- (String) paths
/** @return ArrayList of String paths */
- public ArrayList<String> getPathsList() {
+ public List<String> getPathsList() {
return makeList(paths);
}
sameDirChangesList(lhs.dirChanges, rhs.dirChanges, a);
}
- public static void sameDirChangesList(ArrayList<DirChanges.Spec> lhs, ArrayList<DirChanges.Spec> rhs, Assert a) {
+ public static void sameDirChangesList(List<DirChanges.Spec> lhs, List<DirChanges.Spec> rhs, Assert a) {
if ((null == lhs) && (null == rhs)) {
return;
}
* @return the unmodifiable List of titles (maybe empty, never null)
*/
private static List<String> parseTitlesList(String titlesList) {
- ArrayList<String> result = new ArrayList<>();
+ List<String> result = new ArrayList<>();
String last = null;
StringTokenizer st = new StringTokenizer(titlesList, ",");
while (st.hasMoreTokens()) {
* @return the unmodifiable List of titles (maybe empty, never null)
*/
private static List<String> readTitlesFile(File titlesFile, boolean fail) {
- ArrayList<String> result = new ArrayList<>();
+ List<String> result = new ArrayList<>();
Reader reader = null;
try {
reader = new FileReader(titlesFile);
private static String updateBootclasspathForSourceVersion(
String sourceVersion,
String compilerName,
- ArrayList toAdd) {
+ List toAdd) {
if (null == sourceVersion) {
return null;
}
String seek;
/** if setup completed, this has the combined global/local options */
- ArrayList commandOptions;
+ List commandOptions;
public Object clone() {
TestSetup testSetup = new TestSetup();
boolean fastFail;
/** relative paths (String) of expected files added */
- final ArrayList<String> added;
+ final List<String> added;
/** relative paths (String) of expected files removed/deleted */
- final ArrayList<String> removed;
+ final List<String> removed;
/** relative paths (String) of expected files updated/changed */
- final ArrayList<String> updated;
+ final List<String> updated;
/** relative paths (String) of expected files NOT
* added, removed, or changed
* XXX unchanged unimplemented
*/
- final ArrayList<String> unchanged;
+ final List<String> unchanged;
public Spec() {
added = new ArrayList<>();
throw new AbortException("expected sources at " + reader);
}
- ArrayList<Message> exp = new ArrayList<>();
+ List<Message> exp = new ArrayList<>();
// !compile || noerrors || className {runOption..}
String first = words[0];
if ("!compile".equals(first)) {
result.description = input;
ArrayList<String> newOptions = new ArrayList<>();
- ArrayList<String> optionsCopy = result.getOptionsList();
+ Iterable<String> optionsCopy = result.getOptionsList();
for (String option: optionsCopy) {
if (option.startsWith("-")) {
newOptions.add("!" + option.substring(1));
*/
private List<Message> makeMessages(// XXX weak - also support expected exceptions, etc.
Kind kind, String[] words, int start, File lastFile) {
- ArrayList<Message> result = new ArrayList<>();
+ List<Message> result = new ArrayList<>();
for (int i = start; i < words.length; i++) {
ISourceLocation sl =
BridgeUtil.makeSourceLocation(words[i], lastFile);
&& FileUtil.canReadFile(F_aspectjrt_jar)
&& FileUtil.canReadFile(J2SE13_RTJAR)
&& FileUtil.canReadFile(J2SE14_RTJAR));
- HashMap map = new HashMap();
+ Map map = new HashMap();
map.put("1.2", "java.lang.ref.Reference");
map.put("1.3", "java.lang.reflect.Proxy");
map.put("1.4", "java.nio.Buffer");
addItems(classesRemoved, items);
}
- private void addItems(ArrayList list, String items) {
+ private void addItems(List list, String items) {
if (null != items) {
String[] classes = XMLWriter.unflattenList(items);
if (!LangUtil.isEmpty(classes)) {
package org.aspectj.testing.harness.bridge;
import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.ListIterator;
-import java.util.Stack;
+import java.util.*;
import org.aspectj.bridge.AbortException;
import org.aspectj.bridge.IMessage;
private final Stack<IMessageHandler> handlers;
/** list of File registered for deletion on demand */
- private final ArrayList<File> tempFiles; // deleteTempFiles requires ListIterator.remove()
+ private final List<File> tempFiles; // deleteTempFiles requires ListIterator.remove()
/** list of Sandboxes registered for cleanup on demand */
- private final ArrayList<Sandbox> sandboxes;
+ private final List<Sandbox> sandboxes;
/** if true, throw AbortException on failure */
boolean abortOnFailure;
import java.util.ArrayList;
import java.util.Iterator;
+import java.util.List;
/**
* Aggregate listeners into one and run synchronously in order added.
*/
public class RunListeners extends RunListener implements IRunListener {
- ArrayList listeners;
+ List listeners;
public RunListeners() {
listeners = new ArrayList();
}
import java.io.File;
import java.util.ArrayList;
+import java.util.List;
import org.aspectj.bridge.IMessageHolder;
import org.aspectj.bridge.MessageHandler;
public class AjcTaskCompileCommandTest extends TestCase {
static boolean loggedWarning = false;
static boolean runAllTests = true;
- static ArrayList<File> tempFiles = new ArrayList<>();
+ static List<File> tempFiles = new ArrayList<>();
private static File getClassesDir() {
File tempDir = FileUtil.getTempDir("AjcTaskCompileCommandTest-classes");
return tempDir;
}
- private static void addCommonArgs(ArrayList<String> list) {
+ private static void addCommonArgs(List<String> list) {
list.add("-d");
list.add(getClassesDir().getAbsolutePath());
list.add("-classpath");
IMessage[] actual,
IMessage.Kind[] ignoreExpectedKinds,
IMessage.Kind[] ignoreActualKinds) {
- ArrayList exp = getExcept(expected, ignoreExpectedKinds);
- ArrayList act = getExcept(actual, ignoreActualKinds);
+ List exp = getExcept(expected, ignoreExpectedKinds);
+ List act = getExcept(actual, ignoreActualKinds);
ArrayList missing = new ArrayList();
List unexpected = new ArrayList();
} else {
ListIterator expectedIterator = exp.listIterator();
int lastLine = Integer.MIN_VALUE + 1;
- ArrayList expectedFound = new ArrayList();
- ArrayList expectedForLine = new ArrayList();
+ List expectedFound = new ArrayList();
+ List expectedForLine = new ArrayList();
for (ListIterator iter = act.listIterator(); iter.hasNext();) {
IMessage actualMessage = (IMessage) iter.next();
int actualLine = getLine(actualMessage);
import java.io.StringWriter;
import java.net.MalformedURLException;
import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.Vector;
+import java.util.*;
import java.util.jar.Attributes;
import java.util.jar.JarOutputStream;
import java.util.jar.Manifest;
final boolean checkExpected = !LangUtil.isEmpty(expectedPaths);
// normalize sources to ignore
- final ArrayList expected = (!checkExpected ? null : new ArrayList());
+ final List expected = (!checkExpected ? null : new ArrayList());
if (checkExpected) {
for (String srcPath : expectedPaths) {
if (!LangUtil.isEmpty(srcPath)) {
return false;
}
};
- ArrayList unexp = new ArrayList(Arrays.asList(dir.listFiles(touchedCollector)));
+ List unexp = new ArrayList(Arrays.asList(dir.listFiles(touchedCollector)));
// report any unexpected changes
return Diffs.makeDiffs(label, expected, unexp, String.CASE_INSENSITIVE_ORDER);
* @see Util#combine(Object[], Object[])
*/
public static String[] combine(String[] one, String[] two) {
- ArrayList twoList = new ArrayList(org.aspectj.util.LangUtil.arrayAsList(two));
+ List twoList = new ArrayList(org.aspectj.util.LangUtil.arrayAsList(two));
ArrayList result = new ArrayList();
if (null != one) {
for (String s : one) {
return;
}
- ArrayList expected = new ArrayList(expectedListIn);
+ List expected = new ArrayList(expectedListIn);
expected.sort(comparator);
- ArrayList actual = new ArrayList(actualListIn);
+ List actual = new ArrayList(actualListIn);
actual.sort(comparator);
Iterator actualIter = actual.iterator();
Object act = null;
void checkUnflatten(FTest test) {
String[] exp = test.unflattened;
- ArrayList result = LangUtil.unflatten(test.toUnflatten, test.spec);
+ List result = LangUtil.unflatten(test.toUnflatten, test.spec);
String label = test + " -> " + result;
assertNotNull(label, result);
public void testArrayList() {
- ArrayList l = new ArrayList();
+ List l = new ArrayList();
l.add(null);
l.add(null);
assertTrue(null == l.get(0));
if (unmodifiable) {
return Collections.unmodifiableList(Arrays.asList(ra));
} else {
- ArrayList list = new ArrayList(Arrays.asList(ra));
+ List list = new ArrayList(Arrays.asList(ra));
return list;
}
}
/** check both hard and soft - assuming list contain String */
void checkDiff(List expected, List actual, List missing, List extra) {
- ArrayList extraOut = new ArrayList();
- ArrayList missingOut = new ArrayList();
+ List extraOut = new ArrayList();
+ List missingOut = new ArrayList();
LangUtil.makeDiffs(expected, actual, missingOut, extraOut);
checkSame(missing, missingOut);
checkSame(extra, extraOut);
/** check only soft - assuming list contain String */
void checkDiffSoft(List expected, List actual, List missing, List extra) {
- ArrayList extraOut = new ArrayList();
- ArrayList missingOut = new ArrayList();
+ List extraOut = new ArrayList();
+ List missingOut = new ArrayList();
LangUtil.makeSoftDiffs(expected, actual, missingOut, extraOut,
String.CASE_INSENSITIVE_ORDER);
checkSameSoft(missing, missingOut);
String label = one + "?=" + two;
assertTrue(label, (null == one) == (null == two));
if (null != one) {
- ArrayList aone = new ArrayList(one);
- ArrayList atwo = new ArrayList();
+ List aone = new ArrayList(one);
+ List atwo = new ArrayList();
aone.addAll(two);
Collections.sort(aone);
Collections.sort(atwo);
private final Messages messages;
private final HTMLEditorKit.Parser parser; // XXX untested - stateful
- private final ArrayList<Link> linksToCheck;
- private final ArrayList<String> checkedUrls; // String (URL.toString)
- private final ArrayList<String> validRefs; // String (URL.toString)
- private final ArrayList<String> refsToCheck; // String (URL.toString)
+ private final List<Link> linksToCheck;
+ private final List<String> checkedUrls; // String (URL.toString)
+ private final List<String> validRefs; // String (URL.toString)
+ private final List<String> refsToCheck; // String (URL.toString)
private final Link.Check checkExists;
private final Link.Check checkContents;
}
public synchronized void run() {
- ArrayList<Link> list = new ArrayList<>();
+ List<Link> list = new ArrayList<>();
while (0 < linksToCheck.size()) {
messages.checkingLinks(linksToCheck.size());
list.clear();
List getSampleMessageTexts() {
if (null == messageTexts) {
- ArrayList result = new ArrayList(Arrays.asList(new String[]
+ List result = new ArrayList(Arrays.asList(new String[]
{"one", "two", "now is the time for all good men..."}));
messageTexts = result;
}
List getSampleExceptions() {
if (null == exceptions) {
- ArrayList result = new ArrayList();
+ List result = new ArrayList();
int i = 1;
result.add(new Error("Error " + i++));
result.add(new RuntimeException("RuntimeException " + i++));
List getSampleLocations() {
if (null == locations) {
- ArrayList result = new ArrayList();
+ List result = new ArrayList();
File file = new File("testsrc/org/aspectj/testing/util/MessageUtilTest.java");
result.add(new SourceLocation(file, 1, 2, 1));
result.add(new SourceLocation(file, 100, 100, 0));
super(urls);
this.urlsForDebugString = urls;
LangUtil.throwIaxIfComponentsBad(dirs, "dirs", null);
- ArrayList dcopy = new ArrayList();
+ List dcopy = new ArrayList();
if (!LangUtil.isEmpty(dirs)) {
dcopy.addAll(Arrays.asList(dirs));
Diffs tests = Diffs.makeDiffs("tests", exp, act, TestResult.BY_NAME);
// remove missing/unexpected (removed, added) tests from results
// otherwise, unexpected-[pass|fail] look like [fixes|broken]
- ArrayList expResults = trimByName(exp, tests.missing);
- ArrayList actResults = trimByName(act, tests.unexpected);
+ List expResults = trimByName(exp, tests.missing);
+ List actResults = trimByName(act, tests.unexpected);
Diffs results = Diffs.makeDiffs("results", expResults, actResults, TestResult.BY_PASSNAME);
/** split input List by whether the TestResult element passed or failed */
- private static void split(List input, ArrayList pass, ArrayList fail) {
+ private static void split(List input, List pass, List fail) {
for (Object o : input) {
TestResult result = (TestResult) o;
if (result.pass) {
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
+import java.util.List;
import java.util.ListIterator;
import org.aspectj.util.FileUtil;
}
}
- ArrayList tempFiles;
+ List tempFiles;
/**
* Constructor for FileUtilTest.
* @param arg0
private final Map familyNameToFamily = new TreeMap();
/** enforce uniqueness of options */
- private final ArrayList names = new ArrayList();
+ private final List names = new ArrayList();
public Factory(String factoryName) {
this.factoryName = factoryName;
import java.util.ArrayList;
import java.util.Iterator;
+import java.util.List;
import org.aspectj.util.LangUtil;
return sb.toString();
}
- private final ArrayList options = new ArrayList();
+ private final List options = new ArrayList();
private final boolean stopAtFirstMatch;
private boolean frozen = !FROZEN;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
+import java.util.List;
import org.aspectj.testing.harness.bridge.AjcSpecTest;
import org.aspectj.testing.harness.bridge.AjcTest;
*/
public class AjcSpecXmlReaderTest extends TestCase {
- ArrayList<File> tempFiles = new ArrayList<>();
+ List<File> tempFiles = new ArrayList<>();
/**
* Constructor for AjcSpecXmlReaderTest.
* @param name
String xml2Path = path + ".tmp.xml";
final File file1 = new File(xmlPath);
- final ArrayList<File> toDelete = new ArrayList<>();
+ final List<File> toDelete = new ArrayList<>();
final AjcSpecXmlReader writer = AjcSpecXmlReader.getReader();
assertTrue("" + file1, file1.canRead());
AjcSpecXmlReader writer = AjcSpecXmlReader.getReader();
File file0 = new File(txtPath);
File file1 = new File(xmlPath);
- ArrayList<File> toDelete = new ArrayList<>();
+ List<File> toDelete = new ArrayList<>();
AjcTest.Suite.Spec suite0 = null;
if (file0.canRead()) {
System.out.println("reading " + file0);
import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;
+import java.util.List;
import org.aspectj.bridge.IMessage;
import org.aspectj.util.LangUtil;
*/
public class MessageListXmlReaderTest extends TestCase {
- ArrayList tempFiles = new ArrayList();
+ List tempFiles = new ArrayList();
public MessageListXmlReaderTest(String name) {
super(name);
}
private String details;
private int id;
private int sourceStart,sourceEnd;
- private final ArrayList extraSourceLocations = new ArrayList();
+ private final List extraSourceLocations = new ArrayList();
//private ISourceLocation pseudoSourceLocation; // set directly
// collapse enclosed source location for shorter, property-based xml
import java.util.ArrayList;
import java.util.Hashtable;
import java.util.List;
+import java.util.Map;
import org.aspectj.util.FileUtil;
configureProcessorOptions("ProcessorConsumer1","DemoProcessor");
configureNonStandardCompileOptions("ProcessorConsumer1", "-showWeaveInfo");
- Hashtable<String, String> javaOptions = new Hashtable<>();
+ Map<String, String> javaOptions = new Hashtable<>();
javaOptions.put("org.eclipse.jdt.core.compiler.compliance", "1.6");
javaOptions.put("org.eclipse.jdt.core.compiler.codegen.targetPlatform", "1.6");
javaOptions.put("org.eclipse.jdt.core.compiler.source", "1.6");
configureProcessorPath("ProcessorConsumer2", getCompilerForProjectWithName("ProcessorProject2").getCompilerConfiguration().getOutputLocationManager().getDefaultOutputLocation().toString()+File.pathSeparator+
new File(testdataSrcDir + File.separatorChar + "ProcessorProject2" + File.separatorChar + "base"+File.separatorChar+"src").toString());
- Hashtable<String, String> javaOptions = new Hashtable<>();
+ Map<String, String> javaOptions = new Hashtable<>();
javaOptions.put("org.eclipse.jdt.core.compiler.compliance", "1.6");
javaOptions.put("org.eclipse.jdt.core.compiler.codegen.targetPlatform", "1.6");
javaOptions.put("org.eclipse.jdt.core.compiler.source", "1.6");
configureNonStandardCompileOptions("ProcessorConsumer1", "-showWeaveInfo");
- Hashtable<String, String> javaOptions = new Hashtable<>();
+ Map<String, String> javaOptions = new Hashtable<>();
javaOptions.put("org.eclipse.jdt.core.compiler.compliance", "1.6");
javaOptions.put("org.eclipse.jdt.core.compiler.codegen.targetPlatform", "1.6");
javaOptions.put("org.eclipse.jdt.core.compiler.source", "1.6");
if (javaOptionsMap != null && !javaOptionsMap.isEmpty())
return javaOptionsMap;
- Hashtable<String, String> ht = new Hashtable<>();
+ Map<String, String> ht = new Hashtable<>();
ht.put("org.eclipse.jdt.core.compiler.compliance", "1.5");
ht.put("org.eclipse.jdt.core.compiler.codegen.targetPlatform", "1.5");
ht.put("org.eclipse.jdt.core.compiler.source", "1.5");
String p = "pr266420";
initialiseProject(p);
- Hashtable<String,String> javaOptions = new Hashtable<>();
+ Map<String,String> javaOptions = new Hashtable<>();
javaOptions.put("org.eclipse.jdt.core.compiler.compliance", "1.6");
javaOptions.put("org.eclipse.jdt.core.compiler.codegen.targetPlatform", "1.6");
javaOptions.put("org.eclipse.jdt.core.compiler.source", "1.6");
public void testPR164384_1() {
initialiseProject("PR164384");
- Hashtable<String, String> javaOptions = new Hashtable<>();
+ Map<String, String> javaOptions = new Hashtable<>();
javaOptions.put("org.eclipse.jdt.core.compiler.compliance", "1.6");
javaOptions.put("org.eclipse.jdt.core.compiler.codegen.targetPlatform", "1.6");
javaOptions.put("org.eclipse.jdt.core.compiler.source", "1.6");
public void testPR164384_2() {
initialiseProject("PR164384");
- Hashtable<String, String> javaOptions = new Hashtable<>();
+ Map<String, String> javaOptions = new Hashtable<>();
javaOptions.put("org.eclipse.jdt.core.compiler.compliance", "1.6");
javaOptions.put("org.eclipse.jdt.core.compiler.codegen.targetPlatform", "1.5");
javaOptions.put("org.eclipse.jdt.core.compiler.source", "1.5");
public void testPR164384_3() {
initialiseProject("PR164384");
- Hashtable<String, String> javaOptions = new Hashtable<>();
+ Map<String, String> javaOptions = new Hashtable<>();
javaOptions.put("org.eclipse.jdt.core.compiler.compliance", "1.6");
javaOptions.put("org.eclipse.jdt.core.compiler.codegen.targetPlatform", "1.6");
javaOptions.put("org.eclipse.jdt.core.compiler.source", "1.5");
* @param List sink the List for String entries of the form {sourcePath}:line:column
* @return String error if any, or add String entries to sink
*/
- public static String lineSeek(String sought, String sourcePath, boolean listAll, ArrayList<String> sink) {
+ public static String lineSeek(String sought, String sourcePath, boolean listAll, List<String> sink) {
if (LangUtil.isEmpty(sought) || LangUtil.isEmpty(sourcePath)) {
return "nothing sought";
}
if (null == input) {
return Collections.emptyList();
}
- ArrayList<String> result = new ArrayList<>();
+ List<String> result = new ArrayList<>();
if (LangUtil.isEmpty(delim) || (!input.contains(delim))) {
result.add(input.trim());
final int sinkLength = (null == sink ? 0 : sink.length);
final int resultSize;
- ArrayList<Object> result = null;
+ List<Object> result = null;
if (0 == sourceLength) {
resultSize = 0;
} else {
if ((null == array) || (1 > array.length)) {
return Collections.emptyList();
}
- ArrayList<T> list = new ArrayList<>(Arrays.asList(array));
+ List<T> list = new ArrayList<>(Arrays.asList(array));
return list;
}
super(urls);
LangUtil.throwIaxIfNotAssignable(dirs, File.class, "dirs");
this.urlsForDebugString = urls;
- ArrayList<File> dcopy = new ArrayList<>();
+ List<File> dcopy = new ArrayList<>();
if (!LangUtil.isEmpty(dirs)) {
dcopy.addAll(Arrays.asList(dirs));
* @throws AssertionFailedError if any names are not in dir
*/
public static String[] dirContains(File dir, final String[] filenames) {
- final ArrayList<String> sought = new ArrayList<>(LangUtil.arrayAsList(filenames));
+ final List<String> sought = new ArrayList<>(LangUtil.arrayAsList(filenames));
FilenameFilter filter = new FilenameFilter() {
public boolean accept(File d, String name) {
return !sought.remove(name);
}
/** List of File files or directories to delete when exiting */
- final ArrayList<File> tempFiles;
+ final List<File> tempFiles;
public FileUtilTest(String s) {
super(s);
}
public void testRandomFileString() {
- ArrayList<String> results = new ArrayList<>();
+ List<String> results = new ArrayList<>();
for (int i = 0; i < 1000; i++) {
String s = FileUtil.randomFileString();
if (results.contains(s)) {
List<String> sourceList = new ArrayList<>();
sourceList.add(file.getPath());
- final ArrayList<String> errors = new ArrayList<>();
+ final List<String> errors = new ArrayList<>();
final PrintStream errorSink = new PrintStream(System.err, true) {
public void println(String error) {
errors.add(error);
tempFiles.add(file);
}
// now test
- final ArrayList<String> errors = new ArrayList<>();
+ final List<String> errors = new ArrayList<>();
final PrintStream errorSink = new PrintStream(System.err, true) {
public void println(String error) {
errors.add(error);
manifest = new Manifest();
- Attributes attributes = manifest.getMainAttributes();
+ Map attributes = manifest.getMainAttributes();
attributes.put(Name.MANIFEST_VERSION, WEAVER_MANIFEST_VERSION);
attributes.put(CREATED_BY, WEAVER_CREATED_BY);
}
FileSystem fs = null;
try {
if (LangUtil.is19VMOrGreater()) {
- HashMap<String, String> env = new HashMap<>();
+ Map<String, String> env = new HashMap<>();
env.put("java.home", jdkHome);
fs = FileSystems.newFileSystem(JRT_URI, env);
} else {
URLClassLoader loader = new URLClassLoader(new URL[] { jrtPath });
- HashMap<String, ?> env = new HashMap<>();
+ Map<String, ?> env = new HashMap<>();
fs = FileSystems.newFileSystem(JRT_URI, env, loader);
}
state = new JImageState(jrtFsPath, fs);
}
private void addExceptionHandlers(MethodGen gen, Map<InstructionHandle, InstructionHandle> map,
- LinkedList<ExceptionRange> exnList) {
+ Iterable<ExceptionRange> exnList) {
// now add exception handlers
for (ExceptionRange r : exnList) {
if (r.isEmpty()) {
// but I don't trust the only implementation, TreeSet, to do the right
// thing.
- /* private */static void insertHandler(ExceptionRange fresh, LinkedList<ExceptionRange> l) {
+ /* private */static void insertHandler(ExceptionRange fresh, List<ExceptionRange> l) {
// Old implementation, simply: l.add(0,fresh);
for (ListIterator<ExceptionRange> iter = l.listIterator(); iter.hasNext();) {
ExceptionRange r = iter.next();
private static void traverse(SimpleAOPParser sap, LightXMLParser xml)
throws Exception {
sap.startElement(xml.getName(), xml.getAttributes());
- ArrayList childrens = xml.getChildrens();
+ Iterable childrens = xml.getChildrens();
for (Object children : childrens) {
LightXMLParser child = (LightXMLParser) children;
traverse(sap, child);
public void testAssignable02() {
List list = new ArrayList();
- ArrayList arraylist = null;
+ List arraylist = null;
List<String> listOfString = new ArrayList<>();
List<?> listOfSomething = new ArrayList<Integer>();
- ArrayList<?> arrayListOfSomething = null;
+ List<?> arrayListOfSomething = null;
List<Number> listOfNumber = null;
ArrayList<Number> arrayListOfNumber = null;
- ArrayList<? extends Number> arrayListOfSomethingNumberish = null;
+ List<? extends Number> arrayListOfSomethingNumberish = null;
List<? extends Number> listOfSomethingNumberish = new ArrayList<Integer>();
List<? super Double> listOfSomethingSuperDouble = new ArrayList<Number>();
List<Integer> listOfInteger = new ArrayList<>();
public void testAssignable03_method_m2() {
List list = new ArrayList();
- ArrayList arraylist = null;
+ List arraylist = null;
List<String> listOfString = new ArrayList<>();
List<?> listOfSomething = new ArrayList<Integer>();
- ArrayList<?> arrayListOfSomething = null;
+ List<?> arrayListOfSomething = null;
List<Number> listOfNumber = null;
- ArrayList<Number> arrayListOfNumber = null;
- ArrayList<Integer> arrayListOfInteger = null;
- ArrayList<? extends Number> arrayListOfSomethingNumberish = null;
+ List<Number> arrayListOfNumber = null;
+ List<Integer> arrayListOfInteger = null;
+ List<? extends Number> arrayListOfSomethingNumberish = null;
List<? extends Number> listOfSomethingNumberish = new ArrayList<Integer>();
List<? super Double> listOfSomethingSuperDouble = new ArrayList<Number>();
List<Integer> listOfInteger = new ArrayList<>();
ArrayList arraylist = null;
List<String> listOfString = new ArrayList<>();
List<?> listOfSomething = new ArrayList<Integer>();
- ArrayList<?> arrayListOfSomething = null;
+ List<?> arrayListOfSomething = null;
List<Number> listOfNumber = null;
- ArrayList<Number> arrayListOfNumber = null;
+ List<Number> arrayListOfNumber = null;
ArrayList<Integer> arrayListOfInteger = null;
- ArrayList<? extends Number> arrayListOfSomethingNumberish = null;
+ List<? extends Number> arrayListOfSomethingNumberish = null;
List<? extends Number> listOfSomethingNumberish = new ArrayList<Integer>();
List<? super Double> listOfSomethingSuperDouble = new ArrayList<Number>();
List<Integer> listOfInteger = new ArrayList<>();
- ArrayList arrayList = null;
+ List arrayList = null;
ArrayList<String> arrayListOfString;
ArrayList<Integer> arraylistOfInteger;
// interfaces too List<? extends A,B>
public void testAssignable03_method_m4() {
List list = new ArrayList();
- ArrayList arraylist = null;
+ List arraylist = null;
List<String> listOfString = new ArrayList<>();
List<?> listOfSomething = new ArrayList<Integer>();
- ArrayList<?> arrayListOfSomething = null;
+ List<?> arrayListOfSomething = null;
List<Number> listOfNumber = null;
- ArrayList<Number> arrayListOfNumber = null;
- ArrayList<? extends Number> arrayListOfSomethingNumberish = null;
+ List<Number> arrayListOfNumber = null;
+ List<? extends Number> arrayListOfSomethingNumberish = null;
List<? extends Number> listOfSomethingNumberish = new ArrayList<Integer>();
List<? super Double> listOfSomethingSuperDouble = new ArrayList<Number>();
List<Integer> listOfInteger = new ArrayList<>();
- ArrayList<String> arrayListOfString;
- ArrayList<Integer> arraylistOfInteger;
+ List<String> arrayListOfString;
+ List<Integer> arraylistOfInteger;
// interfaces too List<? extends A,B>
ReferenceType ajArrayListOfString = resolve("Pjava/util/ArrayList<Ljava/lang/String;>;");