Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2019-11-20 13:17:37 +0000
committerAlexander Kurtakov2019-11-20 13:17:37 +0000
commit33defb9587efb47a86fbc1f56cb56ca48db45304 (patch)
treed2e3a36f9bcf3e579b8cb0dc4c690117b90af73e
parent16966545d54bb46b0c1728a445d6e6597677d390 (diff)
downloadm2e-core-33defb9587efb47a86fbc1f56cb56ca48db45304.tar.gz
m2e-core-33defb9587efb47a86fbc1f56cb56ca48db45304.tar.xz
m2e-core-33defb9587efb47a86fbc1f56cb56ca48db45304.zip
Get rid of Collections.EMPTY_LIST
The replacement emptyList properly supports generics. Change-Id: I30503a445e6e452fba11e9cd385c073e1cb60a56 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/MavenDiscovery.java6
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchDelegate.java5
2 files changed, 5 insertions, 6 deletions
diff --git a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/MavenDiscovery.java b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/MavenDiscovery.java
index 505ed360..203cfb41 100644
--- a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/MavenDiscovery.java
+++ b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/MavenDiscovery.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008-2013 Sonatype, Inc. and others.
+ * Copyright (c) 2008, 2019 Sonatype, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -84,9 +84,9 @@ public class MavenDiscovery {
PATH = CONFIGURED_URL != null ? CONFIGURED_URL : BASEURL + DEFAULT_FILENAME;
}
- @SuppressWarnings("unchecked")
public static void launchWizard(Shell shell) {
- launchWizard(shell, Collections.EMPTY_LIST, Collections.EMPTY_LIST, Collections.EMPTY_LIST, Collections.EMPTY_LIST);
+ launchWizard(shell, Collections.emptyList(), Collections.emptyList(), Collections.emptyList(),
+ Collections.emptyList());
}
public static void launchWizard(final Collection<String> packagingTypes, final Collection<MojoExecutionKey> mojos,
diff --git a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchDelegate.java b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchDelegate.java
index ac6bcaed..50a018cd 100644
--- a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchDelegate.java
+++ b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchDelegate.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008-2010 Sonatype, Inc.
+ * Copyright (c) 2008, 2019 Sonatype, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -167,8 +167,7 @@ public class MavenLaunchDelegate extends JavaLaunchDelegate implements MavenLaun
private void getProperties(StringBuilder sb, ILaunchConfiguration configuration) throws CoreException {
try {
- @SuppressWarnings("unchecked")
- List<String> properties = configuration.getAttribute(ATTR_PROPERTIES, Collections.EMPTY_LIST);
+ List<String> properties = configuration.getAttribute(ATTR_PROPERTIES, Collections.emptyList());
for(String property : properties) {
int n = property.indexOf('=');
String name = property;

Back to the top