From 07885b36f008d0566e5c46304dbc895b361deef1 Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Fri, 16 Jun 2017 07:36:03 -0500 Subject: Bug 486950 - [osgi R7] log service is being updated Update various LogTrackers to no longer implement LogService to avoid compilation errors. Change-Id: Ie983f4cb18aef1d897d2fb7a3eccc0c47f07d91c Signed-off-by: Thomas Watson --- .../META-INF/MANIFEST.MF | 2 +- bundles/org.eclipse.equinox.coordinator/pom.xml | 2 +- .../equinox/coordinator/CoordinationImpl.java | 4 ++-- .../eclipse/equinox/coordinator/CoordinatorImpl.java | 20 ++++++++++---------- .../org/eclipse/equinox/coordinator/LogTracker.java | 18 ++++++++++-------- .../org.eclipse.equinox.device/META-INF/MANIFEST.MF | 2 +- bundles/org.eclipse.equinox.device/pom.xml | 2 +- .../org/eclipse/equinox/device/DeviceTracker.java | 4 ++-- .../eclipse/equinox/device/DriverLocatorTracker.java | 4 ++-- .../equinox/device/DriverSelectorTracker.java | 4 ++-- .../org/eclipse/equinox/device/DriverTracker.java | 4 ++-- .../src/org/eclipse/equinox/device/LogTracker.java | 16 ++++++++-------- .../org.eclipse.equinox.event/META-INF/MANIFEST.MF | 2 +- bundles/org.eclipse.equinox.event/pom.xml | 2 +- .../equinox/internal/event/EventHandlerTracker.java | 7 +++---- .../equinox/internal/event/EventHandlerWrapper.java | 6 +++--- .../eclipse/equinox/internal/event/LogTracker.java | 18 ++++++++++-------- .../META-INF/MANIFEST.MF | 2 +- bundles/org.eclipse.equinox.metatype/pom.xml | 2 +- .../org/eclipse/equinox/metatype/impl/Activator.java | 13 ++++++------- .../metatype/impl/AttributeDefinitionImpl.java | 8 ++++---- .../eclipse/equinox/metatype/impl/DataParser.java | 6 +++--- .../eclipse/equinox/metatype/impl/LogTracker.java | 18 ++++++++++-------- .../metatype/impl/MetaTypeInformationImpl.java | 8 +++----- .../equinox/metatype/impl/MetaTypeProviderImpl.java | 6 +++--- .../metatype/impl/MetaTypeProviderTracker.java | 6 +++--- .../equinox/metatype/impl/MetaTypeServiceImpl.java | 8 ++++---- .../equinox/metatype/impl/ValueTokenizer.java | 6 +++--- .../tests/hook/RegionServiceFindHookTests.java | 7 ++++++- .../New Format Transformer Launch.launch | 9 ++++++--- .../META-INF/MANIFEST.MF | 2 +- bundles/org.eclipse.equinox.useradmin/pom.xml | 2 +- .../equinox/internal/useradmin/LogTracker.java | 12 ++++++------ .../internal/useradmin/UserAdminEventProducer.java | 6 +++--- .../equinox/internal/useradmin/UserAdminStore.java | 4 ++-- 35 files changed, 126 insertions(+), 116 deletions(-) diff --git a/bundles/org.eclipse.equinox.coordinator/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.coordinator/META-INF/MANIFEST.MF index 2ed015766..603ef9efd 100644 --- a/bundles/org.eclipse.equinox.coordinator/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.equinox.coordinator/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %bundleName Bundle-SymbolicName: org.eclipse.equinox.coordinator -Bundle-Version: 1.3.300.qualifier +Bundle-Version: 1.3.400.qualifier Bundle-Activator: org.eclipse.equinox.coordinator.Activator Bundle-Vendor: %bundleVendor Import-Package: org.eclipse.osgi.util;version="[1.1,2.0)", diff --git a/bundles/org.eclipse.equinox.coordinator/pom.xml b/bundles/org.eclipse.equinox.coordinator/pom.xml index 00bbec604..d2021bfb9 100644 --- a/bundles/org.eclipse.equinox.coordinator/pom.xml +++ b/bundles/org.eclipse.equinox.coordinator/pom.xml @@ -19,7 +19,7 @@ org.eclipse.equinox org.eclipse.equinox.coordinator - 1.3.300-SNAPSHOT + 1.3.400-SNAPSHOT eclipse-plugin diff --git a/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/CoordinationImpl.java b/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/CoordinationImpl.java index ceeef4273..de3403810 100644 --- a/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/CoordinationImpl.java +++ b/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/CoordinationImpl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2014 IBM Corporation and others. + * Copyright (c) 2010, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -391,7 +391,7 @@ public class CoordinationImpl { return referent; } - LogService getLogService() { + LogTracker getLogService() { return coordinator.getLogService(); } diff --git a/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/CoordinatorImpl.java b/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/CoordinatorImpl.java index 4e4127cfd..b6bc48d83 100644 --- a/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/CoordinatorImpl.java +++ b/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/CoordinatorImpl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2013 IBM Corporation and others. + * Copyright (c) 2010, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -90,15 +90,15 @@ public class CoordinatorImpl implements Coordinator { private final Bundle bundle; private final List coordinations; - private final LogService logService; + private final LogTracker logTracker; private final long maxTimeout; private final Timer timer; private boolean shutdown; - public CoordinatorImpl(Bundle bundle, LogService logService, Timer timer, long maxTimeout) { + public CoordinatorImpl(Bundle bundle, LogTracker logService, Timer timer, long maxTimeout) { this.bundle = bundle; - this.logService = logService; + this.logTracker = logService; this.timer = timer; coordinations = new ArrayList(); if (maxTimeout < 0) @@ -128,7 +128,7 @@ public class CoordinatorImpl implements Coordinator { // Override the requested timeout with the max timeout, if necessary. if (maxTimeout != 0) { if (timeout == 0 || maxTimeout < timeout) { - logService.log(LogService.LOG_WARNING, NLS.bind(Messages.MaximumTimeout, new Object[]{timeout, maxTimeout, name})); + logTracker.log(LogService.LOG_WARNING, NLS.bind(Messages.MaximumTimeout, new Object[]{timeout, maxTimeout, name})); timeout = maxTimeout; } } @@ -179,7 +179,7 @@ public class CoordinatorImpl implements Coordinator { try { checkPermission(CoordinationPermission.ADMIN, result.getName()); } catch (SecurityException e) { - logService.log(LogService.LOG_DEBUG, NLS.bind(Messages.GetCoordinationNotPermitted, new Object[]{Thread.currentThread(), result.getName(), result.getId()}), e); + logTracker.log(LogService.LOG_DEBUG, NLS.bind(Messages.GetCoordinationNotPermitted, new Object[]{Thread.currentThread(), result.getName(), result.getId()}), e); result = null; } } @@ -200,7 +200,7 @@ public class CoordinatorImpl implements Coordinator { checkPermission(CoordinationPermission.ADMIN, coordination.getName()); result.add(coordination.getReferent()); } catch (SecurityException e) { - logService.log(LogService.LOG_DEBUG, NLS.bind(Messages.GetCoordinationNotPermitted, new Object[]{Thread.currentThread(), coordination.getName(), coordination.getId()}), e); + logTracker.log(LogService.LOG_DEBUG, NLS.bind(Messages.GetCoordinationNotPermitted, new Object[]{Thread.currentThread(), coordination.getName(), coordination.getId()}), e); } } } @@ -250,8 +250,8 @@ public class CoordinatorImpl implements Coordinator { return bundle; } - LogService getLogService() { - return logService; + LogTracker getLogService() { + return logTracker; } long getMaxTimeout() { @@ -263,7 +263,7 @@ public class CoordinatorImpl implements Coordinator { try { Timer.class.getMethod("purge", (Class[]) null).invoke(timer, (Object[]) null); //$NON-NLS-1$ } catch (Exception e) { - logService.log(LogService.LOG_DEBUG, Messages.CanceledTaskNotPurged, e); + logTracker.log(LogService.LOG_DEBUG, Messages.CanceledTaskNotPurged, e); } } diff --git a/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/LogTracker.java b/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/LogTracker.java index 9ee71794b..e24be4ca5 100644 --- a/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/LogTracker.java +++ b/bundles/org.eclipse.equinox.coordinator/src/org/eclipse/equinox/coordinator/LogTracker.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2013 IBM Corporation and others. + * Copyright (c) 1998, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -24,7 +24,7 @@ import org.osgi.util.tracker.ServiceTracker; * and handles all issues such as the service coming and going. */ -public class LogTracker extends ServiceTracker implements LogService { +public class LogTracker extends ServiceTracker { /** LogService interface class name */ protected final static String clazz = "org.osgi.service.log.LogService"; //$NON-NLS-1$ @@ -56,11 +56,12 @@ public class LogTracker extends ServiceTracker implement log(null, level, message, exception); } - public void log(ServiceReference reference, int level, String message) { + public void log(ServiceReference reference, int level, String message) { log(reference, level, message, null); } - public synchronized void log(ServiceReference reference, int level, String message, Throwable exception) { + @SuppressWarnings("deprecation") + public synchronized void log(ServiceReference reference, int level, String message, Throwable exception) { ServiceReference[] references = getServiceReferences(); if (references != null) { @@ -91,6 +92,7 @@ public class LogTracker extends ServiceTracker implement * @param throwable Log exception or null if none. * @param reference ServiceReference associated with message or null if none. */ + @SuppressWarnings("deprecation") protected void noLogService(int level, String message, Throwable throwable, ServiceReference reference) { if (out != null) { synchronized (out) { @@ -100,22 +102,22 @@ public class LogTracker extends ServiceTracker implement out.print(timestamp + " "); //$NON-NLS-1$ switch (level) { - case LOG_DEBUG : { + case LogService.LOG_DEBUG : { out.print(LogTrackerMsg.Debug); break; } - case LOG_INFO : { + case LogService.LOG_INFO : { out.print(LogTrackerMsg.Info); break; } - case LOG_WARNING : { + case LogService.LOG_WARNING : { out.print(LogTrackerMsg.Warning); break; } - case LOG_ERROR : { + case LogService.LOG_ERROR : { out.print(LogTrackerMsg.Error); break; diff --git a/bundles/org.eclipse.equinox.device/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.device/META-INF/MANIFEST.MF index 6932c892f..d06ed3f7f 100644 --- a/bundles/org.eclipse.equinox.device/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.equinox.device/META-INF/MANIFEST.MF @@ -1,6 +1,6 @@ Bundle-ManifestVersion: 2 Bundle-Name: %bundleName -Bundle-Version: 1.0.400.qualifier +Bundle-Version: 1.0.500.qualifier Bundle-Activator: org.eclipse.equinox.device.Activator Bundle-SymbolicName: org.eclipse.equinox.device Bundle-Vendor: %bundleVendor diff --git a/bundles/org.eclipse.equinox.device/pom.xml b/bundles/org.eclipse.equinox.device/pom.xml index 872ff2f0d..f9a5762ec 100644 --- a/bundles/org.eclipse.equinox.device/pom.xml +++ b/bundles/org.eclipse.equinox.device/pom.xml @@ -19,6 +19,6 @@ org.eclipse.equinox org.eclipse.equinox.device - 1.0.400-SNAPSHOT + 1.0.500-SNAPSHOT eclipse-plugin diff --git a/bundles/org.eclipse.equinox.device/src/org/eclipse/equinox/device/DeviceTracker.java b/bundles/org.eclipse.equinox.device/src/org/eclipse/equinox/device/DeviceTracker.java index 32b77d43e..2a7a691c5 100644 --- a/bundles/org.eclipse.equinox.device/src/org/eclipse/equinox/device/DeviceTracker.java +++ b/bundles/org.eclipse.equinox.device/src/org/eclipse/equinox/device/DeviceTracker.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2007 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -33,7 +33,7 @@ public class DeviceTracker extends ServiceTracker { protected ServiceReference device; /** LogService object */ - protected LogService log; + protected LogTracker log; /** Device services properties */ protected Dictionary properties; diff --git a/bundles/org.eclipse.equinox.device/src/org/eclipse/equinox/device/DriverLocatorTracker.java b/bundles/org.eclipse.equinox.device/src/org/eclipse/equinox/device/DriverLocatorTracker.java index 45e83a190..ebbc37cc5 100644 --- a/bundles/org.eclipse.equinox.device/src/org/eclipse/equinox/device/DriverLocatorTracker.java +++ b/bundles/org.eclipse.equinox.device/src/org/eclipse/equinox/device/DriverLocatorTracker.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2007 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -30,7 +30,7 @@ public class DriverLocatorTracker extends ServiceTracker { protected Activator manager; /** LogService object */ - protected LogService log; + protected LogTracker log; /** List of bundles to be uninstalled. */ protected Vector bundles; diff --git a/bundles/org.eclipse.equinox.device/src/org/eclipse/equinox/device/DriverSelectorTracker.java b/bundles/org.eclipse.equinox.device/src/org/eclipse/equinox/device/DriverSelectorTracker.java index ba5782a6e..c34f6df39 100644 --- a/bundles/org.eclipse.equinox.device/src/org/eclipse/equinox/device/DriverSelectorTracker.java +++ b/bundles/org.eclipse.equinox.device/src/org/eclipse/equinox/device/DriverSelectorTracker.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2006 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -25,7 +25,7 @@ public class DriverSelectorTracker extends ServiceTracker { protected final static String clazz = "org.osgi.service.device.DriverSelector"; //$NON-NLS-1$ /** LogService object */ - protected LogService log; + protected LogTracker log; /** DeviceManager object. */ protected Activator manager; diff --git a/bundles/org.eclipse.equinox.device/src/org/eclipse/equinox/device/DriverTracker.java b/bundles/org.eclipse.equinox.device/src/org/eclipse/equinox/device/DriverTracker.java index 2b7a7f8a4..a05e64b88 100644 --- a/bundles/org.eclipse.equinox.device/src/org/eclipse/equinox/device/DriverTracker.java +++ b/bundles/org.eclipse.equinox.device/src/org/eclipse/equinox/device/DriverTracker.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2006 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -30,7 +30,7 @@ public class DriverTracker extends ServiceTracker { protected final static String clazz = "org.osgi.service.device.Driver"; //$NON-NLS-1$ /** LogService object */ - protected LogService log; + protected LogTracker log; /** Dictionary mapping DRIVER_ID strings <==> Driver ServiceReferences */ protected Hashtable drivers; diff --git a/bundles/org.eclipse.equinox.device/src/org/eclipse/equinox/device/LogTracker.java b/bundles/org.eclipse.equinox.device/src/org/eclipse/equinox/device/LogTracker.java index 44b58ba12..4586f1ca1 100644 --- a/bundles/org.eclipse.equinox.device/src/org/eclipse/equinox/device/LogTracker.java +++ b/bundles/org.eclipse.equinox.device/src/org/eclipse/equinox/device/LogTracker.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2006 IBM Corporation and others. + * Copyright (c) 1998, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -23,7 +23,7 @@ import org.osgi.util.tracker.ServiceTracker; * and handles all issues such as the service coming and going. */ -public class LogTracker extends ServiceTracker implements LogService { +public class LogTracker extends ServiceTracker { /** LogService interface class name */ protected final static String clazz = "org.osgi.service.log.LogService"; //$NON-NLS-1$ @@ -107,29 +107,29 @@ public class LogTracker extends ServiceTracker implements LogService { out.print(timestamp + " "); //$NON-NLS-1$ switch (level) { - case LOG_DEBUG : { + case LogService.LOG_DEBUG : { out.print("Debug: "); //$NON-NLS-1$ break; } - case LOG_INFO : { - out.print(LogTrackerMsg.Info); + case LogService.LOG_INFO : { + out.print(LogTrackerMsg.Info); break; } - case LOG_WARNING : { + case LogService.LOG_WARNING : { out.print(LogTrackerMsg.Warning); break; } - case LOG_ERROR : { + case LogService.LOG_ERROR : { out.print(LogTrackerMsg.Error); break; } default : { out.print("["); //$NON-NLS-1$ - out.print(LogTrackerMsg.Unknown_Log_level); + out.print(LogTrackerMsg.Unknown_Log_level); out.print("]: "); //$NON-NLS-1$ break; diff --git a/bundles/org.eclipse.equinox.event/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.event/META-INF/MANIFEST.MF index 145df0a19..08d1d59ae 100644 --- a/bundles/org.eclipse.equinox.event/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.equinox.event/META-INF/MANIFEST.MF @@ -1,6 +1,6 @@ Bundle-ManifestVersion: 2 Bundle-Name: %bundleName -Bundle-Version: 1.4.0.qualifier +Bundle-Version: 1.4.100.qualifier Bundle-SymbolicName: org.eclipse.equinox.event Bundle-Activator: org.eclipse.equinox.internal.event.Activator Import-Package: org.eclipse.osgi.framework.eventmgr;version="1.1.0", diff --git a/bundles/org.eclipse.equinox.event/pom.xml b/bundles/org.eclipse.equinox.event/pom.xml index a1d157594..4dbcb5546 100644 --- a/bundles/org.eclipse.equinox.event/pom.xml +++ b/bundles/org.eclipse.equinox.event/pom.xml @@ -19,6 +19,6 @@ org.eclipse.equinox org.eclipse.equinox.event - 1.4.0-SNAPSHOT + 1.4.100-SNAPSHOT eclipse-plugin diff --git a/bundles/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/EventHandlerTracker.java b/bundles/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/EventHandlerTracker.java index 23bb0ba3b..63f08a665 100644 --- a/bundles/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/EventHandlerTracker.java +++ b/bundles/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/EventHandlerTracker.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2010 IBM Corporation and others. + * Copyright (c) 2007, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -18,12 +18,11 @@ import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; import org.osgi.service.event.Event; import org.osgi.service.event.EventHandler; -import org.osgi.service.log.LogService; import org.osgi.util.tracker.ServiceTracker; public class EventHandlerTracker extends ServiceTracker implements EventDispatcher { - private final LogService log; + private final LogTracker log; //* List of all handlers with topic of "*" private final List globalWildcard; // Map> key is topic prefix of partial wildcard @@ -31,7 +30,7 @@ public class EventHandlerTracker extends ServiceTracker> key is topic name private final Map> topicName; - public EventHandlerTracker(BundleContext context, LogService log) { + public EventHandlerTracker(BundleContext context, LogTracker log) { super(context, EventHandler.class.getName(), null); this.log = log; globalWildcard = new ArrayList(); diff --git a/bundles/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/EventHandlerWrapper.java b/bundles/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/EventHandlerWrapper.java index 309c98fe6..d9ba8ef8d 100644 --- a/bundles/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/EventHandlerWrapper.java +++ b/bundles/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/EventHandlerWrapper.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2015 IBM Corporation and others. + * Copyright (c) 2007, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -25,7 +25,7 @@ import org.osgi.service.log.LogService; */ public class EventHandlerWrapper { final ServiceReference reference; - private final LogService log; + private final LogTracker log; final BundleContext context; private EventHandler handler; private String[] topics; @@ -38,7 +38,7 @@ public class EventHandlerWrapper { * @param context Bundle Context of the Event Admin bundle * @param log LogService object for logging */ - public EventHandlerWrapper(ServiceReference reference, BundleContext context, LogService log) { + public EventHandlerWrapper(ServiceReference reference, BundleContext context, LogTracker log) { this.reference = reference; this.context = context; this.log = log; diff --git a/bundles/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/LogTracker.java b/bundles/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/LogTracker.java index 06a5221d9..4374b05b6 100644 --- a/bundles/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/LogTracker.java +++ b/bundles/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/LogTracker.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2013 IBM Corporation and others. + * Copyright (c) 1998, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -23,7 +23,7 @@ import org.osgi.util.tracker.ServiceTracker; * and handles all issues such as the service coming and going. */ -public class LogTracker extends ServiceTracker implements LogService { +public class LogTracker extends ServiceTracker { /** LogService interface class name */ protected final static String clazz = "org.osgi.service.log.LogService"; //$NON-NLS-1$ @@ -55,11 +55,12 @@ public class LogTracker extends ServiceTracker implement log(null, level, message, exception); } - public void log(ServiceReference reference, int level, String message) { + public void log(ServiceReference reference, int level, String message) { log(reference, level, message, null); } - public synchronized void log(ServiceReference reference, int level, String message, Throwable exception) { + @SuppressWarnings("deprecation") + public synchronized void log(ServiceReference reference, int level, String message, Throwable exception) { ServiceReference[] references = getServiceReferences(); if (references != null) { @@ -90,6 +91,7 @@ public class LogTracker extends ServiceTracker implement * @param throwable Log exception or null if none. * @param reference ServiceReference associated with message or null if none. */ + @SuppressWarnings("deprecation") protected void noLogService(int level, String message, Throwable throwable, ServiceReference reference) { if (out != null) { synchronized (out) { @@ -99,22 +101,22 @@ public class LogTracker extends ServiceTracker implement out.print(timestamp + " "); //$NON-NLS-1$ switch (level) { - case LOG_DEBUG : { + case LogService.LOG_DEBUG : { out.print(LogTrackerMsg.Debug); break; } - case LOG_INFO : { + case LogService.LOG_INFO : { out.print(LogTrackerMsg.Info); break; } - case LOG_WARNING : { + case LogService.LOG_WARNING : { out.print(LogTrackerMsg.Warning); break; } - case LOG_ERROR : { + case LogService.LOG_ERROR : { out.print(LogTrackerMsg.Error); break; diff --git a/bundles/org.eclipse.equinox.metatype/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.metatype/META-INF/MANIFEST.MF index cab535789..1225e0d1c 100644 --- a/bundles/org.eclipse.equinox.metatype/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.equinox.metatype/META-INF/MANIFEST.MF @@ -1,6 +1,6 @@ Bundle-ManifestVersion: 2 Bundle-Name: %bundleName -Bundle-Version: 1.4.300.qualifier +Bundle-Version: 1.4.400.qualifier Bundle-SymbolicName: org.eclipse.equinox.metatype Bundle-Activator: org.eclipse.equinox.metatype.impl.Activator Import-Package: javax.xml.parsers, diff --git a/bundles/org.eclipse.equinox.metatype/pom.xml b/bundles/org.eclipse.equinox.metatype/pom.xml index 338711d41..7a0c07e3a 100644 --- a/bundles/org.eclipse.equinox.metatype/pom.xml +++ b/bundles/org.eclipse.equinox.metatype/pom.xml @@ -19,7 +19,7 @@ org.eclipse.equinox org.eclipse.equinox.metatype - 1.4.300-SNAPSHOT + 1.4.400-SNAPSHOT eclipse-plugin diff --git a/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/Activator.java b/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/Activator.java index 3daf3f4f3..2a4786390 100644 --- a/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/Activator.java +++ b/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/Activator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2011 IBM Corporation and others. + * Copyright (c) 2005, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,11 +10,10 @@ *******************************************************************************/ package org.eclipse.equinox.metatype.impl; -import org.eclipse.equinox.metatype.EquinoxMetaTypeService; - import java.util.Dictionary; import java.util.Hashtable; import javax.xml.parsers.SAXParserFactory; +import org.eclipse.equinox.metatype.EquinoxMetaTypeService; import org.osgi.framework.*; import org.osgi.service.cm.ManagedService; import org.osgi.service.log.LogService; @@ -95,14 +94,14 @@ public class Activator implements BundleActivator { private class SAXParserFactoryTrackerCustomizer implements ServiceTrackerCustomizer { private final BundleContext bundleCtx; - private final LogService logService; + private final LogTracker logService; private final ServiceTracker mtpTracker; private MetaTypeServiceImpl metaTypeService; private ServiceRegistration metaTypeServiceRegistration; private SAXParserFactory saxParserFactory; - public SAXParserFactoryTrackerCustomizer(BundleContext bundleContext, LogService logService, ServiceTracker metaTypeProviderTracker) { + public SAXParserFactoryTrackerCustomizer(BundleContext bundleContext, LogTracker logService, ServiceTracker metaTypeProviderTracker) { this.bundleCtx = bundleContext; this.logService = logService; this.mtpTracker = metaTypeProviderTracker; @@ -125,8 +124,8 @@ public class Activator implements BundleActivator { else if (saxParserFactory.isNamespaceAware()) { return parserFactory; } else if (parserFactory.isNamespaceAware() || // Previous factory not set for namespace awareness but the new one is case. - // Now the fun case. Neither factory is set for namespace awareness. Need to see if we're currently using - // a factory incapable of creating namespace aware parsers and, if so, if it can be replaced with the new one. + // Now the fun case. Neither factory is set for namespace awareness. Need to see if we're currently using + // a factory incapable of creating namespace aware parsers and, if so, if it can be replaced with the new one. (!supportsNamespaceAwareness(saxParserFactory) && supportsNamespaceAwareness(parserFactory))) { oldFactory = saxParserFactory; saxParserFactory = parserFactory; diff --git a/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/AttributeDefinitionImpl.java b/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/AttributeDefinitionImpl.java index 2e671d6c4..176518122 100644 --- a/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/AttributeDefinitionImpl.java +++ b/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/AttributeDefinitionImpl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2013 IBM Corporation and others. + * Copyright (c) 2005, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -33,17 +33,17 @@ public class AttributeDefinitionImpl extends LocalizationElement implements Equi Vector _values = new Vector(7); Vector _labels = new Vector(7); - private final LogService logger; + private final LogTracker logger; private final ExtendableHelper helper; /** * Constructor of class AttributeDefinitionImpl. */ - public AttributeDefinitionImpl(String id, String name, String description, int type, int cardinality, Object min, Object max, boolean isRequired, String localization, LogService logger, Map> extensionAttributes) { + public AttributeDefinitionImpl(String id, String name, String description, int type, int cardinality, Object min, Object max, boolean isRequired, String localization, LogTracker logger, Map> extensionAttributes) { this(id, name, description, type, cardinality, min, max, isRequired, localization, logger, new ExtendableHelper(extensionAttributes)); } - private AttributeDefinitionImpl(String id, String name, String description, int type, int cardinality, Object min, Object max, boolean isRequired, String localization, LogService logger, ExtendableHelper helper) { + private AttributeDefinitionImpl(String id, String name, String description, int type, int cardinality, Object min, Object max, boolean isRequired, String localization, LogTracker logger, ExtendableHelper helper) { super(localization); this._id = id; this._name = name; diff --git a/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/DataParser.java b/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/DataParser.java index 5128d9ab8..a4fb715b2 100644 --- a/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/DataParser.java +++ b/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/DataParser.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2014 IBM Corporation and others. + * Copyright (c) 2005, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -83,13 +83,13 @@ public class DataParser { String _dp_localization; // Default visibility to avoid a plethora of synthetic accessor method warnings. - final LogService logger; + final LogTracker logger; final Collection designates = new ArrayList(7); /* * Constructor of class DataParser. */ - public DataParser(Bundle bundle, URL url, SAXParser parser, LogService logger) { + public DataParser(Bundle bundle, URL url, SAXParser parser, LogTracker logger) { this._dp_bundle = bundle; this._dp_url = url; diff --git a/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/LogTracker.java b/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/LogTracker.java index d23b46707..f7e794c00 100644 --- a/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/LogTracker.java +++ b/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/LogTracker.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2013 IBM Corporation and others. + * Copyright (c) 1998, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -23,7 +23,7 @@ import org.osgi.util.tracker.ServiceTracker; * and handles all issues such as the service coming and going. */ -public class LogTracker extends ServiceTracker implements LogService { +public class LogTracker extends ServiceTracker { /** LogService interface class name */ protected final static String clazz = "org.osgi.service.log.LogService"; //$NON-NLS-1$ @@ -55,11 +55,12 @@ public class LogTracker extends ServiceTracker implement log(null, level, message, exception); } - public void log(ServiceReference reference, int level, String message) { + public void log(ServiceReference reference, int level, String message) { log(reference, level, message, null); } - public synchronized void log(ServiceReference reference, int level, String message, Throwable exception) { + @SuppressWarnings("deprecation") + public synchronized void log(ServiceReference reference, int level, String message, Throwable exception) { ServiceReference[] references = getServiceReferences(); if (references != null) { @@ -90,6 +91,7 @@ public class LogTracker extends ServiceTracker implement * @param throwable Log exception or null if none. * @param reference ServiceReference associated with message or null if none. */ + @SuppressWarnings("deprecation") protected void noLogService(int level, String message, Throwable throwable, ServiceReference reference) { if (out != null) { synchronized (out) { @@ -99,22 +101,22 @@ public class LogTracker extends ServiceTracker implement out.print(timestamp + " "); //$NON-NLS-1$ switch (level) { - case LOG_DEBUG : { + case LogService.LOG_DEBUG : { out.print(LogTrackerMsg.Debug); break; } - case LOG_INFO : { + case LogService.LOG_INFO : { out.print(LogTrackerMsg.Info); break; } - case LOG_WARNING : { + case LogService.LOG_WARNING : { out.print(LogTrackerMsg.Warning); break; } - case LOG_ERROR : { + case LogService.LOG_ERROR : { out.print(LogTrackerMsg.Error); break; diff --git a/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeInformationImpl.java b/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeInformationImpl.java index a9780ff68..a88ec193e 100644 --- a/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeInformationImpl.java +++ b/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeInformationImpl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2011 IBM Corporation and others. + * Copyright (c) 2005, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,13 +10,11 @@ *******************************************************************************/ package org.eclipse.equinox.metatype.impl; -import org.eclipse.equinox.metatype.EquinoxMetaTypeInformation; - import java.util.Enumeration; import java.util.Vector; import javax.xml.parsers.SAXParser; +import org.eclipse.equinox.metatype.EquinoxMetaTypeInformation; import org.osgi.framework.Bundle; -import org.osgi.service.log.LogService; /** * Implementation of MetaTypeProvider @@ -33,7 +31,7 @@ public class MetaTypeInformationImpl extends MetaTypeProviderImpl implements Equ /** * Constructor of class MetaTypeInformationImpl. */ - MetaTypeInformationImpl(Bundle bundle, SAXParser parser, LogService logger) { + MetaTypeInformationImpl(Bundle bundle, SAXParser parser, LogTracker logger) { super(bundle, parser, logger); } diff --git a/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeProviderImpl.java b/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeProviderImpl.java index 333b10a68..3ef511d0d 100644 --- a/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeProviderImpl.java +++ b/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeProviderImpl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2013 IBM Corporation and others. + * Copyright (c) 2005, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -45,12 +45,12 @@ public class MetaTypeProviderImpl implements MetaTypeProvider { boolean _isThereMeta = false; // Give access to subclasses. - protected final LogService logger; + protected final LogTracker logger; /** * Constructor of class MetaTypeProviderImpl. */ - MetaTypeProviderImpl(Bundle bundle, SAXParser parser, LogService logger) { + MetaTypeProviderImpl(Bundle bundle, SAXParser parser, LogTracker logger) { this._bundle = bundle; this.logger = logger; diff --git a/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeProviderTracker.java b/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeProviderTracker.java index 71fcb4956..e599bd5e6 100644 --- a/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeProviderTracker.java +++ b/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeProviderTracker.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2013 IBM Corporation and others. + * Copyright (c) 2005, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -25,7 +25,7 @@ import org.osgi.util.tracker.ServiceTracker; public class MetaTypeProviderTracker implements EquinoxMetaTypeInformation { private final Bundle _bundle; - private final LogService log; + private final LogTracker log; private final ServiceTracker _tracker; /** @@ -35,7 +35,7 @@ public class MetaTypeProviderTracker implements EquinoxMetaTypeInformation { * @param bundle The bundle to track all MetaTypeProviders for. * @param log The {@code LogService} to use for logging messages. */ - public MetaTypeProviderTracker(Bundle bundle, LogService log, ServiceTracker tracker) { + public MetaTypeProviderTracker(Bundle bundle, LogTracker log, ServiceTracker tracker) { this._bundle = bundle; this._tracker = tracker; this.log = log; diff --git a/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeServiceImpl.java b/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeServiceImpl.java index 127de74e3..afae7cefe 100644 --- a/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeServiceImpl.java +++ b/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeServiceImpl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2013 IBM Corporation and others. + * Copyright (c) 2005, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -30,13 +30,13 @@ public class MetaTypeServiceImpl implements EquinoxMetaTypeService, SynchronousB SAXParserFactory _parserFactory; private Hashtable _mtps = new Hashtable(7); - private final LogService logger; + private final LogTracker logger; private final ServiceTracker metaTypeProviderTracker; /** * Constructor of class MetaTypeServiceImpl. */ - public MetaTypeServiceImpl(SAXParserFactory parserFactory, LogService logger, ServiceTracker metaTypeProviderTracker) { + public MetaTypeServiceImpl(SAXParserFactory parserFactory, LogTracker logger, ServiceTracker metaTypeProviderTracker) { this._parserFactory = parserFactory; this.logger = logger; this.metaTypeProviderTracker = metaTypeProviderTracker; @@ -56,7 +56,7 @@ public class MetaTypeServiceImpl implements EquinoxMetaTypeService, SynchronousB */ private EquinoxMetaTypeInformation getMetaTypeProvider(final Bundle b) { // Avoid synthetic accessor method warnings. - final LogService loggerTemp = this.logger; + final LogTracker loggerTemp = this.logger; final ServiceTracker tracker = this.metaTypeProviderTracker; Long bID = Long.valueOf(b.getBundleId()); synchronized (_mtps) { diff --git a/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/ValueTokenizer.java b/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/ValueTokenizer.java index 4f374baaa..2dfdfb6a4 100644 --- a/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/ValueTokenizer.java +++ b/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/ValueTokenizer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2013 IBM Corporation and others. + * Copyright (c) 2005, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -21,13 +21,13 @@ public class ValueTokenizer { private static final char DELIMITER = ','; private static final char ESCAPE = '\\'; - private final LogService logger; + private final LogTracker logger; private final List values = new ArrayList(); /* * Constructor of class ValueTokenizer */ - public ValueTokenizer(String values_str, LogService logger) { + public ValueTokenizer(String values_str, LogTracker logger) { this.logger = logger; if (values_str == null) return; diff --git a/bundles/org.eclipse.equinox.region.tests/src/org/eclipse/equinox/region/internal/tests/hook/RegionServiceFindHookTests.java b/bundles/org.eclipse.equinox.region.tests/src/org/eclipse/equinox/region/internal/tests/hook/RegionServiceFindHookTests.java index 91f87964a..95ca098c4 100644 --- a/bundles/org.eclipse.equinox.region.tests/src/org/eclipse/equinox/region/internal/tests/hook/RegionServiceFindHookTests.java +++ b/bundles/org.eclipse.equinox.region.tests/src/org/eclipse/equinox/region/internal/tests/hook/RegionServiceFindHookTests.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2015 VMware Inc. + * Copyright (c) 2011, 2017 VMware 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 @@ -137,6 +137,11 @@ public class RegionServiceFindHookTests { public int compareTo(Object reference) { return 1; } + + @Override + public Dictionary getProperties() { + return new Hashtable<>(); + } }; this.candidates.add(ref); diff --git a/bundles/org.eclipse.equinox.transforms.hook/New Format Transformer Launch.launch b/bundles/org.eclipse.equinox.transforms.hook/New Format Transformer Launch.launch index b7c0b3464..03f7eab0a 100644 --- a/bundles/org.eclipse.equinox.transforms.hook/New Format Transformer Launch.launch +++ b/bundles/org.eclipse.equinox.transforms.hook/New Format Transformer Launch.launch @@ -1,4 +1,4 @@ - + @@ -13,16 +13,19 @@ - + + - + + + diff --git a/bundles/org.eclipse.equinox.useradmin/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.useradmin/META-INF/MANIFEST.MF index c6bc46028..c3246f43a 100644 --- a/bundles/org.eclipse.equinox.useradmin/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.equinox.useradmin/META-INF/MANIFEST.MF @@ -1,7 +1,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Vendor: %bundleVendor -Bundle-Version: 1.1.400.qualifier +Bundle-Version: 1.1.500.qualifier Bundle-Activator: org.eclipse.equinox.internal.useradmin.Activator Bundle-SymbolicName: org.eclipse.equinox.useradmin Import-Service: org.osgi.service.log.LogService diff --git a/bundles/org.eclipse.equinox.useradmin/pom.xml b/bundles/org.eclipse.equinox.useradmin/pom.xml index 028a12ad4..30e95de0b 100644 --- a/bundles/org.eclipse.equinox.useradmin/pom.xml +++ b/bundles/org.eclipse.equinox.useradmin/pom.xml @@ -19,6 +19,6 @@ org.eclipse.equinox org.eclipse.equinox.useradmin - 1.1.400-SNAPSHOT + 1.1.500-SNAPSHOT eclipse-plugin diff --git a/bundles/org.eclipse.equinox.useradmin/src/org/eclipse/equinox/internal/useradmin/LogTracker.java b/bundles/org.eclipse.equinox.useradmin/src/org/eclipse/equinox/internal/useradmin/LogTracker.java index 1225dc6e7..19d90b8f7 100644 --- a/bundles/org.eclipse.equinox.useradmin/src/org/eclipse/equinox/internal/useradmin/LogTracker.java +++ b/bundles/org.eclipse.equinox.useradmin/src/org/eclipse/equinox/internal/useradmin/LogTracker.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1998, 2008 IBM Corporation and others. + * Copyright (c) 1998, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -23,7 +23,7 @@ import org.osgi.util.tracker.ServiceTracker; * and handles all issues such as the service coming and going. */ -public class LogTracker extends ServiceTracker implements LogService { +public class LogTracker extends ServiceTracker { /** LogService interface class name */ protected final static String clazz = "org.osgi.service.log.LogService"; //$NON-NLS-1$ @@ -99,22 +99,22 @@ public class LogTracker extends ServiceTracker implements LogService { out.print(timestamp + " "); //$NON-NLS-1$ switch (level) { - case LOG_DEBUG : { + case LogService.LOG_DEBUG : { out.print(LogTrackerMsg.Debug); break; } - case LOG_INFO : { + case LogService.LOG_INFO : { out.print(LogTrackerMsg.Info); break; } - case LOG_WARNING : { + case LogService.LOG_WARNING : { out.print(LogTrackerMsg.Warning); break; } - case LOG_ERROR : { + case LogService.LOG_ERROR : { out.print(LogTrackerMsg.Error); break; diff --git a/bundles/org.eclipse.equinox.useradmin/src/org/eclipse/equinox/internal/useradmin/UserAdminEventProducer.java b/bundles/org.eclipse.equinox.useradmin/src/org/eclipse/equinox/internal/useradmin/UserAdminEventProducer.java index e8651906d..98050664e 100644 --- a/bundles/org.eclipse.equinox.useradmin/src/org/eclipse/equinox/internal/useradmin/UserAdminEventProducer.java +++ b/bundles/org.eclipse.equinox.useradmin/src/org/eclipse/equinox/internal/useradmin/UserAdminEventProducer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2008 IBM Corporation and others. + * Copyright (c) 2001, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -27,13 +27,13 @@ public class UserAdminEventProducer extends ServiceTracker implements EventDispa protected ServiceReference userAdmin; static protected final String userAdminListenerClass = "org.osgi.service.useradmin.UserAdminListener"; //$NON-NLS-1$ - protected LogService log; + protected LogTracker log; /** List of UserAdminListeners */ protected EventListeners listeners; /** EventManager for event delivery. */ protected EventManager eventManager; - protected UserAdminEventProducer(ServiceReference userAdmin, BundleContext context, LogService log) { + protected UserAdminEventProducer(ServiceReference userAdmin, BundleContext context, LogTracker log) { super(context, userAdminListenerClass, null); this.userAdmin = userAdmin; this.log = log; diff --git a/bundles/org.eclipse.equinox.useradmin/src/org/eclipse/equinox/internal/useradmin/UserAdminStore.java b/bundles/org.eclipse.equinox.useradmin/src/org/eclipse/equinox/internal/useradmin/UserAdminStore.java index c3caa5163..f7774267d 100644 --- a/bundles/org.eclipse.equinox.useradmin/src/org/eclipse/equinox/internal/useradmin/UserAdminStore.java +++ b/bundles/org.eclipse.equinox.useradmin/src/org/eclipse/equinox/internal/useradmin/UserAdminStore.java @@ -36,11 +36,11 @@ public class UserAdminStore { protected ServiceReference prefsRef; protected ServiceRegistration userAdminListenerReg; protected UserAdmin useradmin; - protected LogService log; + protected LogTracker log; protected Preferences rootNode; protected PreferencesService preferencesService; - protected UserAdminStore(PreferencesService preferencesService, UserAdmin useradmin, LogService log) { + protected UserAdminStore(PreferencesService preferencesService, UserAdmin useradmin, LogTracker log) { this.preferencesService = preferencesService; this.useradmin = useradmin; this.log = log; -- cgit v1.2.3