Fixed compiler warnings.
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/content/ContentTypeManager.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/content/ContentTypeManager.java
index bd09d70..7113290 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/content/ContentTypeManager.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/content/ContentTypeManager.java
@@ -171,12 +171,12 @@
// files associated by name should appear before those associated by extension
SortedSet allByFileName = (SortedSet) fileNames.get(fileName);
if (allByFileName != null && !allByFileName.isEmpty())
- result[count++] = (IContentType) ((ContentType) allByFileName.first()).getTarget();
+ result[count++] = ((ContentType) allByFileName.first()).getTarget();
String fileExtension = getFileExtension(fileName);
if (fileExtension != null) {
SortedSet allByFileExtension = (SortedSet) fileExtensions.get(fileExtension);
if (allByFileExtension != null && !allByFileExtension.isEmpty())
- result[count++] = (IContentType) ((ContentType) allByFileExtension.first()).getTarget();
+ result[count++] = ((ContentType) allByFileExtension.first()).getTarget();
}
if (count == 0)
return new IContentType[0];
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/content/XMLContentDescriber.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/content/XMLContentDescriber.java
index 43c6d5b..8d353c2 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/content/XMLContentDescriber.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/content/XMLContentDescriber.java
@@ -17,7 +17,7 @@
/**
* A content interpreter for XML files.
*
- * @see http://www.w3.org/TR/REC-xml *
+ * @see "http://www.w3.org/TR/REC-xml *"
*/
public class XMLContentDescriber implements IContentDescriber {
private static final String ENCODING = "encoding=\""; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/jobs/LockManager.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/jobs/LockManager.java
index 5d80a95..e77d14e 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/jobs/LockManager.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/jobs/LockManager.java
@@ -78,6 +78,7 @@
private HashMap suspendedLocks = new HashMap();
public LockManager() {
+ super();
}
/* (non-Javadoc)
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/jobs/ObjectMap.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/jobs/ObjectMap.java
index 6e50263..ff1b213 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/jobs/ObjectMap.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/jobs/ObjectMap.java
@@ -55,7 +55,7 @@
}
/**
- * @see Map#clear
+ * @see Map#clear()
*/
public void clear() {
elements = null;
@@ -70,7 +70,7 @@
}
/**
- * @see Map#containsKey
+ * @see Map#containsKey(java.lang.Object)
*/
public boolean containsKey(Object key) {
if (elements == null || count == 0)
@@ -82,7 +82,7 @@
}
/**
- * @see Map#containsValue
+ * @see Map#containsValue(java.lang.Object)
*/
public boolean containsValue(Object value) {
if (elements == null || count == 0)
@@ -94,16 +94,18 @@
}
/**
- * @see Map#entrySet This implementation does not conform properly to the
- * specification in the Map interface. The returned collection will not
- * be bound to this map and will not remain in sync with this map.
+ * @see Map#entrySet()
+ *
+ * Note: This implementation does not conform properly to the
+ * specification in the Map interface. The returned collection will not
+ * be bound to this map and will not remain in sync with this map.
*/
public Set entrySet() {
return toHashMap().entrySet();
}
/**
- * See Object#equals
+ * @see Object#equals(java.lang.Object)
*/
public boolean equals(Object o) {
if (!(o instanceof Map))
@@ -124,7 +126,7 @@
}
/**
- * @see Map#get
+ * @see Map#get(java.lang.Object)
*/
public Object get(Object key) {
if (elements == null || count == 0)
@@ -146,7 +148,7 @@
}
/**
- * See Object#hashCode
+ * @see Object#hashCode()
*/
public int hashCode() {
int hash = 0;
@@ -159,16 +161,18 @@
}
/**
- * @see Map#isEmpty
+ * @see Map#isEmpty()
*/
public boolean isEmpty() {
return count == 0;
}
/**
- * @see Map#keySet This implementation does not conform properly to the
- * specification in the Map interface. The returned collection will not
- * be bound to this map and will not remain in sync with this map.
+ * @see Map#keySet()
+ *
+ * Note: This implementation does not conform properly to the
+ * specification in the Map interface. The returned collection will not
+ * be bound to this map and will not remain in sync with this map.
*/
public Set keySet() {
Set result = new HashSet(size());
@@ -181,7 +185,7 @@
}
/**
- * @see Map#put
+ * @see Map#put(java.lang.Object, java.lang.Object)
*/
public Object put(Object key, Object value) {
if (key == null)
@@ -221,7 +225,7 @@
}
/**
- * @see Map#putAll
+ * @see Map#putAll(java.util.Map)
*/
public void putAll(Map map) {
for (Iterator i = map.keySet().iterator(); i.hasNext();) {
@@ -232,7 +236,7 @@
}
/**
- * @see Map#remove
+ * @see Map#remove(java.lang.Object)
*/
public Object remove(Object key) {
if (elements == null || count == 0)
@@ -250,7 +254,7 @@
}
/**
- * @see Map#size
+ * @see Map#size()
*/
public int size() {
return count;
@@ -270,9 +274,11 @@
}
/**
- * @see Map#values This implementation does not conform properly to the
- * specification in the Map interface. The returned collection will not
- * be bound to this map and will not remain in sync with this map.
+ * @see Map#values()
+ *
+ * Note: This implementation does not conform properly to the
+ * specification in the Map interface. The returned collection will not
+ * be bound to this map and will not remain in sync with this map.
*/
public Collection values() {
Set result = new HashSet(size());
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/registry/BundleModel.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/registry/BundleModel.java
index 75b93a9..6789c7d 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/registry/BundleModel.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/registry/BundleModel.java
@@ -28,10 +28,7 @@
private String hostId;
private IExtensionPoint[] extensionPoints;
private IExtension[] extensions;
-
- private transient boolean bundleNotFound;
private transient ResourceBundle resourceBundle;
-
private long bundleId; //Introduced to fix #46308 //TODO Here may consider keeping the bundle object instead of keeping the id.
//Introduced for UI backward compatibility
@@ -141,8 +138,6 @@
* Fixes up the extension declarations in the given pre-3.0 plug-in or fragment to compensate
* for extension points that were renamed between release 2.1 and 3.0.
*
- * @param plugin the pre-3.0 plug-in or fragment
- * @param factory the factory for creating new model objects
* @since 3.0
*/
private void fixRenamedExtensionPoints() {
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/registry/ConfigurationElement.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/registry/ConfigurationElement.java
index 52d5482..40f37c3 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/registry/ConfigurationElement.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/registry/ConfigurationElement.java
@@ -182,7 +182,7 @@
}
public IExtension getDeclaringExtension() {
- return (IExtension) getParentExtension();
+ return getParentExtension();
}
/**
@@ -283,7 +283,7 @@
* Sets this model object and all of its descendents to be read-only.
* Subclasses may extend this implementation.
*
- * @see #isReadOnly
+ * @see RegistryModelObject#isReadOnly()
*/
public void markReadOnly() {
super.markReadOnly();
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/registry/Extension.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/registry/Extension.java
index 9c13dea..8eb9a50 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/registry/Extension.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/registry/Extension.java
@@ -102,7 +102,7 @@
* Sets this model object and all of its descendents to be read-only.
* Subclasses may extend this implementation.
*
- * @see #isReadOnly
+ * @see RegistryModelObject#isReadOnly()
*/
public void markReadOnly() {
super.markReadOnly();
@@ -113,10 +113,7 @@
/**
* Set the extension point with which this extension is associated.
- * This object must not be read-only.
- *
- * @return the extension point with which this extension is associated.
- * May be <code>null</code>.
+ * May be <code>null</code>. This object must not be read-only.
*/
public void setExtensionPointIdentifier(String value) {
assertIsWriteable();
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/registry/ExtensionsParser.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/registry/ExtensionsParser.java
index 4b026aa..e009600 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/registry/ExtensionsParser.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/registry/ExtensionsParser.java
@@ -108,7 +108,7 @@
* with other document events.</p>
*
* @param locator A locator for all SAX document events.
- * @see org.xml.sax.ContentHandler#setDocumentLocator
+ * @see org.xml.sax.ContentHandler#setDocumentLocator(org.xml.sax.Locator)
* @see org.xml.sax.Locator
*/
public void setDocumentLocator(Locator locator) {
@@ -135,6 +135,7 @@
}
public void endDocument() {
+ // do nothing
}
public void endElement(String uri, String elementName, String qName) {
@@ -309,6 +310,7 @@
}
public void ignoreableWhitespace(char[] ch, int start, int length) {
+ // do nothing
}
private void logStatus(SAXParseException ex) {
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/registry/RegistryModelObject.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/registry/RegistryModelObject.java
index 62fad2e..87d6c62 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/registry/RegistryModelObject.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/registry/RegistryModelObject.java
@@ -60,7 +60,7 @@
*
* @return <code>true</code> if this model object is read-only,
* <code>false</code> otherwise
- * @see #markReadOnly
+ * @see #markReadOnly()
*/
public boolean isReadOnly() {
return (flags & M_READ_ONLY) == M_READ_ONLY;
@@ -70,7 +70,7 @@
* Sets this model object and all of its descendents to be read-only.
* Subclasses may extend this implementation.
*
- * @see #isReadOnly
+ * @see #isReadOnly()
*/
public void markReadOnly() {
flags |= M_READ_ONLY;
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/AdapterManager.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/AdapterManager.java
index e279c46..e66e45a 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/AdapterManager.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/AdapterManager.java
@@ -29,7 +29,7 @@
* superinterfaces) </il>
* </ul>
*
- * @see IAdapter
+ * @see IAdapterFactory
* @see IAdapterManager
*/
public final class AdapterManager implements IAdapterManager, IRegistryChangeListener {
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/AuthorizationDatabase.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/AuthorizationDatabase.java
index a86a51d..e1c4818 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/AuthorizationDatabase.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/AuthorizationDatabase.java
@@ -64,7 +64,7 @@
* "c:/temp/database"
* @param password the password to access the database. For example,
* "secret"
- * @exception Exception if there are problems creating the database.
+ * @exception CoreException if there are problems creating the database.
* Reasons include:
* <ul>
* <li>The database could not be opened because the wrong password was given.
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/Cipher.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/Cipher.java
index cc86e4c..ca8abba 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/Cipher.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/Cipher.java
@@ -56,7 +56,7 @@
* mode and to set the password.
*
* @param mode
- * @param password
+ * @param passwordString
*/
public Cipher(int mode, String passwordString) {
this.mode = mode;
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/CipherInputStream.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/CipherInputStream.java
index 9ddf640..36d3ef3 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/CipherInputStream.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/CipherInputStream.java
@@ -38,14 +38,14 @@
}
/**
- * @see InputStream#markSupported
+ * @see InputStream#markSupported()
*/
public boolean markSupported() {
return false;
}
/**
- * @see InputStream#read
+ * @see InputStream#read()
*/
public int read() throws IOException {
int b = super.read();
@@ -59,7 +59,7 @@
}
/**
- * @see InputStream#read(byte, int, int)
+ * @see InputStream#read(byte[], int, int)
*/
public int read(byte b[], int off, int len) throws IOException {
int bytesRead = in.read(b, off, len);
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/FindSupport.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/FindSupport.java
index 66d7063..81827f0 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/FindSupport.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/FindSupport.java
@@ -69,6 +69,7 @@
* Returns a URL for the given path. Returns <code>null</code> if the URL
* could not be computed or created.
*
+ * TODO fix these comments
* @param path file path relative to plug-in installation location
* @param override map of override substitution arguments to be used for
* any $arg$ path elements. The map keys correspond to the substitution
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/InternalPlatform.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/InternalPlatform.java
index 5fdd490..e149205 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/InternalPlatform.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/InternalPlatform.java
@@ -167,7 +167,7 @@
}
/**
- * @see Platform#addLogListener
+ * @see Platform#addLogListener(ILogListener)
*/
public void addLogListener(ILogListener listener) {
assertInitialized();
@@ -240,7 +240,7 @@
}
/**
- * @see Platform#getAdapterManager
+ * @see Platform#getAdapterManager()
*/
public IAdapterManager getAdapterManager() {
assertInitialized();
@@ -287,7 +287,7 @@
}
/**
- * @see Platform#getLocation
+ * @see Platform#getLocation()
*/
public IPath getLocation() throws IllegalStateException {
Location location = getInstanceLocation();
@@ -363,6 +363,8 @@
* This method is used by the platform boot loader; is must
* not be called directly by client code.
* </p>
+ * TODO: fix these comments
+ * @param context
* @param pluginPath the list of places to look for plug-in specifications. This may
* identify individual plug-in files or directories containing directories which contain
* plug-in files.
@@ -585,7 +587,7 @@
}
/**
- * @see Platform#removeLogListener
+ * @see Platform#removeLogListener(ILogListener)
*/
public void removeLogListener(ILogListener listener) {
assertInitialized();
@@ -656,6 +658,7 @@
* plugin's fragments. This properties file can be used to translate
* preference values.
*
+ * TODO fix these comments
* @param pluginDescriptor the descriptor of the plugin
* who has the preferences
* @param basePrefFileName the base name of the preference file
@@ -684,6 +687,7 @@
* Takes a preference value and a related resource bundle and
* returns the translated version of this value (if one exists).
*
+ * TODO: fix these comments
* @param value the preference value for potential translation
* @param bundle the bundle containing the translated values
*
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/Log.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/Log.java
index b27270f..ee657da 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/Log.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/Log.java
@@ -30,7 +30,7 @@
* Adds the given log listener to this log. Subsequently the log listener will
* receive notification of all log events passing through this log.
*
- * @see Platform#addLogListener
+ * @see Platform#addLogListener(ILogListener)
*/
public void addLogListener(ILogListener listener) {
synchronized (logListeners) {
@@ -49,7 +49,7 @@
* Logs the given status. The status is distributed to the log listeners
* installed on this log and then to the log listeners installed on the platform.
*
- * @see Plugin#getLogMask
+ * @see Plugin#getLog()
*/
public void log(final IStatus status) {
// Log to the platform log first in case a listener throws an error.
@@ -78,7 +78,7 @@
* Removes the given log listener to this log. Subsequently the log listener will
* no longer receive notification of log events passing through this log.
*
- * @see Platform#removeLogListener
+ * @see Platform#removeLogListener(ILogListener)
*/
public void removeLogListener(ILogListener listener) {
synchronized (logListeners) {
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/PlatformLogWriter.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/PlatformLogWriter.java
index 43b479b..cc0d181 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/PlatformLogWriter.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/PlatformLogWriter.java
@@ -20,7 +20,7 @@
*/
public class PlatformLogWriter implements ILogListener {
/**
- * @see ILogListener#logging.
+ * @see ILogListener#logging(IStatus, String)
*/
public synchronized void logging(IStatus status, String plugin) {
FrameworkLogEntry logEntry = getLog(status);
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/SafeFileOutputStream.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/SafeFileOutputStream.java
index 0778198..512fc71 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/SafeFileOutputStream.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/SafeFileOutputStream.java
@@ -86,7 +86,7 @@
transferStreams(source, destination);
}
- protected void createTempFile(String tempPath) throws IOException {
+ protected void createTempFile(String tempPath) {
if (tempPath == null)
tempPath = target.getAbsolutePath() + EXTENSION;
temp = new File(tempPath);
@@ -118,10 +118,12 @@
try {
source.close();
} catch (IOException e) {
+ // do nothing
}
try {
destination.close();
} catch (IOException e) {
+ // do nothing
}
}
}
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Platform.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Platform.java
index dfcc90c..36ddc5f 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Platform.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Platform.java
@@ -163,6 +163,7 @@
* Private constructor to block instance creation.
*/
private Platform() {
+ super();
}
/**
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Plugin.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Plugin.java
index abb40b2..507f075 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Plugin.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Plugin.java
@@ -152,6 +152,7 @@
* @since 3.0
*/
public Plugin() {
+ super();
}
/**