Bug 515447 - Remove redundant type arguments in jdt.debug
Change-Id: Ieccd3833e7d242747e6321db069b1b3fe4db6928
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/JavaUISourceLocator.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/JavaUISourceLocator.java
index b057f1b..f6b0a52 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/JavaUISourceLocator.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/JavaUISourceLocator.java
@@ -229,7 +229,7 @@
private void cacheSourceElement(Object sourceElement, IJavaReferenceType type) {
if (fTypesToSource == null) {
- fTypesToSource = new HashMap<IJavaReferenceType, Object>();
+ fTypesToSource = new HashMap<>();
}
fTypesToSource.put(type, sourceElement);
}
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/breakpoints/JavaBreakpointConditionEditor.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/breakpoints/JavaBreakpointConditionEditor.java
index 2c4447f..0135a65 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/breakpoints/JavaBreakpointConditionEditor.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/breakpoints/JavaBreakpointConditionEditor.java
@@ -381,7 +381,7 @@
});
if (fConditionHistoryDialogSettings != null) {
- fLocalConditionHistory= new HashMap<IJavaLineBreakpoint, Stack<String>>();
+ fLocalConditionHistory= new HashMap<>();
fConditionHistory= SWTFactory.createCombo(parent, SWT.DROP_DOWN | SWT.READ_ONLY, 1, null);
initializeConditionHistoryDropDown();
fConditionHistory.addSelectionListener(new SelectionAdapter() {
@@ -396,7 +396,7 @@
GridData data= new GridData(GridData.FILL_HORIZONTAL);
data.widthHint= 10;
fConditionHistory.setLayoutData(data);
- fLocalConditionHistory= new HashMap<IJavaLineBreakpoint, Stack<String>>(10);
+ fLocalConditionHistory= new HashMap<>(10);
}
fViewer = new JDISourceViewer(parent, null, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.LEFT_TO_RIGHT);
@@ -694,7 +694,7 @@
// Update local history
Stack<String> localHistory= fLocalConditionHistory.get(fBreakpoint);
if (localHistory == null) {
- localHistory= new Stack<String>();
+ localHistory= new Stack<>();
fLocalConditionHistory.put(fBreakpoint, localHistory);
}
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/AppletParametersTab.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/AppletParametersTab.java
index 2142397..f079ae6 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/AppletParametersTab.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/AppletParametersTab.java
@@ -409,7 +409,7 @@
fNameText.setText(LauncherMessages.appletlauncher_argumenttab_name_defaultvalue);
}
- Map<String, String> input = new HashMap<String, String>();
+ Map<String, String> input = new HashMap<>();
try {
Map<String, String> params = config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_APPLET_PARAMETERS, (Map<String, String>) null);
if (params != null) {
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaApplicationLaunchShortcut.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaApplicationLaunchShortcut.java
index fc83852..9ac5acd 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaApplicationLaunchShortcut.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaApplicationLaunchShortcut.java
@@ -57,7 +57,7 @@
* @since 3.5
*/
protected IJavaElement[] getJavaElements(Object[] objects) {
- List<IJavaElement> list= new ArrayList<IJavaElement>(objects.length);
+ List<IJavaElement> list= new ArrayList<>(objects.length);
for (int i = 0; i < objects.length; i++) {
Object object = objects[i];
if (object instanceof IAdaptable) {
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaClasspathTab.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaClasspathTab.java
index 077a1d3..0b57588 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaClasspathTab.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaClasspathTab.java
@@ -147,7 +147,7 @@
* @since 3.0
*/
protected void createPathButtons(Composite pathButtonComp) {
- List<RuntimeClasspathAction> advancedActions = new ArrayList<RuntimeClasspathAction>(5);
+ List<RuntimeClasspathAction> advancedActions = new ArrayList<>(5);
createButton(pathButtonComp, new MoveUpAction(fClasspathViewer));
createButton(pathButtonComp, new MoveDownAction(fClasspathViewer));
@@ -280,7 +280,7 @@
} else {
configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH, false);
try {
- List<String> mementos = new ArrayList<String>(classpath.length);
+ List<String> mementos = new ArrayList<>(classpath.length);
for (int i = 0; i < classpath.length; i++) {
IRuntimeClasspathEntry entry = classpath[i];
mementos.add(entry.getMemento());
@@ -301,7 +301,7 @@
private IRuntimeClasspathEntry[] getCurrentClasspath() {
IClasspathEntry[] boot = fModel.getEntries(ClasspathModel.BOOTSTRAP);
IClasspathEntry[] user = fModel.getEntries(ClasspathModel.USER);
- List<IRuntimeClasspathEntry> entries = new ArrayList<IRuntimeClasspathEntry>(boot.length + user.length);
+ List<IRuntimeClasspathEntry> entries = new ArrayList<>(boot.length + user.length);
IClasspathEntry bootEntry;
IRuntimeClasspathEntry entry;
for (int i = 0; i < boot.length; i++) {
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaConnectTab.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaConnectTab.java
index c33876e..b344005 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaConnectTab.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaConnectTab.java
@@ -71,7 +71,7 @@
// UI widgets
private Button fAllowTerminateButton;
private Map<String, Connector.Argument> fArgumentMap;
- private Map<String, FieldEditor> fFieldEditorMap = new HashMap<String, FieldEditor>();
+ private Map<String, FieldEditor> fFieldEditorMap = new HashMap<>();
private Composite fArgumentComposite;
private Combo fConnectorCombo;
@@ -257,7 +257,7 @@
config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_ALLOW_TERMINATE, fAllowTerminateButton.getSelection());
config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_CONNECTOR, getSelectedConnector().getIdentifier());
mapResources(config);
- Map<String, String> attrMap = new HashMap<String, String>(fFieldEditorMap.size());
+ Map<String, String> attrMap = new HashMap<>(fFieldEditorMap.size());
Iterator<String> keys = fFieldEditorMap.keySet().iterator();
while (keys.hasNext()) {
String key = keys.next();
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaLaunchShortcut.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaLaunchShortcut.java
index 820548b..61d7bea 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaLaunchShortcut.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaLaunchShortcut.java
@@ -189,7 +189,7 @@
List<ILaunchConfiguration> candidateConfigs = Collections.EMPTY_LIST;
try {
ILaunchConfiguration[] configs = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurations(ctype);
- candidateConfigs = new ArrayList<ILaunchConfiguration>(configs.length);
+ candidateConfigs = new ArrayList<>(configs.length);
for (int i = 0; i < configs.length; i++) {
ILaunchConfiguration config = configs[i];
if (config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, "").equals(type.getFullyQualifiedName())) { //$NON-NLS-1$
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/BreakpointChange.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/BreakpointChange.java
index ab7cd70..896126f 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/BreakpointChange.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/BreakpointChange.java
@@ -267,7 +267,7 @@
* @return element's path
*/
private static List<IJavaElement> getPath(IJavaElement element) {
- ArrayList<IJavaElement> children = new ArrayList<IJavaElement>();
+ ArrayList<IJavaElement> children = new ArrayList<>();
while (element != null && element.getElementType() != IJavaElement.COMPILATION_UNIT) {
children.add(element);
element = element.getParent();
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/BreakpointMoveParticipant.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/BreakpointMoveParticipant.java
index 620ad8b..6c2cfbc 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/BreakpointMoveParticipant.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/BreakpointMoveParticipant.java
@@ -112,7 +112,7 @@
*/
@Override
public Change createChange(IProgressMonitor pm) throws CoreException, OperationCanceledException {
- List<Change> changes = new ArrayList<Change>();
+ List<Change> changes = new ArrayList<>();
IResource resource = getBreakpointContainer();
IMarker[] markers= resource.findMarkers(IBreakpoint.BREAKPOINT_MARKER, true, IResource.DEPTH_INFINITE);
gatherChanges(markers, changes);
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/BreakpointRenameFieldParticipant.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/BreakpointRenameFieldParticipant.java
index b0cf628..8d08fb8 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/BreakpointRenameFieldParticipant.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/BreakpointRenameFieldParticipant.java
@@ -48,7 +48,7 @@
*/
@Override
public Change createChange(IProgressMonitor pm) throws CoreException, OperationCanceledException {
- List<Change> changes = new ArrayList<Change>();
+ List<Change> changes = new ArrayList<>();
IResource resource = getBreakpointContainer();
IMarker[] markers = resource.findMarkers(JavaWatchpoint.JAVA_WATCHPOINT, true, IResource.DEPTH_INFINITE);
gatherChanges(markers, changes, getArguments().getNewName());
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/BreakpointRenameParticipant.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/BreakpointRenameParticipant.java
index f196983..c44a7d7 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/BreakpointRenameParticipant.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/BreakpointRenameParticipant.java
@@ -97,7 +97,7 @@
*/
@Override
public Change createChange(IProgressMonitor pm) throws CoreException, OperationCanceledException {
- List<Change> changes = new ArrayList<Change>();
+ List<Change> changes = new ArrayList<>();
IResource resource = getBreakpointContainer();
IMarker[] markers= resource.findMarkers(IBreakpoint.BREAKPOINT_MARKER, true, IResource.DEPTH_INFINITE);
gatherChanges(markers, changes, getArguments().getNewName());
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/ClassPrepareBreakpointTypeChange.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/ClassPrepareBreakpointTypeChange.java
index cc80129..bf0d895 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/ClassPrepareBreakpointTypeChange.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/ClassPrepareBreakpointTypeChange.java
@@ -53,7 +53,7 @@
@Override
public Change perform(IProgressMonitor pm) throws CoreException {
IResource resource = BreakpointUtils.getBreakpointResource(fDestType);
- Map<String, Object> map = new HashMap<String, Object>();
+ Map<String, Object> map = new HashMap<>();
BreakpointUtils.addJavaBreakpointAttributes(map, fDestType);
map.put(IInternalDebugUIConstants.WORKING_SET_NAME, getOriginalWorkingSets());// creating breakpoint in the original working set
// TODO - start/end should be adjusted, but can access new CU from model yet
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/ExceptionBreakpointTypeChange.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/ExceptionBreakpointTypeChange.java
index 1e896d0..f1e77f3 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/ExceptionBreakpointTypeChange.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/ExceptionBreakpointTypeChange.java
@@ -50,7 +50,7 @@
*/
@Override
public Change perform(IProgressMonitor pm) throws CoreException {
- Map<String, Object> map = new HashMap<String, Object>();
+ Map<String, Object> map = new HashMap<>();
BreakpointUtils.addJavaBreakpointAttributes(map, fDestType);
IResource resource = BreakpointUtils.getBreakpointResource(fDestType);
IJavaExceptionBreakpoint breakpoint = JDIDebugModel.createExceptionBreakpoint(
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/JDTDebugRefactoringUtil.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/JDTDebugRefactoringUtil.java
index 454bf66..427a510 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/JDTDebugRefactoringUtil.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/JDTDebugRefactoringUtil.java
@@ -104,7 +104,7 @@
* @since 3.2
*/
public static Change createChangesForPackageMove(IPackageFragment pfragment, IPackageFragmentRoot destination) throws CoreException {
- List<Change> changes = new ArrayList<Change>();
+ List<Change> changes = new ArrayList<>();
ILaunchConfiguration[] configs = getJavaTypeLaunchConfigurations(pfragment.getJavaProject().getElementName());
String mtname = null;
for (int i= 0; i < configs.length; i++) {
@@ -127,7 +127,7 @@
* @since 3.2
*/
public static Change createChangesForPackageRename(IPackageFragment pfragment, String newname) throws CoreException {
- List<Change> changes = new ArrayList<Change>();
+ List<Change> changes = new ArrayList<>();
ILaunchConfiguration[] configs = getJavaTypeLaunchConfigurations(pfragment.getJavaProject().getElementName());
String mtname;
for (int i= 0; i < configs.length; i++) {
@@ -159,7 +159,7 @@
* @since 3.2
*/
public static Change createChangesForProjectRename(IJavaProject project, String newname) throws CoreException {
- List<Change> changes = new ArrayList<Change>();
+ List<Change> changes = new ArrayList<>();
ILaunchConfiguration[] configs = getJavaTypeLaunchConfigurations(project.getElementName());
LaunchConfigurationProjectMainTypeChange change = null;
for (int i= 0; i < configs.length; i++) {
@@ -183,7 +183,7 @@
* @since 3.2
*/
protected static Change createChangesForTypeChange(IType type, String newfqname, String pname) throws CoreException {
- List<Change> changes = new ArrayList<Change>();
+ List<Change> changes = new ArrayList<>();
String typename = type.getFullyQualifiedName();
ILaunchConfiguration[] configs = getJavaTypeLaunchConfigurations(type.getJavaProject().getElementName());
String mtname;
@@ -260,7 +260,7 @@
protected static ILaunchConfiguration[] getJavaTypeLaunchConfigurations(String pname) {
try {
ILaunchConfiguration[] configs = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurations();
- ArrayList<ILaunchConfiguration> list = new ArrayList<ILaunchConfiguration>();
+ ArrayList<ILaunchConfiguration> list = new ArrayList<>();
String attrib;
for(int i = 0; i < configs.length; i++) {
attrib = configs[i].getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, (String)null);
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/LineBreakpointTypeChange.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/LineBreakpointTypeChange.java
index 83e8828..54042f4 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/LineBreakpointTypeChange.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/LineBreakpointTypeChange.java
@@ -56,7 +56,7 @@
@Override
public Change perform(IProgressMonitor pm) throws CoreException {
IResource resource = BreakpointUtils.getBreakpointResource(fDestType);
- Map<String, Object> map = new HashMap<String, Object>();
+ Map<String, Object> map = new HashMap<>();
BreakpointUtils.addJavaBreakpointAttributes(map, fDestType);
map.put(IInternalDebugUIConstants.WORKING_SET_NAME, getOriginalWorkingSets());// creating breakpoint in the original working set
IJavaLineBreakpoint breakpoint = JDIDebugModel.createLineBreakpoint(
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/MethodBreakpointMethodChange.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/MethodBreakpointMethodChange.java
index 60688b6..690623e 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/MethodBreakpointMethodChange.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/MethodBreakpointMethodChange.java
@@ -50,7 +50,7 @@
*/
@Override
public Change perform(IProgressMonitor pm) throws CoreException {
- Map<String, Object> map = new HashMap<String, Object>();
+ Map<String, Object> map = new HashMap<>();
BreakpointUtils.addJavaBreakpointAttributes(map, fDestMethod);
IResource resource = BreakpointUtils.getBreakpointResource(fDestMethod);
int range[] = getNewLineNumberAndRange(fDestMethod);
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/MethodBreakpointTypeChange.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/MethodBreakpointTypeChange.java
index 3828660..996be1a 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/MethodBreakpointTypeChange.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/MethodBreakpointTypeChange.java
@@ -72,7 +72,7 @@
}
}
}
- Map<String, Object> map = new HashMap<String, Object>();
+ Map<String, Object> map = new HashMap<>();
BreakpointUtils.addJavaBreakpointAttributes(map, destMethod);
map.put(IInternalDebugUIConstants.WORKING_SET_NAME, getOriginalWorkingSets());// creating breakpoint in the original working set
IResource resource = BreakpointUtils.getBreakpointResource(destMethod);
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/WatchpointFieldChange.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/WatchpointFieldChange.java
index 56c0ee1..d2895bd 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/WatchpointFieldChange.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/WatchpointFieldChange.java
@@ -51,7 +51,7 @@
*/
@Override
public Change perform(IProgressMonitor pm) throws CoreException {
- Map<String, Object> map = new HashMap<String, Object>();
+ Map<String, Object> map = new HashMap<>();
map.put(IInternalDebugUIConstants.WORKING_SET_NAME, getOriginalWorkingSets());// creating breakpoint in the original working set
BreakpointUtils.addJavaBreakpointAttributes(map, fDestField);
IResource resource = BreakpointUtils.getBreakpointResource(fDestField);
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/WatchpointTypeChange.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/WatchpointTypeChange.java
index 135c62b..3a2f412 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/WatchpointTypeChange.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/WatchpointTypeChange.java
@@ -57,7 +57,7 @@
@Override
public Change perform(IProgressMonitor pm) throws CoreException {
IField destField = fDestType.getField(getFieldName());
- Map<String, Object> map = new HashMap<String, Object>();
+ Map<String, Object> map = new HashMap<>();
BreakpointUtils.addJavaBreakpointAttributes(map, destField);
IResource resource = BreakpointUtils.getBreakpointResource(destField);
int[] range = getNewLineNumberAndRange(destField);
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/WatchpointTypeRenameChange.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/WatchpointTypeRenameChange.java
index bf8bd06..5d0c5c8 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/WatchpointTypeRenameChange.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/WatchpointTypeRenameChange.java
@@ -61,7 +61,7 @@
destinationField = getDestinationType().getField(getFieldName());
}
- Map<String, Object> map = new HashMap<String, Object>();
+ Map<String, Object> map = new HashMap<>();
BreakpointUtils.addJavaBreakpointAttributes(map, destinationField);
map.put(IInternalDebugUIConstants.WORKING_SET_NAME, getOriginalWorkingSets()); // creating breakpoint in the original working set
IResource resource = BreakpointUtils.getBreakpointResource(destinationField);
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/EditLogicalStructureDialog.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/EditLogicalStructureDialog.java
index 4ea9ddd..6f8c4bf 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/EditLogicalStructureDialog.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/EditLogicalStructureDialog.java
@@ -88,7 +88,7 @@
private final List<String[]> fVariables;
public AttributesContentProvider(String[][] variables) {
- fVariables= new ArrayList<String[]>();
+ fVariables= new ArrayList<>();
for (int i= 0; i < variables.length; i++) {
String[] variable= new String[2];
variable[0]= variables[i][0];
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/EvaluationContextManager.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/EvaluationContextManager.java
index e350205..aedb75c 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/EvaluationContextManager.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/EvaluationContextManager.java
@@ -126,7 +126,7 @@
*/
private void setContext(IWorkbenchPage page, IJavaStackFrame frame, boolean instOf) {
if (fContextsByPage == null) {
- fContextsByPage = new HashMap<IWorkbenchPage, IJavaStackFrame>();
+ fContextsByPage = new HashMap<>();
}
fContextsByPage.put(page, frame);
System.setProperty(DEBUGGER_ACTIVE, "true"); //$NON-NLS-1$
@@ -214,7 +214,7 @@
* @return IJavaStackFrame
*/
public static IJavaStackFrame getEvaluationContext(IWorkbenchWindow window) {
- List<IWorkbenchWindow> alreadyVisited= new ArrayList<IWorkbenchWindow>();
+ List<IWorkbenchWindow> alreadyVisited= new ArrayList<>();
if (window == null) {
window = fgManager.fActiveWindow;
}
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/HeapWalkingPreferencePage.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/HeapWalkingPreferencePage.java
index f1f49c4..a249a76 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/HeapWalkingPreferencePage.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/HeapWalkingPreferencePage.java
@@ -48,7 +48,7 @@
*/
@Override
public void init(IWorkbench workbench) {
- fErrorMessages = new HashMap<Object, String>();
+ fErrorMessages = new HashMap<>();
}
/* (non-Javadoc)
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JDIDebugUIPlugin.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JDIDebugUIPlugin.java
index da5932c..36d112b 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JDIDebugUIPlugin.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JDIDebugUIPlugin.java
@@ -532,7 +532,7 @@
* workspace are considered.
*/
public static ElementListSelectionDialog createAllPackagesDialog(Shell shell, IJavaProject[] originals, final boolean includeDefaultPackage) throws JavaModelException{
- final List<IPackageFragment> packageList = new ArrayList<IPackageFragment>();
+ final List<IPackageFragment> packageList = new ArrayList<>();
if (originals == null) {
IWorkspaceRoot wsroot= ResourcesPlugin.getWorkspace().getRoot();
IJavaModel model= JavaCore.create(wsroot);
@@ -545,7 +545,7 @@
@Override
public void run(IProgressMonitor monitor) {
try {
- Set<String> packageNameSet= new HashSet<String>();
+ Set<String> packageNameSet= new HashSet<>();
monitor.beginTask(DebugUIMessages.JDIDebugUIPlugin_Searching_1, projects.length);
for (int i = 0; i < projects.length; i++) {
IPackageFragment[] pkgs= projects[i].getPackageFragments();
@@ -616,7 +616,7 @@
}
protected void initializeVMInstallTypePageMap() {
- fVmInstallTypePageMap = new HashMap<String, IConfigurationElement>(10);
+ fVmInstallTypePageMap = new HashMap<>(10);
IExtensionPoint extensionPoint= Platform.getExtensionRegistry().getExtensionPoint(getUniqueIdentifier(), IJavaDebugUIConstants.EXTENSION_POINT_VM_INSTALL_TYPE_PAGE);
IConfigurationElement[] infos= extensionPoint.getConfigurationElements();
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JDIModelPresentation.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JDIModelPresentation.java
index 3ea7c15..b7f7df0 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JDIModelPresentation.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JDIModelPresentation.java
@@ -116,7 +116,7 @@
*/
public final static String DISPLAY_QUALIFIED_NAMES= "DISPLAY_QUALIFIED_NAMES"; //$NON-NLS-1$
- protected HashMap<String, Object> fAttributes= new HashMap<String, Object>(3);
+ protected HashMap<String, Object> fAttributes= new HashMap<>(3);
static final Point BIG_SIZE= new Point(16, 16);
@@ -1932,7 +1932,7 @@
* Decompose a comma separated list of generic names (String) to a list of generic names (List)
*/
private List<String> getNameList(String listName) {
- List<String> names= new ArrayList<String>();
+ List<String> names= new ArrayList<>();
StringTokenizer tokenizer= new StringTokenizer(listName, ",<>", true); //$NON-NLS-1$
int enclosingLevel= 0;
int startPos= 0;
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDebugOptionsManager.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDebugOptionsManager.java
index 1ab2e09..6afe57d 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDebugOptionsManager.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDebugOptionsManager.java
@@ -129,7 +129,7 @@
private static Set<String> fgDisplayOptions;
static {
- fgDisplayOptions = new HashSet<String>();
+ fgDisplayOptions = new HashSet<>();
fgDisplayOptions.add(IJDIPreferencesConstants.PREF_SHOW_CHAR);
fgDisplayOptions.add(IJDIPreferencesConstants.PREF_SHOW_HEX);
fgDisplayOptions.add(IJDIPreferencesConstants.PREF_SHOW_UNSIGNED);
@@ -442,7 +442,7 @@
* @return list
*/
public static String[] parseList(String listString) {
- List<String> list = new ArrayList<String>(10);
+ List<String> list = new ArrayList<>(10);
StringTokenizer tokenizer = new StringTokenizer(listString, ","); //$NON-NLS-1$
while (tokenizer.hasMoreTokens()) {
String token = tokenizer.nextToken();
@@ -717,7 +717,7 @@
@Override
public void breakpointsAdded(final IBreakpoint[] breakpoints) {
// if a breakpoint is added, but already has a message, do not update it
- List<IBreakpoint> update = new ArrayList<IBreakpoint>();
+ List<IBreakpoint> update = new ArrayList<>();
for (int i = 0; i < breakpoints.length; i++) {
IBreakpoint breakpoint = breakpoints[i];
try {
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDetailFormattersManager.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDetailFormattersManager.java
index dd11fc2..1832c18 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDetailFormattersManager.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDetailFormattersManager.java
@@ -101,7 +101,7 @@
DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this);
DebugPlugin.getDefault().addDebugEventListener(this);
DebugUITools.getPreferenceStore().addPropertyChangeListener(this);
- fCacheMap= new HashMap<Key, Expression>();
+ fCacheMap= new HashMap<>();
}
/**
@@ -109,7 +109,7 @@
*/
private void populateDetailFormattersMap() {
String[] detailFormattersList= JavaDebugOptionsManager.parseList(JDIDebugUIPlugin.getDefault().getPreferenceStore().getString(IJDIPreferencesConstants.PREF_DETAIL_FORMATTERS_LIST));
- fDetailFormattersMap= new HashMap<String, DetailFormatter>(detailFormattersList.length / 3);
+ fDetailFormattersMap= new HashMap<>(detailFormattersList.length / 3);
for (int i= 0, length= detailFormattersList.length; i < length;) {
String typeName= detailFormattersList[i++];
String snippet= detailFormattersList[i++].replace('\u0000', ',');
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDetailFormattersPreferencePage.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDetailFormattersPreferencePage.java
index 065fedd..54451be 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDetailFormattersPreferencePage.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDetailFormattersPreferencePage.java
@@ -370,8 +370,8 @@
fViewer= viewer;
// load the current formatters
String[] detailFormattersList= JavaDebugOptionsManager.parseList(JDIDebugUIPlugin.getDefault().getPreferenceStore().getString(IJDIPreferencesConstants.PREF_DETAIL_FORMATTERS_LIST));
- fDetailFormattersSet= new TreeSet<DetailFormatter>();
- fDefinedTypes= new ArrayList<String>(detailFormattersList.length / 3);
+ fDetailFormattersSet= new TreeSet<>();
+ fDefinedTypes= new ArrayList<>(detailFormattersList.length / 3);
for (int i= 0, length= detailFormattersList.length; i < length;) {
String typeName= detailFormattersList[i++];
String snippet= detailFormattersList[i++].replace('\u0000', ',');
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaPrimitivesPreferencePage.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaPrimitivesPreferencePage.java
index f35b53b..d4a8287 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaPrimitivesPreferencePage.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaPrimitivesPreferencePage.java
@@ -33,7 +33,7 @@
*/
public class JavaPrimitivesPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
- private List<BooleanFieldEditor> fEdtiors = new ArrayList<BooleanFieldEditor>();
+ private List<BooleanFieldEditor> fEdtiors = new ArrayList<>();
public JavaPrimitivesPreferencePage() {
super(DebugUIMessages.JavaPrimitivesPreferencePage_0);
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaStepFilterPreferencePage.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaStepFilterPreferencePage.java
index 410c670..4529693 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaStepFilterPreferencePage.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaStepFilterPreferencePage.java
@@ -418,8 +418,8 @@
public boolean performOk() {
DebugUITools.setUseStepFilters(fUseStepFiltersButton.getSelection());
IPreferenceStore store = getPreferenceStore();
- ArrayList<String> active = new ArrayList<String>();
- ArrayList<String> inactive = new ArrayList<String>();
+ ArrayList<String> active = new ArrayList<>();
+ ArrayList<String> inactive = new ArrayList<>();
String name = ""; //$NON-NLS-1$
Filter[] filters = getAllFiltersFromTable();
for(int i = 0; i < filters.length; i++) {
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaVarActionFilter.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaVarActionFilter.java
index 69f2a4f..93639d8 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaVarActionFilter.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaVarActionFilter.java
@@ -48,7 +48,7 @@
* @return the set of predefined types
*/
private static Set<String> initPrimitiveTypes() {
- HashSet<String> set = new HashSet<String>(8);
+ HashSet<String> set = new HashSet<>(8);
set.add("short"); //$NON-NLS-1$
set.add("int"); //$NON-NLS-1$
set.add("long"); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AbstractAddStepFilterAction.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AbstractAddStepFilterAction.java
index ceaa079..defafc1 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AbstractAddStepFilterAction.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AbstractAddStepFilterAction.java
@@ -64,8 +64,8 @@
IPreferenceStore prefStore = getPreferenceStore();
String[] activeArray = JavaDebugOptionsManager.parseList(prefStore.getString(IJDIPreferencesConstants.PREF_ACTIVE_FILTERS_LIST));
String[] inactiveArray = JavaDebugOptionsManager.parseList(prefStore.getString(IJDIPreferencesConstants.PREF_INACTIVE_FILTERS_LIST));
- List<String> activeList = new ArrayList<String>(Arrays.asList(activeArray));
- List<String> inactiveList = new ArrayList<String>(Arrays.asList(inactiveArray));
+ List<String> activeList = new ArrayList<>(Arrays.asList(activeArray));
+ List<String> inactiveList = new ArrayList<>(Arrays.asList(inactiveArray));
// If the pattern is already in the active list, there's nothing to do
// (it can't/shouldn't be in the inactive list)
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AddExternalJarAction.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AddExternalJarAction.java
index f602dba..5a5b764 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AddExternalJarAction.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AddExternalJarAction.java
@@ -57,7 +57,7 @@
int nChosen = fileNames.length;
IPath filterPath = new Path(dialog.getFilterPath());
- ArrayList<IRuntimeClasspathEntry> list = new ArrayList<IRuntimeClasspathEntry>();
+ ArrayList<IRuntimeClasspathEntry> list = new ArrayList<>();
IPath path = null;
for (int i= 0; i < nChosen; i++) {
path = filterPath.append(fileNames[i]).makeAbsolute();
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AddFolderAction.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AddFolderAction.java
index 1e0a43b..5d37982 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AddFolderAction.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AddFolderAction.java
@@ -121,7 +121,7 @@
*/
protected List<IResource> getSelectedFolders() {
List<IRuntimeClasspathEntry> list = getEntriesAsList();
- List<IResource> folders = new ArrayList<IResource>();
+ List<IResource> folders = new ArrayList<>();
Iterator<IRuntimeClasspathEntry> iter = list.iterator();
while (iter.hasNext()) {
IRuntimeClasspathEntry entry = iter.next();
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AddJarAction.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AddJarAction.java
index 8bf4015..4d66a1c 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AddJarAction.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AddJarAction.java
@@ -60,7 +60,7 @@
*/
protected IPath[] getSelectedJars() {
List<IRuntimeClasspathEntry> list = getEntriesAsList();
- List<IPath> jars = new ArrayList<IPath>();
+ List<IPath> jars = new ArrayList<>();
Iterator<IRuntimeClasspathEntry> iter = list.iterator();
while (iter.hasNext()) {
IRuntimeClasspathEntry entry = iter.next();
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AddProjectAction.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AddProjectAction.java
index 8d454e5..8120530 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AddProjectAction.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AddProjectAction.java
@@ -63,7 +63,7 @@
if (dialog.open() == Window.OK) {
Object[] selections = dialog.getResult();
- List<IJavaProject> additions = new ArrayList<IJavaProject>(selections.length);
+ List<IJavaProject> additions = new ArrayList<>(selections.length);
try {
for (int i = 0; i < selections.length; i++) {
IJavaProject jp = (IJavaProject)selections[i];
@@ -77,7 +77,7 @@
status.add(e.getStatus());
}
- List<IRuntimeClasspathEntry> runtimeEntries = new ArrayList<IRuntimeClasspathEntry>(additions.size());
+ List<IRuntimeClasspathEntry> runtimeEntries = new ArrayList<>(additions.size());
Iterator<IJavaProject> iter = additions.iterator();
while (iter.hasNext()) {
IJavaProject jp = iter.next();
@@ -125,11 +125,11 @@
JDIDebugUIPlugin.log(e);
projects= new IJavaProject[0];
}
- List<IJavaProject> remaining = new ArrayList<IJavaProject>();
+ List<IJavaProject> remaining = new ArrayList<>();
for (int i = 0; i < projects.length; i++) {
remaining.add(projects[i]);
}
- List<IJavaProject> alreadySelected = new ArrayList<IJavaProject>();
+ List<IJavaProject> alreadySelected = new ArrayList<>();
IRuntimeClasspathEntry[] entries = getViewer().getEntries();
for (int i = 0; i < entries.length; i++) {
if (entries[i].getType() == IRuntimeClasspathEntry.PROJECT) {
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/BreakpointLocationVerifierJob.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/BreakpointLocationVerifierJob.java
index ddf0b93..feb8a97 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/BreakpointLocationVerifierJob.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/BreakpointLocationVerifierJob.java
@@ -213,7 +213,7 @@
* Create a new breakpoint at the right position.
*/
private void createNewBreakpoint(int lineNumber, String typeName) throws CoreException {
- Map<String, Object> newAttributes = new HashMap<String, Object>(10);
+ Map<String, Object> newAttributes = new HashMap<>(10);
int start = -1, end = -1;
if (fType != null) {
try {
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/InstanceFiltersAction.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/InstanceFiltersAction.java
index 6676b2b..36a5dda 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/InstanceFiltersAction.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/InstanceFiltersAction.java
@@ -181,7 +181,7 @@
dialog.setTitle(ActionMessages.InstanceFiltersAction_2);
// determine initial selection
- List<IJavaBreakpoint> existing = new ArrayList<IJavaBreakpoint>();
+ List<IJavaBreakpoint> existing = new ArrayList<>();
Iterator<IJavaBreakpoint> iter = breakpoints.iterator();
while (iter.hasNext()) {
IJavaBreakpoint bp = iter.next();
@@ -222,11 +222,11 @@
}
protected List<IJavaBreakpoint> getApplicableBreakpoints(IJavaVariable variable, IJavaObject object) {
- List<IJavaBreakpoint> breakpoints = new ArrayList<IJavaBreakpoint>();
+ List<IJavaBreakpoint> breakpoints = new ArrayList<>();
try {
// collect names in type hierarchy
- List<String> superTypeNames = new ArrayList<String>();
+ List<String> superTypeNames = new ArrayList<>();
IJavaType type = object.getJavaType();
while (type instanceof IJavaClassType) {
superTypeNames.add(type.getName());
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/OpenFromClipboardAction.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/OpenFromClipboardAction.java
index 1d52441..e8f4e4f 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/OpenFromClipboardAction.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/OpenFromClipboardAction.java
@@ -198,7 +198,7 @@
}
String trimmedText = inputText.replaceAll("\\s+", " "); //$NON-NLS-1$ //$NON-NLS-2$
- List<Object> matches = new ArrayList<Object>();
+ List<Object> matches = new ArrayList<>();
int line = 0;
try {
line = getJavaElementMatches(trimmedText, matches);
@@ -282,7 +282,7 @@
}
private static void handleSingleLineInput(String inputText) {
- List<Object> matches = new ArrayList<Object>();
+ List<Object> matches = new ArrayList<>();
try {
int line= getJavaElementMatches(inputText, matches);
handleMatches(matches, line, inputText);
@@ -690,7 +690,7 @@
if (index != -1) {
typeName = memberName.substring(0, index);
memberName = memberName.substring(index + 1);
- final List<Object> typeMatches = new ArrayList<Object>();
+ final List<Object> typeMatches = new ArrayList<>();
noOfSearches++;
doTypeSearch(typeName, typeMatches, progress.newChild(work / noOfSearches));
IType[] types = new IType[typeMatches.size()];
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/RunToLineAdapter.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/RunToLineAdapter.java
index d2c5bdd..4eb5303 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/RunToLineAdapter.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/RunToLineAdapter.java
@@ -88,7 +88,7 @@
throw new CoreException(new Status(IStatus.ERROR, JDIDebugUIPlugin.getUniqueIdentifier(), IJavaDebugUIConstants.INTERNAL_ERROR, "Invalid Type Name", null)); //$NON-NLS-1$
}
IBreakpoint breakpoint= null;
- Map<String, Object> attributes = new HashMap<String, Object>(4);
+ Map<String, Object> attributes = new HashMap<>(4);
BreakpointUtils.addRunToLineAttributes(attributes);
breakpoint= JDIDebugModel.createLineBreakpoint(ResourcesPlugin.getWorkspace().getRoot(), typeName[0], lineNumber[0], -1, -1, 1, false, attributes);
errorMessage = "Unable to locate debug target"; //$NON-NLS-1$
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/RuntimeClasspathAction.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/RuntimeClasspathAction.java
index 58669ef..a3e332d 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/RuntimeClasspathAction.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/RuntimeClasspathAction.java
@@ -76,7 +76,7 @@
* @return targets for an action
*/
protected List<IRuntimeClasspathEntry> getOrderedSelection() {
- List<IRuntimeClasspathEntry> targets = new ArrayList<IRuntimeClasspathEntry>();
+ List<IRuntimeClasspathEntry> targets = new ArrayList<>();
List<?> selection = ((IStructuredSelection)getViewer().getSelection()).toList();
IRuntimeClasspathEntry[] entries = getViewer().getEntries();
for (int i = 0; i < entries.length; i++) {
@@ -94,7 +94,7 @@
*/
protected List<IRuntimeClasspathEntry> getEntriesAsList() {
IRuntimeClasspathEntry[] entries = getViewer().getEntries();
- List<IRuntimeClasspathEntry> list = new ArrayList<IRuntimeClasspathEntry>(entries.length);
+ List<IRuntimeClasspathEntry> list = new ArrayList<>(entries.length);
for (int i = 0; i < entries.length; i++) {
list.add(entries[i]);
}
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java
index 51ea548..a1fa186 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java
@@ -270,7 +270,7 @@
start = range.getOffset();
end = start + range.getLength();
}
- attributes = new HashMap<String, Object>(10);
+ attributes = new HashMap<>(10);
BreakpointUtils.addJavaBreakpointAttributes(attributes, members[i]);
type = members[i].getDeclaringType();
signature = members[i].getSignature();
@@ -391,7 +391,7 @@
}
return Status.OK_STATUS;
}
- Map<String, Object> attributes = new HashMap<String, Object>(10);
+ Map<String, Object> attributes = new HashMap<>(10);
IDocumentProvider documentProvider = editor.getDocumentProvider();
if (documentProvider == null) {
return Status.CANCEL_STATUS;
@@ -469,7 +469,7 @@
deleteBreakpoint(existing, part, monitor);
return Status.OK_STATUS;
}
- HashMap<String, Object> map = new HashMap<String, Object>(10);
+ HashMap<String, Object> map = new HashMap<>(10);
BreakpointUtils.addJavaBreakpointAttributes(map, type);
ISourceRange range= type.getNameRange();
int start = -1;
@@ -715,7 +715,7 @@
if (selection.isEmpty()) {
return new IMethod[0];
}
- List<IMethod> methods = new ArrayList<IMethod>(selection.size());
+ List<IMethod> methods = new ArrayList<>(selection.size());
Iterator<?> iterator = selection.iterator();
while (iterator.hasNext()) {
Object thing = iterator.next();
@@ -746,7 +746,7 @@
if (selection.isEmpty()) {
return new IMethod[0];
}
- List<IMethod> methods = new ArrayList<IMethod>(selection.size());
+ List<IMethod> methods = new ArrayList<>(selection.size());
Iterator<?> iterator = selection.iterator();
while (iterator.hasNext()) {
Object thing = iterator.next();
@@ -810,7 +810,7 @@
if (selection.isEmpty()) {
return Collections.EMPTY_LIST;
}
- List<Object> fields = new ArrayList<Object>(selection.size());
+ List<Object> fields = new ArrayList<>(selection.size());
Iterator<?> iterator = selection.iterator();
while (iterator.hasNext()) {
Object thing = iterator.next();
@@ -984,7 +984,7 @@
}
int start = -1;
int end = -1;
- attributes = new HashMap<String, Object>(10);
+ attributes = new HashMap<>(10);
if (javaField == null) {
resource = ResourcesPlugin.getWorkspace().getRoot();
} else {
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/AbstractDetailPane.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/AbstractDetailPane.java
index 04cf88f..a799295 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/AbstractDetailPane.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/AbstractDetailPane.java
@@ -48,11 +48,11 @@
private String fDescription;
private String fId;
private AbstractJavaBreakpointEditor fEditor;
- private Set<Integer> fAutoSaveProperties = new HashSet<Integer>();
+ private Set<Integer> fAutoSaveProperties = new HashSet<>();
private IWorkbenchPartSite fSite;
// property listeners
- private ListenerList<IPropertyListener> fListeners = new ListenerList<IPropertyListener>();
+ private ListenerList<IPropertyListener> fListeners = new ListenerList<>();
private Composite fEditorParent;
/**
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/AddClassPrepareBreakpointAction.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/AddClassPrepareBreakpointAction.java
index 45feb84..54fea1279 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/AddClassPrepareBreakpointAction.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/AddClassPrepareBreakpointAction.java
@@ -59,7 +59,7 @@
for (int i = 0; i < selection.length; i++) {
final IType type = (IType) selection[i];
final IResource resource = BreakpointUtils.getBreakpointResource(type);
- final Map<String, Object> map = new HashMap<String, Object>(10);
+ final Map<String, Object> map = new HashMap<>(10);
BreakpointUtils.addJavaBreakpointAttributes(map, type);
int kind = IJavaClassPrepareBreakpoint.TYPE_CLASS;
if (!type.isClass()) {
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/AddExceptionAction.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/AddExceptionAction.java
index c96b5a0..dcac528 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/AddExceptionAction.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/AddExceptionAction.java
@@ -120,7 +120,7 @@
*/
private void createBreakpoint(final boolean caught, final boolean uncaught, final IType type) throws CoreException {
final IResource resource = BreakpointUtils.getBreakpointResource(type);
- final Map<String, Object> map = new HashMap<String, Object>(10);
+ final Map<String, Object> map = new HashMap<>(10);
BreakpointUtils.addJavaBreakpointAttributes(map, type);
IBreakpoint[] breakpoints = DebugPlugin.getDefault().getBreakpointManager().getBreakpoints(
JDIDebugModel.getPluginIdentifier());
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/BreakpointDetailPaneFactory.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/BreakpointDetailPaneFactory.java
index dc5b980..3e630be 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/BreakpointDetailPaneFactory.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/BreakpointDetailPaneFactory.java
@@ -42,7 +42,7 @@
*/
@Override
public Set<String> getDetailPaneTypes(IStructuredSelection selection) {
- HashSet<String> set = new HashSet<String>();
+ HashSet<String> set = new HashSet<>();
if (selection.size() == 1) {
IBreakpoint b = (IBreakpoint) selection.getFirstElement();
try {
@@ -129,7 +129,7 @@
private Map<String, String> getNameMap() {
if (fNameMap == null) {
- fNameMap = new HashMap<String, String>();
+ fNameMap = new HashMap<>();
fNameMap.put(LineBreakpointDetailPane.DETAIL_PANE_LINE_BREAKPOINT, BreakpointMessages.BreakpointDetailPaneFactory_0);
fNameMap.put(WatchpointDetailPane.DETAIL_PANE_WATCHPOINT, BreakpointMessages.WatchpointDetailPane_0);
fNameMap.put(MethodBreakpointDetailPane.DETAIL_PANE_METHOD_BREAKPOINT, BreakpointMessages.BreakpointDetailPaneFactory_1);
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/JavaBreakpointTypeAdapterFactory.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/JavaBreakpointTypeAdapterFactory.java
index 8adff72..88ba545 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/JavaBreakpointTypeAdapterFactory.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/JavaBreakpointTypeAdapterFactory.java
@@ -35,10 +35,10 @@
*/
public class JavaBreakpointTypeAdapterFactory implements IAdapterFactory {
- private Map<String, Object> fStratumTypes = new HashMap<String, Object>();
+ private Map<String, Object> fStratumTypes = new HashMap<>();
// map of breakpoint type names to breakpoint type categories
- private Map<String, IBreakpointTypeCategory> fOtherTypes = new HashMap<String, IBreakpointTypeCategory>();
+ private Map<String, IBreakpointTypeCategory> fOtherTypes = new HashMap<>();
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/ToggleClassPrepareBreakpointAction.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/ToggleClassPrepareBreakpointAction.java
index 263d26e..8cb708f 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/ToggleClassPrepareBreakpointAction.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/ToggleClassPrepareBreakpointAction.java
@@ -91,7 +91,7 @@
if (!type.isClass()) {
kind = IJavaClassPrepareBreakpoint.TYPE_INTERFACE;
}
- HashMap<String, Object> map = new HashMap<String, Object>(10);
+ HashMap<String, Object> map = new HashMap<>(10);
BreakpointUtils.addJavaBreakpointAttributes(map, type);
ISourceRange range= type.getNameRange();
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/classpath/AbstractClasspathEntry.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/classpath/AbstractClasspathEntry.java
index 8add92e..263b706 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/classpath/AbstractClasspathEntry.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/classpath/AbstractClasspathEntry.java
@@ -16,7 +16,7 @@
public abstract class AbstractClasspathEntry implements IClasspathEntry {
- protected List<IClasspathEntry> childEntries = new ArrayList<IClasspathEntry>();
+ protected List<IClasspathEntry> childEntries = new ArrayList<>();
protected IClasspathEntry parent = null;
/* (non-Javadoc)
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/classpath/ClasspathContentProvider.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/classpath/ClasspathContentProvider.java
index 7a9a1df..8aff086 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/classpath/ClasspathContentProvider.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/classpath/ClasspathContentProvider.java
@@ -166,7 +166,7 @@
return ((ClasspathEntry)parentElement).getChildren(fTab.getLaunchConfiguration());
}
if (parentElement == null) {
- List<Object> all= new ArrayList<Object>();
+ List<Object> all= new ArrayList<>();
Object[] topEntries= model.getEntries();
for (int i = 0; i < topEntries.length; i++) {
Object object = topEntries[i];
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/classpath/RuntimeClasspathViewer.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/classpath/RuntimeClasspathViewer.java
index f6dffaa..d66cecf 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/classpath/RuntimeClasspathViewer.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/classpath/RuntimeClasspathViewer.java
@@ -354,7 +354,7 @@
*/
public ISelection getSelectedEntries() {
IStructuredSelection selection= (IStructuredSelection)getSelection();
- List<IClasspathEntry> entries= new ArrayList<IClasspathEntry>(selection.size() * 2);
+ List<IClasspathEntry> entries= new ArrayList<>(selection.size() * 2);
Iterator<IClasspathEntry> itr= selection.iterator();
while (itr.hasNext()) {
IClasspathEntry element = itr.next();
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/console/JavaExceptionHyperLink.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/console/JavaExceptionHyperLink.java
index d61b1e1..272e916 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/console/JavaExceptionHyperLink.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/console/JavaExceptionHyperLink.java
@@ -105,7 +105,7 @@
} else if (source instanceof IType) {
type = (IType) source;
}
- Map<String, Object> map = new HashMap<String, Object>();
+ Map<String, Object> map = new HashMap<>();
if (type != null) {
res = BreakpointUtils.getBreakpointResource(type);
BreakpointUtils.addJavaBreakpointAttributes(map, type);
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/contentassist/JavaDebugContentAssistProcessor.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/contentassist/JavaDebugContentAssistProcessor.java
index f050e44..7bcb278 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/contentassist/JavaDebugContentAssistProcessor.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/contentassist/JavaDebugContentAssistProcessor.java
@@ -160,7 +160,7 @@
localVariableTypeNames, localVariableNames,
localModifiers, fContext.isStatic(), fCollector);
- List<IJavaCompletionProposal> total = new ArrayList<IJavaCompletionProposal>();
+ List<IJavaCompletionProposal> total = new ArrayList<>();
total.addAll(Arrays.asList(fCollector.getJavaCompletionProposals()));
if (fJavaEngine != null) {
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/display/DisplayView.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/display/DisplayView.java
index b49d1df..e4db3d8 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/display/DisplayView.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/display/DisplayView.java
@@ -150,8 +150,8 @@
protected IAction fClearDisplayAction;
protected DisplayViewAction fContentAssistAction;
- protected Map<String, IAction> fGlobalActions= new HashMap<String, IAction>(4);
- protected List<String> fSelectionActions= new ArrayList<String>(3);
+ protected Map<String, IAction> fGlobalActions= new HashMap<>(4);
+ protected List<String> fSelectionActions= new ArrayList<>(3);
protected String fRestoredContents= null;
/**
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/ExecutionEnvironmentsPreferencePage.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/ExecutionEnvironmentsPreferencePage.java
index 3d2cc3b..5a39b00 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/ExecutionEnvironmentsPreferencePage.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/ExecutionEnvironmentsPreferencePage.java
@@ -64,7 +64,7 @@
/**
* Working copy "EE Profile -> Default JRE"
*/
- private Map<Object, Object> fDefaults = new HashMap<Object, Object>();
+ private Map<Object, Object> fDefaults = new HashMap<>();
class JREsContentProvider implements IStructuredContentProvider {
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/InstalledJREsBlock.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/InstalledJREsBlock.java
index 363a9fb..8929723 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/InstalledJREsBlock.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/InstalledJREsBlock.java
@@ -176,7 +176,7 @@
/**
* VMs being displayed
*/
- private List<IVMInstall> fVMs = new ArrayList<IVMInstall>();
+ private List<IVMInstall> fVMs = new ArrayList<>();
/**
* The main list control
@@ -535,7 +535,7 @@
IStructuredSelection selection = (IStructuredSelection) fVMList.getSelection();
Iterator<IVMInstall> it = selection.iterator();
- ArrayList<VMStandin> newEntries = new ArrayList<VMStandin>();
+ ArrayList<VMStandin> newEntries = new ArrayList<>();
while (it.hasNext()) {
IVMInstall selectedVM = it.next();
// duplicate & add VM
@@ -862,15 +862,15 @@
}
// ignore installed locations
- final Set<File> exstingLocations = new HashSet<File>();
+ final Set<File> exstingLocations = new HashSet<>();
for (IVMInstall vm : fVMs) {
exstingLocations.add(vm.getInstallLocation());
}
// search
final File rootDir = new File(path);
- final List<File> locations = new ArrayList<File>();
- final List<IVMInstallType> types = new ArrayList<IVMInstallType>();
+ final List<File> locations = new ArrayList<>();
+ final List<IVMInstallType> types = new ArrayList<>();
IRunnableWithProgress r = new IRunnableWithProgress() {
@Override
@@ -939,11 +939,11 @@
* Mac OS location
*/
private void doMacSearch() {
- final List<VMStandin> added = new ArrayList<VMStandin>();
+ final List<VMStandin> added = new ArrayList<>();
IRunnableWithProgress r = new IRunnableWithProgress() {
@Override
public void run(IProgressMonitor monitor) throws InvocationTargetException {
- Set<String> exists = new HashSet<String>();
+ Set<String> exists = new HashSet<>();
for (IVMInstall vm : fVMs) {
exists.add(vm.getId());
}
@@ -1014,7 +1014,7 @@
if (names == null) {
return;
}
- List<File> subDirs = new ArrayList<File>();
+ List<File> subDirs = new ArrayList<>();
for (int i = 0; i < names.length; i++) {
if (monitor.isCanceled()) {
return;
@@ -1157,7 +1157,7 @@
*/
protected void fillWithWorkspaceJREs() {
// fill with JREs
- List<VMStandin> standins = new ArrayList<VMStandin>();
+ List<VMStandin> standins = new ArrayList<>();
IVMInstallType[] types = JavaRuntime.getVMInstallTypes();
for (int i = 0; i < types.length; i++) {
IVMInstallType type = types[i];
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREsComboBlock.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREsComboBlock.java
index 7f6ff01..2124c7b 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREsComboBlock.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREsComboBlock.java
@@ -68,7 +68,7 @@
/**
* VMs being displayed
*/
- private List<Object> fVMs = new ArrayList<Object>();
+ private List<Object> fVMs = new ArrayList<>();
/**
* The main control
@@ -131,7 +131,7 @@
/**
* List of execution environments
*/
- private List<Object> fEnvironments = new ArrayList<Object>();
+ private List<Object> fEnvironments = new ArrayList<>();
private IStatus fStatus = OK_STATUS;
@@ -440,7 +440,7 @@
*/
protected void fillWithWorkspaceJREs() {
// fill with JREs
- List<VMStandin> standins = new ArrayList<VMStandin>();
+ List<VMStandin> standins = new ArrayList<>();
IVMInstallType[] types = JavaRuntime.getVMInstallTypes();
for (int i = 0; i < types.length; i++) {
IVMInstallType type = types[i];
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/LibraryContentProvider.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/LibraryContentProvider.java
index e877192..4a32789 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/LibraryContentProvider.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/LibraryContentProvider.java
@@ -81,7 +81,7 @@
}
}
- private HashMap<LibraryStandin, Object[]> fChildren= new HashMap<LibraryStandin, Object[]>();
+ private HashMap<LibraryStandin, Object[]> fChildren= new HashMap<>();
private LibraryStandin[] fLibraries= new LibraryStandin[0];
@@ -183,7 +183,7 @@
* the current viewer selection, or an empty set, never <code>null</code>
*/
private Set<Object> getSelectedLibraries(IStructuredSelection selection) {
- Set<Object> libraries= new HashSet<Object>();
+ Set<Object> libraries= new HashSet<>();
for (Iterator<?> iter= selection.iterator(); iter.hasNext();) {
Object element= iter.next();
if (element instanceof LibraryStandin) {
@@ -234,7 +234,7 @@
* @param selection the current viewer selection
*/
public void remove(IStructuredSelection selection) {
- List<LibraryStandin> newLibraries = new ArrayList<LibraryStandin>();
+ List<LibraryStandin> newLibraries = new ArrayList<>();
for (int i = 0; i < fLibraries.length; i++) {
newLibraries.add(fLibraries[i]);
}
@@ -260,11 +260,11 @@
* is empty.
*/
public void add(LibraryLocation[] libs, IStructuredSelection selection) {
- List<LibraryStandin> newLibraries = new ArrayList<LibraryStandin>(fLibraries.length + libs.length);
+ List<LibraryStandin> newLibraries = new ArrayList<>(fLibraries.length + libs.length);
for (int i = 0; i < fLibraries.length; i++) {
newLibraries.add(fLibraries[i]);
}
- List<LibraryStandin> toAdd = new ArrayList<LibraryStandin>(libs.length);
+ List<LibraryStandin> toAdd = new ArrayList<>(libs.length);
for (int i = 0; i < libs.length; i++) {
toAdd.add(new LibraryStandin(libs[i]));
}
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/StandardVMCommandTab.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/StandardVMCommandTab.java
index 56470e6..6b61d92 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/StandardVMCommandTab.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/StandardVMCommandTab.java
@@ -42,7 +42,7 @@
protected Button fDefaultButton;
protected Button fSpecificButton;
- protected static final Map<?, ?> EMPTY_MAP = new HashMap<Object, Object>(1);
+ protected static final Map<?, ?> EMPTY_MAP = new HashMap<>(1);
/**
* @see ILaunchConfigurationTab#createControl(Composite)
@@ -164,7 +164,7 @@
configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE_SPECIFIC_ATTRS_MAP, (Map<String, String>)null);
} else {
String javaCommand = fJavaCommandText.getText();
- Map<String, String> attributeMap = new HashMap<String, String>(1);
+ Map<String, String> attributeMap = new HashMap<>(1);
attributeMap.put(IJavaLaunchConfigurationConstants.ATTR_JAVA_COMMAND, javaCommand);
configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE_SPECIFIC_ATTRS_MAP, attributeMap);
}
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/VMInstallWizard.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/VMInstallWizard.java
index 9112dd6..27ac354 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/VMInstallWizard.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/VMInstallWizard.java
@@ -42,7 +42,7 @@
*/
public VMInstallWizard(VMStandin editVM, IVMInstall[] currentInstalls) {
fEditVM = editVM;
- List<String> names = new ArrayList<String>(currentInstalls.length);
+ List<String> names = new ArrayList<>(currentInstalls.length);
for (int i = 0; i < currentInstalls.length; i++) {
IVMInstall install = currentInstalls[i];
if (!install.equals(editVM)) {
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/VMTypePage.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/VMTypePage.java
index e7e583a..85ae2b8 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/VMTypePage.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/VMTypePage.java
@@ -53,7 +53,7 @@
/**
* Keep track of pages created, so we can dispose of them.
*/
- private Set<AbstractVMInstallPage> fPages = new HashSet<AbstractVMInstallPage>();
+ private Set<AbstractVMInstallPage> fPages = new HashSet<>();
/**
* Label provider for VM types
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/AppletLaunchConfigurationUtils.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/AppletLaunchConfigurationUtils.java
index 9175123..bd9c727 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/AppletLaunchConfigurationUtils.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/AppletLaunchConfigurationUtils.java
@@ -108,7 +108,7 @@
*/
public static Set<IType> collectAppletTypesInProject(IProgressMonitor monitor, IJavaProject project) {
IType[] types;
- HashSet<IType> result = new HashSet<IType>(5);
+ HashSet<IType> result = new HashSet<>(5);
try {
IType javaLangApplet = AppletLaunchConfigurationUtils.getMainType("java.applet.Applet", project); //$NON-NLS-1$
ITypeHierarchy hierarchy = javaLangApplet.newTypeHierarchy(project, new SubProgressMonitor(monitor, 1));
@@ -174,7 +174,7 @@
}
private static List<IType> searchSubclassesOfApplet(IProgressMonitor pm, IJavaElement javaElement) {
- return new ArrayList<IType>(collectAppletTypesInProject(pm, javaElement.getJavaProject()));
+ return new ArrayList<>(collectAppletTypesInProject(pm, javaElement.getJavaProject()));
}
private static boolean isSubclassOfApplet(IProgressMonitor pm, IType type) {
@@ -210,7 +210,7 @@
* @throws InterruptedException
*/
public static IType[] findApplets(IRunnableContext context, final Object[] elements) throws InvocationTargetException, InterruptedException {
- final Set<Object> result= new HashSet<Object>();
+ final Set<Object> result= new HashSet<>();
if (elements.length > 0) {
IRunnableWithProgress runnable= new IRunnableWithProgress() {
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/AppletSelectionDialog.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/AppletSelectionDialog.java
index 08529e9..dce9b39 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/AppletSelectionDialog.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/AppletSelectionDialog.java
@@ -112,7 +112,7 @@
// For each java project, calculate the Applet types it contains and add
// them to the results
final int projectCount = javaProjects.length;
- final Set<IType> results = new HashSet<IType>(projectCount);
+ final Set<IType> results = new HashSet<>(projectCount);
boolean canceled = false;
try {
fRunnableContext.run(true, true, new IRunnableWithProgress() {
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/DebugTypeSelectionDialog.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/DebugTypeSelectionDialog.java
index c6df39c..783497d 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/DebugTypeSelectionDialog.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/DebugTypeSelectionDialog.java
@@ -52,7 +52,7 @@
* Main list label provider
*/
public class DebugTypeLabelProvider implements ILabelProvider {
- HashMap<ImageDescriptor, Image> fImageMap = new HashMap<ImageDescriptor, Image>();
+ HashMap<ImageDescriptor, Image> fImageMap = new HashMap<>();
@Override
public Image getImage(Object element) {
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/JREResolution.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/JREResolution.java
index 82bbc59..58c6d24 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/JREResolution.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/JREResolution.java
@@ -52,7 +52,7 @@
*/
protected static IVMInstall[] getAllVMs() {
IVMInstallType[] types = JavaRuntime.getVMInstallTypes();
- List<IVMInstall> vms = new ArrayList<IVMInstall>();
+ List<IVMInstall> vms = new ArrayList<>();
for (int i = 0; i < types.length; i++) {
IVMInstallType type = types[i];
IVMInstall[] installs = type.getVMInstalls();
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/MainMethodSearchEngine.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/MainMethodSearchEngine.java
index 49125fb..8e8fc2b 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/MainMethodSearchEngine.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/MainMethodSearchEngine.java
@@ -43,7 +43,7 @@
private List<IType> fResult;
public MethodCollector() {
- fResult = new ArrayList<IType>(200);
+ fResult = new ArrayList<>(200);
}
public List<IType> getResult() {
@@ -115,7 +115,7 @@
*/
private Set<IType> addSubtypes(List<IType> types, IProgressMonitor monitor, IJavaSearchScope scope) {
Iterator<IType> iterator = types.iterator();
- Set<IType> result = new HashSet<IType>(types.size());
+ Set<IType> result = new HashSet<>(types.size());
IType type = null;
ITypeHierarchy hierarchy = null;
IType[] subtypes = null;
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/ProjectClasspathArgumentSelector.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/ProjectClasspathArgumentSelector.java
index c7c011b..899049c 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/ProjectClasspathArgumentSelector.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/ProjectClasspathArgumentSelector.java
@@ -38,7 +38,7 @@
dialog.setTitle(LauncherMessages.ProjectClasspathArugumentSelector_0);
dialog.setMultipleSelection(false);
dialog.setMessage(LauncherMessages.ProjectClasspathArugumentSelector_1);
- List<IJavaProject> javaProjects = new ArrayList<IJavaProject>();
+ List<IJavaProject> javaProjects = new ArrayList<>();
IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
for (int i = 0; i < projects.length; i++) {
IJavaProject jp = JavaCore.create(projects[i]);
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/RuntimeClasspathViewer.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/RuntimeClasspathViewer.java
index f6f4015..c356217 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/RuntimeClasspathViewer.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/RuntimeClasspathViewer.java
@@ -47,7 +47,7 @@
/**
* The runtime classpath entries displayed in this viewer
*/
- protected List<IRuntimeClasspathEntry> fEntries = new ArrayList<IRuntimeClasspathEntry>();
+ protected List<IRuntimeClasspathEntry> fEntries = new ArrayList<>();
class ContentProvider implements IStructuredContentProvider {
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/SourceLookupBlock.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/SourceLookupBlock.java
index 078e06a..fbc7237 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/SourceLookupBlock.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/SourceLookupBlock.java
@@ -131,7 +131,7 @@
}
});
- List<RuntimeClasspathAction> advancedActions = new ArrayList<RuntimeClasspathAction>(5);
+ List<RuntimeClasspathAction> advancedActions = new ArrayList<>(5);
GC gc = new GC(parent);
gc.setFont(parent.getFont());
@@ -289,7 +289,7 @@
configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_DEFAULT_SOURCE_PATH, def);
try {
IRuntimeClasspathEntry[] entries = fPathViewer.getEntries();
- List<String> mementos = new ArrayList<String>(entries.length);
+ List<String> mementos = new ArrayList<>(entries.length);
for (int i = 0; i < entries.length; i++) {
mementos.add(entries[i].getMemento());
}
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/monitors/JavaMonitor.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/monitors/JavaMonitor.java
index 9598f0f..b9d6b18 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/monitors/JavaMonitor.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/monitors/JavaMonitor.java
@@ -54,7 +54,7 @@
* The List of JavaContendedMonitor and JavaOwnedMonitor associated with this
* monitor.
*/
- private List<PlatformObject> fElements= new ArrayList<PlatformObject>();
+ private List<PlatformObject> fElements= new ArrayList<>();
public JavaMonitor(IJavaObject monitor) {
fMonitor= monitor;
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/monitors/JavaMonitorThread.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/monitors/JavaMonitorThread.java
index a44ee1b..2569431 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/monitors/JavaMonitorThread.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/monitors/JavaMonitorThread.java
@@ -60,7 +60,7 @@
/**
* List of JavaOwningThread and JavaWaitingThread associated with this thread.
*/
- private List<IDebugElement> fElements= new ArrayList<IDebugElement>();
+ private List<IDebugElement> fElements= new ArrayList<>();
/**
* JavaWaitingThread object used to return the JavaOwnedMonitor for this
@@ -239,7 +239,7 @@
*/
private void fireChangeEvent(int detail) {
Object[] elements= fElements.toArray();
- List<Object> changedElement= new ArrayList<Object>();
+ List<Object> changedElement= new ArrayList<>();
if (fOriginalThread != null) {
changedElement.add(fOriginalThread);
}
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/monitors/ThreadMonitorManager.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/monitors/ThreadMonitorManager.java
index efb3b26..5e0a0c0 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/monitors/ThreadMonitorManager.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/monitors/ThreadMonitorManager.java
@@ -61,8 +61,8 @@
}
private ThreadMonitorManager() {
- fJavaMonitorThreads= new HashMap<IDebugElement, Object>();
- fJavaMonitors= new HashMap<IDebugElement, Object>();
+ fJavaMonitorThreads= new HashMap<>();
+ fJavaMonitors= new HashMap<>();
IPreferenceStore preferenceStore = JDIDebugUIPlugin.getDefault().getPreferenceStore();
preferenceStore.addPropertyChangeListener(this);
fIsEnabled= preferenceStore.getBoolean(IJavaDebugUIConstants.PREF_SHOW_MONITOR_THREAD_INFO);
@@ -238,11 +238,11 @@
public void run() {
JavaMonitorThread[] threads= getJavaMonitorThreads();
JavaMonitor[] monitors= getJavaMonitors();
- List<Object> inDeadlock= new ArrayList<Object>();
+ List<Object> inDeadlock= new ArrayList<>();
for (int i = 0; i < threads.length; i++) {
JavaMonitorThread thread= threads[i];
- List<JavaMonitorThread> threadStack= new ArrayList<JavaMonitorThread>();
- List<JavaMonitor> monitorStack= new ArrayList<JavaMonitor>();
+ List<JavaMonitorThread> threadStack= new ArrayList<>();
+ List<JavaMonitor> monitorStack= new ArrayList<>();
while (thread != null) {
boolean isInDeadlock= false;
if (inDeadlock.contains(thread) || threadStack.contains(thread)) {
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/ExceptionFilterEditor.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/ExceptionFilterEditor.java
index 7169f64..3a69591 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/ExceptionFilterEditor.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/ExceptionFilterEditor.java
@@ -178,8 +178,8 @@
protected void doStore() {
Object[] filters = fFilterContentProvider.getElements(null);
- List<String> inclusionFilters = new ArrayList<String>(filters.length);
- List<String> exclusionFilters = new ArrayList<String>(filters.length);
+ List<String> inclusionFilters = new ArrayList<>(filters.length);
+ List<String> exclusionFilters = new ArrayList<>(filters.length);
for (int i = 0; i < filters.length; i++) {
Filter filter = (Filter) filters[i];
String name = filter.getName();
@@ -512,7 +512,7 @@
eFilters = new String[] {
};
}
- fFilters = new ArrayList<Filter>();
+ fFilters = new ArrayList<>();
populateFilters(iFilters, true);
populateFilters(eFilters, false);
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/JavaBreakpointPage.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/JavaBreakpointPage.java
index 1c824b5..5a589f2 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/JavaBreakpointPage.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/JavaBreakpointPage.java
@@ -67,7 +67,7 @@
/*
* protected Button fTriggerPointButton; protected Button fTriggerPointButtonActive;
*/
- protected List<String> fErrorMessages= new ArrayList<String>();
+ protected List<String> fErrorMessages= new ArrayList<>();
protected String fPrevMessage = null;
private AbstractJavaBreakpointEditor fEditor;
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/ThreadFilterEditor.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/ThreadFilterEditor.java
index 4fce382..6f2cb9e 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/ThreadFilterEditor.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/ThreadFilterEditor.java
@@ -299,7 +299,7 @@
}
}
if (parent instanceof ILaunchManager) {
- List<IJavaDebugTarget> children= new ArrayList<IJavaDebugTarget>();
+ List<IJavaDebugTarget> children= new ArrayList<>();
ILaunch[] launches= ((ILaunchManager) parent).getLaunches();
IDebugTarget[] targets;
IJavaDebugTarget target;
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/VMCapabilitiesPropertyPage.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/VMCapabilitiesPropertyPage.java
index 2d9919b..1e30b8c 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/VMCapabilitiesPropertyPage.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/VMCapabilitiesPropertyPage.java
@@ -70,7 +70,7 @@
* Constructor
*/
public VMCapabilitiesPropertyPage() {
- fExpandedComps = new ArrayList<ExpandableComposite>();
+ fExpandedComps = new ArrayList<>();
}
/* (non-Javadoc)
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/snippeteditor/ScrapbookLauncher.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/snippeteditor/ScrapbookLauncher.java
index 9e031f8..e56af53 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/snippeteditor/ScrapbookLauncher.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/snippeteditor/ScrapbookLauncher.java
@@ -83,9 +83,9 @@
private IJavaLineBreakpoint fMagicBreakpoint;
- private HashMap<IFile, IDebugTarget> fScrapbookToVMs = new HashMap<IFile, IDebugTarget>(10);
- private HashMap<IDebugTarget, IBreakpoint> fVMsToBreakpoints = new HashMap<IDebugTarget, IBreakpoint>(10);
- private HashMap<IDebugTarget, IFile> fVMsToScrapbooks = new HashMap<IDebugTarget, IFile>(10);
+ private HashMap<IFile, IDebugTarget> fScrapbookToVMs = new HashMap<>(10);
+ private HashMap<IDebugTarget, IBreakpoint> fVMsToBreakpoints = new HashMap<>(10);
+ private HashMap<IDebugTarget, IFile> fVMsToScrapbooks = new HashMap<>(10);
private static ScrapbookLauncher fgDefault = null;
@@ -137,7 +137,7 @@
return null;
}
- List<IRuntimeClasspathEntry> cp = new ArrayList<IRuntimeClasspathEntry>(3);
+ List<IRuntimeClasspathEntry> cp = new ArrayList<>(3);
String jarFile = jarURL.getFile();
IRuntimeClasspathEntry supportEntry = JavaRuntime.newArchiveRuntimeClasspathEntry(new Path(jarFile));
cp.add(supportEntry);
@@ -212,7 +212,7 @@
}
// convert to mementos
- List<String> classpathList= new ArrayList<String>(classPath.length);
+ List<String> classpathList= new ArrayList<>(classPath.length);
for (int i = 0; i < classPath.length; i++) {
classpathList.add(classPath[i].getMemento());
}
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/snippeteditor/SelectImportsDialog.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/snippeteditor/SelectImportsDialog.java
index a1bbdf7..c729e84 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/snippeteditor/SelectImportsDialog.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/snippeteditor/SelectImportsDialog.java
@@ -79,7 +79,7 @@
}
protected void populateImports() {
- fImportNames= new ArrayList<Filter>(1);
+ fImportNames= new ArrayList<>(1);
if (fImports != null) {
for (int i = 0; i < fImports.length; i++) {
String name = fImports[i];
@@ -196,7 +196,7 @@
ElementListSelectionDialog dialog = null;
try {
IJavaProject project= fEditor.getJavaProject();
- List<IJavaElement> projects= new ArrayList<IJavaElement>();
+ List<IJavaElement> projects= new ArrayList<>();
projects.add(project);
IPackageFragmentRoot[] roots= project.getAllPackageFragmentRoots();
for (int i = 0; i < roots.length; i++) {
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/snippeteditor/SnippetOpenHierarchyOnSelectionAction.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/snippeteditor/SnippetOpenHierarchyOnSelectionAction.java
index 164fd31..b858c69 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/snippeteditor/SnippetOpenHierarchyOnSelectionAction.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/snippeteditor/SnippetOpenHierarchyOnSelectionAction.java
@@ -95,7 +95,7 @@
*/
protected List<IJavaElement> filterResolveResults(IJavaElement[] codeResolveResults) {
int nResults= codeResolveResults.length;
- List<IJavaElement> refs= new ArrayList<IJavaElement>(nResults);
+ List<IJavaElement> refs= new ArrayList<>(nResults);
for (int i= 0; i < nResults; i++) {
if (codeResolveResults[i] instanceof ISourceReference) {
refs.add(codeResolveResults[i]);
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/snippeteditor/SnippetOpenOnSelectionAction.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/snippeteditor/SnippetOpenOnSelectionAction.java
index 8f82248..28e4e7b 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/snippeteditor/SnippetOpenOnSelectionAction.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/snippeteditor/SnippetOpenOnSelectionAction.java
@@ -114,7 +114,7 @@
*/
protected List<IJavaElement> filterResolveResults(IJavaElement[] codeResolveResults) {
int nResults= codeResolveResults.length;
- List<IJavaElement> refs= new ArrayList<IJavaElement>(nResults);
+ List<IJavaElement> refs= new ArrayList<>(nResults);
for (int i= 0; i < nResults; i++) {
if (codeResolveResults[i] instanceof ISourceReference) {
refs.add(codeResolveResults[i]);
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/sourcelookup/JavaProjectSourceContainerBrowser.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/sourcelookup/JavaProjectSourceContainerBrowser.java
index d9ea5db..ffd007e 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/sourcelookup/JavaProjectSourceContainerBrowser.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/sourcelookup/JavaProjectSourceContainerBrowser.java
@@ -89,10 +89,10 @@
dialog.setTitle(SourceLookupMessages.JavaProjectSourceContainerBrowser_1);
MultiStatus status = new MultiStatus(JDIDebugUIPlugin.getUniqueIdentifier(), IJavaDebugUIConstants.INTERNAL_ERROR, "Failed to add project(s)", null); //$NON-NLS-1$
- List<ISourceContainer> sourceContainers = new ArrayList<ISourceContainer>();
+ List<ISourceContainer> sourceContainers = new ArrayList<>();
if (dialog.open() == Window.OK) {
Object[] selections = dialog.getResult();
- List<IJavaProject> additions = new ArrayList<IJavaProject>(selections.length);
+ List<IJavaProject> additions = new ArrayList<>(selections.length);
try {
for (int i = 0; i < selections.length; i++) {
IJavaProject jp = (IJavaProject)selections[i];
@@ -141,11 +141,11 @@
JDIDebugUIPlugin.log(e);
projects= new IJavaProject[0];
}
- List<IJavaProject> remaining = new ArrayList<IJavaProject>();
+ List<IJavaProject> remaining = new ArrayList<>();
for (int i = 0; i < projects.length; i++) {
remaining.add(projects[i]);
}
- List<IJavaProject> alreadySelected = new ArrayList<IJavaProject>();
+ List<IJavaProject> alreadySelected = new ArrayList<>();
ISourceContainer[] containers = director.getSourceContainers();
for (int i = 0; i < containers.length; i++) {
ISourceContainer container = containers[i];
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/threadgroups/JavaThreadEventHandler.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/threadgroups/JavaThreadEventHandler.java
index 6b8be44..6755f87 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/threadgroups/JavaThreadEventHandler.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/threadgroups/JavaThreadEventHandler.java
@@ -101,7 +101,7 @@
Object[] launchChildren = launch.getChildren();
delta = delta.addNode(launch, indexOf(launches, launch), IModelDelta.NO_CHANGE, launchChildren.length);
IJavaDebugTarget debugTarget = (IJavaDebugTarget) thread.getDebugTarget();
- List<IJavaThreadGroup> groups = new ArrayList<IJavaThreadGroup>();
+ List<IJavaThreadGroup> groups = new ArrayList<>();
try{
delta = delta.addNode(debugTarget, indexOf(launchChildren, debugTarget), IModelDelta.NO_CHANGE, debugTarget.getRootThreadGroups().length);
IJavaThread javaThread = (IJavaThread) thread;
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/variables/JavaContentProviderFilter.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/variables/JavaContentProviderFilter.java
index 76494a7..9613cad 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/variables/JavaContentProviderFilter.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/variables/JavaContentProviderFilter.java
@@ -45,7 +45,7 @@
boolean filterConstants = !includeConstants(context);
if (filterStatics || filterConstants) {
- List<Object> keep = new ArrayList<Object>(variables.length);
+ List<Object> keep = new ArrayList<>(variables.length);
for (int i = 0; i < variables.length; i++) {
boolean filter = false;
if (variables[i] instanceof IJavaVariable){
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/variables/JavaVariableLabelProvider.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/variables/JavaVariableLabelProvider.java
index dbf64e6..e2e7a64 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/variables/JavaVariableLabelProvider.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/variables/JavaVariableLabelProvider.java
@@ -54,7 +54,7 @@
/**
* Map of view id to qualified name setting
*/
- private Map<String, Boolean> fQualifiedNameSettings = new HashMap<String, Boolean>();
+ private Map<String, Boolean> fQualifiedNameSettings = new HashMap<>();
private boolean fQualifiedNames = false;
/**
diff --git a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/EvaluationResult.java b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/EvaluationResult.java
index e59ec42..7495e85 100644
--- a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/EvaluationResult.java
+++ b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/EvaluationResult.java
@@ -72,7 +72,7 @@
setEvaluationEngine(engine);
setThread(thread);
setSnippet(snippet);
- fErrors = new ArrayList<String>();
+ fErrors = new ArrayList<>();
}
/**
diff --git a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/LocalEvaluationEngine.java b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/LocalEvaluationEngine.java
index dd972a7..6f66a2f 100644
--- a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/LocalEvaluationEngine.java
+++ b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/LocalEvaluationEngine.java
@@ -492,8 +492,8 @@
// set up local variables and 'this' context for evaluation
IJavaVariable[] locals = frame.getLocalVariables();
- List<String> typeNames = new ArrayList<String>(locals.length);
- List<String> varNames = new ArrayList<String>(locals.length);
+ List<String> typeNames = new ArrayList<>(locals.length);
+ List<String> varNames = new ArrayList<>(locals.length);
for (IJavaVariable var : locals) {
String typeName = getTranslatedTypeName(var
@@ -913,7 +913,7 @@
*/
private void addSnippetFile(File file) {
if (fSnippetFiles == null) {
- fSnippetFiles = new ArrayList<File>();
+ fSnippetFiles = new ArrayList<>();
}
fSnippetFiles.add(file);
}
@@ -927,7 +927,7 @@
*/
private void addDirectory(File file) {
if (fDirectories == null) {
- fDirectories = new ArrayList<File>();
+ fDirectories = new ArrayList<>();
}
fDirectories.add(file);
}
@@ -1301,7 +1301,7 @@
typeName = typeName.substring(index + 1);
}
index = typeName.indexOf('$');
- ArrayList<String> list = new ArrayList<String>(1);
+ ArrayList<String> list = new ArrayList<>(1);
while (index >= 0) {
list.add(typeName.substring(0, index));
typeName = typeName.substring(index + 1);
diff --git a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/ASTEvaluationEngine.java b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/ASTEvaluationEngine.java
index a978870..4c1cae6 100644
--- a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/ASTEvaluationEngine.java
+++ b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/ASTEvaluationEngine.java
@@ -290,7 +290,7 @@
innerClassFields = new IVariable[0];
}
int numLocalsVar = localsVar.length;
- Set<String> names = new HashSet<String>();
+ Set<String> names = new HashSet<>();
// ******
// to hide problems with local variable declare as instance of Local
// Types
diff --git a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/ASTInstructionCompiler.java b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/ASTInstructionCompiler.java
index 9121ea5..0a293db 100644
--- a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/ASTInstructionCompiler.java
+++ b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/ASTInstructionCompiler.java
@@ -155,8 +155,8 @@
public ASTInstructionCompiler(int startPosition, String snippet) {
fStartPosition = startPosition;
fInstructions = new InstructionSequence(snippet);
- fStack = new Stack<Instruction>();
- fCompleteInstructions = new ArrayList<CompleteInstruction>();
+ fStack = new Stack<>();
+ fCompleteInstructions = new ArrayList<>();
}
/**
@@ -3900,7 +3900,7 @@
}
class slot {
- ArrayList<ConditionalJump> jumps = new ArrayList<ConditionalJump>();
+ ArrayList<ConditionalJump> jumps = new ArrayList<>();
ArrayList<Statement> stmts = null;
}
@@ -3918,7 +3918,7 @@
ArrayList<Statement> statementsDefault = null;
Jump jumpDefault = null;
- ArrayList<slot> jumpsStatements = new ArrayList<slot>();
+ ArrayList<slot> jumpsStatements = new ArrayList<>();
slot currentslot = new slot();
jumpsStatements.add(currentslot);
@@ -3930,7 +3930,7 @@
jumpDefault = new Jump();
push(jumpDefault);
storeInstruction(); // jump
- statementsDefault = new ArrayList<Statement>();
+ statementsDefault = new ArrayList<>();
} else {
if (switchCase.getExpression() instanceof StringLiteral) {
push(new SendMessage(
@@ -3957,7 +3957,7 @@
statementsDefault.add(statement);
} else {
if (currentslot.stmts == null) {
- currentslot.stmts = new ArrayList<Statement>();
+ currentslot.stmts = new ArrayList<>();
}
currentslot.stmts.add(statement);
}
diff --git a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/Interpreter.java b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/Interpreter.java
index 8d87c95..ee36651 100644
--- a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/Interpreter.java
+++ b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/Interpreter.java
@@ -54,7 +54,7 @@
public Interpreter(InstructionSequence instructions, IRuntimeContext context) {
fInstructions = instructions.getInstructions();
fContext = context;
- fInternalVariables = new HashMap<String, IVariable>();
+ fInternalVariables = new HashMap<>();
}
public void execute() throws CoreException {
@@ -79,7 +79,7 @@
}
private void reset() {
- fStack = new Stack<Object>();
+ fStack = new Stack<>();
fInstructionCounter = 0;
}
@@ -110,7 +110,7 @@
*/
private void disableCollection(IJavaObject value) {
if (fPermStorage == null) {
- fPermStorage = new ArrayList<IJavaObject>(5);
+ fPermStorage = new ArrayList<>(5);
}
try {
value.disableCollection();
diff --git a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/SignatureExt.java b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/SignatureExt.java
index 78d2176..d95d585 100644
--- a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/SignatureExt.java
+++ b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/SignatureExt.java
@@ -47,7 +47,7 @@
throw new IllegalArgumentException();
i++; // trailing '>'
}
- ArrayList<char[]> superList = new ArrayList<char[]>();
+ ArrayList<char[]> superList = new ArrayList<>();
while (i < length) {
int superStart = i;
i = Util.scanTypeSignature(typeSignature, i);
diff --git a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/SourceBasedSourceGenerator.java b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/SourceBasedSourceGenerator.java
index cdbc0cd..72bca4e 100644
--- a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/SourceBasedSourceGenerator.java
+++ b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/SourceBasedSourceGenerator.java
@@ -155,7 +155,7 @@
private int fSourceMajorLevel;
private int fSourceMinorLevel;
- private Stack<Map<String, String>> fTypeParameterStack = new Stack<Map<String, String>>();
+ private Stack<Map<String, String>> fTypeParameterStack = new Stack<>();
private Map<String, String> fMatchingTypeParameters = null;
private CompilationUnit fCompilationUnit;
{
@@ -1604,7 +1604,7 @@
private void pushTypeParameters(List<TypeParameter> typeParameters) {
if (!typeParameters.isEmpty()) {
- HashMap<String,String> newTypeParameters = new HashMap<String,String>(fTypeParameterStack.peek());
+ HashMap<String,String> newTypeParameters = new HashMap<>(fTypeParameterStack.peek());
Iterator<TypeParameter> iterator = typeParameters.iterator();
while (iterator.hasNext()) {
TypeParameter typeParameter = iterator.next();
diff --git a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/instructions/InstructionSequence.java b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/instructions/InstructionSequence.java
index 1c784b7..0a163f2 100644
--- a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/instructions/InstructionSequence.java
+++ b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/instructions/InstructionSequence.java
@@ -30,8 +30,8 @@
private CoreException fException;
public InstructionSequence(String snippet) {
- fInstructions = new ArrayList<Instruction>(10);
- fErrors = new ArrayList<String>();
+ fInstructions = new ArrayList<>(10);
+ fErrors = new ArrayList<>();
fSnippet = snippet;
}
diff --git a/org.eclipse.jdt.debug/jdi interfaces/com/sun/jdi/connect/IllegalConnectorArgumentsException.java b/org.eclipse.jdt.debug/jdi interfaces/com/sun/jdi/connect/IllegalConnectorArgumentsException.java
index 5ad92e4..ef1e0f6 100644
--- a/org.eclipse.jdt.debug/jdi interfaces/com/sun/jdi/connect/IllegalConnectorArgumentsException.java
+++ b/org.eclipse.jdt.debug/jdi interfaces/com/sun/jdi/connect/IllegalConnectorArgumentsException.java
@@ -31,7 +31,7 @@
public IllegalConnectorArgumentsException(String message, String argName) {
super(message);
- fNames = new ArrayList<String>(1);
+ fNames = new ArrayList<>(1);
fNames.add(argName);
}
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ArrayReferenceImpl.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ArrayReferenceImpl.java
index 1b99e0c..090eaf3 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ArrayReferenceImpl.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ArrayReferenceImpl.java
@@ -189,7 +189,7 @@
*/
private List<Value> readObjectSequence(int length, DataInputStream in)
throws IOException {
- List<Value> elements = new ArrayList<Value>(length);
+ List<Value> elements = new ArrayList<>(length);
for (int i = 0; i < length; i++) {
ValueImpl value = ObjectReferenceImpl
.readObjectRefWithTag(this, in);
@@ -211,7 +211,7 @@
*/
private List<Value> readPrimitiveSequence(int length, int type, DataInputStream in)
throws IOException {
- List<Value> elements = new ArrayList<Value>(length);
+ List<Value> elements = new ArrayList<>(length);
for (int i = 0; i < length; i++) {
ValueImpl value = ValueImpl.readWithoutTag(this, type, in);
elements.add(value);
@@ -260,7 +260,7 @@
@Override
public void setValue(int index, Value value) throws InvalidTypeException,
ClassNotLoadedException {
- ArrayList<Value> list = new ArrayList<Value>(1);
+ ArrayList<Value> list = new ArrayList<>(1);
list.add(value);
setValues(index, list, 0, 1);
}
@@ -397,7 +397,7 @@
*/
private List<Value> checkValues(List<? extends Value> values, Type type)
throws InvalidTypeException {
- List<Value> checkedValues = new ArrayList<Value>(values.size());
+ List<Value> checkedValues = new ArrayList<>(values.size());
Iterator<? extends Value> iterValues = values.iterator();
while (iterValues.hasNext()) {
checkedValues.add(ValueImpl.checkValue(iterValues.next(),
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ArrayTypeImpl.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ArrayTypeImpl.java
index 90a2477..a81b1a4 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ArrayTypeImpl.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ArrayTypeImpl.java
@@ -216,7 +216,7 @@
@Override
public Map<Field, Value> getValues(List<? extends Field> fields) {
if (fields.isEmpty()) {
- return new HashMap<Field, Value>();
+ return new HashMap<>();
}
throw new IllegalArgumentException(
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ClassLoaderReferenceImpl.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ClassLoaderReferenceImpl.java
index 1902532..047ae22 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ClassLoaderReferenceImpl.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ClassLoaderReferenceImpl.java
@@ -58,7 +58,7 @@
public List<ReferenceType> definedClasses() {
// Note that this information should not be cached.
List<ReferenceType> visibleClasses = visibleClasses();
- List<ReferenceType> result = new ArrayList<ReferenceType>(visibleClasses.size());
+ List<ReferenceType> result = new ArrayList<>(visibleClasses.size());
Iterator<ReferenceType> iter = visibleClasses.iterator();
while (iter.hasNext()) {
try {
@@ -87,7 +87,7 @@
defaultReplyErrorHandler(replyPacket.errorCode());
DataInputStream replyData = replyPacket.dataInStream();
int nrOfElements = readInt("elements", replyData); //$NON-NLS-1$
- List<ReferenceType> elements = new ArrayList<ReferenceType>(nrOfElements);
+ List<ReferenceType> elements = new ArrayList<>(nrOfElements);
for (int i = 0; i < nrOfElements; i++) {
ReferenceTypeImpl elt = ReferenceTypeImpl.readWithTypeTag(this, replyData);
if (elt == null)
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ClassTypeImpl.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ClassTypeImpl.java
index e7e762c..9989725 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ClassTypeImpl.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ClassTypeImpl.java
@@ -274,7 +274,7 @@
@Override
public List<ClassType> subclasses() {
// Note that this information should not be cached.
- List<ClassType> subclasses = new ArrayList<ClassType>();
+ List<ClassType> subclasses = new ArrayList<>();
Iterator<ReferenceType> itr = virtualMachineImpl().allRefTypes();
while (itr.hasNext()) {
try {
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/GenericSignature.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/GenericSignature.java
index 8f1ea2b..bb9ec3c 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/GenericSignature.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/GenericSignature.java
@@ -43,7 +43,7 @@
}
private static List<String> getTypeSignatureList(String typeSignatureList) {
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
int pos = 0;
while (pos < typeSignatureList.length()) {
int signatureLength = nextTypeSignatureLength(typeSignatureList, pos);
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/InterfaceTypeImpl.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/InterfaceTypeImpl.java
index 43a34f8..65137b9 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/InterfaceTypeImpl.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/InterfaceTypeImpl.java
@@ -104,7 +104,7 @@
@Override
public List<ClassType> implementors() {
// Note that this information should not be cached.
- List<ClassType> implementors = new ArrayList<ClassType>();
+ List<ClassType> implementors = new ArrayList<>();
Iterator<ReferenceType> itr = virtualMachineImpl().allRefTypes();
while (itr.hasNext()) {
ReferenceType refType = itr.next();
@@ -129,7 +129,7 @@
@Override
public List<InterfaceType> subinterfaces() {
// Note that this information should not be cached.
- List<InterfaceType> implementors = new ArrayList<InterfaceType>();
+ List<InterfaceType> implementors = new ArrayList<>();
Iterator<ReferenceType> itr = virtualMachineImpl().allRefTypes();
while (itr.hasNext()) {
try {
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/MethodImpl.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/MethodImpl.java
index b633ef7..b61d475 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/MethodImpl.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/MethodImpl.java
@@ -173,8 +173,8 @@
fLowestValidCodeIndex = readLong("lowest index", replyData); //$NON-NLS-1$
fHighestValidCodeIndex = readLong("highest index", replyData); //$NON-NLS-1$
int nrOfElements = readInt("elements", replyData); //$NON-NLS-1$
- fCodeIndexToLine = new HashMap<Long, Integer>();
- fLineToCodeIndexes = new HashMap<Integer, List<Long>>();
+ fCodeIndexToLine = new HashMap<>();
+ fLineToCodeIndexes = new HashMap<>();
if (nrOfElements == 0) {
throw new AbsentInformationException(
JDIMessages.MethodImpl_Got_empty_line_number_table_for_this_method_3);
@@ -195,7 +195,7 @@
List<Long> lineNrEntry = fLineToCodeIndexes.get(lineNrInt);
if (lineNrEntry == null) {
- lineNrEntry = new ArrayList<Long>();
+ lineNrEntry = new ArrayList<>();
fLineToCodeIndexes.put(lineNrInt, lineNrEntry);
}
lineNrEntry.add(lineCodeIndexLong);
@@ -267,7 +267,7 @@
return fArguments;
}
- List<LocalVariable> result = new ArrayList<LocalVariable>();
+ List<LocalVariable> result = new ArrayList<>();
Iterator<LocalVariable> iter = variables().iterator();
while (iter.hasNext()) {
LocalVariable var = iter.next();
@@ -288,7 +288,7 @@
return fArgumentTypeNames;
}
List<String> argumentTypeSignatures = argumentTypeSignatures();
- List<String> result = new ArrayList<String>();
+ List<String> result = new ArrayList<>();
for (Iterator<String> iter = argumentTypeSignatures.iterator(); iter.hasNext();) {
result.add(TypeImpl.signatureToName(iter.next()));
}
@@ -318,7 +318,7 @@
if (fArgumentTypes != null) {
return fArgumentTypes;
}
- List<Type> result = new ArrayList<Type>();
+ List<Type> result = new ArrayList<>();
Iterator<String> iter = argumentTypeSignatures().iterator();
ClassLoaderReference classLoaderRef = declaringType().classLoader();
VirtualMachineImpl vm = virtualMachineImpl();
@@ -540,7 +540,7 @@
DataInputStream replyData = replyPacket.dataInStream();
fArgumentSlotsCount = readInt("arg count", replyData); //$NON-NLS-1$
int nrOfElements = readInt("elements", replyData); //$NON-NLS-1$
- List<LocalVariable> variables = new ArrayList<LocalVariable>(nrOfElements);
+ List<LocalVariable> variables = new ArrayList<>(nrOfElements);
for (int i = 0; i < nrOfElements; i++) {
long codeIndex = readLong("code index", replyData); //$NON-NLS-1$
String name = readString("name", replyData); //$NON-NLS-1$
@@ -605,7 +605,7 @@
}
if (signatures.length > 0) {
fArgumentSlotsCount = signatures.length;
- fVariables = new ArrayList<LocalVariable>(fArgumentSlotsCount);
+ fVariables = new ArrayList<>(fArgumentSlotsCount);
for (int i = 0; i < signatures.length; i++) {
String name = "arg" + i; //$NON-NLS-1$
LocalVariableImpl localVar = new LocalVariableImpl(virtualMachineImpl(), this, 0, name, signatures[i], genericSignatures[i], -1, slot, true);
@@ -625,7 +625,7 @@
@Override
public List<LocalVariable> variablesByName(String name) throws AbsentInformationException {
Iterator<LocalVariable> iter = variables().iterator();
- List<LocalVariable> result = new ArrayList<LocalVariable>();
+ List<LocalVariable> result = new ArrayList<>();
while (iter.hasNext()) {
LocalVariable var = iter.next();
if (var.name().equals(name)) {
@@ -832,14 +832,14 @@
Map<String, List<Location>> sourceNameAllLineLocations = null;
if (fStratumAllLineLocations == null) { // the stratum map doesn't
// exist, create it
- fStratumAllLineLocations = new HashMap<String, Map<String, List<Location>>>();
+ fStratumAllLineLocations = new HashMap<>();
} else {
// get the source name map
sourceNameAllLineLocations = fStratumAllLineLocations.get(stratum);
}
if (sourceNameAllLineLocations == null) { // the source name map doesn't
// exist, create it
- sourceNameAllLineLocations = new HashMap<String, List<Location>>();
+ sourceNameAllLineLocations = new HashMap<>();
fStratumAllLineLocations.put(stratum, sourceNameAllLineLocations);
} else {
// get the line locations
@@ -873,7 +873,7 @@
* the specified lines.
*/
protected List<Location> javaStratumLocationsOfLines(List<Integer> javaLines) throws AbsentInformationException {
- Set<Long> tmpLocations = new TreeSet<Long>();
+ Set<Long> tmpLocations = new TreeSet<>();
for (Iterator<Integer> iter = javaLines.iterator(); iter.hasNext();) {
Integer key = iter.next();
List<Long> indexes = javaStratumLineToCodeIndexes(key.intValue());
@@ -881,7 +881,7 @@
tmpLocations.addAll(indexes);
}
}
- List<Location> locations = new ArrayList<Location>();
+ List<Location> locations = new ArrayList<>();
for (Iterator<Long> iter = tmpLocations.iterator(); iter.hasNext();) {
long index = iter.next().longValue();
int position = Arrays.binarySearch(fCodeIndexTable, index);
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ObjectReferenceImpl.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ObjectReferenceImpl.java
index 7d783e7..899b317 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ObjectReferenceImpl.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ObjectReferenceImpl.java
@@ -154,7 +154,7 @@
result.owner = ThreadReferenceImpl.read(this, replyData);
result.entryCount = readInt("entry count", replyData); //$NON-NLS-1$
int nrOfWaiters = readInt("nr of waiters", replyData); //$NON-NLS-1$
- result.waiters = new ArrayList<ThreadReference>(nrOfWaiters);
+ result.waiters = new ArrayList<>(nrOfWaiters);
for (int i = 0; i < nrOfWaiters; i++)
result.waiters.add(ThreadReferenceImpl.read(this, replyData));
return result;
@@ -200,7 +200,7 @@
*/
@Override
public Value getValue(Field field) {
- ArrayList<Field> list = new ArrayList<Field>(1);
+ ArrayList<Field> list = new ArrayList<>(1);
list.add(field);
return getValues(list).get(field);
}
@@ -250,7 +250,7 @@
if (max > 0 && elements > max) {
elements = max;
}
- ArrayList<ObjectReference> list = new ArrayList<ObjectReference>();
+ ArrayList<ObjectReference> list = new ArrayList<>();
for (int i = 0; i < elements; i++) {
list.add((ObjectReference)ValueImpl.readWithTag(this, replyData));
}
@@ -271,7 +271,7 @@
public Map<Field, Value> getValues(List<? extends Field> allFields) {
// if the field list is empty, nothing to do.
if (allFields.isEmpty()) {
- return new HashMap<Field, Value>();
+ return new HashMap<>();
}
// Note that this information should not be cached.
initJdwpRequest();
@@ -283,8 +283,8 @@
* Distinguish static fields from non-static fields: For static
* fields ReferenceTypeImpl.getValues() must be used.
*/
- List<Field> staticFields = new ArrayList<Field>();
- List<FieldImpl> nonStaticFields = new ArrayList<FieldImpl>();
+ List<Field> staticFields = new ArrayList<>();
+ List<FieldImpl> nonStaticFields = new ArrayList<>();
// Separate static and non-static fields.
int allFieldsSize = allFields.size();
@@ -300,7 +300,7 @@
// First get values for the static fields.
Map<Field, Value> resultMap;
if (staticFields.isEmpty()) {
- resultMap = new HashMap<Field, Value>();
+ resultMap = new HashMap<>();
} else {
resultMap = referenceType().getValues(staticFields);
}
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ReferenceTypeImpl.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ReferenceTypeImpl.java
index e1a35e6..5673199 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ReferenceTypeImpl.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ReferenceTypeImpl.java
@@ -116,7 +116,7 @@
fFileId = fileId;
fFileName = fileName;
fAbsoluteFileName = absoluteFileName;
- fLineInfo = new HashMap<Integer, List<int[]>>();
+ fLineInfo = new HashMap<>();
}
/**
@@ -137,7 +137,7 @@
Integer key = new Integer(inputLine);
List<int[]> outputLines = fLineInfo.get(key);
if (outputLines == null) {
- outputLines = new ArrayList<int[]>();
+ outputLines = new ArrayList<>();
fLineInfo.put(key, outputLines);
}
outputLines.add(new int[] { outputStartLine, outputLineRange });
@@ -152,7 +152,7 @@
* @return a List of int[2].
*/
public List<Integer> getOutputLinesForLine(int lineNumber) {
- List<Integer> list = new ArrayList<Integer>();
+ List<Integer> list = new ArrayList<>();
List<int[]> outputLines = fLineInfo.get(new Integer(lineNumber));
if (outputLines != null) {
for (Iterator<int[]> iter = outputLines.iterator(); iter.hasNext();) {
@@ -217,8 +217,8 @@
*/
public Stratum(String id) {
fId = id;
- fFileInfos = new ArrayList<FileInfo>();
- fOutputLineToInputLine = new HashMap<Integer, List<int[]>>();
+ fFileInfos = new ArrayList<>();
+ fOutputLineToInputLine = new HashMap<>();
fPrimaryFileId = -1;
}
@@ -315,7 +315,7 @@
Integer key = new Integer(outputStartLine);
List<int[]> inputLines = fOutputLineToInputLine.get(key);
if (inputLines == null) {
- inputLines = new ArrayList<int[]>();
+ inputLines = new ArrayList<>();
fOutputLineToInputLine.put(key, inputLines);
}
inputLines.add(new int[] { lineFileId, inputStartLine });
@@ -488,7 +488,7 @@
// The interfaces are maintained in a set, to avoid duplicates.
// The interfaces of its own (own interfaces() command) are first
// inserted.
- HashSet<InterfaceType> allInterfacesSet = new HashSet<InterfaceType>(interfaces());
+ HashSet<InterfaceType> allInterfacesSet = new HashSet<>(interfaces());
// All interfaces of the interfaces it implements.
Iterator<InterfaceType> interfaces = interfaces().iterator();
@@ -506,7 +506,7 @@
}
}
- fAllInterfaces = new ArrayList<InterfaceType>(allInterfacesSet);
+ fAllInterfaces = new ArrayList<>(allInterfacesSet);
return fAllInterfaces;
}
@@ -574,8 +574,8 @@
*/
// The name+signature combinations of methods are maintained in a set,
// to avoid including methods that have been overridden.
- Set<String> namesAndSignatures = new HashSet<String>();
- List<Method> visibleMethods = new ArrayList<Method>();
+ Set<String> namesAndSignatures = new HashSet<>();
+ List<Method> visibleMethods = new ArrayList<>();
// The methods of its own (own methods() command).
for (Iterator<Method> iter = methods().iterator(); iter.hasNext();) {
@@ -621,7 +621,7 @@
* methods of it's superclass.
*/
// The name+signature combinations of methods are maintained in a set.
- HashSet<Method> resultSet = new HashSet<Method>();
+ HashSet<Method> resultSet = new HashSet<>();
// The methods of its own (own methods() command).
resultSet.addAll(methods());
@@ -641,7 +641,7 @@
resultSet.addAll(superclass.allMethods());
}
- fAllMethods = new ArrayList<Method>(resultSet);
+ fAllMethods = new ArrayList<>(resultSet);
return fAllMethods;
}
@@ -668,7 +668,7 @@
defaultReplyErrorHandler(replyPacket.errorCode());
}
DataInputStream replyData = replyPacket.dataInStream();
- List<InterfaceType> elements = new ArrayList<InterfaceType>();
+ List<InterfaceType> elements = new ArrayList<>();
int nrOfElements = readInt("elements", replyData); //$NON-NLS-1$
for (int i = 0; i < nrOfElements; i++) {
InterfaceTypeImpl ref = InterfaceTypeImpl.read(this, replyData);
@@ -720,10 +720,10 @@
*/
// The names of fields are maintained in a set, to avoid including
// fields that have been overridden.
- HashSet<String> fieldNames = new HashSet<String>();
+ HashSet<String> fieldNames = new HashSet<>();
// The fields of its own (own fields() command).
- List<Field> visibleFields = new ArrayList<Field>();
+ List<Field> visibleFields = new ArrayList<>();
addVisibleFields(fields(), fieldNames, visibleFields);
// All fields of the interfaces it implements.
@@ -763,7 +763,7 @@
*/
// The names of fields are maintained in a set, to avoid including
// fields that have been inherited double.
- HashSet<Field> resultSet = new HashSet<Field>();
+ HashSet<Field> resultSet = new HashSet<>();
// The fields of its own (own fields() command).
resultSet.addAll(fields());
@@ -783,7 +783,7 @@
resultSet.addAll(superclass.allFields());
}
- fAllFields = new ArrayList<Field>(resultSet);
+ fAllFields = new ArrayList<>(resultSet);
return fAllFields;
}
@@ -925,7 +925,7 @@
JdwpReplyPacket replyPacket = requestVM(jdwpCommand, this);
defaultReplyErrorHandler(replyPacket.errorCode());
DataInputStream replyData = replyPacket.dataInStream();
- List<Field> elements = new ArrayList<Field>();
+ List<Field> elements = new ArrayList<>();
int nrOfElements = readInt("elements", replyData); //$NON-NLS-1$
for (int i = 0; i < nrOfElements; i++) {
FieldImpl elt = FieldImpl.readWithNameSignatureModifiers(this,
@@ -970,7 +970,7 @@
"", null, -1); //$NON-NLS-1$
}
if (fMethodTable == null) {
- fMethodTable = new Hashtable<JdwpMethodID, Method>();
+ fMethodTable = new Hashtable<>();
Iterator<Method> iter = methods().iterator();
while (iter.hasNext()) {
MethodImpl method = (MethodImpl) iter.next();
@@ -985,7 +985,7 @@
*/
@Override
public Value getValue(Field field) {
- ArrayList<Field> list = new ArrayList<Field>(1);
+ ArrayList<Field> list = new ArrayList<>(1);
list.add(field);
return getValues(list).get(field);
}
@@ -997,7 +997,7 @@
public Map<Field, Value> getValues(List<? extends Field> fields) {
// if the field list is empty, nothing to do
if (fields.isEmpty()) {
- return new HashMap<Field, Value>();
+ return new HashMap<>();
}
// Note that this information should not be cached.
initJdwpRequest();
@@ -1018,7 +1018,7 @@
defaultReplyErrorHandler(replyPacket.errorCode());
DataInputStream replyData = replyPacket.dataInStream();
- HashMap<Field, Value> map = new HashMap<Field, Value>();
+ HashMap<Field, Value> map = new HashMap<>();
int nrOfElements = readInt("elements", replyData); //$NON-NLS-1$
if (nrOfElements != fieldsSize)
throw new InternalError(
@@ -1126,7 +1126,7 @@
JdwpReplyPacket replyPacket = requestVM(jdwpCommand, this);
defaultReplyErrorHandler(replyPacket.errorCode());
DataInputStream replyData = replyPacket.dataInStream();
- List<Method> elements = new ArrayList<Method>();
+ List<Method> elements = new ArrayList<>();
int nrOfElements = readInt("elements", replyData); //$NON-NLS-1$
for (int i = 0; i < nrOfElements; i++) {
MethodImpl elt = MethodImpl.readWithNameSignatureModifiers(
@@ -1152,7 +1152,7 @@
*/
@Override
public List<Method> methodsByName(String name) {
- List<Method> elements = new ArrayList<Method>();
+ List<Method> elements = new ArrayList<>();
Iterator<Method> iter = visibleMethods().iterator();
while (iter.hasNext()) {
Method method = iter.next();
@@ -1169,7 +1169,7 @@
*/
@Override
public List<Method> methodsByName(String name, String signature) {
- List<Method> elements = new ArrayList<Method>();
+ List<Method> elements = new ArrayList<>();
Iterator<Method> iter = visibleMethods().iterator();
while (iter.hasNext()) {
MethodImpl method = (MethodImpl) iter.next();
@@ -1225,7 +1225,7 @@
// Note that the VM gives an empty reply on RT_NESTED_TYPES, therefore
// we search for the
// nested types in the loaded types.
- List<ReferenceType> result = new ArrayList<ReferenceType>();
+ List<ReferenceType> result = new ArrayList<>();
Iterator<ReferenceType> itr = virtualMachineImpl().allRefTypes();
while (itr.hasNext()) {
try {
@@ -1507,7 +1507,7 @@
*/
@Override
public List<String> sourceNames(String stratumId) throws AbsentInformationException {
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
Stratum stratum = getStratum(stratumId);
if (stratum != null) {
// return the source names defined for this stratum in the SMAP.
@@ -1534,7 +1534,7 @@
*/
@Override
public List<String> sourcePaths(String stratumId) throws AbsentInformationException {
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
Stratum stratum = getStratum(stratumId);
if (stratum != null) {
// return the source paths defined for this stratum in the SMAP.
@@ -1583,21 +1583,21 @@
Map<String, List<Location>> sourceNameAllLineLocations = null;
if (fStratumAllLineLocations == null) { // the stratum map doesn't
// exist, create it
- fStratumAllLineLocations = new HashMap<String, Map<String, List<Location>>>();
+ fStratumAllLineLocations = new HashMap<>();
} else {
// get the source name map
sourceNameAllLineLocations = fStratumAllLineLocations.get(stratum);
}
if (sourceNameAllLineLocations == null) { // the source name map doesn't
// exist, create it
- sourceNameAllLineLocations = new HashMap<String, List<Location>>();
+ sourceNameAllLineLocations = new HashMap<>();
fStratumAllLineLocations.put(stratum, sourceNameAllLineLocations);
} else {
// get the line locations
allLineLocations = sourceNameAllLineLocations.get(sourceName);
}
if (allLineLocations == null) { // the line locations are not known, compute and store them
- allLineLocations = new ArrayList<Location>();
+ allLineLocations = new ArrayList<>();
boolean hasLineInformation = false;
AbsentInformationException exception = null;
while (allMethods.hasNext()) {
@@ -1626,7 +1626,7 @@
@Override
public List<Location> locationsOfLine(String stratum, String sourceName, int lineNumber) throws AbsentInformationException {
Iterator<Method> allMethods = methods().iterator();
- List<Location> locations = new ArrayList<Location>();
+ List<Location> locations = new ArrayList<>();
boolean hasLineInformation = false;
AbsentInformationException exception = null;
while (allMethods.hasNext()) {
@@ -1655,7 +1655,7 @@
*/
@Override
public List<String> availableStrata() {
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
// The strata defined in the SMAP.
if (isSourceDebugExtensionAvailable()) {
list.addAll(fStrata.keySet());
@@ -1747,7 +1747,7 @@
JDIMessages.ReferenceTypeImpl_31);
}
// parse the source map.
- fStrata = new HashMap<String, Stratum>();
+ fStrata = new HashMap<>();
SourceDebugExtensionParser.parse(fSmap, this);
}
@@ -1997,7 +1997,7 @@
*/
public List<Location> locationsOfLine(String stratumId, String sourceName, int lineNumber, MethodImpl method) throws AbsentInformationException {
Stratum stratum = getStratum(stratumId);
- List<Integer> javaLines = new ArrayList<Integer>();
+ List<Integer> javaLines = new ArrayList<>();
if (stratum != null) {
boolean found = false;
for (Iterator<FileInfo> iter = stratum.fFileInfos.iterator(); iter.hasNext() && !found;) {
@@ -2077,7 +2077,7 @@
}
}
}
- List<Location> locations = new ArrayList<Location>();
+ List<Location> locations = new ArrayList<>();
for (int i = 0, length = lineInfoTable.length; i < length; i++) {
if (lineInfoTable[i] != null) {
locations.add(new LocationImpl(virtualMachineImpl(), method, codeIndexTable[i]));
@@ -2086,7 +2086,7 @@
return locations;
}
// Java stratum
- List<Location> result = new ArrayList<Location>();
+ List<Location> result = new ArrayList<>();
for (long element : codeIndexTable) {
result.add(new LocationImpl(virtualMachineImpl(), method, element));
}
@@ -2190,7 +2190,7 @@
if (max > 0 && elements > max) {
elements = max;
}
- ArrayList<ObjectReference> list = new ArrayList<ObjectReference>();
+ ArrayList<ObjectReference> list = new ArrayList<>();
for (int i = 0; i < elements; i++) {
list.add((ObjectReference) ValueImpl.readWithTag(this, replyData));
}
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/SourceDebugExtensionParser.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/SourceDebugExtensionParser.java
index 2b578ca..07895fd 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/SourceDebugExtensionParser.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/SourceDebugExtensionParser.java
@@ -268,7 +268,7 @@
*/
private SourceDebugExtensionParser(ReferenceTypeImpl referenceType) {
fReferenceType = referenceType;
- fDefinedStrata = new ArrayList<String>();
+ fDefinedStrata = new ArrayList<>();
fDefinedStrata.add(VirtualMachineImpl.JAVA_STRATUM_NAME);
}
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/StackFrameImpl.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/StackFrameImpl.java
index 633b800..e7a3615 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/StackFrameImpl.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/StackFrameImpl.java
@@ -70,7 +70,7 @@
public Value getValue(LocalVariable variable)
throws IllegalArgumentException, InvalidStackFrameException,
VMMismatchException {
- ArrayList<LocalVariable> list = new ArrayList<LocalVariable>(1);
+ ArrayList<LocalVariable> list = new ArrayList<>(1);
list.add(variable);
return getValues(list).get(variable);
}
@@ -82,7 +82,7 @@
public Map<LocalVariable, Value> getValues(List<? extends LocalVariable> variables) throws IllegalArgumentException,
InvalidStackFrameException, VMMismatchException {
// Note that this information should not be cached.
- Map<LocalVariable, Value> map = new HashMap<LocalVariable, Value>(variables.size());
+ Map<LocalVariable, Value> map = new HashMap<>(variables.size());
// if the variable list is empty, nothing to do
if (variables.isEmpty()) {
return map;
@@ -169,7 +169,7 @@
}
try {
List<LocalVariable> list = location().method().variables();
- ArrayList<Value> ret = new ArrayList<Value>();
+ ArrayList<Value> ret = new ArrayList<>();
LocalVariable var = null;
for (Iterator<LocalVariable> iter = list.iterator(); iter.hasNext();) {
var = iter.next();
@@ -294,7 +294,7 @@
public List<LocalVariable> visibleVariables() throws AbsentInformationException {
List<LocalVariable> variables = fLocation.method().variables();
Iterator<LocalVariable> iter = variables.iterator();
- List<LocalVariable> visibleVars = new ArrayList<LocalVariable>(variables.size());
+ List<LocalVariable> visibleVars = new ArrayList<>(variables.size());
while (iter.hasNext()) {
LocalVariableImpl var = (LocalVariableImpl) iter.next();
// Only return local variables other than the this pointer.
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ThreadGroupReferenceImpl.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ThreadGroupReferenceImpl.java
index 08dbd36..fe19d7b 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ThreadGroupReferenceImpl.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ThreadGroupReferenceImpl.java
@@ -156,12 +156,12 @@
DataInputStream replyData = replyPacket.dataInStream();
ChildrenInfo result = new ChildrenInfo();
int nrThreads = readInt("nr threads", replyData); //$NON-NLS-1$
- result.childThreads = new ArrayList<ThreadReference>(nrThreads);
+ result.childThreads = new ArrayList<>(nrThreads);
for (int i = 0; i < nrThreads; i++)
result.childThreads.add(ThreadReferenceImpl.read(this,
replyData));
int nrThreadGroups = readInt("nr thread groups", replyData); //$NON-NLS-1$
- result.childThreadGroups = new ArrayList<ThreadGroupReference>(nrThreadGroups);
+ result.childThreadGroups = new ArrayList<>(nrThreadGroups);
for (int i = 0; i < nrThreadGroups; i++)
result.childThreadGroups.add(ThreadGroupReferenceImpl.read(
this, replyData));
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ThreadReferenceImpl.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ThreadReferenceImpl.java
index 63121c7..d9e0b0c 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ThreadReferenceImpl.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ThreadReferenceImpl.java
@@ -276,7 +276,7 @@
DataInputStream replyData = replyPacket.dataInStream();
int nrOfElements = readInt("elements", replyData); //$NON-NLS-1$
- List<StackFrame> frames = new ArrayList<StackFrame>(nrOfElements);
+ List<StackFrame> frames = new ArrayList<>(nrOfElements);
for (int i = 0; i < nrOfElements; i++) {
StackFrameImpl frame = StackFrameImpl.readWithLocation(this,
this, replyData);
@@ -394,7 +394,7 @@
DataInputStream replyData = replyPacket.dataInStream();
int nrOfMonitors = readInt("nr of monitors", replyData); //$NON-NLS-1$
- List<ObjectReference> result = new ArrayList<ObjectReference>(nrOfMonitors);
+ List<ObjectReference> result = new ArrayList<>(nrOfMonitors);
for (int i = 0; i < nrOfMonitors; i++) {
result.add(ObjectReferenceImpl.readObjectRefWithTag(this,
replyData));
@@ -436,7 +436,7 @@
DataInputStream replyData = replyPacket.dataInStream();
int owned = readInt("owned monitors", replyData); //$NON-NLS-1$
- List<com.sun.jdi.MonitorInfo> result = new ArrayList<com.sun.jdi.MonitorInfo>(owned);
+ List<com.sun.jdi.MonitorInfo> result = new ArrayList<>(owned);
ObjectReference monitor = null;
int depth = -1;
for (int i = 0; i < owned; i++) {
@@ -735,7 +735,7 @@
}
Field[] fields = ThreadReferenceImpl.class.getDeclaredFields();
- fgThreadStatusMap = new HashMap<Integer, String>();
+ fgThreadStatusMap = new HashMap<>();
fgSuspendStatusStrings = new String[32]; // Int
for (Field field : fields) {
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ValueCache.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ValueCache.java
index 5afe436..37744f0 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ValueCache.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ValueCache.java
@@ -35,19 +35,19 @@
* Map to store <key, Reference> pairs, where Reference is a soft reference
* to an Object.
*/
- private Map<Object, SoftReference<Object>> cacheTable = new Hashtable<Object, SoftReference<Object>>();
+ private Map<Object, SoftReference<Object>> cacheTable = new Hashtable<>();
/**
* Map to store <Reference, key> pairs, to find the cacheTable-key of a
* garbage collected Reference.
*/
- private Map<SoftReference<Object>, Object> refTable = new Hashtable<SoftReference<Object>, Object>();
+ private Map<SoftReference<Object>, Object> refTable = new Hashtable<>();
/**
* The reference-queue that is registered with the soft references. The
* garbage collector will enqueue soft references that are garbage
* collected.
*/
- private ReferenceQueue<Object> refQueue = new ReferenceQueue<Object>();
+ private ReferenceQueue<Object> refQueue = new ReferenceQueue<>();
/**
* Clean up all entries from the table for which the values were garbage
@@ -68,7 +68,7 @@
*/
public void put(Object key, Object value) {
cleanup();
- SoftReference<Object> ref = new SoftReference<Object>(value, refQueue);
+ SoftReference<Object> ref = new SoftReference<>(value, refQueue);
cacheTable.put(key, ref);
refTable.put(ref, key);
}
@@ -95,7 +95,7 @@
*/
public Collection<Object> values() {
cleanup();
- List<Object> returnValues = new ArrayList<Object>();
+ List<Object> returnValues = new ArrayList<>();
synchronized (cacheTable) {
Iterator<SoftReference<Object>> iter = cacheTable.values().iterator();
SoftReference<Object> ref;
@@ -117,7 +117,7 @@
*/
public Collection<Object> valuesWithType(Class<?> type) {
cleanup();
- List<Object> returnValues = new ArrayList<Object>();
+ List<Object> returnValues = new ArrayList<>();
synchronized (cacheTable) {
Iterator<SoftReference<Object>> iter = cacheTable.values().iterator();
SoftReference<Object> ref;
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ValueImpl.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ValueImpl.java
index eaa2535..d9e0ae0 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ValueImpl.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ValueImpl.java
@@ -160,7 +160,7 @@
*/
protected static List<Value> checkValues(List<?extends Value> values, List<Type> types,
VirtualMachineImpl vm) throws InvalidTypeException {
- List<Value> result = new ArrayList<Value>(values.size());
+ List<Value> result = new ArrayList<>(values.size());
Iterator<? extends Value> iterValues = values.iterator();
Iterator<Type> iterTypes = types.iterator();
while (iterValues.hasNext()) {
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/VerboseWriter.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/VerboseWriter.java
index f8d4fa7..f2c0aed 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/VerboseWriter.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/VerboseWriter.java
@@ -44,7 +44,7 @@
*/
public VerboseWriter(PrintWriter out) {
fOutput = out;
- fLineBuffer = new ArrayList<StringBuffer>();
+ fLineBuffer = new ArrayList<>();
fPosition = 0;
fLineBuffer.add(new StringBuffer());
}
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/VirtualMachineImpl.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/VirtualMachineImpl.java
index 383b6bb..557815f 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/VirtualMachineImpl.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/VirtualMachineImpl.java
@@ -374,7 +374,7 @@
defaultReplyErrorHandler(replyPacket.errorCode());
DataInputStream replyData = replyPacket.dataInStream();
int nrOfElements = readInt("elements", replyData); //$NON-NLS-1$
- List<ReferenceType> elements = new ArrayList<ReferenceType>(nrOfElements);
+ List<ReferenceType> elements = new ArrayList<>(nrOfElements);
for (int i = 0; i < nrOfElements; i++) {
ReferenceTypeImpl elt = ReferenceTypeImpl
.readWithTypeTagAndSignature(this,
@@ -423,7 +423,7 @@
defaultReplyErrorHandler(replyPacket.errorCode());
DataInputStream replyData = replyPacket.dataInStream();
int nrOfElements = readInt("elements", replyData); //$NON-NLS-1$
- List<ThreadReference> elements = new ArrayList<ThreadReference>(nrOfElements);
+ List<ThreadReference> elements = new ArrayList<>(nrOfElements);
for (int i = 0; i < nrOfElements; i++) {
ThreadReferenceImpl elt = ThreadReferenceImpl.read(this,
replyData);
@@ -654,7 +654,7 @@
defaultReplyErrorHandler(replyPacket.errorCode());
DataInputStream replyData = replyPacket.dataInStream();
int nrOfElements = readInt("elements", replyData); //$NON-NLS-1$
- List<ReferenceType> elements = new ArrayList<ReferenceType>(nrOfElements);
+ List<ReferenceType> elements = new ArrayList<>(nrOfElements);
for (int i = 0; i < nrOfElements; i++) {
ReferenceTypeImpl elt = ReferenceTypeImpl.readWithTypeTag(this,
replyData);
@@ -908,7 +908,7 @@
DataInputStream replyData = replyPacket.dataInStream();
int nrGroups = readInt("nr of groups", replyData); //$NON-NLS-1$
- ArrayList<ThreadGroupReference> result = new ArrayList<ThreadGroupReference>(nrGroups);
+ ArrayList<ThreadGroupReference> result = new ArrayList<>(nrGroups);
for (int i = 0; i < nrGroups; i++) {
ThreadGroupReferenceImpl threadGroup = ThreadGroupReferenceImpl.read(this, replyData);
result.add(threadGroup);
@@ -1184,7 +1184,7 @@
}
Field[] fields = VirtualMachineImpl.class.getDeclaredFields();
- fgHCRResultMap = new HashMap<Integer, String>();
+ fgHCRResultMap = new HashMap<>();
for (Field field : fields) {
if ((field.getModifiers() & Modifier.PUBLIC) == 0
|| (field.getModifiers() & Modifier.STATIC) == 0
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/VirtualMachineManagerImpl.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/VirtualMachineManagerImpl.java
index 3c784aa..d983e73 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/VirtualMachineManagerImpl.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/VirtualMachineManagerImpl.java
@@ -52,7 +52,7 @@
*/
private PrintWriter fVerbosePrintWriter = null;
/** List of all VMs that are currently connected. */
- List<VirtualMachine> fConnectedVMs = new ArrayList<VirtualMachine>();
+ List<VirtualMachine> fConnectedVMs = new ArrayList<>();
/** True if in verbose mode. */
private boolean fVerbose = false;
/** Name of verbose file. */
@@ -182,7 +182,7 @@
*/
@Override
public List<Connector> allConnectors() {
- List<Connector> result = new ArrayList<Connector>(attachingConnectors());
+ List<Connector> result = new ArrayList<>(attachingConnectors());
result.addAll(launchingConnectors());
result.addAll(listeningConnectors());
return result;
@@ -193,7 +193,7 @@
*/
@Override
public List<AttachingConnector> attachingConnectors() {
- ArrayList<AttachingConnector> list = new ArrayList<AttachingConnector>(1);
+ ArrayList<AttachingConnector> list = new ArrayList<>(1);
list.add(new SocketAttachingConnectorImpl(this));
return list;
}
@@ -203,7 +203,7 @@
*/
@Override
public List<LaunchingConnector> launchingConnectors() {
- ArrayList<LaunchingConnector> list = new ArrayList<LaunchingConnector>(2);
+ ArrayList<LaunchingConnector> list = new ArrayList<>(2);
list.add(new SocketLaunchingConnectorImpl(this));
list.add(new SocketRawLaunchingConnectorImpl(this));
return list;
@@ -214,7 +214,7 @@
*/
@Override
public List<ListeningConnector> listeningConnectors() {
- ArrayList<ListeningConnector> list = new ArrayList<ListeningConnector>(1);
+ ArrayList<ListeningConnector> list = new ArrayList<>(1);
list.add(new SocketListeningConnectorImpl(this));
return list;
}
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/connect/PacketReceiveManager.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/connect/PacketReceiveManager.java
index 54423ac..2393096 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/connect/PacketReceiveManager.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/connect/PacketReceiveManager.java
@@ -60,9 +60,9 @@
public PacketReceiveManager(Connection connection, VirtualMachineImpl vmImpl) {
super(connection);
fVM = vmImpl;
- fCommandPackets = new LinkedList<JdwpCommandPacket>();
- fReplyPackets = new LinkedList<JdwpReplyPacket>();
- fTimedOutPackets = new ArrayList<Integer>();
+ fCommandPackets = new LinkedList<>();
+ fReplyPackets = new LinkedList<>();
+ fTimedOutPackets = new ArrayList<>();
}
@Override
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/connect/PacketSendManager.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/connect/PacketSendManager.java
index 7f840f3..4d67de6 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/connect/PacketSendManager.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/connect/PacketSendManager.java
@@ -34,7 +34,7 @@
*/
public PacketSendManager(Connection connection) {
super(connection);
- fOutgoingPackets = new LinkedList<JdwpPacket>();
+ fOutgoingPackets = new LinkedList<>();
}
@Override
@@ -103,7 +103,7 @@
*/
private void sendAvailablePackets() throws InterruptedException,
IOException {
- LinkedList<JdwpPacket> packetsToSend = new LinkedList<JdwpPacket>();
+ LinkedList<JdwpPacket> packetsToSend = new LinkedList<>();
synchronized (fOutgoingPackets) {
while (fOutgoingPackets.size() == 0) {
fOutgoingPackets.wait();
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/connect/SocketAttachingConnectorImpl.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/connect/SocketAttachingConnectorImpl.java
index 673bf62..82d4dac 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/connect/SocketAttachingConnectorImpl.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/connect/SocketAttachingConnectorImpl.java
@@ -49,7 +49,7 @@
*/
@Override
public Map<String, Connector.Argument> defaultArguments() {
- HashMap<String, Connector.Argument> arguments = new HashMap<String, Connector.Argument>(2);
+ HashMap<String, Connector.Argument> arguments = new HashMap<>(2);
// Host name
StringArgumentImpl strArg = new StringArgumentImpl(
@@ -136,7 +136,7 @@
connection = ((SocketTransportImpl) fTransport).attach(fHostname,
fPort, fTimeout, 0);
} catch (IllegalArgumentException e) {
- List<String> args = new ArrayList<String>();
+ List<String> args = new ArrayList<>();
args.add("hostname"); //$NON-NLS-1$
args.add("port"); //$NON-NLS-1$
throw new IllegalConnectorArgumentsException(e.getMessage(), args);
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/connect/SocketLaunchingConnectorImpl.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/connect/SocketLaunchingConnectorImpl.java
index 8881299..3be7c5c 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/connect/SocketLaunchingConnectorImpl.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/connect/SocketLaunchingConnectorImpl.java
@@ -68,7 +68,7 @@
*/
@Override
public Map<String, Connector.Argument> defaultArguments() {
- HashMap<String, Connector.Argument> arguments = new HashMap<String, Connector.Argument>(6);
+ HashMap<String, Connector.Argument> arguments = new HashMap<>(6);
// Home
StringArgumentImpl strArg = new StringArgumentImpl(
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/connect/SocketListeningConnectorImpl.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/connect/SocketListeningConnectorImpl.java
index e04a471..86ab266 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/connect/SocketListeningConnectorImpl.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/connect/SocketListeningConnectorImpl.java
@@ -47,7 +47,7 @@
*/
@Override
public Map<String, Connector.Argument> defaultArguments() {
- HashMap<String, Connector.Argument> arguments = new HashMap<String, Connector.Argument>(1);
+ HashMap<String, Connector.Argument> arguments = new HashMap<>(1);
// Port
IntegerArgumentImpl intArg = new IntegerArgumentImpl(
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/connect/SocketRawLaunchingConnectorImpl.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/connect/SocketRawLaunchingConnectorImpl.java
index d893f45..9986bb1 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/connect/SocketRawLaunchingConnectorImpl.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/connect/SocketRawLaunchingConnectorImpl.java
@@ -56,7 +56,7 @@
*/
@Override
public Map<String, Connector.Argument> defaultArguments() {
- HashMap<String, Connector.Argument> arguments = new HashMap<String, Connector.Argument>(3);
+ HashMap<String, Connector.Argument> arguments = new HashMap<>(3);
// Command
StringArgumentImpl strArg = new StringArgumentImpl(
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/event/EventImpl.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/event/EventImpl.java
index 1d95e3e..7a0df05 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/event/EventImpl.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/event/EventImpl.java
@@ -211,7 +211,7 @@
return;
java.lang.reflect.Field[] fields = EventImpl.class.getDeclaredFields();
- fEventKindMap = new HashMap<Integer, String>();
+ fEventKindMap = new HashMap<>();
for (Field field : fields) {
if ((field.getModifiers() & java.lang.reflect.Modifier.PUBLIC) == 0
|| (field.getModifiers() & java.lang.reflect.Modifier.STATIC) == 0
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/event/EventSetImpl.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/event/EventSetImpl.java
index 7b0d096..642e1a9 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/event/EventSetImpl.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/event/EventSetImpl.java
@@ -51,7 +51,7 @@
*/
public EventSetImpl(VirtualMachineImpl vmImpl, EventImpl[] events) {
this(vmImpl);
- fEvents = new ArrayList<Event>(events.length);
+ fEvents = new ArrayList<>(events.length);
for (EventImpl event : events)
fEvents.add(event);
}
@@ -61,7 +61,7 @@
*/
public EventSetImpl(VirtualMachineImpl vmImpl, EventImpl event) {
this(vmImpl);
- fEvents = new ArrayList<Event>(1);
+ fEvents = new ArrayList<>(1);
fEvents.add(event);
}
@@ -129,7 +129,7 @@
return;
}
Iterator<Event> iter = fEvents.iterator();
- List<ThreadReference> resumedThreads = new ArrayList<ThreadReference>(fEvents.size());
+ List<ThreadReference> resumedThreads = new ArrayList<>(fEvents.size());
while (iter.hasNext()) {
EventImpl event = (EventImpl)iter.next();
ThreadReference thread = event.thread();
@@ -161,7 +161,7 @@
// Read size.
int size = target.readInt("size", in); //$NON-NLS-1$
// Create event list.
- eventSet.fEvents = new ArrayList<Event>(size);
+ eventSet.fEvents = new ArrayList<>(size);
while (size-- > 0) {
EventImpl event = EventImpl.read(target, in);
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/jdwp/JdwpCommandPacket.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/jdwp/JdwpCommandPacket.java
index 4cb92de..103383c 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/jdwp/JdwpCommandPacket.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/jdwp/JdwpCommandPacket.java
@@ -257,7 +257,7 @@
Field[] fields = JdwpCommandPacket.class.getDeclaredFields();
// First get the set names.
- Map<Integer, String> setNames = new HashMap<Integer, String>(fields.length);
+ Map<Integer, String> setNames = new HashMap<>(fields.length);
for (Field field : fields) {
if ((field.getModifiers() & Modifier.PUBLIC) == 0
|| (field.getModifiers() & Modifier.STATIC) == 0
@@ -282,7 +282,7 @@
}
// Get the commands.
- fgCommandMap = new HashMap<Integer, String>();
+ fgCommandMap = new HashMap<>();
for (Field field : fields) {
if ((field.getModifiers() & Modifier.PUBLIC) == 0
|| (field.getModifiers() & Modifier.STATIC) == 0
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/jdwp/JdwpID.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/jdwp/JdwpID.java
index f4c569b..868f6ab 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/jdwp/JdwpID.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/jdwp/JdwpID.java
@@ -161,8 +161,8 @@
return;
java.lang.reflect.Field[] fields = JdwpID.class.getDeclaredFields();
- fTagMap = new HashMap<Integer, String>();
- fTypeTagMap = new HashMap<Integer, String>();
+ fTagMap = new HashMap<>();
+ fTypeTagMap = new HashMap<>();
for (Field field : fields) {
if ((field.getModifiers() & java.lang.reflect.Modifier.PUBLIC) == 0
|| (field.getModifiers() & java.lang.reflect.Modifier.STATIC) == 0
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/jdwp/JdwpReplyPacket.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/jdwp/JdwpReplyPacket.java
index 01b5a74..90f333b 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/jdwp/JdwpReplyPacket.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/jdwp/JdwpReplyPacket.java
@@ -139,7 +139,7 @@
}
Field[] fields = JdwpReplyPacket.class.getDeclaredFields();
- fErrorMap = new HashMap<Integer, String>(fields.length);
+ fErrorMap = new HashMap<>(fields.length);
for (Field field : fields) {
if ((field.getModifiers() & Modifier.PUBLIC) == 0
|| (field.getModifiers() & Modifier.STATIC) == 0
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/request/EventRequestImpl.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/request/EventRequestImpl.java
index c7d4826..c86bb83 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/request/EventRequestImpl.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/request/EventRequestImpl.java
@@ -177,7 +177,7 @@
@Override
public void putProperty(Object key, Object value) {
if (fPropertyMap == null)
- fPropertyMap = new HashMap<Object, Object>();
+ fPropertyMap = new HashMap<>();
if (value == null)
fPropertyMap.remove(key);
@@ -344,7 +344,7 @@
public void addCountFilter(int count) throws InvalidRequestStateException {
checkDisabled();
if (fCountFilters == null)
- fCountFilters = new ArrayList<Integer>();
+ fCountFilters = new ArrayList<>();
fCountFilters.add(new Integer(count));
}
@@ -360,7 +360,7 @@
if (threadFilter.isCollected())
throw new ObjectCollectedException();
if (fThreadFilters == null)
- fThreadFilters = new ArrayList<ThreadReference>();
+ fThreadFilters = new ArrayList<>();
fThreadFilters.add(threadFilter);
}
@@ -374,7 +374,7 @@
checkVM(filter);
checkDisabled();
if (fClassFilterRefs == null)
- fClassFilterRefs = new ArrayList<ReferenceType>();
+ fClassFilterRefs = new ArrayList<>();
fClassFilterRefs.add(filter);
}
@@ -387,7 +387,7 @@
throws InvalidRequestStateException {
checkDisabled();
if (fClassFilters == null)
- fClassFilters = new ArrayList<String>();
+ fClassFilters = new ArrayList<>();
fClassFilters.add(filter);
}
@@ -401,7 +401,7 @@
throws InvalidRequestStateException {
checkDisabled();
if (fClassExclusionFilters == null)
- fClassExclusionFilters = new ArrayList<String>();
+ fClassExclusionFilters = new ArrayList<>();
fClassExclusionFilters.add(filter);
}
@@ -416,7 +416,7 @@
// Used in createBreakpointRequest.
checkVM(location);
if (fLocationFilters == null)
- fLocationFilters = new ArrayList<LocationImpl>();
+ fLocationFilters = new ArrayList<>();
fLocationFilters.add(location);
}
@@ -434,7 +434,7 @@
checkVM(refType);
if (fExceptionFilters == null)
- fExceptionFilters = new ArrayList<ExceptionFilter>();
+ fExceptionFilters = new ArrayList<>();
ExceptionFilter filter = new ExceptionFilter();
filter.fException = refType;
@@ -451,7 +451,7 @@
// Used in createXWatchpointRequest methods.
checkVM(field);
if (fFieldFilters == null)
- fFieldFilters = new ArrayList<FieldImpl>();
+ fFieldFilters = new ArrayList<>();
fFieldFilters.add(field);
}
@@ -467,7 +467,7 @@
checkVM(thread);
if (fThreadStepFilters == null)
- fThreadStepFilters = new ArrayList<ThreadStepFilter>();
+ fThreadStepFilters = new ArrayList<>();
ThreadStepFilter filter = new ThreadStepFilter();
filter.fThread = thread;
@@ -486,7 +486,7 @@
checkDisabled();
checkVM(instance);
if (fInstanceFilters == null) {
- fInstanceFilters = new ArrayList<ObjectReference>();
+ fInstanceFilters = new ArrayList<>();
}
fInstanceFilters.add(instance);
}
@@ -502,7 +502,7 @@
public void addSourceNameFilter(String pattern) {
checkDisabled();
if (fSourceNameFilters == null) {
- fSourceNameFilters = new ArrayList<String>();
+ fSourceNameFilters = new ArrayList<>();
}
fSourceNameFilters.add(pattern);
}
@@ -731,10 +731,10 @@
java.lang.reflect.Field[] fields = EventRequestImpl.class
.getDeclaredFields();
- fStepSizeMap = new HashMap<Integer, String>();
- fStepDepthMap = new HashMap<Integer, String>();
- fSuspendPolicyMap = new HashMap<Integer, String>();
- fModifierKindMap = new HashMap<Integer, String>();
+ fStepSizeMap = new HashMap<>();
+ fStepDepthMap = new HashMap<>();
+ fSuspendPolicyMap = new HashMap<>();
+ fModifierKindMap = new HashMap<>();
for (Field field : fields) {
if ((field.getModifiers() & java.lang.reflect.Modifier.PUBLIC) == 0
|| (field.getModifiers() & java.lang.reflect.Modifier.STATIC) == 0
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/request/EventRequestManagerImpl.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/request/EventRequestManagerImpl.java
index cefe842..a86f15f 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/request/EventRequestManagerImpl.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/request/EventRequestManagerImpl.java
@@ -83,8 +83,8 @@
private Hashtable<RequestID, RT> enabledrequests;
private EventRequestType() {
- requests= new ArrayList<RT>();
- enabledrequests= new Hashtable<RequestID, RT>();
+ requests= new ArrayList<>();
+ enabledrequests= new Hashtable<>();
}
public List<RT> getUnmodifiableList() {
@@ -97,22 +97,22 @@
}
}
- private EventRequestType<AccessWatchpointRequest> ACCESS_WATCHPOINT_TYPE= new EventRequestType<AccessWatchpointRequest>();
- private EventRequestType<BreakpointRequest> BREAKPOINT_TYPE= new EventRequestType<BreakpointRequest>();
- private EventRequestType<ClassPrepareRequest> CLASS_PREPARE_TYPE= new EventRequestType<ClassPrepareRequest>();
- private EventRequestType<ClassUnloadRequest> CLASS_UNLOAD_TYPE= new EventRequestType<ClassUnloadRequest>();
- private EventRequestType<MethodEntryRequest> METHOD_ENTRY_TYPE= new EventRequestType<MethodEntryRequest>();
- private EventRequestType<MethodExitRequest> METHOD_EXIT_TYPE= new EventRequestType<MethodExitRequest>();
- private EventRequestType<ExceptionRequest> EXCEPTION_TYPE= new EventRequestType<ExceptionRequest>();
- private EventRequestType<ModificationWatchpointRequest> MODIFICATION_WATCHPOINT_TYPE= new EventRequestType<ModificationWatchpointRequest>();
- private EventRequestType<StepRequest> STEP_TYPE= new EventRequestType<StepRequest>();
- private EventRequestType<ThreadDeathRequest> THREAD_DEATH_TYPE= new EventRequestType<ThreadDeathRequest>();
- private EventRequestType<ThreadStartRequest> THREAD_START_TYPE= new EventRequestType<ThreadStartRequest>();
- private EventRequestType<VMDeathRequest> VM_DEATH_TYPE= new EventRequestType<VMDeathRequest>();
- private EventRequestType<MonitorContendedEnteredRequest> MONITOR_CONTENDED_ENTERED_TYPE= new EventRequestType<MonitorContendedEnteredRequest>();
- private EventRequestType<MonitorContendedEnterRequest> MONITOR_CONTENDED_ENTER_TYPE= new EventRequestType<MonitorContendedEnterRequest>();
- private EventRequestType<MonitorWaitedRequest> MONITOR_WAITED_TYPE= new EventRequestType<MonitorWaitedRequest>();
- private EventRequestType<MonitorWaitRequest> MONITOR_WAIT_TYPE= new EventRequestType<MonitorWaitRequest>();
+ private EventRequestType<AccessWatchpointRequest> ACCESS_WATCHPOINT_TYPE= new EventRequestType<>();
+ private EventRequestType<BreakpointRequest> BREAKPOINT_TYPE= new EventRequestType<>();
+ private EventRequestType<ClassPrepareRequest> CLASS_PREPARE_TYPE= new EventRequestType<>();
+ private EventRequestType<ClassUnloadRequest> CLASS_UNLOAD_TYPE= new EventRequestType<>();
+ private EventRequestType<MethodEntryRequest> METHOD_ENTRY_TYPE= new EventRequestType<>();
+ private EventRequestType<MethodExitRequest> METHOD_EXIT_TYPE= new EventRequestType<>();
+ private EventRequestType<ExceptionRequest> EXCEPTION_TYPE= new EventRequestType<>();
+ private EventRequestType<ModificationWatchpointRequest> MODIFICATION_WATCHPOINT_TYPE= new EventRequestType<>();
+ private EventRequestType<StepRequest> STEP_TYPE= new EventRequestType<>();
+ private EventRequestType<ThreadDeathRequest> THREAD_DEATH_TYPE= new EventRequestType<>();
+ private EventRequestType<ThreadStartRequest> THREAD_START_TYPE= new EventRequestType<>();
+ private EventRequestType<VMDeathRequest> VM_DEATH_TYPE= new EventRequestType<>();
+ private EventRequestType<MonitorContendedEnteredRequest> MONITOR_CONTENDED_ENTERED_TYPE= new EventRequestType<>();
+ private EventRequestType<MonitorContendedEnterRequest> MONITOR_CONTENDED_ENTER_TYPE= new EventRequestType<>();
+ private EventRequestType<MonitorWaitedRequest> MONITOR_WAITED_TYPE= new EventRequestType<>();
+ private EventRequestType<MonitorWaitRequest> MONITOR_WAIT_TYPE= new EventRequestType<>();
/**
* Creates new EventRequestManager.
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/spy/JdwpCommandPacket.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/spy/JdwpCommandPacket.java
index 8e31bba..d459ff1 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/spy/JdwpCommandPacket.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/spy/JdwpCommandPacket.java
@@ -248,7 +248,7 @@
Field[] fields = JdwpCommandPacket.class.getDeclaredFields();
// First get the set names.
- Map<Integer, String> setNames = new HashMap<Integer, String>(fields.length);
+ Map<Integer, String> setNames = new HashMap<>(fields.length);
for (Field field : fields) {
if ((field.getModifiers() & Modifier.PUBLIC) == 0
|| (field.getModifiers() & Modifier.STATIC) == 0
@@ -273,7 +273,7 @@
}
// Get the commands.
- fgCommandMap = new HashMap<Integer, String>();
+ fgCommandMap = new HashMap<>();
for (Field field : fields) {
if ((field.getModifiers() & Modifier.PUBLIC) == 0
|| (field.getModifiers() & Modifier.STATIC) == 0
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/spy/JdwpReplyPacket.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/spy/JdwpReplyPacket.java
index 6aa6fc6..ac0df7e 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/spy/JdwpReplyPacket.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/spy/JdwpReplyPacket.java
@@ -137,7 +137,7 @@
}
Field[] fields = JdwpReplyPacket.class.getDeclaredFields();
- fErrorMap = new HashMap<Integer, String>(fields.length);
+ fErrorMap = new HashMap<>(fields.length);
for (Field field : fields) {
if ((field.getModifiers() & Modifier.PUBLIC) == 0
|| (field.getModifiers() & Modifier.STATIC) == 0
diff --git a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/spy/TcpipSpy.java b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/spy/TcpipSpy.java
index 002ab3a..074a6af 100644
--- a/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/spy/TcpipSpy.java
+++ b/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/spy/TcpipSpy.java
@@ -51,7 +51,7 @@
private DataOutputStream fDataOut;
private static VerbosePacketStream out = new VerbosePacketStream(System.out);
- private static Map<Integer, JdwpConversation> fPackets = new HashMap<Integer, JdwpConversation>();
+ private static Map<Integer, JdwpConversation> fPackets = new HashMap<>();
private static int fFieldIDSize;
private static int fMethodIDSize;
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/debug/core/JDIDebugModel.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/debug/core/JDIDebugModel.java
index 663ddf1..d1e64bf 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/debug/core/JDIDebugModel.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/debug/core/JDIDebugModel.java
@@ -337,7 +337,7 @@
int hitCount, boolean register, Map<String, Object> attributes)
throws CoreException {
if (attributes == null)
- attributes = new HashMap<String, Object>(10);
+ attributes = new HashMap<>(10);
return new JavaLineBreakpoint(resource, typeName, lineNumber,
charStart, charEnd, hitCount, register, attributes);
}
@@ -398,7 +398,7 @@
int lineNumber, int charStart, int charEnd, int hitCount,
boolean register, Map<String, Object> attributes) throws CoreException {
if (attributes == null)
- attributes = new HashMap<String, Object>(10);
+ attributes = new HashMap<>(10);
return new JavaPatternBreakpoint(resource, sourceName, pattern,
lineNumber, charStart, charEnd, hitCount, register, attributes);
}
@@ -482,7 +482,7 @@
int charStart, int charEnd, int hitCount, boolean register,
Map<String, Object> attributes) throws CoreException {
if (attributes == null)
- attributes = new HashMap<String, Object>(10);
+ attributes = new HashMap<>(10);
return new JavaStratumLineBreakpoint(resource, stratum, sourceName,
sourcePath, classNamePattern, lineNumber, charStart, charEnd,
hitCount, register, attributes);
@@ -538,7 +538,7 @@
int charStart, int charEnd, int hitCount, boolean register,
Map<String, Object> attributes) throws CoreException {
if (attributes == null)
- attributes = new HashMap<String, Object>(10);
+ attributes = new HashMap<>(10);
return new JavaTargetPatternBreakpoint(resource, sourceName,
lineNumber, charStart, charEnd, hitCount, register, attributes);
}
@@ -585,7 +585,7 @@
boolean uncaught, boolean checked, boolean register, Map<String, Object> attributes)
throws CoreException {
if (attributes == null)
- attributes = new HashMap<String, Object>(10);
+ attributes = new HashMap<>(10);
return new JavaExceptionBreakpoint(resource, exceptionName, caught,
uncaught, checked, register, attributes);
}
@@ -647,7 +647,7 @@
int charEnd, int hitCount, boolean register, Map<String, Object> attributes)
throws CoreException {
if (attributes == null)
- attributes = new HashMap<String, Object>(10);
+ attributes = new HashMap<>(10);
return new JavaWatchpoint(resource, typeName, fieldName, lineNumber,
charStart, charEnd, hitCount, register, attributes);
}
@@ -717,7 +717,7 @@
int hitCount, boolean register, Map<String, Object> attributes)
throws CoreException {
if (attributes == null)
- attributes = new HashMap<String, Object>(10);
+ attributes = new HashMap<>(10);
return new JavaMethodBreakpoint(resource, typePattern, methodName,
methodSignature, entry, exit, nativeOnly, lineNumber,
charStart, charEnd, hitCount, register, attributes);
@@ -776,7 +776,7 @@
int hitCount, boolean register, Map<String, Object> attributes)
throws CoreException {
if (attributes == null)
- attributes = new HashMap<String, Object>(10);
+ attributes = new HashMap<>(10);
return new JavaMethodEntryBreakpoint(resource, typeName, methodName,
methodSignature, lineNumber, charStart, charEnd, hitCount,
register, attributes);
@@ -965,7 +965,7 @@
IResource resource, String typeName, int memberType, int charStart,
int charEnd, boolean register, Map<String, Object> attributes) throws CoreException {
if (attributes == null)
- attributes = new HashMap<String, Object>(10);
+ attributes = new HashMap<>(10);
return new JavaClassPrepareBreakpoint(resource, typeName, memberType,
charStart, charEnd, register, attributes);
}
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/EventDispatcher.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/EventDispatcher.java
index 3d64b71..92c0328 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/EventDispatcher.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/EventDispatcher.java
@@ -76,7 +76,7 @@
* Queue of debug model events to fire, created when processing events on
* the target VM. Keyed by event sets, processed independently.
*/
- private Map<EventSet, List<DebugEvent>> fSetToQueue = new HashMap<EventSet, List<DebugEvent>>();
+ private Map<EventSet, List<DebugEvent>> fSetToQueue = new HashMap<>();
/**
* Constructs a new event dispatcher listening for events originating from
@@ -86,7 +86,7 @@
* the target this event dispatcher belongs to
*/
public EventDispatcher(JDIDebugTarget target) {
- fEventHandlers = new HashMap<EventRequest, IJDIEventListener>(10);
+ fEventHandlers = new HashMap<>(10);
fTarget = target;
fShutdown = false;
}
@@ -139,7 +139,7 @@
try {
if (((IJavaLineBreakpoint) listener).isConditionEnabled()) {
if (deferredEvents == null) {
- deferredEvents = new ArrayList<Event>(5);
+ deferredEvents = new ArrayList<>(5);
}
deferredEvents.add(event);
continue;
@@ -337,7 +337,7 @@
synchronized (fSetToQueue) {
List<DebugEvent> list = fSetToQueue.get(set);
if (list == null) {
- list = new ArrayList<DebugEvent>(5);
+ list = new ArrayList<>(5);
fSetToQueue.put(set, list);
}
list.add(event);
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/JDIDebugOptions.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/JDIDebugOptions.java
index f9e87fa..062eddd 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/JDIDebugOptions.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/JDIDebugOptions.java
@@ -49,7 +49,7 @@
* Constructor
*/
public JDIDebugOptions(BundleContext context) {
- Hashtable<String, String> props = new Hashtable<String, String>(2);
+ Hashtable<String, String> props = new Hashtable<>(2);
props.put(org.eclipse.osgi.service.debug.DebugOptions.LISTENER_SYMBOLICNAME, JDIDebugPlugin.getUniqueIdentifier());
context.registerService(DebugOptionsListener.class.getName(), this, props);
}
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/JavaDebugUtils.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/JavaDebugUtils.java
index beb115a..30ac59d 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/JavaDebugUtils.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/JavaDebugUtils.java
@@ -451,7 +451,7 @@
typeName = typeName.substring(index + 1);
}
index = typeName.indexOf('$');
- List<String> list = new ArrayList<String>(1);
+ List<String> list = new ArrayList<>(1);
while (index >= 0) {
list.add(typeName.substring(0, index));
typeName = typeName.substring(index + 1);
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/BreakpointListenerManager.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/BreakpointListenerManager.java
index 6b3cbd2..f79ec37 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/BreakpointListenerManager.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/BreakpointListenerManager.java
@@ -226,8 +226,8 @@
*/
private synchronized void init() {
if (fgJavaBreakpointListenersMap == null) {
- fgJavaBreakpointListenersMap = new HashMap<String, JavaBreakpointListenerProxy>();
- List<JavaBreakpointListenerProxy> global = new ArrayList<JavaBreakpointListenerProxy>();
+ fgJavaBreakpointListenersMap = new HashMap<>();
+ List<JavaBreakpointListenerProxy> global = new ArrayList<>();
IExtensionPoint extensionPoint = Platform
.getExtensionRegistry()
.getExtensionPoint(
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaBreakpoint.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaBreakpoint.java
index d142f25..cad7552 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaBreakpoint.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaBreakpoint.java
@@ -178,8 +178,8 @@
EXPIRED, ENABLED };
public JavaBreakpoint() {
- fRequestsByTarget = new HashMap<JDIDebugTarget, List<EventRequest>>(1);
- fFilteredThreadsByTarget = new HashMap<JDIDebugTarget, IJavaThread>(1);
+ fRequestsByTarget = new HashMap<>(1);
+ fFilteredThreadsByTarget = new HashMap<>(1);
}
/*
@@ -266,7 +266,7 @@
protected ArrayList<EventRequest> getRequests(JDIDebugTarget target) {
ArrayList<EventRequest> list = (ArrayList<EventRequest>) fRequestsByTarget.get(target);
if (list == null) {
- list = new ArrayList<EventRequest>(2);
+ list = new ArrayList<>(2);
}
return list;
}
@@ -780,7 +780,7 @@
// removing was previously done is a workspace runnable, but that is
// not possible since it can be a resource callback (marker deletion)
// that causes a breakpoint to be removed
- ArrayList<EventRequest> requests = new ArrayList<EventRequest>(getRequests(target));
+ ArrayList<EventRequest> requests = new ArrayList<>(getRequests(target));
// Iterate over a copy of the requests since this list of requests
// can be changed in other threads which would cause an
// ConcurrentModificationException
@@ -937,15 +937,15 @@
*/
private void configureAtStartup() throws CoreException {
List<String> attributes = null;
- List<Object> values = new ArrayList<Object>(3);
+ List<Object> values = new ArrayList<>(3);
if (isInstalled()) {
- attributes = new ArrayList<String>(3);
+ attributes = new ArrayList<>(3);
attributes.add(INSTALL_COUNT);
values.add(new Integer(0));
}
if (isExpired()) {
if (attributes == null) {
- attributes = new ArrayList<String>(3);
+ attributes = new ArrayList<>(3);
}
// if breakpoint was auto-disabled, re-enable it
attributes.add(EXPIRED);
@@ -959,7 +959,7 @@
}
String[] listeners = readBreakpointListeners();
if (listeners.length > 0) {
- fBreakpointListenerIds = new ArrayList<String>();
+ fBreakpointListenerIds = new ArrayList<>();
for (String listener : listeners) {
fBreakpointListenerIds.add(listener);
}
@@ -1109,7 +1109,7 @@
protected void setInstalledIn(IJavaDebugTarget target, boolean installed) {
if (installed) {
if (fInstalledTargets == null) {
- fInstalledTargets = new HashSet<IJavaDebugTarget>();
+ fInstalledTargets = new HashSet<>();
}
fInstalledTargets.add(target);
} else {
@@ -1282,7 +1282,7 @@
@Override
public void addInstanceFilter(IJavaObject object) throws CoreException {
if (fInstanceFilters == null) {
- fInstanceFilters = new ArrayList<IJavaObject>();
+ fInstanceFilters = new ArrayList<>();
}
if (!fInstanceFilters.contains(object)) {
fInstanceFilters.add(object);
@@ -1422,7 +1422,7 @@
public synchronized void addBreakpointListener(String identifier)
throws CoreException {
if (fBreakpointListenerIds == null) {
- fBreakpointListenerIds = new ArrayList<String>();
+ fBreakpointListenerIds = new ArrayList<>();
}
if (!fBreakpointListenerIds.contains(identifier)) {
fBreakpointListenerIds.add(identifier);
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaBreakpointImportParticipant.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaBreakpointImportParticipant.java
index 6ef1195..7acaeaa 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaBreakpointImportParticipant.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaBreakpointImportParticipant.java
@@ -79,7 +79,7 @@
fSignature = getMemberSignature(breakpoint);
fBreakpoint = breakpoint;
fUnit = unit;
- fTypeNameStack = new Stack<String>();
+ fTypeNameStack = new Stack<>();
}
/**
@@ -360,7 +360,7 @@
* @return a listing of signatures for the specified parameters
*/
private List<String> getParametersTypeNames(List<SingleVariableDeclaration> rawparams) {
- List<String> rparams = new ArrayList<String>(rawparams.size());
+ List<String> rparams = new ArrayList<>(rawparams.size());
String pname = null;
for (SingleVariableDeclaration param : rawparams) {
pname = getTypeSignature(param.getType());
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaExceptionBreakpoint.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaExceptionBreakpoint.java
index e5b7183..b82a9e4 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaExceptionBreakpoint.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaExceptionBreakpoint.java
@@ -584,7 +584,7 @@
if (list == null) {
return ""; //$NON-NLS-1$
}
- Set<String> set = new HashSet<String>(list.length);
+ Set<String> set = new HashSet<>(list.length);
StringBuffer buffer = new StringBuffer();
for (int i = 0; i < list.length; i++) {
if (i > 0 && i < list.length) {
@@ -607,7 +607,7 @@
* Parses the comma separated String into an array of Strings
*/
protected String[] parseList(String listString) {
- List<String> list = new ArrayList<String>(10);
+ List<String> list = new ArrayList<>(10);
StringTokenizer tokenizer = new StringTokenizer(listString, ","); //$NON-NLS-1$
while (tokenizer.hasMoreTokens()) {
String token = tokenizer.nextToken();
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaLineBreakpoint.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaLineBreakpoint.java
index b4bbe5e..44b4e2c 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaLineBreakpoint.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaLineBreakpoint.java
@@ -95,25 +95,25 @@
/**
* Maps suspended threads to the suspend event that suspended them
*/
- private Map<IJavaThread, ICompiledExpression> fSuspendEvents = new HashMap<IJavaThread, ICompiledExpression>();
+ private Map<IJavaThread, ICompiledExpression> fSuspendEvents = new HashMap<>();
/**
* The map of cached compiled expressions (ICompiledExpression) for this
* breakpoint, keyed by thread. This value must be cleared every time the
* breakpoint is added to a target.
*/
- private Map<IJavaThread, ICompiledExpression> fCompiledExpressions = new HashMap<IJavaThread, ICompiledExpression>();
+ private Map<IJavaThread, ICompiledExpression> fCompiledExpressions = new HashMap<>();
/**
* Cache of projects for stack frames to avoid repetitive project resolution
* on conditional breakpoints.
*/
- private Map<IJavaStackFrame, IJavaProject> fProjectsByFrame = new HashMap<IJavaStackFrame, IJavaProject>();
+ private Map<IJavaStackFrame, IJavaProject> fProjectsByFrame = new HashMap<>();
/**
* The map of the result value of the condition (IValue) for this
* breakpoint, keyed by debug target.
*/
- private Map<IDebugTarget, IValue> fConditionValues = new HashMap<IDebugTarget, IValue>();
+ private Map<IDebugTarget, IValue> fConditionValues = new HashMap<>();
/**
* Status code indicating that a request to create a breakpoint in a type
@@ -201,7 +201,7 @@
private void removeCachedThreads(Map<IJavaThread, ICompiledExpression> map, JDIDebugTarget target) {
Set<IJavaThread> threads = map.keySet();
- List<IJavaThread> threadsToRemove = new ArrayList<IJavaThread>();
+ List<IJavaThread> threadsToRemove = new ArrayList<>();
Iterator<IJavaThread> iter = threads.iterator();
JDIThread thread;
while (iter.hasNext()) {
@@ -226,7 +226,7 @@
// clean up cached projects for stack frames
synchronized (fProjectsByFrame) {
Set<IJavaStackFrame> frames = fProjectsByFrame.keySet();
- List<IJavaStackFrame> framesToRemove = new ArrayList<IJavaStackFrame>();
+ List<IJavaStackFrame> framesToRemove = new ArrayList<>();
Iterator<IJavaStackFrame> iter = frames.iterator();
JDIStackFrame frame;
while (iter.hasNext()) {
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaMethodBreakpoint.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaMethodBreakpoint.java
index 1055b2a..7c25d2e 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaMethodBreakpoint.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaMethodBreakpoint.java
@@ -118,7 +118,7 @@
* <li>Method exit (value <code>EXIT_EVENT</code>)</li>
* </ol>
*/
- private Map<IDebugTarget, Integer> fLastEventTypes = new HashMap<IDebugTarget, Integer>(10);
+ private Map<IDebugTarget, Integer> fLastEventTypes = new HashMap<>(10);
/**
* Used to match type names
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaTargetPatternBreakpoint.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaTargetPatternBreakpoint.java
index a320a94..e6e470b 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaTargetPatternBreakpoint.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaTargetPatternBreakpoint.java
@@ -235,7 +235,7 @@
public void setPattern(IJavaDebugTarget target, String pattern)
throws CoreException {
if (fPatterns == null) {
- fPatterns = new HashMap<IJavaDebugTarget, String>(2);
+ fPatterns = new HashMap<>(2);
}
// if pattern is changing then remove and re-add
String oldPattern = getPattern(target);
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaWatchpoint.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaWatchpoint.java
index 090a42a..bbf34a3 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaWatchpoint.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaWatchpoint.java
@@ -95,7 +95,7 @@
* <li>Field modification (value <code>MODIFICATION_EVENT</code>)</li>
* </ol>
*/
- private HashMap<JDIDebugTarget, Integer> fLastEventTypes = new HashMap<JDIDebugTarget, Integer>(10);
+ private HashMap<JDIDebugTarget, Integer> fLastEventTypes = new HashMap<>(10);
public JavaWatchpoint() {
}
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/ValidBreakpointLocationLocator.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/ValidBreakpointLocationLocator.java
index 27b20aa..11f28bb 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/ValidBreakpointLocationLocator.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/ValidBreakpointLocationLocator.java
@@ -931,7 +931,7 @@
private void nestLabel(String label) {
if (fLabels == null) {
- fLabels = new ArrayList<String>();
+ fLabels = new ArrayList<>();
}
fLabels.add(label);
}
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/hcr/JavaHotCodeReplaceManager.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/hcr/JavaHotCodeReplaceManager.java
index a35c968..c1b48cd 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/hcr/JavaHotCodeReplaceManager.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/hcr/JavaHotCodeReplaceManager.java
@@ -104,8 +104,8 @@
/**
* The lists of hot swap targets which support HCR and those which don't
*/
- private ArrayList<JDIDebugTarget> fHotSwapTargets = new ArrayList<JDIDebugTarget>(1);
- private ArrayList<JDIDebugTarget> fNoHotSwapTargets = new ArrayList<JDIDebugTarget>(1);
+ private ArrayList<JDIDebugTarget> fHotSwapTargets = new ArrayList<>(1);
+ private ArrayList<JDIDebugTarget> fNoHotSwapTargets = new ArrayList<>(1);
/**
* A mapping of the last time projects were built.
@@ -114,13 +114,13 @@
* <li>value: build date (ProjectBuildTime)</li>
* </ol>
*/
- private Map<IProject, ProjectBuildTime> fProjectBuildTimes = new HashMap<IProject, ProjectBuildTime>();
+ private Map<IProject, ProjectBuildTime> fProjectBuildTimes = new HashMap<>();
private static Date fStartupDate = new Date();
/**
* Cache of compilation unit deltas renewed on each HCR attempt.
*/
- private Map<ICompilationUnit, CompilationUnitDelta> fDeltaCache = new HashMap<ICompilationUnit, CompilationUnitDelta>();
+ private Map<ICompilationUnit, CompilationUnitDelta> fDeltaCache = new HashMap<>();
/**
* Utility object used for tracking build times of projects. The HCR manager
@@ -259,7 +259,7 @@
}
Object source = event.getSource();
if (source instanceof IProject) {
- List<IProject> list = new ArrayList<IProject>();
+ List<IProject> list = new ArrayList<>();
list.add((IProject) source);
return list;
} else if (source instanceof IWorkspace) {
@@ -377,8 +377,8 @@
// Make a local copy of the resources/names to swap so we can
// filter
// unloaded types on a per-target basis.
- List<IResource> resourcesToReplace = new ArrayList<IResource>(resources);
- List<String> qualifiedNamesToReplace = new ArrayList<String>(qualifiedNames);
+ List<IResource> resourcesToReplace = new ArrayList<>(resources);
+ List<String> qualifiedNamesToReplace = new ArrayList<>(qualifiedNames);
filterUnloadedTypes(target, resourcesToReplace,
qualifiedNamesToReplace);
@@ -407,7 +407,7 @@
* replace.
*/
protected synchronized List<JDIDebugTarget> getHotSwapTargets() {
- return new ArrayList<JDIDebugTarget>(fHotSwapTargets);
+ return new ArrayList<>(fHotSwapTargets);
}
/**
@@ -415,7 +415,7 @@
* code replace.
*/
protected synchronized List<JDIDebugTarget> getNoHotSwapTargets() {
- return new ArrayList<JDIDebugTarget>(fNoHotSwapTargets);
+ return new ArrayList<>(fNoHotSwapTargets);
}
/**
@@ -467,8 +467,8 @@
}
// Make a local copy of the resources/names to swap so we can filter
// unloaded types on a per-target basis.
- List<IResource> resourcesToReplace = new ArrayList<IResource>(resources);
- List<String> qualifiedNamesToReplace = new ArrayList<String>(qualifiedNames);
+ List<IResource> resourcesToReplace = new ArrayList<>(resources);
+ List<String> qualifiedNamesToReplace = new ArrayList<>(qualifiedNames);
filterUnloadedTypes(target, resourcesToReplace,
qualifiedNamesToReplace);
if (qualifiedNamesToReplace.isEmpty()) {
@@ -476,7 +476,7 @@
continue;
}
- List<IThread> poppedThreads = new ArrayList<IThread>();
+ List<IThread> poppedThreads = new ArrayList<>();
target.setIsPerformingHotCodeReplace(true);
try {
boolean framesPopped = false;
@@ -720,7 +720,7 @@
*/
private Map<ReferenceType, byte[]> getTypesToBytes(JDIDebugTarget target, List<IResource> resources,
List<String> qualifiedNames) {
- Map<ReferenceType, byte[]> typesToBytes = new HashMap<ReferenceType, byte[]>(resources.size());
+ Map<ReferenceType, byte[]> typesToBytes = new HashMap<>(resources.size());
Iterator<IResource> resourceIter = resources.iterator();
Iterator<String> nameIter = qualifiedNames.iterator();
IResource resource;
@@ -885,7 +885,7 @@
List<String> replacedClassNames) throws DebugException {
JDIThread thread = null;
JDIStackFrame affectedFrame = null;
- List<JDIStackFrame> popFrames = new ArrayList<JDIStackFrame>();
+ List<JDIStackFrame> popFrames = new ArrayList<>();
int numThreads = threads.length;
IResource[] resources = new IResource[resourceList.size()];
resourceList.toArray(resources);
@@ -1259,8 +1259,8 @@
* Resets the file collection to empty
*/
public void reset() {
- fFiles = new ArrayList<IResource>();
- fNames = new ArrayList<String>();
+ fFiles = new ArrayList<>();
+ fNames = new ArrayList<>();
}
/**
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/logicalstructures/JavaLogicalStructures.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/logicalstructures/JavaLogicalStructures.java
index 8ad3863..772369a 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/logicalstructures/JavaLogicalStructures.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/logicalstructures/JavaLogicalStructures.java
@@ -64,7 +64,7 @@
/**
* The list of java logical structures listeners.
*/
- private static Set<IJavaStructuresListener> fListeners = new HashSet<IJavaStructuresListener>();
+ private static Set<IJavaStructuresListener> fListeners = new HashSet<>();
/**
* Preference key for the list of user defined Java logical structures
@@ -109,7 +109,7 @@
}
private static void initJavaLogicalStructureMap() {
- fJavaLogicalStructureMap = new HashMap<String, List<JavaLogicalStructure>>();
+ fJavaLogicalStructureMap = new HashMap<>();
addAllLogicalStructures(fPluginContributedJavaLogicalStructures);
addAllLogicalStructures(fUserDefinedJavaLogicalStructures);
}
@@ -132,7 +132,7 @@
String typeName = structure.getQualifiedTypeName();
List<JavaLogicalStructure> logicalStructure = fJavaLogicalStructureMap.get(typeName);
if (logicalStructure == null) {
- logicalStructure = new ArrayList<JavaLogicalStructure>();
+ logicalStructure = new ArrayList<>();
fJavaLogicalStructureMap.put(typeName, logicalStructure);
}
logicalStructure.add(structure);
@@ -142,7 +142,7 @@
* Get the configuration elements for the extension point.
*/
private static void initPluginContributedJavaLogicalStructure() {
- fPluginContributedJavaLogicalStructures = new ArrayList<JavaLogicalStructure>();
+ fPluginContributedJavaLogicalStructures = new ArrayList<>();
IExtensionPoint extensionPoint = Platform.getExtensionRegistry()
.getExtensionPoint(JDIDebugPlugin.getUniqueIdentifier(),
JDIDebugPlugin.EXTENSION_POINT_JAVA_LOGICAL_STRUCTURES);
@@ -163,7 +163,7 @@
* Get the user defined logical structures (from the preference store).
*/
private static void initUserDefinedJavaLogicalStructures() {
- fUserDefinedJavaLogicalStructures = new ArrayList<JavaLogicalStructure>();
+ fUserDefinedJavaLogicalStructures = new ArrayList<>();
String logicalStructuresString = Platform.getPreferencesService().getString(
JDIDebugPlugin.getUniqueIdentifier(),
PREF_JAVA_LOGICAL_STRUCTURES,
@@ -280,7 +280,7 @@
return new ILogicalStructureType[0];
}
IJavaObject javaValue = (IJavaObject) value;
- List<JavaLogicalStructure> logicalStructures = new ArrayList<JavaLogicalStructure>();
+ List<JavaLogicalStructure> logicalStructures = new ArrayList<>();
try {
IJavaType type = javaValue.getJavaType();
if (!(type instanceof IJavaClassType)) {
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIArrayValue.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIArrayValue.java
index a346579..3e8659a 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIArrayValue.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIArrayValue.java
@@ -262,7 +262,7 @@
public void setValues(int offset, int length, IJavaValue[] values,
int startOffset) throws DebugException {
try {
- List<Value> list = new ArrayList<Value>(values.length);
+ List<Value> list = new ArrayList<>(values.length);
for (IJavaValue value : values) {
list.add(((JDIValue) value).getUnderlyingValue());
}
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIClassType.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIClassType.java
index 810a547..880653d 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIClassType.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIClassType.java
@@ -164,7 +164,7 @@
try {
List<InterfaceType> interfaceList = ((ClassType) getUnderlyingType())
.allInterfaces();
- List<JDIType> javaInterfaceTypeList = new ArrayList<JDIType>(interfaceList.size());
+ List<JDIType> javaInterfaceTypeList = new ArrayList<>(interfaceList.size());
for(InterfaceType interfaceType : interfaceList) {
if (interfaceType != null) {
javaInterfaceTypeList.add(JDIType.createType(
@@ -194,7 +194,7 @@
public IJavaInterfaceType[] getInterfaces() throws DebugException {
try {
List<InterfaceType> interfaceList = ((ClassType) getUnderlyingType()).interfaces();
- List<JDIType> javaInterfaceTypeList = new ArrayList<JDIType>(interfaceList.size());
+ List<JDIType> javaInterfaceTypeList = new ArrayList<>(interfaceList.size());
for(InterfaceType interfaceType : interfaceList) {
if (interfaceType != null) {
javaInterfaceTypeList.add(JDIType.createType(
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIDebugTarget.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIDebugTarget.java
index 8e9b760..519f877 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIDebugTarget.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIDebugTarget.java
@@ -353,7 +353,7 @@
prepareBreakpointsSearchScope();
setBreakpoints(new ArrayList<IBreakpoint>(5));
setThreadList(new ArrayList<JDIThread>(5));
- fGroups = new ArrayList<JDIThreadGroup>(5);
+ fGroups = new ArrayList<>(5);
setOutOfSynchTypes(new ArrayList<String>(0));
setHCROccurred(false);
initialize();
@@ -439,7 +439,7 @@
List<JDIThread> threadList;
synchronized (fThreads) {
//TODO investigate making fThreads be a synchronized collection, to remove all this copying
- threadList = new ArrayList<JDIThread>(fThreads);
+ threadList = new ArrayList<>(fThreads);
}
return threadList.iterator();
}
@@ -927,7 +927,7 @@
* Sets the list of out of synch types to the given list.
*/
private void setOutOfSynchTypes(List<String> qualifiedNames) {
- fOutOfSynchTypes = new HashSet<String>();
+ fOutOfSynchTypes = new HashSet<>();
fOutOfSynchTypes.addAll(qualifiedNames);
}
@@ -1905,7 +1905,7 @@
* cleared.
*/
protected void removeAllBreakpoints() {
- List<IBreakpoint> list = new ArrayList<IBreakpoint>(getBreakpoints());
+ List<IBreakpoint> list = new ArrayList<>(getBreakpoints());
for(IBreakpoint bp : list) {
JavaBreakpoint breakpoint = (JavaBreakpoint) bp;
try {
@@ -1922,7 +1922,7 @@
* target.
*/
protected void reinstallAllBreakpoints() {
- List<IBreakpoint> list = new ArrayList<IBreakpoint>(getBreakpoints());
+ List<IBreakpoint> list = new ArrayList<>(getBreakpoints());
for(IBreakpoint bp : list) {
JavaBreakpoint breakpoint = (JavaBreakpoint) bp;
try {
@@ -2788,7 +2788,7 @@
*/
public IAstEvaluationEngine getEvaluationEngine(IJavaProject project) {
if (fEngines == null) {
- fEngines = new HashMap<IJavaProject, IAstEvaluationEngine>(2);
+ fEngines = new HashMap<>(2);
}
IAstEvaluationEngine engine = fEngines
.get(project);
@@ -2901,7 +2901,7 @@
if (!isAvailable()) {
return;
}
- List<IBreakpoint> list = new ArrayList<IBreakpoint>(getBreakpoints());
+ List<IBreakpoint> list = new ArrayList<>(getBreakpoints());
for(IBreakpoint bp : list) {
JavaBreakpoint breakpoint = (JavaBreakpoint) bp;
try {
@@ -3000,7 +3000,7 @@
return new IJavaThreadGroup[0];
}
List<ThreadGroupReference> groups = vm.topLevelThreadGroups();
- List<JDIThreadGroup> modelGroups = new ArrayList<JDIThreadGroup>(groups.size());
+ List<JDIThreadGroup> modelGroups = new ArrayList<>(groups.size());
for(ThreadGroupReference ref : groups) {
JDIThreadGroup group = findThreadGroup(ref);
if (group != null) {
@@ -3163,9 +3163,9 @@
}
boolean prevSuspend = isSuspended();
int running = 0;
- List<JDIThread> toSuspend = new ArrayList<JDIThread>();
- List<JDIThread> toResume = new ArrayList<JDIThread>();
- List<JDIThread> toRefresh = new ArrayList<JDIThread>();
+ List<JDIThread> toSuspend = new ArrayList<>();
+ List<JDIThread> toResume = new ArrayList<>();
+ List<JDIThread> toRefresh = new ArrayList<>();
Iterator<JDIThread> iterator = getThreadIterator();
while (iterator.hasNext()) {
JDIThread thread = iterator.next();
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIInterfaceType.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIInterfaceType.java
index b0a6557..5e5cdcf 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIInterfaceType.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIInterfaceType.java
@@ -51,7 +51,7 @@
try {
List<ClassType> implementorList = ((InterfaceType) getUnderlyingType())
.implementors();
- List<JDIType> javaClassTypeList = new ArrayList<JDIType>(implementorList.size());
+ List<JDIType> javaClassTypeList = new ArrayList<>(implementorList.size());
Iterator<ClassType> iterator = implementorList.iterator();
while (iterator.hasNext()) {
ClassType classType = iterator.next();
@@ -84,7 +84,7 @@
try {
List<InterfaceType> subList = ((InterfaceType) getUnderlyingType())
.subinterfaces();
- List<JDIType> javaInterfaceTypeList = new ArrayList<JDIType>(subList.size());
+ List<JDIType> javaInterfaceTypeList = new ArrayList<>(subList.size());
Iterator<InterfaceType> iterator = subList.iterator();
while (iterator.hasNext()) {
InterfaceType interfaceType = iterator.next();
@@ -117,7 +117,7 @@
try {
List<InterfaceType> superList = ((InterfaceType) getUnderlyingType())
.superinterfaces();
- List<JDIType> javaInterfaceTypeList = new ArrayList<JDIType>(superList.size());
+ List<JDIType> javaInterfaceTypeList = new ArrayList<>(superList.size());
Iterator<InterfaceType> iterator = superList.iterator();
while (iterator.hasNext()) {
InterfaceType interfaceType = iterator.next();
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIObjectValue.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIObjectValue.java
index 6645136..710de87 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIObjectValue.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIObjectValue.java
@@ -72,7 +72,7 @@
if (args == null) {
arguments = Collections.EMPTY_LIST;
} else {
- arguments = new ArrayList<Value>(args.length);
+ arguments = new ArrayList<>(args.length);
for (IJavaValue arg : args) {
arguments.add(((JDIValue) arg).getUnderlyingValue());
}
@@ -118,7 +118,7 @@
if (args == null) {
arguments = Collections.EMPTY_LIST;
} else {
- arguments = new ArrayList<Value>(args.length);
+ arguments = new ArrayList<>(args.length);
for (IJavaValue arg : args) {
arguments.add(((JDIValue) arg).getUnderlyingValue());
}
@@ -403,7 +403,7 @@
*/
@Override
public IJavaThread[] getWaitingThreads() throws DebugException {
- List<JDIThread> waiting = new ArrayList<JDIThread>();
+ List<JDIThread> waiting = new ArrayList<>();
try {
List<ThreadReference> threads = getUnderlyingObject().waitingThreads();
JDIDebugTarget debugTarget = (JDIDebugTarget) getDebugTarget();
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIReferenceType.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIReferenceType.java
index 0753c41..6dc2a16 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIReferenceType.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIReferenceType.java
@@ -389,7 +389,7 @@
if (target.supportsInstanceRetrieval()) {
Type type = getUnderlyingType();
if(type instanceof ReferenceType) {
- ArrayList<ReferenceType> list = new ArrayList<ReferenceType>(2);
+ ArrayList<ReferenceType> list = new ArrayList<>(2);
list.add((ReferenceType) type);
VirtualMachine vm = getVM();
try {
@@ -416,7 +416,7 @@
if (args == null) {
arguments = Collections.EMPTY_LIST;
} else {
- arguments = new ArrayList<Value>(args.length);
+ arguments = new ArrayList<>(args.length);
for (IJavaValue arg : args) {
arguments.add(((JDIValue) arg).getUnderlyingValue());
}
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIStackFrame.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIStackFrame.java
index d26ae3e..73235e0 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIStackFrame.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIStackFrame.java
@@ -308,7 +308,7 @@
}
Method method = getUnderlyingMethod();
- fVariables = new ArrayList<IJavaVariable>();
+ fVariables = new ArrayList<>();
// #isStatic() does not claim to throw any exceptions - so it is
// not try/catch coded
if (method.isStatic()) {
@@ -430,7 +430,7 @@
// generic signature
String[] parameterTypes = Signature
.getParameterTypes(genericSignature);
- List<String> argumentTypeNames = new ArrayList<String>();
+ List<String> argumentTypeNames = new ArrayList<>();
for (String parameterType : parameterTypes) {
argumentTypeNames.add(Signature.toString(parameterType)
.replace('/', '.'));
@@ -762,7 +762,7 @@
return null;
}
IVariable[] variables = getVariables();
- List<IJavaVariable> possibleMatches = new ArrayList<IJavaVariable>();
+ List<IJavaVariable> possibleMatches = new ArrayList<>();
IJavaVariable thisVariable = null;
for (IVariable variable : variables) {
IJavaVariable var = (IJavaVariable) variable;
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIThread.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIThread.java
index 95b15f1..b8de172 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIThread.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIThread.java
@@ -176,7 +176,7 @@
* collection if the thread is not suspended or was not suspended by any
* breakpoint(s).
*/
- private List<IBreakpoint> fCurrentBreakpoints = new ArrayList<IBreakpoint>(2);
+ private List<IBreakpoint> fCurrentBreakpoints = new ArrayList<>(2);
/**
* Non-null when this thread is executing an evaluation runnable. An
* evaluation may involve a series of method invocations.
@@ -327,7 +327,7 @@
* initialized
*/
protected void initialize() throws ObjectCollectedException {
- fStackFrames = new ArrayList<IJavaStackFrame>();
+ fStackFrames = new ArrayList<>();
// system thread
try {
determineIfSystemThread();
@@ -3492,7 +3492,7 @@
public ThreadJob(JDIThread thread) {
super(JDIDebugModelMessages.JDIThread_39);
fJDIThread = thread;
- fRunnables = new Vector<Runnable>(5);
+ fRunnables = new Vector<>(5);
setSystem(true);
}
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIThreadGroup.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIThreadGroup.java
index 0ec6185..124c893 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIThreadGroup.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIThreadGroup.java
@@ -56,7 +56,7 @@
public synchronized IJavaThread[] getThreads() throws DebugException {
try {
List<ThreadReference> threads = fGroup.threads();
- List<JDIThread> modelThreads = new ArrayList<JDIThread>(threads.size());
+ List<JDIThread> modelThreads = new ArrayList<>(threads.size());
Iterator<ThreadReference> iterator = threads.iterator();
while (iterator.hasNext()) {
ThreadReference ref = iterator.next();
@@ -103,7 +103,7 @@
public IJavaThreadGroup[] getThreadGroups() throws DebugException {
try {
List<ThreadGroupReference> groups = fGroup.threadGroups();
- List<JDIThreadGroup> modelGroups = new ArrayList<JDIThreadGroup>(groups.size());
+ List<JDIThreadGroup> modelGroups = new ArrayList<>(groups.size());
Iterator<ThreadGroupReference> iterator = groups.iterator();
while (iterator.hasNext()) {
ThreadGroupReference ref = iterator
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIValue.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIValue.java
index 9cae151..c81761a 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIValue.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIValue.java
@@ -239,7 +239,7 @@
return fVariables;
} else if (fValue instanceof ObjectReference) {
ObjectReference object = (ObjectReference) fValue;
- fVariables = new ArrayList<IJavaVariable>();
+ fVariables = new ArrayList<>();
if (isArray()) {
try {
int length = getArrayLength();
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/CompositeId.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/CompositeId.java
index de3b607..12c0424 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/CompositeId.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/CompositeId.java
@@ -23,7 +23,7 @@
}
public static CompositeId fromString(String idString) {
- ArrayList<String> parts= new ArrayList<String>();
+ ArrayList<String> parts= new ArrayList<>();
int commaIndex= idString.indexOf(',');
while (commaIndex > 0) {
int length= Integer.valueOf(idString.substring(0, commaIndex)).intValue();
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/DefaultEntryResolver.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/DefaultEntryResolver.java
index 398a916..c2a33ed 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/DefaultEntryResolver.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/DefaultEntryResolver.java
@@ -34,7 +34,7 @@
public IRuntimeClasspathEntry[] resolveRuntimeClasspathEntry(IRuntimeClasspathEntry entry, ILaunchConfiguration configuration) throws CoreException {
IRuntimeClasspathEntry2 entry2 = (IRuntimeClasspathEntry2)entry;
IRuntimeClasspathEntry[] entries = entry2.getRuntimeClasspathEntries(configuration);
- List<IRuntimeClasspathEntry> resolved = new ArrayList<IRuntimeClasspathEntry>();
+ List<IRuntimeClasspathEntry> resolved = new ArrayList<>();
for (int i = 0; i < entries.length; i++) {
IRuntimeClasspathEntry[] temp = JavaRuntime.resolveRuntimeClasspathEntry(entries[i], configuration);
for (int j = 0; j < temp.length; j++) {
@@ -50,7 +50,7 @@
public IRuntimeClasspathEntry[] resolveRuntimeClasspathEntry(IRuntimeClasspathEntry entry, IJavaProject project) throws CoreException {
IRuntimeClasspathEntry2 entry2 = (IRuntimeClasspathEntry2)entry;
IRuntimeClasspathEntry[] entries = entry2.getRuntimeClasspathEntries(null);
- List<IRuntimeClasspathEntry> resolved = new ArrayList<IRuntimeClasspathEntry>();
+ List<IRuntimeClasspathEntry> resolved = new ArrayList<>();
for (int i = 0; i < entries.length; i++) {
IRuntimeClasspathEntry[] temp = JavaRuntime.resolveRuntimeClasspathEntry(entries[i], project);
for (int j = 0; j < temp.length; j++) {
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/DefaultProjectClasspathEntry.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/DefaultProjectClasspathEntry.java
index 895914c..472fbbd 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/DefaultProjectClasspathEntry.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/DefaultProjectClasspathEntry.java
@@ -137,8 +137,8 @@
@Override
public IRuntimeClasspathEntry[] getRuntimeClasspathEntries(ILaunchConfiguration configuration) throws CoreException {
IClasspathEntry entry = JavaCore.newProjectEntry(getJavaProject().getProject().getFullPath());
- List<Object> classpathEntries = new ArrayList<Object>(5);
- List<IClasspathEntry> expanding = new ArrayList<IClasspathEntry>(5);
+ List<Object> classpathEntries = new ArrayList<>(5);
+ List<IClasspathEntry> expanding = new ArrayList<>(5);
expandProject(entry, classpathEntries, expanding);
IRuntimeClasspathEntry[] runtimeEntries = new IRuntimeClasspathEntry[classpathEntries.size()];
for (int i = 0; i < runtimeEntries.length; i++) {
@@ -151,7 +151,7 @@
}
}
// remove bootpath entries - this is a default user classpath
- List<IRuntimeClasspathEntry> ordered = new ArrayList<IRuntimeClasspathEntry>(runtimeEntries.length);
+ List<IRuntimeClasspathEntry> ordered = new ArrayList<>(runtimeEntries.length);
for (int i = 0; i < runtimeEntries.length; i++) {
if (runtimeEntries[i].getClasspathProperty() == IRuntimeClasspathEntry.USER_CLASSES) {
ordered.add(runtimeEntries[i]);
@@ -190,7 +190,7 @@
}
IClasspathEntry[] buildPath = project.getRawClasspath();
- List<IClasspathEntry> unexpandedPath = new ArrayList<IClasspathEntry>(buildPath.length);
+ List<IClasspathEntry> unexpandedPath = new ArrayList<>(buildPath.length);
boolean projectAdded = false;
for (int i = 0; i < buildPath.length; i++) {
IClasspathEntry classpathEntry = buildPath[i];
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/EECompilationParticipant.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/EECompilationParticipant.java
index 2c61580..246dac1 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/EECompilationParticipant.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/EECompilationParticipant.java
@@ -45,7 +45,7 @@
* A set of projects that have been cleaned. When the build finishes for
* a project that has been cleaned, we check for EE problems.
*/
- private Set<IJavaProject> fCleaned = new HashSet<IJavaProject>();
+ private Set<IJavaProject> fCleaned = new HashSet<>();
/* (non-Javadoc)
* @see org.eclipse.jdt.core.compiler.CompilationParticipant#isActive(org.eclipse.jdt.core.IJavaProject)
@@ -153,7 +153,7 @@
*/
private int getSeverityLevel(String prefkey, IProject project) {
IPreferencesService service = Platform.getPreferencesService();
- List<IScopeContext> scopes = new ArrayList<IScopeContext>();
+ List<IScopeContext> scopes = new ArrayList<>();
scopes.add(InstanceScope.INSTANCE);
if(project != null) {
scopes.add(new ProjectScope(project));
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JREContainer.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JREContainer.java
index 4dc0165..3c672af 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JREContainer.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JREContainer.java
@@ -59,7 +59,7 @@
/**
* Cache of classpath entries per VM install. Cleared when a VM changes.
*/
- private static Map<IVMInstall, IClasspathEntry[]> fgClasspathEntries = new HashMap<IVMInstall, IClasspathEntry[]>(10);
+ private static Map<IVMInstall, IClasspathEntry[]> fgClasspathEntries = new HashMap<>(10);
/**
* Variable to return an empty array of <code>IAccessRule</code>s
@@ -69,7 +69,7 @@
/**
* Map of {IVMInstall -> Map of {{IExeuctionEnvironment, IAccessRule[][]} -> {IClasspathEntry[]}}
*/
- private static Map<RuleKey, RuleEntry> fgClasspathEntriesWithRules = new HashMap<RuleKey, RuleEntry>(10);
+ private static Map<RuleKey, RuleEntry> fgClasspathEntriesWithRules = new HashMap<>(10);
/**
* A single key entry for the cache of access rules and classpath entries
@@ -236,7 +236,7 @@
if(obj instanceof IVMInstall) {
IVMInstall install = (IVMInstall) obj;
RuleKey key = null;
- ArrayList<RuleKey> list = new ArrayList<RuleKey>();
+ ArrayList<RuleKey> list = new ArrayList<>();
for(Iterator<RuleKey> iter = fgClasspathEntriesWithRules.keySet().iterator(); iter.hasNext();) {
key = iter.next();
if(key.fInstall.equals(install)) {
@@ -313,7 +313,7 @@
return entry.getClasspathEntries();
}
}
- List<IClasspathEntry> entries = new ArrayList<IClasspathEntry>(libs.length);
+ List<IClasspathEntry> entries = new ArrayList<>(libs.length);
for (int i = 0; i < libs.length; i++) {
if (!libs[i].getSystemLibraryPath().isEmpty()) {
IPath sourcePath = libs[i].getSystemLibrarySourcePath();
@@ -344,7 +344,7 @@
private static IClasspathAttribute[] buildClasspathAttributes(final IVMInstall vm, final LibraryLocation lib, final boolean overrideJavaDoc) {
- List<IClasspathAttribute> classpathAttributes = new LinkedList<IClasspathAttribute>();
+ List<IClasspathAttribute> classpathAttributes = new LinkedList<>();
// process the javadoc location
URL javadocLocation = lib.getJavadocLocation();
if (overrideJavaDoc && javadocLocation == null) {
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JREPreferenceModifyListener.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JREPreferenceModifyListener.java
index cbcb3b9..723a34c 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JREPreferenceModifyListener.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JREPreferenceModifyListener.java
@@ -46,8 +46,8 @@
VMDefinitionsContainer vms = new VMDefinitionsContainer();
String pref = InstanceScope.INSTANCE.getNode(LaunchingPlugin.ID_PLUGIN).get(JavaRuntime.PREF_VM_XML, ""); //$NON-NLS-1$
// names -> existing vm's
- Map<String, IVMInstall> names = new HashMap<String, IVMInstall>();
- Set<String> ids = new HashSet<String>();
+ Map<String, IVMInstall> names = new HashMap<>();
+ Set<String> ids = new HashSet<>();
if (pref.length() > 0) {
try {
VMDefinitionsContainer container = VMDefinitionsContainer.parseXMLIntoContainer(new ByteArrayInputStream(pref.getBytes("UTF8"))); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JRERuntimeClasspathEntryResolver.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JRERuntimeClasspathEntryResolver.java
index 879812d..381c0c9 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JRERuntimeClasspathEntryResolver.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JRERuntimeClasspathEntryResolver.java
@@ -107,11 +107,11 @@
// only return endorsed and bootstrap classpath entries if we have the info
// libraries in the 'ext' directories are not loaded by the boot class loader
String[] extensionDirsArray = libraryInfo.getExtensionDirs();
- Set<String> extensionDirsSet = new HashSet<String>();
+ Set<String> extensionDirsSet = new HashSet<>();
for (int i = 0; i < extensionDirsArray.length; i++) {
extensionDirsSet.add(extensionDirsArray[i]);
}
- List<IRuntimeClasspathEntry> resolvedEntries = new ArrayList<IRuntimeClasspathEntry>(libs.length);
+ List<IRuntimeClasspathEntry> resolvedEntries = new ArrayList<>(libs.length);
for (int i = 0; i < libs.length; i++) {
LibraryLocation location = libs[i];
IPath libraryPath = location.getSystemLibraryPath();
@@ -125,7 +125,7 @@
}
}
}
- List<IRuntimeClasspathEntry> resolvedEntries = new ArrayList<IRuntimeClasspathEntry>(libs.length);
+ List<IRuntimeClasspathEntry> resolvedEntries = new ArrayList<>(libs.length);
for (int i = 0; i < libs.length; i++) {
IPath systemLibraryPath = libs[i].getSystemLibraryPath();
if (systemLibraryPath.toFile().exists()) {
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaAppletLaunchConfigurationDelegate.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaAppletLaunchConfigurationDelegate.java
index b24b75d..9090022 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaAppletLaunchConfigurationDelegate.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaAppletLaunchConfigurationDelegate.java
@@ -49,7 +49,7 @@
* used to initiate the applet launch. This is used to delete the HTML
* file when the launch terminates.
*/
- private static Map<ILaunch, File> fgLaunchToFileMap = new HashMap<ILaunch, File>();
+ private static Map<ILaunch, File> fgLaunchToFileMap = new HashMap<>();
/**
* Used to map temporary file to launch object.
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaLaunchableTester.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaLaunchableTester.java
index 7d03783..b7b539c 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaLaunchableTester.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaLaunchableTester.java
@@ -116,7 +116,7 @@
/**
* Map of modifier text to corresponding flag (Integer)
*/
- private static Map<String, Integer> fgModifiers = new HashMap<String, Integer>();
+ private static Map<String, Integer> fgModifiers = new HashMap<>();
private static final int FLAGS_MASK= Flags.AccPublic | Flags.AccProtected | Flags.AccPrivate | Flags.AccStatic
| Flags.AccFinal | Flags.AccSynchronized | Flags.AccAbstract | Flags.AccNative;
@@ -489,7 +489,7 @@
private boolean hasItemOnBuildPath(IJavaElement element, Object[] args) {
if(element != null && args != null) {
IJavaProject project = element.getJavaProject();
- Set<IJavaProject> searched = new HashSet<IJavaProject>();
+ Set<IJavaProject> searched = new HashSet<>();
searched.add(project);
return hasItemsOnBuildPath(project, searched, args);
}
@@ -498,7 +498,7 @@
private boolean hasItemsOnBuildPath(IJavaProject project, Set<IJavaProject> searched, Object[] args) {
try {
- List<IJavaProject> projects = new ArrayList<IJavaProject>();
+ List<IJavaProject> projects = new ArrayList<>();
if(project != null && project.exists()) {
IClasspathEntry[] entries = project.getResolvedClasspath(true);
for(int i = 0; i < entries.length; i++) {
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaSourceLookupDirector.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaSourceLookupDirector.java
index bb139b7..7ffdce2 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaSourceLookupDirector.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaSourceLookupDirector.java
@@ -30,7 +30,7 @@
private static Set<String> fFilteredTypes;
static {
- fFilteredTypes = new HashSet<String>();
+ fFilteredTypes = new HashSet<>();
fFilteredTypes.add(ProjectSourceContainer.TYPE_ID);
fFilteredTypes.add(WorkspaceSourceContainer.TYPE_ID);
// can't reference UI constant
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaSourceLookupUtil.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaSourceLookupUtil.java
index aec0983..ea47cb0 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaSourceLookupUtil.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaSourceLookupUtil.java
@@ -49,7 +49,7 @@
* @return source containers corresponding to the given runtime classpath entries
*/
public static ISourceContainer[] translate(IRuntimeClasspathEntry[] entries) {
- List<ISourceContainer> containers = new ArrayList<ISourceContainer>(entries.length);
+ List<ISourceContainer> containers = new ArrayList<>(entries.length);
for (int i = 0; i < entries.length; i++) {
IRuntimeClasspathEntry entry = entries[i];
switch (entry.getType()) {
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/LaunchingPlugin.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/LaunchingPlugin.java
index 112cb38..6711557 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/LaunchingPlugin.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/LaunchingPlugin.java
@@ -156,7 +156,7 @@
*
* @since 3.7
*/
- private static HashSet<String> fgHasChanged = new HashSet<String>();
+ private static HashSet<String> fgHasChanged = new HashSet<>();
/**
* Mutex for checking the time stamp of an install location
*
@@ -184,7 +184,7 @@
private boolean fDefaultChanged = false;
// old container ids to new
- private HashMap<IPath, IPath> fRenamedContainerIds = new HashMap<IPath, IPath>();
+ private HashMap<IPath, IPath> fRenamedContainerIds = new HashMap<>();
/**
* Returns the JRE container id that the given VM would map to, or
@@ -308,7 +308,7 @@
// re-bind all container entries
int length = projects.length;
- Map<IPath, List<IJavaProject>> projectsMap = new HashMap<IPath, List<IJavaProject>>();
+ Map<IPath, List<IJavaProject>> projectsMap = new HashMap<>();
for (int i = 0; i < length; i++) {
IJavaProject project = projects[i];
IClasspathEntry[] entries = project.getRawClasspath();
@@ -334,7 +334,7 @@
// @see bug 310789 - batch updates by common container paths
List<IJavaProject> projectsList = projectsMap.get(reference);
if (projectsList == null) {
- projectsMap.put(reference, projectsList = new ArrayList<IJavaProject>(length));
+ projectsMap.put(reference, projectsList = new ArrayList<>(length));
}
projectsList.add(project);
} else {
@@ -529,7 +529,7 @@
@Override
public void start(BundleContext context) throws Exception {
super.start(context);
- Hashtable<String, String> props = new Hashtable<String, String>(2);
+ Hashtable<String, String> props = new Hashtable<>(2);
props.put(org.eclipse.osgi.service.debug.DebugOptions.LISTENER_SYMBOLICNAME, getUniqueIdentifier());
context.registerService(DebugOptionsListener.class.getName(), this, props);
ResourcesPlugin.getWorkspace().addSaveParticipant(ID_PLUGIN, new ISaveParticipant() {
@@ -591,7 +591,7 @@
IExtensionPoint extensionPoint= Platform.getExtensionRegistry().getExtensionPoint(ID_PLUGIN, ID_EXTENSION_POINT_VM_CONNECTORS);
IConfigurationElement[] configs= extensionPoint.getConfigurationElements();
MultiStatus status= new MultiStatus(getUniqueIdentifier(), IStatus.OK, "Exception occurred reading vmConnectors extensions.", null); //$NON-NLS-1$
- fVMConnectors = new HashMap<String, IVMConnector>(configs.length);
+ fVMConnectors = new HashMap<>(configs.length);
for (int i= 0; i < configs.length; i++) {
try {
IVMConnector vmConnector= (IVMConnector)configs[i].createExecutableExtension("class"); //$NON-NLS-1$
@@ -630,7 +630,7 @@
private void initializeRuntimeClasspathExtensions() {
IExtensionPoint extensionPoint= Platform.getExtensionRegistry().getExtensionPoint(LaunchingPlugin.ID_PLUGIN, ID_EXTENSION_POINT_RUNTIME_CLASSPATH_ENTRIES);
IConfigurationElement[] configs= extensionPoint.getConfigurationElements();
- fClasspathEntryExtensions = new HashMap<String, IConfigurationElement>(configs.length);
+ fClasspathEntryExtensions = new HashMap<>(configs.length);
for (int i= 0; i < configs.length; i++) {
fClasspathEntryExtensions.put(configs[i].getAttribute("id"), configs[i]); //$NON-NLS-1$
}
@@ -913,7 +913,7 @@
* Restores library information for VMs
*/
private static void restoreLibraryInfo() {
- fgLibraryInfoMap = new HashMap<String, LibraryInfo>(10);
+ fgLibraryInfoMap = new HashMap<>(10);
IPath libPath = getDefault().getStateLocation();
libPath = libPath.append("libraryInfos.xml"); //$NON-NLS-1$
File file = libPath.toFile();
@@ -1004,7 +1004,7 @@
* @since 3.7
*/
private static void readInstallInfo() {
- fgInstallTimeMap = new HashMap<String, Long>();
+ fgInstallTimeMap = new HashMap<>();
IPath libPath = getDefault().getStateLocation();
libPath = libPath.append(".install.xml"); //$NON-NLS-1$
File file = libPath.toFile();
@@ -1097,7 +1097,7 @@
* @return paths stored in XML
*/
private static String[] getPathsFromXML(Element lib, String pathType) {
- List<String> paths = new ArrayList<String>();
+ List<String> paths = new ArrayList<>();
NodeList list = lib.getChildNodes();
int length = list.getLength();
for (int i = 0; i < length; ++i) {
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/MacInstalledJREs.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/MacInstalledJREs.java
index ecc0920..07a339c 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/MacInstalledJREs.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/MacInstalledJREs.java
@@ -158,7 +158,7 @@
if (result instanceof Object[]) {
Object[] maps = (Object[]) result;
smonitor.setWorkRemaining(maps.length);
- List<VMStandin> jres= new ArrayList<VMStandin>();
+ List<VMStandin> jres= new ArrayList<>();
AbstractVMInstallType mactype = (AbstractVMInstallType) JavaRuntime.getVMInstallType("org.eclipse.jdt.internal.launching.macosx.MacOSXType"); //$NON-NLS-1$
if(mactype != null) {
for (int i = 0; i < maps.length; i++) {
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/PListParser.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/PListParser.java
index e1453dd..315574d 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/PListParser.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/PListParser.java
@@ -173,7 +173,7 @@
* @throws CoreException if an error occurs
*/
private Object[] parseArray(Element root) throws CoreException {
- List<Object> collection = new ArrayList<Object>();
+ List<Object> collection = new ArrayList<>();
NodeList list = root.getChildNodes();
Node node = null;
Element element = null;
@@ -199,7 +199,7 @@
* @throws CoreException if an error occurs
*/
private Map<String, Object> parseDictionary(Element root) throws CoreException {
- Map<String, Object> dict = new HashMap<String, Object>();
+ Map<String, Object> dict = new HashMap<>();
NodeList list = root.getChildNodes();
Node node = null;
Element element = null;
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/ProjectClasspathVariableResolver.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/ProjectClasspathVariableResolver.java
index eb180a0..9980ff9 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/ProjectClasspathVariableResolver.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/ProjectClasspathVariableResolver.java
@@ -56,7 +56,7 @@
if (javaProject.exists()) {
IRuntimeClasspathEntry2 defClassPath = (IRuntimeClasspathEntry2) JavaRuntime.newDefaultProjectClasspathEntry(javaProject);
IRuntimeClasspathEntry[] entries = defClassPath.getRuntimeClasspathEntries(null);
- List<IRuntimeClasspathEntry> collect = new ArrayList<IRuntimeClasspathEntry>();
+ List<IRuntimeClasspathEntry> collect = new ArrayList<>();
for (int i = 0; i < entries.length; i++) {
IRuntimeClasspathEntry[] children = JavaRuntime.resolveRuntimeClasspathEntry(entries[i], javaProject);
for (int j = 0; j < children.length; j++) {
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/SocketAttachConnector.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/SocketAttachConnector.java
index e1af1ce..2272091 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/SocketAttachConnector.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/SocketAttachConnector.java
@@ -212,7 +212,7 @@
*/
@Override
public List<String> getArgumentOrder() {
- List<String> list = new ArrayList<String>(2);
+ List<String> list = new ArrayList<>(2);
list.add("hostname"); //$NON-NLS-1$
list.add("port"); //$NON-NLS-1$
return list;
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/SocketListenConnector.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/SocketListenConnector.java
index e2a87ae..967a56d 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/SocketListenConnector.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/SocketListenConnector.java
@@ -137,7 +137,7 @@
*/
@Override
public List<String> getArgumentOrder() {
- List<String> list = new ArrayList<String>(1);
+ List<String> list = new ArrayList<>(1);
list.add("port"); //$NON-NLS-1$
list.add("connectionLimit"); //$NON-NLS-1$
return list;
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/Standard11xVMRunner.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/Standard11xVMRunner.java
index d311ac9..fb9f643 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/Standard11xVMRunner.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/Standard11xVMRunner.java
@@ -53,7 +53,7 @@
String program= constructProgramString(config);
- List<String> arguments= new ArrayList<String>();
+ List<String> arguments= new ArrayList<>();
arguments.add(program);
// VM arguments are the first thing after the java program so that users can specify
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMDebugger.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMDebugger.java
index f1195d4..ed11b38 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMDebugger.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMDebugger.java
@@ -174,7 +174,7 @@
String program= constructProgramString(config);
- List<String> arguments= new ArrayList<String>(12);
+ List<String> arguments= new ArrayList<>(12);
arguments.add(program);
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMRunner.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMRunner.java
index 639f62e..6d27b25 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMRunner.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMRunner.java
@@ -167,7 +167,7 @@
if (java_swt == null) {
// not started via java_swt -> now we require that the VM supports the "-XstartOnFirstThread" option
boolean found = false;
- ArrayList<String> args = new ArrayList<String>();
+ ArrayList<String> args = new ArrayList<>();
for (int i = 0; i < cmdLine.length; i++) {
if(XSTART_ON_FIRST_THREAD.equals(cmdLine[i])) {
found = true;
@@ -362,7 +362,7 @@
String program= constructProgramString(config);
- List<String> arguments= new ArrayList<String>();
+ List<String> arguments= new ArrayList<>();
arguments.add(program);
// VM args are the first thing after the java program so that users can specify
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java
index d9d637d..a7080e7 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java
@@ -101,7 +101,7 @@
* Map of the install path for which we were unable to generate
* the library info during this session.
*/
- private static Map<String, LibraryInfo> fgFailedInstallPath = new HashMap<String, LibraryInfo>();
+ private static Map<String, LibraryInfo> fgFailedInstallPath = new HashMap<>();
/**
* Cache for default library locations. See {@link #getDefaultLibraryLocations(File)}
@@ -110,7 +110,7 @@
*
* @since 3.7
*/
- private static Map<String, List<LibraryLocation>> fgDefaultLibLocs = new HashMap<String, List<LibraryLocation>>();
+ private static Map<String, List<LibraryLocation>> fgDefaultLibLocs = new HashMap<>();
/**
* The list of locations in which to look for the java executable in candidate
@@ -160,7 +160,7 @@
return e1.getNamespaceIdentifier().compareTo(e2.getNamespaceIdentifier());
}
});
- List<ILibraryLocationResolver> resolvers = new ArrayList<ILibraryLocationResolver>(configs.length);
+ List<ILibraryLocationResolver> resolvers = new ArrayList<>(configs.length);
for( int i = 0; i < configs.length; i++ ) {
IConfigurationElement e = configs[i];
try {
@@ -421,11 +421,11 @@
}
// Add all endorsed libraries - they are first, as they replace
- allLibs = new ArrayList<LibraryLocation>(gatherAllLibraries(libInfo.getEndorsedDirs()));
+ allLibs = new ArrayList<>(gatherAllLibraries(libInfo.getEndorsedDirs()));
// next is the boot path libraries
String[] bootpath = libInfo.getBootpath();
- List<LibraryLocation> boot = new ArrayList<LibraryLocation>(bootpath.length);
+ List<LibraryLocation> boot = new ArrayList<>(bootpath.length);
URL url = getDefaultJavadocLocation(installLocation);
for (int i = 0; i < bootpath.length; i++) {
IPath path = new Path(bootpath[i]);
@@ -444,7 +444,7 @@
allLibs.addAll(gatherAllLibraries(libInfo.getExtensionDirs()));
//remove duplicates
- HashSet<String> set = new HashSet<String>();
+ HashSet<String> set = new HashSet<>();
LibraryLocation lib = null;
for(ListIterator<LibraryLocation> liter = allLibs.listIterator(); liter.hasNext();) {
lib = liter.next();
@@ -496,7 +496,7 @@
* @return List of all zip's and jars
*/
public static List<LibraryLocation> gatherAllLibraries(String[] dirPaths) {
- List<LibraryLocation> libraries = new ArrayList<LibraryLocation>();
+ List<LibraryLocation> libraries = new ArrayList<>();
for (int i = 0; i < dirPaths.length; i++) {
File extDir = new File(dirPaths[i]);
if (extDir.isDirectory()) {
@@ -707,7 +707,7 @@
}
protected String[] parsePaths(String paths) {
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
int pos = 0;
int index = paths.indexOf(File.pathSeparatorChar, pos);
while (index > 0) {
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/VMDefinitionsContainer.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/VMDefinitionsContainer.java
index 4fd7c13..8f48cf3 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/VMDefinitionsContainer.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/VMDefinitionsContainer.java
@@ -108,9 +108,9 @@
* Constructs an empty VM container
*/
public VMDefinitionsContainer() {
- fVMTypeToVMMap = new HashMap<IVMInstallType, List<IVMInstall>>(10);
- fInvalidVMList = new ArrayList<IVMInstall>(10);
- fVMList = new ArrayList<IVMInstall>(10);
+ fVMTypeToVMMap = new HashMap<>(10);
+ fInvalidVMList = new ArrayList<>(10);
+ fVMList = new ArrayList<>(10);
}
/**
@@ -128,7 +128,7 @@
IVMInstallType vmInstallType = vm.getVMInstallType();
List<IVMInstall> vmList = fVMTypeToVMMap.get(vmInstallType);
if (vmList == null) {
- vmList = new ArrayList<IVMInstall>(3);
+ vmList = new ArrayList<>(3);
fVMTypeToVMMap.put(vmInstallType, vmList);
}
vmList.add(vm);
@@ -187,7 +187,7 @@
*/
public List<IVMInstall> getValidVMList() {
List<IVMInstall> vms = getVMList();
- List<IVMInstall> resultList = new ArrayList<IVMInstall>(vms.size());
+ List<IVMInstall> resultList = new ArrayList<>(vms.size());
resultList.addAll(vms);
resultList.removeAll(fInvalidVMList);
return resultList;
@@ -676,7 +676,7 @@
private static void setLibraryLocations(IVMInstall vm, Element libLocationsElement) {
NodeList list = libLocationsElement.getChildNodes();
int length = list.getLength();
- List<LibraryLocation> locations = new ArrayList<LibraryLocation>(length);
+ List<LibraryLocation> locations = new ArrayList<>(length);
for (int i = 0; i < length; ++i) {
Node node = list.item(i);
short type = node.getNodeType();
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/DefaultAccessRuleParticipant.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/DefaultAccessRuleParticipant.java
index 68db7d3..df824ae 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/DefaultAccessRuleParticipant.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/DefaultAccessRuleParticipant.java
@@ -37,7 +37,7 @@
/**
* Cache of access rules per environment. Re-use rules between projects.
*/
- private static Map<String, IAccessRule[][]> fgRules = new HashMap<String, IAccessRule[][]>();
+ private static Map<String, IAccessRule[][]> fgRules = new HashMap<>();
/* (non-Javadoc)
* @see org.eclipse.jdt.launching.environments.IAccessRuleParticipant#getAccessRules(org.eclipse.jdt.launching.environments.IExecutionEnvironment, org.eclipse.jdt.launching.IVMInstall, org.eclipse.jdt.launching.LibraryLocation[], org.eclipse.jdt.core.IJavaProject)
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/EnvironmentsManager.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/EnvironmentsManager.java
index 2f3bfa5..4e8dd20 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/EnvironmentsManager.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/EnvironmentsManager.java
@@ -193,15 +193,15 @@
if (fEnvironments == null) {
IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(LaunchingPlugin.ID_PLUGIN, JavaRuntime.EXTENSION_POINT_EXECUTION_ENVIRONMENTS);
IConfigurationElement[] configs= extensionPoint.getConfigurationElements();
- fEnvironments = new TreeSet<IExecutionEnvironment>(new Comparator<IExecutionEnvironment>() {
+ fEnvironments = new TreeSet<>(new Comparator<IExecutionEnvironment>() {
@Override
public int compare(IExecutionEnvironment o1, IExecutionEnvironment o2) {
return o1.getId().compareTo(o2.getId());
}
});
- fRuleParticipants = new LinkedHashSet<AccessRuleParticipant>();
- fEnvironmentsMap = new HashMap<String, IExecutionEnvironment>(configs.length);
- fAnalyzers = new HashMap<String, Analyzer>(configs.length);
+ fRuleParticipants = new LinkedHashSet<>();
+ fEnvironmentsMap = new HashMap<>(configs.length);
+ fAnalyzers = new HashMap<>(configs.length);
for (int i = 0; i < configs.length; i++) {
IConfigurationElement element = configs[i];
String name = element.getName();
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/ExecutionEnvironment.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/ExecutionEnvironment.java
index 02a6a6b..ca101f0 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/ExecutionEnvironment.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/ExecutionEnvironment.java
@@ -118,12 +118,12 @@
/**
* Set of compatible vm's - just the strictly compatible ones
*/
- private Set<IVMInstall> fStrictlyCompatible = new HashSet<IVMInstall>();
+ private Set<IVMInstall> fStrictlyCompatible = new HashSet<>();
/**
* All compatible vm's
*/
- private List<IVMInstall> fCompatibleVMs = new ArrayList<IVMInstall>();
+ private List<IVMInstall> fCompatibleVMs = new ArrayList<>();
/**
* default VM install or <code>null</code> if none
@@ -140,7 +140,7 @@
* Caches access rules returned by each participant for a given VM.
* @since 3.3
*/
- private Map<IVMInstall, Map<IAccessRuleParticipant, IAccessRule[][]>> fParticipantMap = new HashMap<IVMInstall, Map<IAccessRuleParticipant, IAccessRule[][]>>();
+ private Map<IVMInstall, Map<IAccessRuleParticipant, IAccessRule[][]>> fParticipantMap = new HashMap<>();
/**
* Cache of VM -> IAccessRule[][] based on the current state of the participant
@@ -148,7 +148,7 @@
* for a specific VM.
* @since 3.3
*/
- private Map<IVMInstall, IAccessRule[][]> fRuleCache = new HashMap<IVMInstall, IAccessRule[][]>();
+ private Map<IVMInstall, IAccessRule[][]> fRuleCache = new HashMap<>();
/**
* Wild card pattern matching all files
@@ -249,7 +249,7 @@
IJavaModel model = JavaCore.create(ResourcesPlugin.getWorkspace().getRoot());
if (model != null) {
try {
- List<IJavaProject> updates = new ArrayList<IJavaProject>();
+ List<IJavaProject> updates = new ArrayList<>();
IJavaProject[] javaProjects = model.getJavaProjects();
IPath path = JavaRuntime.newJREContainerPath(this);
for (int i = 0; i < javaProjects.length; i++) {
@@ -320,7 +320,7 @@
synchronized (this) {
Map<IAccessRuleParticipant, IAccessRule[][]> cachedRules = fParticipantMap.get(vm);
if (cachedRules == null || !cachedRules.equals(rulesByParticipant)) {
- ArrayList<List<IAccessRule>> libLists = new ArrayList<List<IAccessRule>>(); // array of lists of access rules
+ ArrayList<List<IAccessRule>> libLists = new ArrayList<>(); // array of lists of access rules
for (int i = 0; i < libraries.length; i++) {
libLists.add(new ArrayList<IAccessRule>());
}
@@ -354,7 +354,7 @@
IAccessRuleParticipant[] participants = EnvironmentsManager.getDefault().getAccessRuleParticipants();
if (fRuleParticipant != null) {
// ensure environment specific provider is last and not duplicated
- LinkedHashSet<IAccessRuleParticipant> set = new LinkedHashSet<IAccessRuleParticipant>();
+ LinkedHashSet<IAccessRuleParticipant> set = new LinkedHashSet<>();
for (int i = 0; i < participants.length; i++) {
set.add(participants[i]);
}
@@ -379,7 +379,7 @@
* @return the mapping of {@link IAccessRuleParticipant} to {@link IAccessRule}s
*/
private Map<IAccessRuleParticipant, IAccessRule[][]> collectRulesByParticipant(IAccessRuleParticipant[] participants, IVMInstall vm, LibraryLocation[] libraries, IJavaProject project) {
- Map<IAccessRuleParticipant, IAccessRule[][]> map = new HashMap<IAccessRuleParticipant, IAccessRule[][]>();
+ Map<IAccessRuleParticipant, IAccessRule[][]> map = new HashMap<>();
for (int i = 0; i < participants.length; i++) {
// TODO: use safe runnable
map.put(participants[i], participants[i].getAccessRules(this, vm, libraries, project));
@@ -465,7 +465,7 @@
@Override
public IExecutionEnvironment[] getSubEnvironments() {
Properties properties = getProfileProperties();
- Set<IExecutionEnvironment> subenv = new LinkedHashSet<IExecutionEnvironment>();
+ Set<IExecutionEnvironment> subenv = new LinkedHashSet<>();
if (properties != null) {
@SuppressWarnings("deprecation")
String subsets = properties.getProperty(Constants.FRAMEWORK_EXECUTIONENVIRONMENT);
@@ -489,7 +489,7 @@
public Map<String, String> getComplianceOptions() {
Properties properties = getProfileProperties();
if (properties != null) {
- Map<String, String> map = new HashMap<String, String>();
+ Map<String, String> map = new HashMap<>();
Iterator<?> iterator = properties.keySet().iterator();
while (iterator.hasNext()) {
String key = (String) iterator.next();
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/ExecutionEnvironmentAnalyzer.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/ExecutionEnvironmentAnalyzer.java
index 1699869..780e2a7 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/ExecutionEnvironmentAnalyzer.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/ExecutionEnvironmentAnalyzer.java
@@ -61,7 +61,7 @@
private static final String[] VM_PROPERTIES = {JAVA_SPEC_NAME, JAVA_SPEC_VERSION, JAVA_VERSION};
private static final String FOUNDATION = "foundation"; //$NON-NLS-1$
- private static final Map<String, String[]> mappings = new HashMap<String, String[]>();
+ private static final Map<String, String[]> mappings = new HashMap<>();
static {
// table where the key is the EE and the value is an array of EEs that it is a super-set of
@@ -79,7 +79,7 @@
}
@Override
public CompatibleEnvironment[] analyze(IVMInstall vm, IProgressMonitor monitor) throws CoreException {
- ArrayList<CompatibleEnvironment> result = new ArrayList<CompatibleEnvironment>();
+ ArrayList<CompatibleEnvironment> result = new ArrayList<>();
if (!(vm instanceof IVMInstall2)) {
return new CompatibleEnvironment[0];
}
@@ -175,7 +175,7 @@
// first entry in the list is the perfect match
private List<String> getTypes(String type) {
- List<String> result = new ArrayList<String>();
+ List<String> result = new ArrayList<>();
result.add(type);
String[] values = mappings.get(type);
if (values != null) {
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/AbstractJavaLaunchConfigurationDelegate.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/AbstractJavaLaunchConfigurationDelegate.java
index 51a9488..d46cb52 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/AbstractJavaLaunchConfigurationDelegate.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/AbstractJavaLaunchConfigurationDelegate.java
@@ -249,7 +249,7 @@
IRuntimeClasspathEntry[] entries = JavaRuntime
.computeUnresolvedRuntimeClasspath(configuration);
entries = JavaRuntime.resolveRuntimeClasspath(entries, configuration);
- List<String> bootEntries = new ArrayList<String>(entries.length);
+ List<String> bootEntries = new ArrayList<>(entries.length);
boolean empty = true;
boolean allStandard = true;
for (int i = 0; i < entries.length; i++) {
@@ -294,7 +294,7 @@
String[][] bootpathInfo = new String[3][];
IRuntimeClasspathEntry[] entries = JavaRuntime
.computeUnresolvedRuntimeClasspath(configuration);
- List<IRuntimeClasspathEntry> bootEntriesPrepend = new ArrayList<IRuntimeClasspathEntry>();
+ List<IRuntimeClasspathEntry> bootEntriesPrepend = new ArrayList<>();
int index = 0;
IRuntimeClasspathEntry jreEntry = null;
while (jreEntry == null && index < entries.length) {
@@ -321,7 +321,7 @@
}
}
if (jreEntry != null) {
- List<IRuntimeClasspathEntry> bootEntriesAppend = new ArrayList<IRuntimeClasspathEntry>();
+ List<IRuntimeClasspathEntry> bootEntriesAppend = new ArrayList<>();
for (; index < entries.length; index++) {
IRuntimeClasspathEntry entry = entries[index];
if (entry.getClasspathProperty() == IRuntimeClasspathEntry.BOOTSTRAP_CLASSES) {
@@ -410,8 +410,8 @@
IRuntimeClasspathEntry[] entries = JavaRuntime
.computeUnresolvedRuntimeClasspath(configuration);
entries = JavaRuntime.resolveRuntimeClasspath(entries, configuration);
- List<String> userEntries = new ArrayList<String>(entries.length);
- Set<String> set = new HashSet<String>(entries.length);
+ List<String> userEntries = new ArrayList<>(entries.length);
+ Set<String> set = new HashSet<>(entries.length);
for (int i = 0; i < entries.length; i++) {
if (entries[i].getClasspathProperty() == IRuntimeClasspathEntry.USER_CLASSES) {
String location = entries[i].getLocation();
@@ -556,7 +556,7 @@
*/
public Map<String, Object> getVMSpecificAttributesMap(ILaunchConfiguration configuration) throws CoreException {
Map<String, String> map = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE_SPECIFIC_ATTRS_MAP,(Map<String, String>) null);
- Map<String, Object> attributes = new HashMap<String, Object>();
+ Map<String, Object> attributes = new HashMap<>();
if(map != null) {
attributes.putAll(map);
}
@@ -827,7 +827,7 @@
if (isStopInMain(configuration)) {
String mainType = getMainTypeName(configuration);
if (mainType != null) {
- Map<String, Object> map = new HashMap<String, Object>();
+ Map<String, Object> map = new HashMap<>();
map
.put(
IJavaLaunchConfigurationConstants.ATTR_STOP_IN_MAIN,
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/AbstractVMInstall.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/AbstractVMInstall.java
index 63a4f18..ddaa77a 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/AbstractVMInstall.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/AbstractVMInstall.java
@@ -64,7 +64,7 @@
* Map VM specific attributes that are persisted restored with a VM install.
* @since 3.4
*/
- private Map<String, String> fAttributeMap = new HashMap<String, String>();
+ private Map<String, String> fAttributeMap = new HashMap<>();
// system properties are cached in user preferences prefixed with this key, followed
// by VM type, VM id, and system property name
@@ -355,7 +355,7 @@
if (monitor == null) {
monitor = new NullProgressMonitor();
}
- Map<String, String> map = new HashMap<String, String>();
+ Map<String, String> map = new HashMap<>();
// first check cache (preference store) to avoid launching VM
boolean cached = true;
@@ -562,6 +562,6 @@
* @since 3.4
*/
public Map<String, String> getAttributes() {
- return new HashMap<String, String>(fAttributeMap);
+ return new HashMap<>(fAttributeMap);
}
}
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/AbstractVMRunner.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/AbstractVMRunner.java
index 49cd030..3c7dfff 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/AbstractVMRunner.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/AbstractVMRunner.java
@@ -151,7 +151,7 @@
* @return default process attribute map for Java processes
*/
protected Map<String, String> getDefaultProcessMap() {
- Map<String, String> map = new HashMap<String, String>();
+ Map<String, String> map = new HashMap<>();
map.put(IProcess.ATTR_PROCESS_TYPE, IJavaLaunchConfigurationConstants.ID_JAVA_PROCESS_TYPE);
return map;
}
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/JavaRuntime.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/JavaRuntime.java
index 2ed618a..3f112f4 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/JavaRuntime.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/JavaRuntime.java
@@ -332,13 +332,13 @@
* cycles in project dependencies when resolving classpath container entries.
* Counters used to know when entering/exiting to clear cache
*/
- private static ThreadLocal<List<IJavaProject>> fgProjects = new ThreadLocal<List<IJavaProject>>(); // Lists
- private static ThreadLocal<Integer> fgEntryCount = new ThreadLocal<Integer>(); // Integers
+ private static ThreadLocal<List<IJavaProject>> fgProjects = new ThreadLocal<>(); // Lists
+ private static ThreadLocal<Integer> fgEntryCount = new ThreadLocal<>(); // Integers
/**
* Set of IDs of VMs contributed via vmInstalls extension point.
*/
- private static Set<String> fgContributedVMs = new HashSet<String>();
+ private static Set<String> fgContributedVMs = new HashSet<>();
/**
* This class contains only static methods, and is not intended
@@ -355,7 +355,7 @@
if(extensionPoint != null) {
IConfigurationElement[] configs = extensionPoint.getConfigurationElements();
MultiStatus status = new MultiStatus(LaunchingPlugin.getUniqueIdentifier(), IStatus.OK, "Exceptions occurred", null); //$NON-NLS-1$
- fgVMTypes = new HashSet<Object>();
+ fgVMTypes = new HashSet<>();
for (int i= 0; i < configs.length; i++) {
try {
fgVMTypes.add(configs[i].createExecutableExtension("class")); //$NON-NLS-1$
@@ -776,7 +776,7 @@
*/
public static IRuntimeClasspathEntry[] computeUnresolvedRuntimeClasspath(IJavaProject project) throws CoreException {
IClasspathEntry[] entries = project.getRawClasspath();
- List<IRuntimeClasspathEntry> classpathEntries = new ArrayList<IRuntimeClasspathEntry>(3);
+ List<IRuntimeClasspathEntry> classpathEntries = new ArrayList<>(3);
for (int i = 0; i < entries.length; i++) {
IClasspathEntry entry = entries[i];
switch (entry.getEntryKind()) {
@@ -1037,7 +1037,7 @@
* @throws CoreException if output resolution encounters a problem
*/
private static IRuntimeClasspathEntry[] resolveOutputLocations(IJavaProject project, int classpathProperty) throws CoreException {
- List<IPath> nonDefault = new ArrayList<IPath>();
+ List<IPath> nonDefault = new ArrayList<>();
if (project.exists() && project.getProject().isOpen()) {
IClasspathEntry entries[] = project.getRawClasspath();
for (int i = 0; i < entries.length; i++) {
@@ -1180,11 +1180,11 @@
property = IRuntimeClasspathEntry.BOOTSTRAP_CLASSES;
break;
}
- List<IRuntimeClasspathEntry> resolved = new ArrayList<IRuntimeClasspathEntry>(cpes.length);
+ List<IRuntimeClasspathEntry> resolved = new ArrayList<>(cpes.length);
List<IJavaProject> projects = fgProjects.get();
Integer count = fgEntryCount.get();
if (projects == null) {
- projects = new ArrayList<IJavaProject>();
+ projects = new ArrayList<>();
fgProjects.set(projects);
count = new Integer(0);
}
@@ -1420,7 +1420,7 @@
IRuntimeClasspathEntry[] unresolved = computeUnresolvedRuntimeClasspath(jproject);
// 1. remove bootpath entries
// 2. resolve & translate to local file system paths
- List<String> resolved = new ArrayList<String>(unresolved.length);
+ List<String> resolved = new ArrayList<>(unresolved.length);
for (int i = 0; i < unresolved.length; i++) {
IRuntimeClasspathEntry entry = unresolved[i];
if (entry.getClasspathProperty() == IRuntimeClasspathEntry.USER_CLASSES) {
@@ -2249,9 +2249,9 @@
private static void initializeResolvers() {
IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(LaunchingPlugin.ID_PLUGIN, EXTENSION_POINT_RUNTIME_CLASSPATH_ENTRY_RESOLVERS);
IConfigurationElement[] extensions = point.getConfigurationElements();
- fgVariableResolvers = new HashMap<String, IRuntimeClasspathEntryResolver>(extensions.length);
- fgContainerResolvers = new HashMap<String, IRuntimeClasspathEntryResolver>(extensions.length);
- fgRuntimeClasspathEntryResolvers = new HashMap<String, RuntimeClasspathEntryResolver>(extensions.length);
+ fgVariableResolvers = new HashMap<>(extensions.length);
+ fgContainerResolvers = new HashMap<>(extensions.length);
+ fgRuntimeClasspathEntryResolvers = new HashMap<>(extensions.length);
for (int i = 0; i < extensions.length; i++) {
RuntimeClasspathEntryResolver res = new RuntimeClasspathEntryResolver(extensions[i]);
String variable = res.getVariableName();
@@ -2286,7 +2286,7 @@
private static void initializeProviders() {
IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(LaunchingPlugin.ID_PLUGIN, EXTENSION_POINT_RUNTIME_CLASSPATH_PROVIDERS);
IConfigurationElement[] extensions = point.getConfigurationElements();
- fgPathProviders = new HashMap<String, RuntimeClasspathProvider>(extensions.length);
+ fgPathProviders = new HashMap<>(extensions.length);
for (int i = 0; i < extensions.length; i++) {
RuntimeClasspathProvider res = new RuntimeClasspathProvider(extensions[i]);
fgPathProviders.put(res.getIdentifier(), res);
@@ -2465,10 +2465,10 @@
* @see JavaRuntime#CLASSPATH_ATTR_LIBRARY_PATH_ENTRY
*/
public static String[] computeJavaLibraryPath(IJavaProject project, boolean requiredProjects) throws CoreException {
- Set<IJavaProject> visited = new HashSet<IJavaProject>();
- List<String> entries = new ArrayList<String>();
+ Set<IJavaProject> visited = new HashSet<>();
+ List<String> entries = new ArrayList<>();
gatherJavaLibraryPathEntries(project, requiredProjects, visited, entries);
- List<String> resolved = new ArrayList<String>(entries.size());
+ List<String> resolved = new ArrayList<>(entries.size());
Iterator<String> iterator = entries.iterator();
IStringVariableManager manager = VariablesPlugin.getDefault().getStringVariableManager();
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
@@ -2561,7 +2561,7 @@
IClasspathEntry[] requiredProjects = processJavaLibraryPathEntries(project, collectRequired, container.getClasspathEntries(), entries);
if (requiredProjects != null) {
if (req == null) {
- req = new ArrayList<IClasspathEntry>();
+ req = new ArrayList<>();
}
for (int j = 0; j < requiredProjects.length; j++) {
req.add(requiredProjects[j]);
@@ -2570,7 +2570,7 @@
}
} else if (collectRequired && entry.getEntryKind() == IClasspathEntry.CPE_PROJECT) {
if (req == null) {
- req = new ArrayList<IClasspathEntry>();
+ req = new ArrayList<>();
}
req.add(entry);
}
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/StandardClasspathProvider.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/StandardClasspathProvider.java
index fadc895..dbf7779 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/StandardClasspathProvider.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/StandardClasspathProvider.java
@@ -72,7 +72,7 @@
@Override
public IRuntimeClasspathEntry[] resolveClasspath(IRuntimeClasspathEntry[] entries, ILaunchConfiguration configuration) throws CoreException {
// use an ordered set to avoid duplicates
- Set<IRuntimeClasspathEntry> all = new LinkedHashSet<IRuntimeClasspathEntry>(entries.length);
+ Set<IRuntimeClasspathEntry> all = new LinkedHashSet<>(entries.length);
for (int i = 0; i < entries.length; i++) {
IRuntimeClasspathEntry[] resolved =JavaRuntime.resolveRuntimeClasspathEntry(entries[i], configuration);
for (int j = 0; j < resolved.length; j++) {
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/StandardSourcePathProvider.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/StandardSourcePathProvider.java
index 76ee5e7..0d32cfb 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/StandardSourcePathProvider.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/StandardSourcePathProvider.java
@@ -147,7 +147,7 @@
public UniqueList(int length) {
super(length);
- set = new HashSet<IRuntimeClasspathEntry>(length);
+ set = new HashSet<>(length);
}
@Override
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/environments/ExecutionEnvironmentDescription.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/environments/ExecutionEnvironmentDescription.java
index 3c3b51d..eb08641 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/environments/ExecutionEnvironmentDescription.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/environments/ExecutionEnvironmentDescription.java
@@ -232,7 +232,7 @@
* @return library locations, possibly empty
*/
public LibraryLocation[] getLibraryLocations() {
- List<LibraryLocation> allLibs = new ArrayList<LibraryLocation>();
+ List<LibraryLocation> allLibs = new ArrayList<>();
String dirs = getProperty(ENDORSED_DIRS);
if (dirs != null) {
@@ -244,7 +244,7 @@
dirs = getProperty(BOOT_CLASS_PATH);
if (dirs != null) {
String[] bootpath = resolvePaths(dirs);
- List<LibraryLocation> boot = new ArrayList<LibraryLocation>(bootpath.length);
+ List<LibraryLocation> boot = new ArrayList<>(bootpath.length);
IPath src = getSourceLocation();
URL url = getJavadocLocation();
URL indexurl = getIndexLocation();
@@ -273,7 +273,7 @@
//remove duplicates
- HashSet<String> set = new HashSet<String>();
+ HashSet<String> set = new HashSet<>();
LibraryLocation lib = null;
for(ListIterator<LibraryLocation> liter = allLibs.listIterator(); liter.hasNext();) {
lib = liter.next();
@@ -367,7 +367,7 @@
* @exception CoreException if unable to read the file
*/
private void initProperties(File eeFile) throws CoreException {
- Map<String, String> properties = new LinkedHashMap<String, String>();
+ Map<String, String> properties = new LinkedHashMap<>();
String eeHome = eeFile.getParentFile().getAbsolutePath();
try (FileReader reader = new FileReader(eeFile); BufferedReader bufferedReader = new BufferedReader(reader);) {
String line = bufferedReader.readLine();
@@ -402,7 +402,7 @@
// resolve things with ${ee.home} in them
fProperties = properties; // needs to be done to resolve
Iterator<Entry<String, String>> entries = properties.entrySet().iterator();
- Map<String, String> resolved = new LinkedHashMap<String, String>(properties.size());
+ Map<String, String> resolved = new LinkedHashMap<>(properties.size());
while (entries.hasNext()) {
Entry<String, String> entry = entries.next();
String key = entry.getKey();
@@ -499,7 +499,7 @@
*/
private Map<String, String> getSourceMap(){
String srcMapString = getProperty(SOURCE_MAP);
- Map<String, String> srcMap = new HashMap<String, String>();
+ Map<String, String> srcMap = new HashMap<>();
if (srcMapString != null){
// Entries must be separated by the file separator and have an equals splitting the lib location from the src location
String[] entries = srcMapString.split(File.pathSeparator);
@@ -512,7 +512,7 @@
key = makePathAbsolute(key, root);
value = makePathAbsolute(value, root);
- List<Character> wildcards = new ArrayList<Character>();
+ List<Character> wildcards = new ArrayList<>();
StringBuffer keyBuffer = new StringBuffer();
char [] chars = key.toCharArray();
// Convert lib location to a regex, replace wildcards with grouped equivalents, keep track of used wildcards, allow '\' and '/' to be used, escape special chars
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/ArchiveSourceLocation.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/ArchiveSourceLocation.java
index 9e2ef1c..d244b93 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/ArchiveSourceLocation.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/ArchiveSourceLocation.java
@@ -66,7 +66,7 @@
* Cache of shared zip files. Zip files are closed
* when the launching plug-in is shutdown.
*/
- private static HashMap<String, ZipFile> fZipFileCache = new HashMap<String, ZipFile>(5);
+ private static HashMap<String, ZipFile> fZipFileCache = new HashMap<>(5);
/**
* Returns a zip file with the given name
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/JavaProjectSourceLocation.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/JavaProjectSourceLocation.java
index 3da5d29..9ad9b51 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/JavaProjectSourceLocation.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/JavaProjectSourceLocation.java
@@ -116,7 +116,7 @@
if (fProject != null) {
try {
IPackageFragmentRoot[] roots = project.getPackageFragmentRoots();
- ArrayList<PackageFragmentRootSourceLocation> list = new ArrayList<PackageFragmentRootSourceLocation>(roots.length);
+ ArrayList<PackageFragmentRootSourceLocation> list = new ArrayList<>(roots.length);
for (int i = 0; i < roots.length; i++) {
if (roots[i].getKind() == IPackageFragmentRoot.K_SOURCE) {
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/JavaSourceLocator.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/JavaSourceLocator.java
index 323d6de..692a3d9 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/JavaSourceLocator.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/JavaSourceLocator.java
@@ -127,7 +127,7 @@
* @throws CoreException if a new locator fails to be created
*/
public JavaSourceLocator(IJavaProject[] projects, boolean includeRequired) throws CoreException {
- ArrayList<IJavaProject> requiredProjects = new ArrayList<IJavaProject>();
+ ArrayList<IJavaProject> requiredProjects = new ArrayList<>();
for (int i= 0; i < projects.length; i++) {
if (includeRequired) {
collectRequiredProjects(projects[i], requiredProjects);
@@ -139,8 +139,8 @@
}
// only add external entries with the same location once
- HashMap<IPath, IPath> external = new HashMap<IPath, IPath>();
- ArrayList<PackageFragmentRootSourceLocation> list = new ArrayList<PackageFragmentRootSourceLocation>();
+ HashMap<IPath, IPath> external = new HashMap<>();
+ ArrayList<PackageFragmentRootSourceLocation> list = new ArrayList<>();
// compute the default locations for each project, and add unique ones
Iterator<IJavaProject> iter = requiredProjects.iterator();
while (iter.hasNext()) {
@@ -232,7 +232,7 @@
}
return null;
}
- List<Object> list = new ArrayList<Object>();
+ List<Object> list = new ArrayList<>();
IJavaSourceLocation[] locations = getSourceLocations();
for (int i = 0; i < locations.length; i++) {
try {
@@ -421,7 +421,7 @@
abort(LaunchingMessages.JavaSourceLocator_Unable_to_restore_Java_source_locator___invalid_format__6, null);
}
- List<IJavaSourceLocation> sourceLocations = new ArrayList<IJavaSourceLocation>();
+ List<IJavaSourceLocation> sourceLocations = new ArrayList<>();
Bundle bundle = LaunchingPlugin.getDefault().getBundle();
NodeList list = root.getChildNodes();
@@ -478,7 +478,7 @@
* @return the array of {@link IJavaSourceLocation}
*/
private static IJavaSourceLocation[] getSourceLocations(IRuntimeClasspathEntry[] entries) {
- List<IJavaSourceLocation> locations = new ArrayList<IJavaSourceLocation>(entries.length);
+ List<IJavaSourceLocation> locations = new ArrayList<>(entries.length);
for (int i = 0; i < entries.length; i++) {
IRuntimeClasspathEntry entry = entries[i];
IJavaSourceLocation location = null;
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/containers/JavaProjectSourceContainer.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/containers/JavaProjectSourceContainer.java
index fabf538..7d05946 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/containers/JavaProjectSourceContainer.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/containers/JavaProjectSourceContainer.java
@@ -105,7 +105,7 @@
*/
@Override
protected ISourceContainer[] createSourceContainers() throws CoreException {
- List<ISourceContainer> containers = new ArrayList<ISourceContainer>();
+ List<ISourceContainer> containers = new ArrayList<>();
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
if (fProject.getProject().isOpen()) {
IClasspathEntry[] entries = fProject.getRawClasspath();
@@ -163,7 +163,7 @@
if (object instanceof IResource) {
if (!getJavaProject().isOnClasspath((IResource)object)) {
if (filtered == null) {
- filtered = new ArrayList<Object>(objects.length);
+ filtered = new ArrayList<>(objects.length);
for (int j = 0; j < objects.length; j++) {
filtered.add(objects[j]);
}
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/containers/JavaSourceLookupParticipant.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/containers/JavaSourceLookupParticipant.java
index a31dbef..3a0104f 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/containers/JavaSourceLookupParticipant.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/containers/JavaSourceLookupParticipant.java
@@ -93,7 +93,7 @@
@Override
public void init(ISourceLookupDirector director) {
super.init(director);
- fDelegateContainers = new HashMap<ISourceContainer, PackageFragmentRootSourceContainer>();
+ fDelegateContainers = new HashMap<>();
}
/* (non-Javadoc)
* @see org.eclipse.debug.internal.core.sourcelookup.ISourceLookupParticipant#sourceContainersChanged(org.eclipse.debug.internal.core.sourcelookup.ISourceLookupDirector)