diff options
author | Alexander Kurtakov | 2018-01-21 09:44:08 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2018-01-21 09:44:08 +0000 |
commit | da22ae61807be63939ff24057ee2b609c2cc0226 (patch) | |
tree | 52e74bed1515875c288c725512f9a83ddfd826fb | |
parent | 710e4240ebb64406e03c4e7119c9587c6feda5d3 (diff) | |
download | rt.equinox.bundles-da22ae61807be63939ff24057ee2b609c2cc0226.tar.gz rt.equinox.bundles-da22ae61807be63939ff24057ee2b609c2cc0226.tar.xz rt.equinox.bundles-da22ae61807be63939ff24057ee2b609c2cc0226.zip |
Bug 530071 - Update servletbridge bundles to Java 1.7I20180122-0800I20180121-2000I20180121-0800
Further warning fixes.
Change-Id: Ieda80df891208093613f97526c6d6bd3517cca5b
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2 files changed, 8 insertions, 6 deletions
diff --git a/bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/CloseableURLClassLoader.java b/bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/CloseableURLClassLoader.java index 4a303100b..09b46ffc5 100644 --- a/bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/CloseableURLClassLoader.java +++ b/bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/CloseableURLClassLoader.java @@ -271,9 +271,9 @@ public class CloseableURLClassLoader extends URLClassLoader { @Override protected Class<?> findClass(final String name) throws ClassNotFoundException { try { - Class<?> clazz = (Class<?>) AccessController.doPrivileged(new PrivilegedExceptionAction() { + Class<?> clazz = AccessController.doPrivileged(new PrivilegedExceptionAction<Class<?>>() { @Override - public Object run() throws ClassNotFoundException { + public Class<?> run() throws ClassNotFoundException { String resourcePath = name.replace('.', '/') + DOT_CLASS; CloseableJarFileLoader loader = null; URL resourceURL = null; @@ -382,9 +382,9 @@ public class CloseableURLClassLoader extends URLClassLoader { @Override public URL findResource(final String name) { - URL url = (URL) AccessController.doPrivileged(new PrivilegedAction() { + URL url = AccessController.doPrivileged(new PrivilegedAction<URL>() { @Override - public Object run() { + public URL run() { synchronized (loaders) { if (closed) return null; @@ -406,7 +406,7 @@ public class CloseableURLClassLoader extends URLClassLoader { @Override public Enumeration<URL> findResources(final String name) throws IOException { final List<URL> resources = new ArrayList<>(); - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<Object>() { @Override public Object run() { synchronized (loaders) { diff --git a/bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/FrameworkLauncher.java b/bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/FrameworkLauncher.java index 65555cd9c..4b6a0c963 100644 --- a/bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/FrameworkLauncher.java +++ b/bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/FrameworkLauncher.java @@ -559,6 +559,7 @@ public class FrameworkLauncher { * The value '@null' will set the map value to null. * @return a map containing the initial properties */ + @SuppressWarnings("rawtypes") protected Map<String, String> buildInitialPropertyMap() { Map<String, String> initialPropertyMap = new HashMap<>(); Properties launchProperties = loadProperties(resourceBase + LAUNCH_INI); @@ -670,7 +671,8 @@ public class FrameworkLauncher { * clearPrefixedSystemProperties clears System Properties by writing null properties in the targetPropertyMap that match a prefix */ private static void clearPrefixedSystemProperties(String prefix, Map<String, String> targetPropertyMap) { - for (Iterator it = System.getProperties().keySet().iterator(); it.hasNext();) { + for (@SuppressWarnings("rawtypes") + Iterator it = System.getProperties().keySet().iterator(); it.hasNext();) { String propertyName = (String) it.next(); if (propertyName.startsWith(prefix) && !targetPropertyMap.containsKey(propertyName)) { targetPropertyMap.put(propertyName, null); |