diff options
author | Thomas Watson | 2019-05-17 12:53:50 +0000 |
---|---|---|
committer | Thomas Watson | 2019-05-17 12:53:50 +0000 |
commit | 922d596b4ac992de19fb8ea8a63fec3010c8a6ec (patch) | |
tree | 91671e3cad493ca9d2f7d19d23f64f2338e3b078 | |
parent | e6c63f60aba8df585366996b68757fe6494c4a3a (diff) | |
download | rt.equinox.framework-922d596b4ac992de19fb8ea8a63fec3010c8a6ec.tar.gz rt.equinox.framework-922d596b4ac992de19fb8ea8a63fec3010c8a6ec.tar.xz rt.equinox.framework-922d596b4ac992de19fb8ea8a63fec3010c8a6ec.zip |
Suppress deprecation warnings.
Change-Id: I9df1251893c3052e18681b9a4c0beeb23b3bab90
Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
4 files changed, 36 insertions, 7 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EquinoxLogFactory.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EquinoxLogFactory.java index d2fb48fce..e24e7bb3a 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EquinoxLogFactory.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EquinoxLogFactory.java @@ -14,11 +14,16 @@ package org.eclipse.osgi.internal.log; -import java.io.*; +import java.io.File; +import java.io.IOException; +import java.io.Writer; import org.eclipse.equinox.log.Logger; import org.eclipse.osgi.framework.log.FrameworkLog; import org.eclipse.osgi.framework.log.FrameworkLogEntry; -import org.osgi.framework.*; +import org.osgi.framework.Bundle; +import org.osgi.framework.FrameworkEvent; +import org.osgi.framework.ServiceFactory; +import org.osgi.framework.ServiceRegistration; import org.osgi.service.log.LogService; class EquinoxLogFactory implements ServiceFactory<FrameworkLog> { @@ -100,6 +105,7 @@ class EquinoxLogFactory implements ServiceFactory<FrameworkLog> { // nothing } + @SuppressWarnings("deprecation") static int convertLevel(FrameworkLogEntry logEntry) { switch (logEntry.getSeverity()) { case FrameworkLogEntry.ERROR : diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EquinoxLogWriter.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EquinoxLogWriter.java index f8c758785..ca5bc3856 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EquinoxLogWriter.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EquinoxLogWriter.java @@ -13,17 +13,32 @@ *******************************************************************************/ package org.eclipse.osgi.internal.log; -import java.io.*; +import java.io.BufferedWriter; +import java.io.File; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.io.OutputStreamWriter; +import java.io.PrintWriter; +import java.io.Reader; +import java.io.StringWriter; +import java.io.Writer; import java.lang.reflect.InvocationTargetException; import java.nio.charset.StandardCharsets; -import java.util.*; +import java.util.Calendar; +import java.util.Date; +import java.util.Map; import org.eclipse.core.runtime.adaptor.EclipseStarter; -import org.eclipse.equinox.log.*; +import org.eclipse.equinox.log.ExtendedLogEntry; +import org.eclipse.equinox.log.LogFilter; +import org.eclipse.equinox.log.SynchronousLogListener; import org.eclipse.osgi.framework.log.FrameworkLogEntry; import org.eclipse.osgi.internal.framework.EquinoxConfiguration; import org.osgi.framework.Bundle; import org.osgi.framework.BundleException; -import org.osgi.service.log.*; +import org.osgi.service.log.LogEntry; +import org.osgi.service.log.LogLevel; +import org.osgi.service.log.LogService; import org.osgi.service.log.admin.LoggerAdmin; import org.osgi.service.log.admin.LoggerContext; @@ -711,6 +726,7 @@ class EquinoxLogWriter implements SynchronousLogListener, LogFilter { return (fwkEntrySeverity & logLevel) != 0; } + @SuppressWarnings("deprecation") @Override public boolean isLoggable(Bundle bundle, String loggableName, int loggableLevel) { if (!enabled) @@ -728,6 +744,7 @@ class EquinoxLogWriter implements SynchronousLogListener, LogFilter { return loggableLevel == LogService.LOG_ERROR; } + @SuppressWarnings("deprecation") @Override public void logged(LogEntry entry) { if (!(entry instanceof ExtendedLogEntry)) @@ -750,6 +767,7 @@ class EquinoxLogWriter implements SynchronousLogListener, LogFilter { return "unknown"; //$NON-NLS-1$ } + @SuppressWarnings("deprecation") private static int convertSeverity(int entryLevel) { switch (entryLevel) { case LogService.LOG_ERROR : diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EventAdminLogListener.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EventAdminLogListener.java index 2147981af..5a09fad1f 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EventAdminLogListener.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EventAdminLogListener.java @@ -10,7 +10,9 @@ *******************************************************************************/ package org.eclipse.osgi.internal.log; -import java.lang.reflect.*; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; import java.util.Dictionary; import java.util.Hashtable; import org.eclipse.equinox.log.SynchronousLogListener; @@ -80,6 +82,7 @@ public class EventAdminLogListener implements SynchronousLogListener { } } + @SuppressWarnings("deprecation") private Object convertEvent(LogEntry entry) throws InstantiationException, IllegalAccessException, InvocationTargetException { String topic = TOPIC; int level = entry.getLevel(); diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java index 9f30acd13..282eaf606 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java @@ -1540,6 +1540,7 @@ public class Storage { return result; } + @SuppressWarnings("deprecation") private void loadVMProfile(Generation systemGeneration) { EquinoxConfiguration equinoxConfig = equinoxContainer.getConfiguration(); Properties profileProps = findVMProfile(systemGeneration); @@ -1686,6 +1687,7 @@ public class Storage { return null; } + @SuppressWarnings("deprecation") private Properties calculateVMProfile(Version javaVersion) { String systemPackages = calculateVMPackages(); if (systemPackages == null) { |