Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2016-10-07 12:15:21 +0000
committerLars Vogel2016-10-07 12:15:21 +0000
commitd1ae88ece1a9968215b0a369ddcd71d7467e0fbf (patch)
tree34c3882eeb64ce4b86a6fc663a9f4f348cce33ff
parent92ae5195ee7a7685524798f74948b8fcbfeb7ccd (diff)
downloadrt.equinox.bundles-d1ae88ece1a9968215b0a369ddcd71d7467e0fbf.tar.gz
rt.equinox.bundles-d1ae88ece1a9968215b0a369ddcd71d7467e0fbf.tar.xz
rt.equinox.bundles-d1ae88ece1a9968215b0a369ddcd71d7467e0fbf.zip
Bug 505359 - [Minor] Reduce warnings in org.eclipse.equinox.registry
Change-Id: I8b3b90f9a4c11eb8858e5ebfe67ea12f57f441c2 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/BufferedRandomInputStream.java2
-rw-r--r--bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryIndexElement.java14
-rw-r--r--bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryObjectManager.java2
-rw-r--r--bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryProperties.java4
4 files changed, 9 insertions, 13 deletions
diff --git a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/BufferedRandomInputStream.java b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/BufferedRandomInputStream.java
index db0abec13..9f1df30a3 100644
--- a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/BufferedRandomInputStream.java
+++ b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/BufferedRandomInputStream.java
@@ -100,7 +100,7 @@ public class BufferedRandomInputStream extends InputStream {
return available + skipped;
}
- public int available() throws IOException {
+ public int available() {
return (buffer_size - buffer_pos);
}
diff --git a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryIndexElement.java b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryIndexElement.java
index 6daf40b8b..5050d54b6 100644
--- a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryIndexElement.java
+++ b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryIndexElement.java
@@ -24,7 +24,7 @@ public class RegistryIndexElement implements KeyedElement {
public RegistryIndexElement(String key) {
this.key = key;
}
-
+
public RegistryIndexElement(String key, int[] extensionPoints, int[] extensions) {
this.key = key;
this.extensionPoints = new RegistryIndexChildren(extensionPoints);
@@ -49,8 +49,7 @@ public class RegistryIndexElement implements KeyedElement {
if (add)
return extensions.linkChild(id);
- else
- return extensions.unlinkChild(id);
+ return extensions.unlinkChild(id);
}
public boolean updateExtensions(int[] IDs, boolean add) {
@@ -59,8 +58,7 @@ public class RegistryIndexElement implements KeyedElement {
if (add)
return extensions.linkChildren(IDs);
- else
- return extensions.unlinkChildren(IDs);
+ return extensions.unlinkChildren(IDs);
}
public boolean updateExtensionPoint(int id, boolean add) {
@@ -69,8 +67,7 @@ public class RegistryIndexElement implements KeyedElement {
if (add)
return extensionPoints.linkChild(id);
- else
- return extensionPoints.unlinkChild(id);
+ return extensionPoints.unlinkChild(id);
}
public boolean updateExtensionPoints(int[] IDs, boolean add) {
@@ -79,8 +76,7 @@ public class RegistryIndexElement implements KeyedElement {
if (add)
return extensionPoints.linkChildren(IDs);
- else
- return extensionPoints.unlinkChildren(IDs);
+ return extensionPoints.unlinkChildren(IDs);
}
//Implements the KeyedElement interface
diff --git a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryObjectManager.java b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryObjectManager.java
index 552d42a5c..1d221337b 100644
--- a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryObjectManager.java
+++ b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryObjectManager.java
@@ -476,7 +476,7 @@ public class RegistryObjectManager implements IObjectManager {
if (orphanExtensions == null && !fromCache) {
result = new HashMap();
orphanExtensions = result;
- } else if (orphanExtensions == null || (result = ((HashMap) ((orphanExtensions instanceof SoftReference) ? ((SoftReference) orphanExtensions).get() : orphanExtensions))) == null) {
+ } else if (orphanExtensions == null || (result = ((orphanExtensions instanceof SoftReference) ? ((SoftReference) orphanExtensions).get() : orphanExtensions)) == null) {
result = registry.getTableReader().loadOrphans();
orphanExtensions = new SoftReference(result);
}
diff --git a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryProperties.java b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryProperties.java
index 08f168996..b2e302b4a 100644
--- a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryProperties.java
+++ b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryProperties.java
@@ -18,7 +18,7 @@ import org.eclipse.core.runtime.Status;
* to BundleContext properties (if available) or System properties otherwise.
*/
public class RegistryProperties {
-
+
public static final String empty = ""; //$NON-NLS-1$
private static Properties registryProperties = new Properties();
@@ -68,7 +68,7 @@ public class RegistryProperties {
// is not present or non-standard. This should not happen, but let's give
// the program a chance to continue - properties should have reasonable
// default values.
- IStatus status = new Status(Status.ERROR, IRegistryConstants.RUNTIME_NAME, 0, e.getMessage(), e);
+ IStatus status = new Status(IStatus.ERROR, IRegistryConstants.RUNTIME_NAME, 0, e.getMessage(), e);
RuntimeLog.log(status);
return null;
}

Back to the top