Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2015-08-02 17:47:41 +0000
committerAndrey Loskutov2015-08-09 17:26:21 +0000
commit70c1bbc97cbddfe017e595a53f53e1dcfef7fca1 (patch)
tree06333d6fc0ff6f50de7d5c077279e9ea45f5259b
parent31eb328d6c88c8853568b939ead70c0120522321 (diff)
downloadrt.equinox.bundles-70c1bbc97cbddfe017e595a53f53e1dcfef7fca1.tar.gz
rt.equinox.bundles-70c1bbc97cbddfe017e595a53f53e1dcfef7fca1.tar.xz
rt.equinox.bundles-70c1bbc97cbddfe017e595a53f53e1dcfef7fca1.zip
Code cleanup: added @Override annotations
Bug: 470699 Change-Id: Ia11cb1fcbe8bd1d6d61285ce72373d0b2474459e Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
-rw-r--r--bundles/org.eclipse.equinox.preferences/.settings/org.eclipse.jdt.core.prefs3
-rw-r--r--bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/AbstractScope.java7
-rw-r--r--bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/Activator.java7
-rw-r--r--bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/BundleDefaultPreferences.java7
-rw-r--r--bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/ConfigurationPreferences.java7
-rw-r--r--bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/DefaultPreferences.java11
-rw-r--r--bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/EclipsePreferences.java43
-rw-r--r--bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/ExportedPreferences.java5
-rw-r--r--bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/ImmutableMap.java16
-rw-r--r--bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/InstancePreferences.java8
-rw-r--r--bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/OSGiPreferencesServiceImpl.java31
-rw-r--r--bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/OSGiPreferencesServiceManager.java5
-rw-r--r--bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/PreferenceServiceRegistryHelper.java5
-rw-r--r--bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/PreferencesService.java31
-rw-r--r--bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/RootPreferences.java5
-rw-r--r--bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/SafeFileOutputStream.java3
-rw-r--r--bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/ScopeDescriptor.java10
-rw-r--r--bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/BundleDefaultsScope.java5
-rw-r--r--bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/ConfigurationScope.java5
-rw-r--r--bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/DefaultScope.java5
-rw-r--r--bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/IEclipsePreferences.java4
-rw-r--r--bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/InstanceScope.java5
-rw-r--r--bundles/org.eclipse.equinox.preferences/src/org/osgi/service/prefs/BackingStoreException.java4
23 files changed, 210 insertions, 22 deletions
diff --git a/bundles/org.eclipse.equinox.preferences/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.preferences/.settings/org.eclipse.jdt.core.prefs
index d24580860..867140176 100644
--- a/bundles/org.eclipse.equinox.preferences/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.equinox.preferences/.settings/org.eclipse.jdt.core.prefs
@@ -43,7 +43,8 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
diff --git a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/AbstractScope.java b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/AbstractScope.java
index 1b5ebd884..29297f403 100644
--- a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/AbstractScope.java
+++ b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/AbstractScope.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * Copyright (c) 2004, 2015 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,6 +25,7 @@ public abstract class AbstractScope implements IScopeContext {
/*
* @see org.eclipse.core.runtime.preferences.IScopeContext#getName()
*/
+ @Override
public abstract String getName();
/*
@@ -32,6 +33,7 @@ public abstract class AbstractScope implements IScopeContext {
*
* @see org.eclipse.core.runtime.preferences.IScopeContext#getNode(java.lang.String)
*/
+ @Override
public IEclipsePreferences getNode(String qualifier) {
if (qualifier == null)
throw new IllegalArgumentException();
@@ -41,11 +43,13 @@ public abstract class AbstractScope implements IScopeContext {
/*
* @see org.eclipse.core.runtime.preferences.IScopeContext#getLocation()
*/
+ @Override
public abstract IPath getLocation();
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
+ @Override
public boolean equals(Object obj) {
if (this == obj)
return true;
@@ -61,6 +65,7 @@ public abstract class AbstractScope implements IScopeContext {
/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
+ @Override
public int hashCode() {
return getName().hashCode();
}
diff --git a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/Activator.java b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/Activator.java
index 0358b4f24..78f4db61c 100644
--- a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/Activator.java
+++ b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/Activator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2011 IBM Corporation and others.
+ * Copyright (c) 2005, 2015 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
@@ -59,6 +59,7 @@ public class Activator implements BundleActivator, ServiceTrackerCustomizer {
/* (non-Javadoc)
* @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
*/
+ @Override
public void start(BundleContext context) throws Exception {
bundleContext = context;
// Open the services first before processing the command-line args, order is important! (Bug 150288)
@@ -78,6 +79,7 @@ public class Activator implements BundleActivator, ServiceTrackerCustomizer {
/* (non-Javadoc)
* @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
*/
+ @Override
public void stop(BundleContext context) throws Exception {
PreferencesOSGiUtils.getDefault().closeServices();
if (registryServiceTracker != null) {
@@ -102,6 +104,7 @@ public class Activator implements BundleActivator, ServiceTrackerCustomizer {
/* (non-Javadoc)
* @see org.osgi.util.tracker.ServiceTrackerCustomizer#addingService(org.osgi.framework.ServiceReference)
*/
+ @Override
public synchronized Object addingService(ServiceReference reference) {
Object service = bundleContext.getService(reference);
// this check is important as it avoids early loading of PreferenceServiceRegistryHelper and allows
@@ -129,6 +132,7 @@ public class Activator implements BundleActivator, ServiceTrackerCustomizer {
/* (non-Javadoc)
* @see org.osgi.util.tracker.ServiceTrackerCustomizer#modifiedService(org.osgi.framework.ServiceReference, java.lang.Object)
*/
+ @Override
public void modifiedService(ServiceReference reference, Object service) {
// nothing to do
}
@@ -136,6 +140,7 @@ public class Activator implements BundleActivator, ServiceTrackerCustomizer {
/* (non-Javadoc)
* @see org.osgi.util.tracker.ServiceTrackerCustomizer#removedService(org.osgi.framework.ServiceReference, java.lang.Object)
*/
+ @Override
public synchronized void removedService(ServiceReference reference, Object service) {
PreferencesService.getDefault().setRegistryHelper(null);
bundleContext.ungetService(reference);
diff --git a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/BundleDefaultPreferences.java b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/BundleDefaultPreferences.java
index acbf2cd94..2da2a6ceb 100644
--- a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/BundleDefaultPreferences.java
+++ b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/BundleDefaultPreferences.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2015 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
@@ -60,6 +60,7 @@ public class BundleDefaultPreferences extends EclipsePreferences {
/* (non-Javadoc)
* @see org.eclipse.core.internal.preferences.EclipsePreferences#getLoadLevel()
*/
+ @Override
protected IEclipsePreferences getLoadLevel() {
if (loadLevel == null) {
if (qualifier == null)
@@ -78,6 +79,7 @@ public class BundleDefaultPreferences extends EclipsePreferences {
/* (non-Javadoc)
* @see org.eclipse.core.internal.preferences.EclipsePreferences#isAlreadyLoaded(org.eclipse.core.runtime.preferences.IEclipsePreferences)
*/
+ @Override
protected boolean isAlreadyLoaded(IEclipsePreferences node) {
return loadedNodes.contains(node.name());
}
@@ -85,6 +87,7 @@ public class BundleDefaultPreferences extends EclipsePreferences {
/* (non-Javadoc)
* @see org.eclipse.core.internal.preferences.EclipsePreferences#loaded()
*/
+ @Override
protected void loaded() {
loadedNodes.add(name());
}
@@ -92,6 +95,7 @@ public class BundleDefaultPreferences extends EclipsePreferences {
/* (non-Javadoc)
* @see org.eclipse.core.internal.preferences.EclipsePreferences#load()
*/
+ @Override
protected void load() {
// ensure that the same node in the "default" scope is loaded so this one is
// initialized properly
@@ -105,6 +109,7 @@ public class BundleDefaultPreferences extends EclipsePreferences {
/* (non-Javadoc)
* @see org.eclipse.core.internal.preferences.EclipsePreferences#internalCreate(org.eclipse.core.internal.preferences.EclipsePreferences, java.lang.String, java.lang.Object)
*/
+ @Override
protected EclipsePreferences internalCreate(EclipsePreferences nodeParent, String nodeName, Object context) {
return new BundleDefaultPreferences(nodeParent, nodeName);
}
diff --git a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/ConfigurationPreferences.java b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/ConfigurationPreferences.java
index dd3a0cf01..09a9b109b 100644
--- a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/ConfigurationPreferences.java
+++ b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/ConfigurationPreferences.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2015 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
@@ -69,14 +69,17 @@ public class ConfigurationPreferences extends EclipsePreferences {
location = computeLocation(baseLocation, qualifier);
}
+ @Override
protected IPath getLocation() {
return location;
}
+ @Override
protected boolean isAlreadyLoaded(IEclipsePreferences node) {
return loadedNodes.contains(node.name());
}
+ @Override
protected void loaded() {
loadedNodes.add(name());
}
@@ -84,6 +87,7 @@ public class ConfigurationPreferences extends EclipsePreferences {
/*
* Return the node at which these preferences are loaded/saved.
*/
+ @Override
protected IEclipsePreferences getLoadLevel() {
if (loadLevel == null) {
if (qualifier == null)
@@ -115,6 +119,7 @@ public class ConfigurationPreferences extends EclipsePreferences {
}
}
+ @Override
protected EclipsePreferences internalCreate(EclipsePreferences nodeParent, String nodeName, Object context) {
return new ConfigurationPreferences(nodeParent, nodeName);
}
diff --git a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/DefaultPreferences.java b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/DefaultPreferences.java
index 94c9baf0a..24df47824 100644
--- a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/DefaultPreferences.java
+++ b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/DefaultPreferences.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2012 IBM Corporation and others.
+ * Copyright (c) 2004, 2015 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
@@ -162,6 +162,7 @@ public class DefaultPreferences extends EclipsePreferences {
return false;
}
+ @Override
public boolean nodeExists(String path) throws BackingStoreException {
// use super implementation for empty and absolute paths
if (path.length() == 0 || path.charAt(0) == IPath.SEPARATOR)
@@ -238,10 +239,12 @@ public class DefaultPreferences extends EclipsePreferences {
/* (non-Javadoc)
* @see org.osgi.service.prefs.Preferences#flush()
*/
+ @Override
public void flush() {
// default values are not persisted
}
+ @Override
protected IEclipsePreferences getLoadLevel() {
if (loadLevel == null) {
if (qualifier == null)
@@ -257,10 +260,12 @@ public class DefaultPreferences extends EclipsePreferences {
return loadLevel;
}
+ @Override
protected EclipsePreferences internalCreate(EclipsePreferences nodeParent, String nodeName, Object context) {
return new DefaultPreferences(nodeParent, nodeName, context);
}
+ @Override
protected boolean isAlreadyLoaded(IEclipsePreferences node) {
return loadedNodes.contains(node.name());
}
@@ -268,6 +273,7 @@ public class DefaultPreferences extends EclipsePreferences {
/* (non-Javadoc)
* @see org.eclipse.core.internal.preferences.EclipsePreferences#load()
*/
+ @Override
protected void load() {
setInitializingBundleDefaults();
try {
@@ -284,6 +290,7 @@ public class DefaultPreferences extends EclipsePreferences {
/* (non-Javadoc)
* @see org.eclipse.core.internal.preferences.EclipsePreferences#internalPut(java.lang.String, java.lang.String)
*/
+ @Override
protected String internalPut(String key, String newValue) {
// set the value in this node
String result = super.internalPut(key, newValue);
@@ -402,6 +409,7 @@ public class DefaultPreferences extends EclipsePreferences {
return result;
}
+ @Override
protected void loaded() {
loadedNodes.add(name());
}
@@ -409,6 +417,7 @@ public class DefaultPreferences extends EclipsePreferences {
/* (non-Javadoc)
* @see org.osgi.service.prefs.Preferences#sync()
*/
+ @Override
public void sync() {
// default values are not persisted
}
diff --git a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/EclipsePreferences.java b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/EclipsePreferences.java
index f69dcfbd1..2c6061cfd 100644
--- a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/EclipsePreferences.java
+++ b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/EclipsePreferences.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2012 IBM Corporation and others.
+ * Copyright (c) 2004, 2015 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
@@ -87,6 +87,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/* (non-Javadoc)
* @see java.util.Hashtable#keys()
*/
+ @Override
public synchronized Enumeration keys() {
TreeSet set = new TreeSet();
for (Enumeration e = super.keys(); e.hasMoreElements();)
@@ -97,8 +98,10 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/* (non-Javadoc)
* @see java.util.Hashtable#entrySet()
*/
+ @Override
public Set entrySet() {
TreeSet set = new TreeSet(new Comparator() {
+ @Override
public int compare(Object e1, Object e2) {
String s1 = (String) ((Map.Entry) e1).getKey();
String s2 = (String) ((Map.Entry) e2).getKey();
@@ -125,6 +128,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/*
* @see org.osgi.service.prefs.Preferences#absolutePath()
*/
+ @Override
public String absolutePath() {
if (cachedPath == null) {
if (parent == null)
@@ -142,6 +146,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
return cachedPath;
}
+ @Override
public void accept(IPreferenceNodeVisitor visitor) throws BackingStoreException {
if (!visitor.visit(this))
return;
@@ -163,6 +168,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/*
* @see org.eclipse.core.runtime.IEclipsePreferences#addNodeChangeListener(org.eclipse.core.runtime.IEclipsePreferences.INodeChangeListener)
*/
+ @Override
public void addNodeChangeListener(INodeChangeListener listener) {
checkRemoved();
if (nodeChangeListeners == null)
@@ -175,6 +181,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/*
* @see org.eclipse.core.runtime.IEclipsePreferences#addPreferenceChangeListener(org.eclipse.core.runtime.IEclipsePreferences.IPreferenceChangeListener)
*/
+ @Override
public void addPreferenceChangeListener(IPreferenceChangeListener listener) {
checkRemoved();
if (preferenceChangeListeners == null)
@@ -203,6 +210,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/*
* @see org.osgi.service.prefs.Preferences#childrenNames()
*/
+ @Override
public String[] childrenNames() throws BackingStoreException {
// illegal state if this node has been removed
checkRemoved();
@@ -228,6 +236,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/*
* @see org.osgi.service.prefs.Preferences#clear()
*/
+ @Override
public void clear() {
// illegal state if this node has been removed
checkRemoved();
@@ -375,6 +384,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/*
* @see org.eclipse.core.runtime.preferences.IScope#create(org.eclipse.core.runtime.preferences.IEclipsePreferences)
*/
+ @Override
public IEclipsePreferences create(IEclipsePreferences nodeParent, String nodeName) {
return create((EclipsePreferences) nodeParent, nodeName, null);
}
@@ -423,6 +433,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/*
* @see org.osgi.service.prefs.Preferences#flush()
*/
+ @Override
public void flush() throws BackingStoreException {
IEclipsePreferences toFlush = null;
synchronized (childAndPropertyLock) {
@@ -480,6 +491,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/*
* @see org.osgi.service.prefs.Preferences#get(java.lang.String, java.lang.String)
*/
+ @Override
public String get(String key, String defaultValue) {
String value = internalGet(key);
return value == null ? defaultValue : value;
@@ -488,6 +500,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/*
* @see org.osgi.service.prefs.Preferences#getBoolean(java.lang.String, boolean)
*/
+ @Override
public boolean getBoolean(String key, boolean defaultValue) {
String value = internalGet(key);
return value == null ? defaultValue : TRUE.equalsIgnoreCase(value);
@@ -496,6 +509,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/*
* @see org.osgi.service.prefs.Preferences#getByteArray(java.lang.String, byte[])
*/
+ @Override
public byte[] getByteArray(String key, byte[] defaultValue) {
String value = internalGet(key);
return value == null ? defaultValue : Base64.decode(value.getBytes());
@@ -551,6 +565,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/*
* @see org.osgi.service.prefs.Preferences#getDouble(java.lang.String, double)
*/
+ @Override
public double getDouble(String key, double defaultValue) {
String value = internalGet(key);
double result = defaultValue;
@@ -566,6 +581,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/*
* @see org.osgi.service.prefs.Preferences#getFloat(java.lang.String, float)
*/
+ @Override
public float getFloat(String key, float defaultValue) {
String value = internalGet(key);
float result = defaultValue;
@@ -581,6 +597,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/*
* @see org.osgi.service.prefs.Preferences#getInt(java.lang.String, int)
*/
+ @Override
public int getInt(String key, int defaultValue) {
String value = internalGet(key);
int result = defaultValue;
@@ -607,6 +624,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/*
* @see org.osgi.service.prefs.Preferences#getLong(java.lang.String, long)
*/
+ @Override
public long getLong(String key, long defaultValue) {
String value = internalGet(key);
long result = defaultValue;
@@ -705,6 +723,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/*
* @see org.osgi.service.prefs.Preferences#keys()
*/
+ @Override
public String[] keys() {
// illegal state if this node has been removed
synchronized (childAndPropertyLock) {
@@ -801,6 +820,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/*
* @see org.osgi.service.prefs.Preferences#name()
*/
+ @Override
public String name() {
return name;
}
@@ -808,6 +828,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/*
* @see org.osgi.service.prefs.Preferences#node(java.lang.String)
*/
+ @Override
public Preferences node(String pathName) {
return internalNode(pathName, true, null);
}
@@ -819,10 +840,12 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
for (int i = 0; i < listeners.length; i++) {
final INodeChangeListener listener = (INodeChangeListener) listeners[i];
ISafeRunnable job = new ISafeRunnable() {
+ @Override
public void handleException(Throwable exception) {
// already logged in Platform#run()
}
+ @Override
public void run() throws Exception {
if (added)
listener.added(event);
@@ -837,6 +860,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/*
* @see org.osgi.service.prefs.Preferences#nodeExists(java.lang.String)
*/
+ @Override
public boolean nodeExists(String path) throws BackingStoreException {
// short circuit for checking this node
if (path.length() == 0)
@@ -871,6 +895,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/*
* @see org.osgi.service.prefs.Preferences#parent()
*/
+ @Override
public Preferences parent() {
// illegal state if this node has been removed
checkRemoved();
@@ -888,10 +913,12 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
for (int i = 0; i < listeners.length; i++) {
final IPreferenceChangeListener listener = (IPreferenceChangeListener) listeners[i];
ISafeRunnable job = new ISafeRunnable() {
+ @Override
public void handleException(Throwable exception) {
// already logged in Platform#run()
}
+ @Override
public void run() throws Exception {
listener.preferenceChange(event);
}
@@ -903,6 +930,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/*
* @see org.osgi.service.prefs.Preferences#put(java.lang.String, java.lang.String)
*/
+ @Override
public void put(String key, String newValue) {
if (key == null || newValue == null)
throw new NullPointerException();
@@ -916,6 +944,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/*
* @see org.osgi.service.prefs.Preferences#putBoolean(java.lang.String, boolean)
*/
+ @Override
public void putBoolean(String key, boolean value) {
if (key == null)
throw new NullPointerException();
@@ -930,6 +959,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/*
* @see org.osgi.service.prefs.Preferences#putByteArray(java.lang.String, byte[])
*/
+ @Override
public void putByteArray(String key, byte[] value) {
if (key == null || value == null)
throw new NullPointerException();
@@ -944,6 +974,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/*
* @see org.osgi.service.prefs.Preferences#putDouble(java.lang.String, double)
*/
+ @Override
public void putDouble(String key, double value) {
if (key == null)
throw new NullPointerException();
@@ -958,6 +989,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/*
* @see org.osgi.service.prefs.Preferences#putFloat(java.lang.String, float)
*/
+ @Override
public void putFloat(String key, float value) {
if (key == null)
throw new NullPointerException();
@@ -972,6 +1004,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/*
* @see org.osgi.service.prefs.Preferences#putInt(java.lang.String, int)
*/
+ @Override
public void putInt(String key, int value) {
if (key == null)
throw new NullPointerException();
@@ -986,6 +1019,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/*
* @see org.osgi.service.prefs.Preferences#putLong(java.lang.String, long)
*/
+ @Override
public void putLong(String key, long value) {
if (key == null)
throw new NullPointerException();
@@ -1000,6 +1034,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/*
* @see org.osgi.service.prefs.Preferences#remove(java.lang.String)
*/
+ @Override
public void remove(String key) {
String oldValue;
synchronized (childAndPropertyLock) {
@@ -1017,6 +1052,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/*
* @see org.osgi.service.prefs.Preferences#removeNode()
*/
+ @Override
public void removeNode() throws BackingStoreException {
// illegal state if this node has been removed
checkRemoved();
@@ -1074,6 +1110,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/*
* @see org.eclipse.core.runtime.IEclipsePreferences#removeNodeChangeListener(org.eclipse.core.runtime.IEclipsePreferences.removeNodeChangeListener)
*/
+ @Override
public void removeNodeChangeListener(INodeChangeListener listener) {
checkRemoved();
if (nodeChangeListeners == null)
@@ -1088,6 +1125,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
/*
* @see org.eclipse.core.runtime.IEclipsePreferences#removePreferenceChangeListener(org.eclipse.core.runtime.IEclipsePreferences.IPreferenceChangeListener)
*/
+ @Override
public void removePreferenceChangeListener(IPreferenceChangeListener listener) {
checkRemoved();
if (preferenceChangeListeners == null)
@@ -1260,6 +1298,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
* @see org.osgi.service.prefs.Preferences#sync()
*/
+ @Override
public void sync() throws BackingStoreException {
// illegal state if this node has been removed
checkRemoved();
@@ -1278,6 +1317,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
public String toDeepDebugString() {
final StringBuffer buffer = new StringBuffer();
IPreferenceNodeVisitor visitor = new IPreferenceNodeVisitor() {
+ @Override
public boolean visit(IEclipsePreferences node) throws BackingStoreException {
buffer.append(node);
buffer.append('\n');
@@ -1302,6 +1342,7 @@ public class EclipsePreferences implements IEclipsePreferences, IScope {
return buffer.toString();
}
+ @Override
public String toString() {
return absolutePath();
}
diff --git a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/ExportedPreferences.java b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/ExportedPreferences.java
index 38d6f26b5..0cce12fbc 100644
--- a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/ExportedPreferences.java
+++ b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/ExportedPreferences.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * Copyright (c) 2004, 2015 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
@@ -31,6 +31,7 @@ public class ExportedPreferences extends EclipsePreferences implements IExported
/*
* @see org.eclipse.core.runtime.preferences.IExportedPreferences#isExportRoot()
*/
+ @Override
public boolean isExportRoot() {
return isExportRoot;
}
@@ -58,6 +59,7 @@ public class ExportedPreferences extends EclipsePreferences implements IExported
this.version = version;
}
+ @Override
protected EclipsePreferences internalCreate(EclipsePreferences nodeParent, String nodeName, Object context) {
return new ExportedPreferences(nodeParent, nodeName);
}
@@ -66,6 +68,7 @@ public class ExportedPreferences extends EclipsePreferences implements IExported
* Return a string representation of this object. To be used for
* debugging purposes only.
*/
+ @Override
public String toString() {
StringBuffer buffer = new StringBuffer();
if (isExportRoot)
diff --git a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/ImmutableMap.java b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/ImmutableMap.java
index 7e5744cf3..3b460ccfb 100644
--- a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/ImmutableMap.java
+++ b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/ImmutableMap.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2011 IBM Corporation and others.
+ * Copyright (c) 2005, 2015 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
@@ -49,6 +49,7 @@ public abstract class ImmutableMap implements Cloneable {
this.threshold = (int) (tableLen * LOAD_FACTOR);
}
+ @Override
public String get(String key) {
int lengthMask = keyTable.length - 1;
int index = key.hashCode() & lengthMask;
@@ -68,6 +69,7 @@ public abstract class ImmutableMap implements Cloneable {
* @param key
* @param value
*/
+ @Override
protected void internalPut(String key, String value) {
int lengthMask = keyTable.length - 1;
int index = key.hashCode() & lengthMask;
@@ -87,6 +89,7 @@ public abstract class ImmutableMap implements Cloneable {
/**
* Returns an array of all keys in this map.
*/
+ @Override
public String[] keys() {
if (elementSize == 0)
return EMPTY_STRING_ARRAY;
@@ -98,6 +101,7 @@ public abstract class ImmutableMap implements Cloneable {
return result;
}
+ @Override
public ImmutableMap put(String key, String value) {
ArrayMap result;
final int oldLen = keyTable.length;
@@ -118,6 +122,7 @@ public abstract class ImmutableMap implements Cloneable {
return result;
}
+ @Override
public ImmutableMap removeKey(String key) {
final int lengthMask = keyTable.length - 1;
int index = key.hashCode() & lengthMask;
@@ -144,6 +149,7 @@ public abstract class ImmutableMap implements Cloneable {
/* (non-Javadoc
* Method declared on IStringPoolParticipant
*/
+ @Override
public void shareStrings(StringPool set) {
//copy elements for thread safety
String[] array = keyTable;
@@ -164,6 +170,7 @@ public abstract class ImmutableMap implements Cloneable {
}
}
+ @Override
public int size() {
return elementSize;
}
@@ -171,28 +178,34 @@ public abstract class ImmutableMap implements Cloneable {
}
static class EmptyMap extends ImmutableMap {
+ @Override
public String get(String value) {
return null;
}
+ @Override
public ImmutableMap removeKey(String key) {
return this;
}
+ @Override
protected void internalPut(String key, String value) {
throw new IllegalStateException();//cannot put elements in the empty map
}
+ @Override
public String[] keys() {
return EMPTY_STRING_ARRAY;
}
+ @Override
public ImmutableMap put(String key, String value) {
ImmutableMap result = createMap(4);
result.internalPut(key, value);
return result;
}
+ @Override
public int size() {
return 0;
}
@@ -265,6 +278,7 @@ public abstract class ImmutableMap implements Cloneable {
*/
public abstract int size();
+ @Override
public String toString() {
StringBuffer s = new StringBuffer();
String[] keys = keys();
diff --git a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/InstancePreferences.java b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/InstancePreferences.java
index 2b2a0676e..341751fe3 100644
--- a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/InstancePreferences.java
+++ b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/InstancePreferences.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2012 IBM Corporation and others.
+ * Copyright (c) 2004, 2015 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
@@ -71,10 +71,12 @@ public class InstancePreferences extends EclipsePreferences {
// accessed before the instance location is set.
}
+ @Override
protected boolean isAlreadyLoaded(IEclipsePreferences node) {
return loadedNodes.contains(node.name());
}
+ @Override
protected void loaded() {
loadedNodes.add(name());
}
@@ -84,6 +86,7 @@ public class InstancePreferences extends EclipsePreferences {
* doesn't exist then assume that conversion has already occurred
* and do nothing.
*/
+ @Override
protected void loadLegacy() {
IPath path = new Path(absolutePath());
if (path.segmentCount() != 2)
@@ -163,6 +166,7 @@ public class InstancePreferences extends EclipsePreferences {
PrefsMessages.message("Unable to delete legacy preferences file: " + prefFile); //$NON-NLS-1$
}
+ @Override
protected IPath getLocation() {
if (location == null)
location = computeLocation(getBaseLocation(), qualifier);
@@ -172,6 +176,7 @@ public class InstancePreferences extends EclipsePreferences {
/*
* Return the node at which these preferences are loaded/saved.
*/
+ @Override
protected IEclipsePreferences getLoadLevel() {
if (loadLevel == null) {
if (qualifier == null)
@@ -205,6 +210,7 @@ public class InstancePreferences extends EclipsePreferences {
}
}
+ @Override
protected EclipsePreferences internalCreate(EclipsePreferences nodeParent, String nodeName, Object context) {
return new InstancePreferences(nodeParent, nodeName);
}
diff --git a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/OSGiPreferencesServiceImpl.java b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/OSGiPreferencesServiceImpl.java
index 28e506ce6..4effc2255 100644
--- a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/OSGiPreferencesServiceImpl.java
+++ b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/OSGiPreferencesServiceImpl.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2011 IBM Corporation and others.
+ * Copyright (c) 2004, 2015 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
@@ -69,6 +69,7 @@ public class OSGiPreferencesServiceImpl implements PreferencesService {
* EclipsePreferences implementation does a best-effort instead of throwing
* {@link IllegalArgumentException}.
*/
+ @Override
public Preferences node(String pathName) {
pathName = fixPath(pathName);
@@ -91,6 +92,7 @@ public class OSGiPreferencesServiceImpl implements PreferencesService {
* propagating the exception.
* </p>
*/
+ @Override
public byte[] getByteArray(String key, byte[] defaultValue) {
String value = wrapped.get(key, null);
byte[] byteArray = null;
@@ -107,6 +109,7 @@ public class OSGiPreferencesServiceImpl implements PreferencesService {
return byteArray == null ? defaultValue : byteArray;
}
+ @Override
public Preferences parent() {
if (wrapped == root) {
try {
@@ -121,10 +124,12 @@ public class OSGiPreferencesServiceImpl implements PreferencesService {
return new OSGiLocalRootPreferences(wrapped.parent(), root);
}
+ @Override
public boolean nodeExists(String pathName) throws BackingStoreException {
return wrapped.nodeExists(fixPath(pathName));
}
+ @Override
public String absolutePath() {
if (wrapped == root) {
return "/"; //$NON-NLS-1$
@@ -132,6 +137,7 @@ public class OSGiPreferencesServiceImpl implements PreferencesService {
return wrapped.absolutePath().substring(root.absolutePath().length(), wrapped.absolutePath().length());
}
+ @Override
public String name() {
if (wrapped == root) {
return ""; //$NON-NLS-1$
@@ -140,82 +146,102 @@ public class OSGiPreferencesServiceImpl implements PreferencesService {
}
//delegate to wrapped preference
+ @Override
public void put(String key, String value) {
wrapped.put(key, value);
}
+ @Override
public String get(String key, String def) {
return wrapped.get(key, def);
}
+ @Override
public void remove(String key) {
wrapped.remove(key);
}
+ @Override
public void clear() throws BackingStoreException {
wrapped.clear();
}
+ @Override
public void putInt(String key, int value) {
wrapped.putInt(key, value);
}
+ @Override
public int getInt(String key, int def) {
return wrapped.getInt(key, def);
}
+ @Override
public void putLong(String key, long value) {
wrapped.putLong(key, value);
}
+ @Override
public long getLong(String key, long def) {
return wrapped.getLong(key, def);
}
+ @Override
public void putBoolean(String key, boolean value) {
wrapped.putBoolean(key, value);
}
+ @Override
public boolean getBoolean(String key, boolean def) {
return wrapped.getBoolean(key, def);
}
+ @Override
public void putFloat(String key, float value) {
wrapped.putFloat(key, value);
}
+ @Override
public float getFloat(String key, float def) {
return wrapped.getFloat(key, def);
}
+ @Override
public void putDouble(String key, double value) {
wrapped.putDouble(key, value);
}
+ @Override
public double getDouble(String key, double def) {
return wrapped.getDouble(key, def);
}
+ @Override
public void putByteArray(String key, byte[] value) {
wrapped.putByteArray(key, value);
}
+ @Override
public String[] keys() throws BackingStoreException {
return wrapped.keys();
}
+ @Override
public String[] childrenNames() throws BackingStoreException {
return wrapped.childrenNames();
}
+ @Override
public void removeNode() throws BackingStoreException {
wrapped.removeNode();
}
+ @Override
public void flush() throws BackingStoreException {
wrapped.flush();
}
+ @Override
public void sync() throws BackingStoreException {
wrapped.sync();
}
@@ -228,14 +254,17 @@ public class OSGiPreferencesServiceImpl implements PreferencesService {
this.bundlePreferences = bundlePreferences;
}
+ @Override
public Preferences getSystemPreferences() {
return new OSGiLocalRootPreferences(bundlePreferences.node("system")); //$NON-NLS-1$
}
+ @Override
public Preferences getUserPreferences(String name) {
return new OSGiLocalRootPreferences(bundlePreferences.node("user/" + name)); //$NON-NLS-1$
}
+ @Override
public String[] getUsers() {
String[] users = null;
try {
diff --git a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/OSGiPreferencesServiceManager.java b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/OSGiPreferencesServiceManager.java
index 6178193c3..fbf27f7fb 100644
--- a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/OSGiPreferencesServiceManager.java
+++ b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/OSGiPreferencesServiceManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2011 IBM Corporation and others.
+ * Copyright (c) 2004, 2015 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
@@ -70,6 +70,7 @@ public class OSGiPreferencesServiceManager implements ServiceFactory, BundleList
/**
* Creates a new OSGiPreferencesServiceImpl for each bundle.
*/
+ @Override
public Object getService(Bundle bundle, ServiceRegistration registration) {
String qualifier = getQualifier(bundle);
//remember we created prefs for this bundle
@@ -95,6 +96,7 @@ public class OSGiPreferencesServiceManager implements ServiceFactory, BundleList
/**
* Flush the bundle's preferences.
*/
+ @Override
public void ungetService(Bundle bundle, ServiceRegistration registration, Object service) {
try {
//new InstanceScope().getNode(getQualifier(bundle)).flush();
@@ -107,6 +109,7 @@ public class OSGiPreferencesServiceManager implements ServiceFactory, BundleList
/**
* If a bundle is uninstalled, delete all of it's preferences from the disk.
*/
+ @Override
public void bundleChanged(BundleEvent event) {
if (event.getType() == BundleEvent.UNINSTALLED) {
try {
diff --git a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/PreferenceServiceRegistryHelper.java b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/PreferenceServiceRegistryHelper.java
index c01a62130..8427b3f4f 100644
--- a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/PreferenceServiceRegistryHelper.java
+++ b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/PreferenceServiceRegistryHelper.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2012 IBM Corporation and others.
+ * Copyright (c) 2006, 2015 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
@@ -255,6 +255,7 @@ public class PreferenceServiceRegistryHelper implements IRegistryChangeListener
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IRegistryChangeListener#registryChanged(org.eclipse.core.runtime.IRegistryChangeEvent)
*/
+ @Override
public void registryChanged(IRegistryChangeEvent event) {
IExtensionDelta[] deltasOld = event.getExtensionDeltas(IPreferencesConstants.RUNTIME_NAME, IPreferencesConstants.PT_PREFERENCES);
IExtensionDelta[] deltasNew = event.getExtensionDeltas(IPreferencesConstants.PREFERS_NAME, IPreferencesConstants.PT_PREFERENCES);
@@ -292,10 +293,12 @@ public class PreferenceServiceRegistryHelper implements IRegistryChangeListener
try {
final AbstractPreferenceInitializer initializer = (AbstractPreferenceInitializer) element.createExecutableExtension(ATTRIBUTE_CLASS);
ISafeRunnable job = new ISafeRunnable() {
+ @Override
public void handleException(Throwable exception) {
// already logged in Platform#run()
}
+ @Override
public void run() throws Exception {
initializer.initializeDefaultPreferences();
}
diff --git a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/PreferencesService.java b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/PreferencesService.java
index f6bc34cf1..7ab8f7c6c 100644
--- a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/PreferencesService.java
+++ b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/PreferencesService.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2011 IBM Corporation and others.
+ * Copyright (c) 2004, 2015 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
@@ -85,6 +85,7 @@ public class PreferencesService implements IPreferencesService {
/* (non-Javadoc)
* @see org.eclipse.core.runtime.preferences.IPreferencesService#applyPreferences(org.eclipse.core.runtime.preferences.IEclipsePreferences, org.eclipse.core.runtime.preferences.IPreferenceFilter[])
*/
+ @Override
public void applyPreferences(IEclipsePreferences tree, IPreferenceFilter[] filters) throws CoreException {
if (filters == null || filters.length == 0)
return;
@@ -108,6 +109,7 @@ public class PreferencesService implements IPreferencesService {
/*
* @see org.eclipse.core.runtime.preferences.IPreferencesService#applyPreferences(org.eclipse.core.runtime.preferences.IExportedPreferences)
*/
+ @Override
public IStatus applyPreferences(IExportedPreferences preferences) throws CoreException {
// TODO investigate refactoring to merge with new #apply(IEclipsePreferences, IPreferenceFilter[]) APIs
if (preferences == null)
@@ -122,6 +124,7 @@ public class PreferencesService implements IPreferencesService {
// create a visitor to apply the given set of preferences
IPreferenceNodeVisitor visitor = new IPreferenceNodeVisitor() {
+ @Override
public boolean visit(IEclipsePreferences node) throws BackingStoreException {
IEclipsePreferences globalNode;
if (node.parent() == null)
@@ -216,6 +219,7 @@ public class PreferencesService implements IPreferencesService {
private boolean containsKeys(IEclipsePreferences aRoot) throws BackingStoreException {
final boolean result[] = new boolean[] {false};
IPreferenceNodeVisitor visitor = new IPreferenceNodeVisitor() {
+ @Override
public boolean visit(IEclipsePreferences node) throws BackingStoreException {
if (node.keys().length != 0)
result[0] = true;
@@ -290,6 +294,7 @@ public class PreferencesService implements IPreferencesService {
// create a visitor to do the export
IPreferenceNodeVisitor visitor = new IPreferenceNodeVisitor() {
+ @Override
public boolean visit(IEclipsePreferences node) throws BackingStoreException {
// don't store defaults
String absolutePath = node.absolutePath();
@@ -392,6 +397,7 @@ public class PreferencesService implements IPreferencesService {
/* (non-Javadoc)
* @see org.eclipse.core.runtime.preferences.IPreferencesService#exportPreferences(IEclipsePreferences, IPreferenceFilter[], OutputStream)
*/
+ @Override
public void exportPreferences(IEclipsePreferences node, IPreferenceFilter[] filters, OutputStream stream) throws CoreException {
if (filters == null || filters.length == 0)
return;
@@ -405,6 +411,7 @@ public class PreferencesService implements IPreferencesService {
/*
* @see org.eclipse.core.runtime.preferences.IPreferencesService#exportPreferences(org.eclipse.core.runtime.preferences.IEclipsePreferences, java.io.OutputStream, java.lang.String[])
*/
+ @Override
public IStatus exportPreferences(IEclipsePreferences node, OutputStream output, String[] excludesList) throws CoreException {
// TODO investigate refactoring to merge with new #export(IEclipsePreferences, IPreferenceFilter[]) APIs
if (node == null || output == null)
@@ -440,10 +447,12 @@ public class PreferencesService implements IPreferencesService {
for (int i = 0; i < listeners.length; i++) {
final PreferenceModifyListener listener = listeners[i];
ISafeRunnable job = new ISafeRunnable() {
+ @Override
public void handleException(Throwable exception) {
// already logged in Platform#run()
}
+ @Override
public void run() throws Exception {
result[0] = listener.preApply(result[0]);
}
@@ -456,6 +465,7 @@ public class PreferencesService implements IPreferencesService {
/*
* @see org.eclipse.core.runtime.preferences.IPreferencesService#get(java.lang.String, java.lang.String, org.osgi.service.prefs.Preferences[])
*/
+ @Override
public String get(String key, String defaultValue, Preferences[] nodes) {
if (nodes == null)
return defaultValue;
@@ -473,6 +483,7 @@ public class PreferencesService implements IPreferencesService {
/*
* @see org.eclipse.core.runtime.preferences.IPreferencesService#getBoolean(java.lang.String, java.lang.String, boolean, org.eclipse.core.runtime.preferences.IScope[])
*/
+ @Override
public boolean getBoolean(String qualifier, String key, boolean defaultValue, IScopeContext[] scopes) {
String result = get(EclipsePreferences.decodePath(key)[1], null, getNodes(qualifier, key, scopes));
return result == null ? defaultValue : Boolean.valueOf(result).booleanValue();
@@ -511,6 +522,7 @@ public class PreferencesService implements IPreferencesService {
/*
* @see org.eclipse.core.runtime.preferences.IPreferencesService#getByteArray(java.lang.String, java.lang.String, byte[], org.eclipse.core.runtime.preferences.IScope[])
*/
+ @Override
public byte[] getByteArray(String qualifier, String key, byte[] defaultValue, IScopeContext[] scopes) {
String result = get(EclipsePreferences.decodePath(key)[1], null, getNodes(qualifier, key, scopes));
return result == null ? defaultValue : Base64.decode(result.getBytes());
@@ -519,6 +531,7 @@ public class PreferencesService implements IPreferencesService {
/*
* @see org.eclipse.core.runtime.preferences.IPreferencesService#getDefaultLookupOrder(java.lang.String, java.lang.String)
*/
+ @Override
public String[] getDefaultLookupOrder(String qualifier, String key) {
LookupOrder order = (LookupOrder) defaultsRegistry.get(getRegistryKey(qualifier, key));
return order == null ? null : order.getOrder();
@@ -527,6 +540,7 @@ public class PreferencesService implements IPreferencesService {
/*
* @see org.eclipse.core.runtime.preferences.IPreferencesService#getDouble(java.lang.String, java.lang.String, double, org.eclipse.core.runtime.preferences.IScope[])
*/
+ @Override
public double getDouble(String qualifier, String key, double defaultValue, IScopeContext[] scopes) {
String value = get(EclipsePreferences.decodePath(key)[1], null, getNodes(qualifier, key, scopes));
if (value == null)
@@ -541,6 +555,7 @@ public class PreferencesService implements IPreferencesService {
/*
* @see org.eclipse.core.runtime.preferences.IPreferencesService#getFloat(java.lang.String, java.lang.String, float, org.eclipse.core.runtime.preferences.IScope[])
*/
+ @Override
public float getFloat(String qualifier, String key, float defaultValue, IScopeContext[] scopes) {
String value = get(EclipsePreferences.decodePath(key)[1], null, getNodes(qualifier, key, scopes));
if (value == null)
@@ -555,6 +570,7 @@ public class PreferencesService implements IPreferencesService {
/*
* @see org.eclipse.core.runtime.preferences.IPreferencesService#getInt(java.lang.String, java.lang.String, int, org.eclipse.core.runtime.preferences.IScope[])
*/
+ @Override
public int getInt(String qualifier, String key, int defaultValue, IScopeContext[] scopes) {
String value = get(EclipsePreferences.decodePath(key)[1], null, getNodes(qualifier, key, scopes));
if (value == null)
@@ -573,6 +589,7 @@ public class PreferencesService implements IPreferencesService {
/*
* @see org.eclipse.core.runtime.preferences.IPreferencesService#getLong(java.lang.String, java.lang.String, long, org.eclipse.core.runtime.preferences.IScope[])
*/
+ @Override
public long getLong(String qualifier, String key, long defaultValue, IScopeContext[] scopes) {
String value = get(EclipsePreferences.decodePath(key)[1], null, getNodes(qualifier, key, scopes));
if (value == null)
@@ -587,6 +604,7 @@ public class PreferencesService implements IPreferencesService {
/*
* @see org.eclipse.core.runtime.preferences.IPreferencesService#getLookupOrder(java.lang.String, java.lang.String)
*/
+ @Override
public String[] getLookupOrder(String qualifier, String key) {
String[] order = getDefaultLookupOrder(qualifier, key);
// if there wasn't an exact match based on both qualifier and simple name
@@ -605,6 +623,7 @@ public class PreferencesService implements IPreferencesService {
for (int i = 0; i < order.length; i++) {
final String scopeString = order[i];
SafeRunner.run(new ISafeRunnable() {
+ @Override
public void run() throws Exception {
boolean found = false;
for (int j = 0; contexts != null && j < contexts.length; j++) {
@@ -628,6 +647,7 @@ public class PreferencesService implements IPreferencesService {
found = false;
}
+ @Override
public void handleException(Throwable exception) {
log(new Status(IStatus.ERROR, Activator.PI_PREFERENCES, PrefsMessages.preferences_contextError, exception));
}
@@ -647,6 +667,7 @@ public class PreferencesService implements IPreferencesService {
return qualifier + '/' + key;
}
+ @Override
public IEclipsePreferences getRootNode() {
return root;
}
@@ -672,6 +693,7 @@ public class PreferencesService implements IPreferencesService {
/*
* @see org.eclipse.core.runtime.preferences.IPreferencesService#getString(java.lang.String, java.lang.String, java.lang.String, org.eclipse.core.runtime.preferences.IScope[])
*/
+ @Override
public String getString(String qualifier, String key, String defaultValue, IScopeContext[] scopes) {
return get(EclipsePreferences.decodePath(key)[1], defaultValue, getNodes(qualifier, key, scopes));
}
@@ -679,6 +701,7 @@ public class PreferencesService implements IPreferencesService {
/*
* @see org.eclipse.core.runtime.preferences.IPreferencesService#importPreferences(java.io.InputStream)
*/
+ @Override
public IStatus importPreferences(InputStream input) throws CoreException {
if (EclipsePreferences.DEBUG_PREFERENCE_GENERAL)
PrefsMessages.message("Importing preferences..."); //$NON-NLS-1$
@@ -701,6 +724,7 @@ public class PreferencesService implements IPreferencesService {
// actually apply the settings
IPreferenceNodeVisitor visitor = new IPreferenceNodeVisitor() {
+ @Override
public boolean visit(IEclipsePreferences node) throws BackingStoreException {
String[] keys = node.keys();
if (keys.length == 0)
@@ -834,6 +858,7 @@ public class PreferencesService implements IPreferencesService {
/* (non-Javadoc)
* @see IPreferencesService#matches(IEclipsePreferences, IPreferenceFilter[])
*/
+ @Override
public IPreferenceFilter[] matches(IEclipsePreferences tree, IPreferenceFilter[] filters) throws CoreException {
if (filters == null || filters.length == 0)
return new IPreferenceFilter[0];
@@ -851,6 +876,7 @@ public class PreferencesService implements IPreferencesService {
if (trees.length == 0)
return result;
IPreferenceNodeVisitor visitor = new IPreferenceNodeVisitor() {
+ @Override
public boolean visit(IEclipsePreferences node) throws BackingStoreException {
Preferences destination = result.node(node.absolutePath());
copyFromTo(node, destination, null, 0);
@@ -865,6 +891,7 @@ public class PreferencesService implements IPreferencesService {
/*
* @see org.eclipse.core.runtime.preferences.IPreferencesService#readPreferences(java.io.InputStream)
*/
+ @Override
public IExportedPreferences readPreferences(InputStream input) throws CoreException {
if (input == null)
throw new IllegalArgumentException();
@@ -922,6 +949,7 @@ public class PreferencesService implements IPreferencesService {
/*
* @see org.eclipse.core.runtime.preferences.IPreferencesService#setDefaultLookupOrder(java.lang.String, java.lang.String, java.lang.String[])
*/
+ @Override
public void setDefaultLookupOrder(String qualifier, String key, String[] order) {
String registryKey = getRegistryKey(qualifier, key);
if (order == null)
@@ -1059,6 +1087,7 @@ public class PreferencesService implements IPreferencesService {
public IStatus validateVersions(IPath path) {
final MultiStatus result = new MultiStatus(PrefsMessages.OWNER_NAME, IStatus.INFO, PrefsMessages.preferences_validate, null);
IPreferenceNodeVisitor visitor = new IPreferenceNodeVisitor() {
+ @Override
public boolean visit(IEclipsePreferences node) {
if (!(node instanceof ExportedPreferences))
return false;
diff --git a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/RootPreferences.java b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/RootPreferences.java
index 74ebd74d3..5d80775b7 100644
--- a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/RootPreferences.java
+++ b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/RootPreferences.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2012 IBM Corporation and others.
+ * Copyright (c) 2004, 2015 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,6 +30,7 @@ public class RootPreferences extends EclipsePreferences {
/*
* @see org.osgi.service.prefs.Preferences#flush()
*/
+ @Override
public void flush() throws BackingStoreException {
// flush all children
BackingStoreException exception = null;
@@ -86,6 +87,7 @@ public class RootPreferences extends EclipsePreferences {
/*
* @see Preferences#node(String)
*/
+ @Override
public Preferences node(String path) {
return getNode(path, true); // create if not found
}
@@ -114,6 +116,7 @@ public class RootPreferences extends EclipsePreferences {
/*
* @see org.osgi.service.prefs.Preferences#sync()
*/
+ @Override
public void sync() throws BackingStoreException {
// sync all children
BackingStoreException exception = null;
diff --git a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/SafeFileOutputStream.java b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/SafeFileOutputStream.java
index c9d3ebda2..93970a232 100644
--- a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/SafeFileOutputStream.java
+++ b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/SafeFileOutputStream.java
@@ -54,6 +54,7 @@ public class SafeFileOutputStream extends OutputStream {
output = new BufferedOutputStream(new FileOutputStream(temp));
}
+ @Override
public void close() throws IOException {
try {
output.close();
@@ -108,6 +109,7 @@ public class SafeFileOutputStream extends OutputStream {
}
}
+ @Override
public void flush() throws IOException {
try {
output.flush();
@@ -131,6 +133,7 @@ public class SafeFileOutputStream extends OutputStream {
}
}
+ @Override
public void write(int b) throws IOException {
try {
output.write(b);
diff --git a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/ScopeDescriptor.java b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/ScopeDescriptor.java
index e5e3889d9..45c511fa0 100644
--- a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/ScopeDescriptor.java
+++ b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/ScopeDescriptor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2012 IBM Corporation and others.
+ * Copyright (c) 2011, 2015 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
@@ -56,10 +56,12 @@ public class ScopeDescriptor {
final String[][] result = new String[1][];
final BackingStoreException[] bse = new BackingStoreException[1];
ISafeRunnable code = new ISafeRunnable() {
+ @Override
public void run() throws Exception {
result[0] = storage.childrenNames(path);
}
+ @Override
public void handleException(Throwable exception) {
if (exception instanceof BackingStoreException)
bse[0] = (BackingStoreException) exception;
@@ -79,10 +81,12 @@ public class ScopeDescriptor {
final Properties[] result = new Properties[1];
final BackingStoreException[] bse = new BackingStoreException[1];
ISafeRunnable code = new ISafeRunnable() {
+ @Override
public void run() throws Exception {
result[0] = storage.load(path);
}
+ @Override
public void handleException(Throwable exception) {
if (exception instanceof BackingStoreException)
bse[0] = (BackingStoreException) exception;
@@ -101,10 +105,12 @@ public class ScopeDescriptor {
return;
final BackingStoreException[] bse = new BackingStoreException[1];
ISafeRunnable code = new ISafeRunnable() {
+ @Override
public void run() throws Exception {
storage.save(path, properties);
}
+ @Override
public void handleException(Throwable exception) {
if (exception instanceof BackingStoreException)
bse[0] = (BackingStoreException) exception;
@@ -129,10 +135,12 @@ public class ScopeDescriptor {
if (storage == null)
return;
SafeRunner.run(new ISafeRunnable() {
+ @Override
public void run() throws Exception {
storage.removed(path);
}
+ @Override
public void handleException(Throwable exception) {
// ignore here, error will be logged in saferunner
}
diff --git a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/BundleDefaultsScope.java b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/BundleDefaultsScope.java
index a182239ec..251c13b77 100644
--- a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/BundleDefaultsScope.java
+++ b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/BundleDefaultsScope.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 IBM Corporation and others.
+ * Copyright (c) 2009, 2015 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
@@ -61,6 +61,7 @@ public final class BundleDefaultsScope extends AbstractScope {
/*
* @see org.eclipse.core.runtime.preferences.IScopeContext#getName()
*/
+ @Override
public String getName() {
return SCOPE;
}
@@ -68,6 +69,7 @@ public final class BundleDefaultsScope extends AbstractScope {
/* (non-Javadoc)
* @see org.eclipse.core.runtime.preferences.IScopeContext#getNode(java.lang.String)
*/
+ @Override
public IEclipsePreferences getNode(String qualifier) {
return super.getNode(qualifier);
}
@@ -75,6 +77,7 @@ public final class BundleDefaultsScope extends AbstractScope {
/*
* @see org.eclipse.core.runtime.preferences.IScopeContext#getLocation()
*/
+ @Override
public IPath getLocation() {
// We don't persist defaults so return null.
return null;
diff --git a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/ConfigurationScope.java b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/ConfigurationScope.java
index c04be6e67..d9e2d511a 100644
--- a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/ConfigurationScope.java
+++ b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/ConfigurationScope.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2011 IBM Corporation and others.
+ * Copyright (c) 2004, 2015 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
@@ -66,6 +66,7 @@ public final class ConfigurationScope extends AbstractScope {
/*
* @see org.eclipse.core.runtime.preferences.IScopeContext#getName()
*/
+ @Override
public String getName() {
return SCOPE;
}
@@ -73,6 +74,7 @@ public final class ConfigurationScope extends AbstractScope {
/* (non-Javadoc)
* @see org.eclipse.core.runtime.preferences.IScopeContext#getNode(java.lang.String)
*/
+ @Override
public IEclipsePreferences getNode(String qualifier) {
return super.getNode(qualifier);
}
@@ -80,6 +82,7 @@ public final class ConfigurationScope extends AbstractScope {
/*
* @see org.eclipse.core.runtime.preferences.IScopeContext#getLocation()
*/
+ @Override
public IPath getLocation() {
IPath result = null;
Location location = PreferencesOSGiUtils.getDefault().getConfigurationLocation();
diff --git a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/DefaultScope.java b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/DefaultScope.java
index 6ba52f87b..88811f6f4 100644
--- a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/DefaultScope.java
+++ b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/DefaultScope.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2011 IBM Corporation and others.
+ * Copyright (c) 2004, 2015 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
@@ -65,6 +65,7 @@ public final class DefaultScope extends AbstractScope {
/*
* @see org.eclipse.core.runtime.preferences.IScopeContext#getName()
*/
+ @Override
public String getName() {
return SCOPE;
}
@@ -72,6 +73,7 @@ public final class DefaultScope extends AbstractScope {
/* (non-Javadoc)
* @see org.eclipse.core.runtime.preferences.IScopeContext#getNode(java.lang.String)
*/
+ @Override
public IEclipsePreferences getNode(String qualifier) {
return super.getNode(qualifier);
}
@@ -79,6 +81,7 @@ public final class DefaultScope extends AbstractScope {
/*
* @see org.eclipse.core.runtime.preferences.IScopeContext#getLocation()
*/
+ @Override
public IPath getLocation() {
// We don't persist defaults so return null.
return null;
diff --git a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/IEclipsePreferences.java b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/IEclipsePreferences.java
index f6ca286e8..12f8a59de 100644
--- a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/IEclipsePreferences.java
+++ b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/IEclipsePreferences.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * Copyright (c) 2004, 2015 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
@@ -283,6 +283,7 @@ public interface IEclipsePreferences extends Preferences {
* @see org.osgi.service.prefs.Preferences#removeNode()
* @see NodeChangeEvent
*/
+ @Override
public void removeNode() throws BackingStoreException;
/**
@@ -301,6 +302,7 @@ public interface IEclipsePreferences extends Preferences {
* @see org.osgi.service.prefs.Preferences#node(String)
* @see NodeChangeEvent
*/
+ @Override
public Preferences node(String path);
/**
diff --git a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/InstanceScope.java b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/InstanceScope.java
index cc0ce84d0..e181e6987 100644
--- a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/InstanceScope.java
+++ b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/InstanceScope.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2011 IBM Corporation and others.
+ * Copyright (c) 2004, 2015 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
@@ -60,6 +60,7 @@ public final class InstanceScope extends AbstractScope {
/*
* @see org.eclipse.core.runtime.preferences.IScopeContext#getLocation()
*/
+ @Override
public IPath getLocation() {
// Return null. The instance location usually corresponds to the state
// location of the bundle and we don't know what bundle we are dealing with.
@@ -69,6 +70,7 @@ public final class InstanceScope extends AbstractScope {
/*
* @see org.eclipse.core.runtime.preferences.IScopeContext#getName()
*/
+ @Override
public String getName() {
return SCOPE;
}
@@ -76,6 +78,7 @@ public final class InstanceScope extends AbstractScope {
/* (non-Javadoc)
* @see org.eclipse.core.runtime.preferences.IScopeContext#getNode(java.lang.String)
*/
+ @Override
public IEclipsePreferences getNode(String qualifier) {
return super.getNode(qualifier);
}
diff --git a/bundles/org.eclipse.equinox.preferences/src/org/osgi/service/prefs/BackingStoreException.java b/bundles/org.eclipse.equinox.preferences/src/org/osgi/service/prefs/BackingStoreException.java
index 86f6e3cc9..9e593c4fc 100644
--- a/bundles/org.eclipse.equinox.preferences/src/org/osgi/service/prefs/BackingStoreException.java
+++ b/bundles/org.eclipse.equinox.preferences/src/org/osgi/service/prefs/BackingStoreException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2001, 2010). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2001, 2015). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -54,6 +54,7 @@ public class BackingStoreException extends Exception {
* set.
* @since 1.1
*/
+ @Override
public Throwable getCause() {
return super.getCause();
}
@@ -69,6 +70,7 @@ public class BackingStoreException extends Exception {
* been set.
* @since 1.1
*/
+ @Override
public Throwable initCause(Throwable cause) {
return super.initCause(cause);
}

Back to the top