diff options
author | Alexander Kurtakov | 2018-03-29 10:26:48 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2018-03-29 10:26:48 +0000 |
commit | 5251d1be37d5970412dcbe291f47948ada582556 (patch) | |
tree | b5ff3a44bb0f342b6b78aa5276aad09dbecb0463 /org.eclipse.debug.examples.core | |
parent | 6ac5654db62a138703356d3d9f6074228ac01ae6 (diff) | |
download | eclipse.platform.debug-5251d1be37d5970412dcbe291f47948ada582556.tar.gz eclipse.platform.debug-5251d1be37d5970412dcbe291f47948ada582556.tar.xz eclipse.platform.debug-5251d1be37d5970412dcbe291f47948ada582556.zip |
Bug 533055 - Remove redundant type argumentsI20180403-2000I20180402-2000I20180401-2000I20180331-1500I20180330-2235I20180330-2000I20180329-2000
Change-Id: I6f62094af1b4ad2c679e78cc635641918f958fb4
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'org.eclipse.debug.examples.core')
10 files changed, 44 insertions, 40 deletions
diff --git a/org.eclipse.debug.examples.core/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.debug.examples.core/.settings/org.eclipse.jdt.core.prefs index 854ba028d..d7f607161 100644 --- a/org.eclipse.debug.examples.core/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.debug.examples.core/.settings/org.eclipse.jdt.core.prefs @@ -11,8 +11,11 @@ org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate @@ -24,6 +27,7 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.doc.comment.support=enabled org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.problem.APILeak=warning org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.autoboxing=ignore @@ -74,19 +78,21 @@ org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error org.eclipse.jdt.core.compiler.problem.nullReference=error org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning org.eclipse.jdt.core.compiler.problem.parameterAssignment=warning +org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore -org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore @@ -96,12 +102,16 @@ org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=enabled org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled +org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore diff --git a/org.eclipse.debug.examples.core/pdavm/src/org/eclipse/debug/examples/pdavm/PDAVirtualMachine.java b/org.eclipse.debug.examples.core/pdavm/src/org/eclipse/debug/examples/pdavm/PDAVirtualMachine.java index d8ee82baf..1e6109ae0 100644 --- a/org.eclipse.debug.examples.core/pdavm/src/org/eclipse/debug/examples/pdavm/PDAVirtualMachine.java +++ b/org.eclipse.debug.examples.core/pdavm/src/org/eclipse/debug/examples/pdavm/PDAVirtualMachine.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2015 Wind River Systems and others. + * Copyright (c) 2005, 2018 Wind River Systems and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -62,7 +62,7 @@ public class PDAVirtualMachine { String fName; String fGroup = "<no_group>"; //$NON-NLS-1$ boolean fIsWriteable = true; - Map<String, BitField> fBitFields = new LinkedHashMap<String, BitField>(0); + Map<String, BitField> fBitFields = new LinkedHashMap<>(0); int fValue; } @@ -73,10 +73,10 @@ public class PDAVirtualMachine { String fName; int fBitOffset; int fBitCount; - Map<String, Integer> fMnemonics = new LinkedHashMap<String, Integer>(0); + Map<String, Integer> fMnemonics = new LinkedHashMap<>(0); } - Map<String, Register> fRegisters = new LinkedHashMap<String, Register>(0); + Map<String, Register> fRegisters = new LinkedHashMap<>(0); class Args { final String[] fArgs; @@ -147,7 +147,7 @@ public class PDAVirtualMachine { Map<String, Integer> fThreadLabels; /** The stack of stack frames (the control stack) */ - final List<Frame> fFrames = new LinkedList<Frame>(); + final List<Frame> fFrames = new LinkedList<>(); /** Current stack frame (not includced in fFrames) */ Frame fCurrentFrame; @@ -176,7 +176,7 @@ public class PDAVirtualMachine { } } - final Map<Integer, PDAThread> fThreads = new LinkedHashMap<Integer, PDAThread>(); + final Map<Integer, PDAThread> fThreads = new LinkedHashMap<>(); int fNextThreadId = 1; @@ -192,7 +192,7 @@ public class PDAVirtualMachine { /** Each stack frame is a mapping of variable names to values. */ class Frame { - final Map<String, Object> fLocalVariables = new LinkedHashMap<String, Object>(); + final Map<String, Object> fLocalVariables = new LinkedHashMap<>(); /** * The name of the function in this frame @@ -278,7 +278,7 @@ public class PDAVirtualMachine { * Breakpoints are stored per each each line of code. The boolean indicates * whether the whole VM should suspend or just the triggering thread. */ - final Map<Integer, Boolean> fBreakpoints = new HashMap<Integer, Boolean>(); + final Map<Integer, Boolean> fBreakpoints = new HashMap<>(); /** * The suspend flag is true if the VM should suspend running the program and @@ -324,7 +324,7 @@ public class PDAVirtualMachine { OutputStream fEventStream; /** The eventstops table holds which events cause suspends and which do not. */ - final Map<String, Boolean> fEventStops = new HashMap<String, Boolean>(); + final Map<String, Boolean> fEventStops = new HashMap<>(); { fEventStops.put("unimpinstr", Boolean.FALSE); //$NON-NLS-1$ fEventStops.put("nosuchlabel", Boolean.FALSE); //$NON-NLS-1$ @@ -340,7 +340,7 @@ public class PDAVirtualMachine { * <li>N = 2 is write watch</li> * <li>N = 3 is both, etc.</li> */ - final Map<String, Integer> fWatchpoints = new HashMap<String, Integer>(); + final Map<String, Integer> fWatchpoints = new HashMap<>(); public static void main(String[] args) { String programFile = args.length >= 1 ? args[0] : null; @@ -388,7 +388,7 @@ public class PDAVirtualMachine { // Load all the code into memory StringWriter stringWriter = new StringWriter(); - List<String> code = new LinkedList<String>(); + List<String> code = new LinkedList<>(); try (FileReader fileReader = new FileReader(inputFile)) { int c = fileReader.read(); while (c != -1) { @@ -416,7 +416,7 @@ public class PDAVirtualMachine { * Initializes the labels map */ Map<String, Integer> mapLabels(String[] code) { - Map<String, Integer> labels = new HashMap<String, Integer>(); + Map<String, Integer> labels = new HashMap<>(); for (int i = 0; i < code.length; i++) { if (code[i].length() != 0 && code[i].charAt(0) == ':') { labels.put(code[i].substring(1), Integer.valueOf(i)); @@ -551,7 +551,7 @@ public class PDAVirtualMachine { void doOneInstruction(PDAThread thread, String instr) { StringTokenizer tokenizer = new StringTokenizer(instr); String op = tokenizer.nextToken(); - List<String> tokens = new LinkedList<String>(); + List<String> tokens = new LinkedList<>(); while (tokenizer.hasMoreTokens()) { tokens.add(tokenizer.nextToken()); } @@ -698,7 +698,7 @@ public class PDAVirtualMachine { } String command = tokenizer.nextToken(); - List<String> tokens = new LinkedList<String>(); + List<String> tokens = new LinkedList<>(); while (tokenizer.hasMoreTokens()) { tokens.add(tokenizer.nextToken()); } @@ -779,7 +779,7 @@ public class PDAVirtualMachine { ? thread.fCurrentFrame : (Frame)thread.fFrames.get(sfnumber); String varDot = var + "."; //$NON-NLS-1$ - List<String> children = new ArrayList<String>(); + List<String> children = new ArrayList<>(); for (Iterator<String> itr = frame.fLocalVariables.keySet().iterator(); itr.hasNext();) { String localVar = itr.next(); if (localVar.startsWith(varDot) && localVar.indexOf('.', varDot.length() + 1) == -1) { @@ -933,7 +933,7 @@ public class PDAVirtualMachine { * @param args */ void debugGroups(Args args) { - TreeSet<String> groups = new TreeSet<String>(); + TreeSet<String> groups = new TreeSet<>(); for (Iterator<Register> itr = fRegisters.values().iterator(); itr.hasNext();) { Register reg = itr.next(); groups.add(reg.fGroup); diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/launcher/PDALaunchDelegate.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/launcher/PDALaunchDelegate.java index b1bc4d67c..077e77183 100644 --- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/launcher/PDALaunchDelegate.java +++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/launcher/PDALaunchDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2015 IBM Corporation and others. + * Copyright (c) 2005, 2018 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -41,9 +41,6 @@ import org.eclipse.debug.examples.core.pda.model.PDADebugTarget; * Launches PDA program on a PDA interpreter written in Perl */ public class PDALaunchDelegate extends LaunchConfigurationDelegate { - /* (non-Javadoc) - * @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor) - */ @Override public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException { //#ifdef ex1 @@ -53,7 +50,7 @@ public class PDALaunchDelegate extends LaunchConfigurationDelegate { //# new RuntimeProcess(launch, process, "Hello", null); //#else - List<String> commandList = new ArrayList<String>(); + List<String> commandList = new ArrayList<>(); // Get Java VM path String javaVMHome = System.getProperty("java.home"); //$NON-NLS-1$ @@ -135,9 +132,6 @@ public class PDALaunchDelegate extends LaunchConfigurationDelegate { return -1; } - /* (non-Javadoc) - * @see org.eclipse.debug.core.model.LaunchConfigurationDelegate#buildForLaunch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.core.runtime.IProgressMonitor) - */ @Override public boolean buildForLaunch(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) throws CoreException { return false; diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDABitFieldData.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDABitFieldData.java index b36e3dbcf..da15cf04f 100644 --- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDABitFieldData.java +++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDABitFieldData.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2013 Wind River Systems and others. + * Copyright (c) 2008, 2018 Wind River Systems and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -34,7 +34,7 @@ public class PDABitFieldData { fOffset = Integer.parseInt(st.nextToken()); fCount = Integer.parseInt(st.nextToken()); - fMnemonics = new LinkedHashMap<String, String>(0); + fMnemonics = new LinkedHashMap<>(0); while (st.hasMoreTokens()) { fMnemonics.put(st.nextToken(), st.nextToken()); } diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAFrameData.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAFrameData.java index d3c5ab8d7..560a820bf 100644 --- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAFrameData.java +++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAFrameData.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2013 Wind River Systems and others. + * Copyright (c) 2008, 2018 Wind River Systems and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -38,7 +38,7 @@ public class PDAFrameData { fPC = Integer.parseInt(st.nextToken()); fFunction = st.nextToken(); - List<String> variablesList = new ArrayList<String>(); + List<String> variablesList = new ArrayList<>(); while (st.hasMoreTokens()) { variablesList.add(st.nextToken()); } diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAListResult.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAListResult.java index e2b9a38ae..e9aae8ea3 100644 --- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAListResult.java +++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAListResult.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2013 Wind River Systems and others. + * Copyright (c) 2008, 2018 Wind River Systems and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -27,7 +27,7 @@ public class PDAListResult extends PDACommandResult { PDAListResult(String response) { super(response); StringTokenizer st = new StringTokenizer(response, "|"); //$NON-NLS-1$ - List<String> valuesList = new ArrayList<String>(); + List<String> valuesList = new ArrayList<>(); while (st.hasMoreTokens()) { String token = st.nextToken(); diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegisterData.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegisterData.java index 27c1874d2..a94db40eb 100644 --- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegisterData.java +++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegisterData.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2013 Wind River Systems and others. + * Copyright (c) 2008, 2018 Wind River Systems and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -35,7 +35,7 @@ public class PDARegisterData { fName = regSt.nextToken(); fWritable = Boolean.getBoolean(regSt.nextToken()); - List<PDABitFieldData> bitFieldsList = new ArrayList<PDABitFieldData>(); + List<PDABitFieldData> bitFieldsList = new ArrayList<>(); while (st.hasMoreTokens()) { bitFieldsList.add(new PDABitFieldData(st.nextToken())); } diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegistersCommandResult.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegistersCommandResult.java index 7eabe8af4..d5a56be66 100644 --- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegistersCommandResult.java +++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegistersCommandResult.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2013 Wind River Systems and others. + * Copyright (c) 2008, 2018 Wind River Systems and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -30,7 +30,7 @@ public class PDARegistersCommandResult extends PDACommandResult { PDARegistersCommandResult(String response) { super(response); StringTokenizer st = new StringTokenizer(response, "#"); //$NON-NLS-1$ - List<PDARegisterData> regList = new ArrayList<PDARegisterData>(); + List<PDARegisterData> regList = new ArrayList<>(); while (st.hasMoreTokens()) { regList.add(new PDARegisterData(st.nextToken())); diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackCommandResult.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackCommandResult.java index dfc583266..74891219b 100644 --- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackCommandResult.java +++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackCommandResult.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2013 Wind River Systems and others. + * Copyright (c) 2008, 2018 Wind River Systems and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -31,7 +31,7 @@ public class PDAStackCommandResult extends PDACommandResult { PDAStackCommandResult(String response) { super(response); StringTokenizer st = new StringTokenizer(response, "#"); //$NON-NLS-1$ - List<PDAFrameData> framesList = new ArrayList<PDAFrameData>(); + List<PDAFrameData> framesList = new ArrayList<>(); while (st.hasMoreTokens()) { framesList.add(new PDAFrameData(st.nextToken())); diff --git a/org.eclipse.debug.examples.core/src_ant/org/eclipse/debug/examples/ant/tasks/PreProcessor.java b/org.eclipse.debug.examples.core/src_ant/org/eclipse/debug/examples/ant/tasks/PreProcessor.java index 3f6f99350..483e9ec72 100644 --- a/org.eclipse.debug.examples.core/src_ant/org/eclipse/debug/examples/ant/tasks/PreProcessor.java +++ b/org.eclipse.debug.examples.core/src_ant/org/eclipse/debug/examples/ant/tasks/PreProcessor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2015 IBM Corporation and others. + * Copyright (c) 2005, 2018 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -46,9 +46,9 @@ import org.apache.tools.ant.util.FileUtils; */ public class PreProcessor extends Task { - private Vector<FileSet> fFileSets = new Vector<FileSet>(); + private Vector<FileSet> fFileSets = new Vector<>(); private File fDestDir = null; - private Set<String> fSymbols = new HashSet<String>(); + private Set<String> fSymbols = new HashSet<>(); private FileUtils fUtils = FileUtils.getFileUtils(); // possible states |