Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteBundle.java')
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteBundle.java84
1 files changed, 41 insertions, 43 deletions
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteBundle.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteBundle.java
index c28eaa122..944754e37 100644
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteBundle.java
+++ b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteBundle.java
@@ -58,14 +58,15 @@ public class SiteBundle {
File file2 = new File(url2.getFile());
return file1.equals(file2);
}
- // URL1 xor URL2 is a file, return false. (They either both need to be files, or neither)
+ // URL1 xor URL2 is a file, return false. (They either both need to be files, or
+ // neither)
if (isFile1 ^ isFile2)
return false;
return getExternalForm(url1).equals(getExternalForm(url2));
}
/**
- * Gets the external form of this URL. In particular, it trims any white space,
+ * Gets the external form of this URL. In particular, it trims any white space,
* removes a trailing slash and creates a lower case string.
*/
private static String getExternalForm(URL url) {
@@ -89,8 +90,8 @@ public class SiteBundle {
}
/**
- * Adds the name of a category this bundle belongs to.
- * Throws a runtime exception if this object is marked read-only.
+ * Adds the name of a category this bundle belongs to. Throws a runtime
+ * exception if this object is marked read-only.
*
* @param categoryName category name
*/
@@ -111,16 +112,16 @@ public class SiteBundle {
try {
url = new URL(base, urlString);
} catch (MalformedURLException e) {
- // UpdateCore.warn("", e); //$NON-NLS-1$
+ // UpdateCore.warn("", e); //$NON-NLS-1$
}
}
/**
* Compares 2 bundle reference models for equality
- *
+ *
* @param object bundle reference model to compare with
- * @return <code>true</code> if the two models are equal,
- * <code>false</code> otherwise
+ * @return <code>true</code> if the two models are equal, <code>false</code>
+ * otherwise
*/
@Override
public boolean equals(Object object) {
@@ -147,9 +148,6 @@ public class SiteBundle {
return sameURL(this.getURL(), that.getURL());
}
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
@Override
public int hashCode() {
final int prime = 31;
@@ -159,7 +157,7 @@ public class SiteBundle {
if (this.getURL() == null)
return result;
- if ("file".equalsIgnoreCase(getURL().getProtocol())) {//$NON-NLS-1$
+ if ("file".equalsIgnoreCase(getURL().getProtocol())) {//$NON-NLS-1$
// If the URL is a file, then create the HashCode from the file
File f = new File(getURL().getFile());
if (f != null)
@@ -194,15 +192,15 @@ public class SiteBundle {
/**
* Returns the bundle version as a string
*
- * @return bundle version
+ * @return bundle version
*/
public String getBundleVersion() {
return bundleVersion;
}
/**
- * Retrieve the displayable label for the bundle reference. If the model
- * object has been resolved, the label is localized.
+ * Retrieve the displayable label for the bundle reference. If the model object
+ * has been resolved, the label is localized.
*
* @return displayable label, or <code>null</code>.
*/
@@ -266,8 +264,8 @@ public class SiteBundle {
/**
* Returns the referenced bundle type.
*
- * @return bundle type, or <code>null</code> representing the default
- * bundle type for the site
+ * @return bundle type, or <code>null</code> representing the default bundle
+ * type for the site
*/
public String getType() {
return type;
@@ -302,14 +300,13 @@ public class SiteBundle {
}
/**
- * Resolve the model object.
- * Any URL strings in the model are resolved relative to the
- * base URL argument. Any translatable strings in the model that are
- * specified as translation keys are localized using the supplied
- * resource bundle.
+ * Resolve the model object. Any URL strings in the model are resolved relative
+ * to the base URL argument. Any translatable strings in the model that are
+ * specified as translation keys are localized using the supplied resource
+ * bundle.
*
* @param resolveBase URL
- * @param bundleURL resource bundle URL
+ * @param bundleURL resource bundle URL
* @exception MalformedURLException
*/
public void resolve(URL resolveBase, URL bundleURL) throws MalformedURLException {
@@ -317,8 +314,8 @@ public class SiteBundle {
}
/**
- * Sets the system architecture specification.
- * Throws a runtime exception if this object is marked read-only.
+ * Sets the system architecture specification. Throws a runtime exception if
+ * this object is marked read-only.
*
* @param arch system architecture specification as a comma-separated list
*/
@@ -327,8 +324,8 @@ public class SiteBundle {
}
/**
- * Sets the names of categories this bundle belongs to.
- * Throws a runtime exception if this object is marked read-only.
+ * Sets the names of categories this bundle belongs to. Throws a runtime
+ * exception if this object is marked read-only.
*
* @param categoryNames an array of category names
*/
@@ -340,8 +337,8 @@ public class SiteBundle {
}
/**
- * Sets the bundle identifier.
- * Throws a runtime exception if this object is marked read-only.
+ * Sets the bundle identifier. Throws a runtime exception if this object is
+ * marked read-only.
*
* @param bundleId bundle identifier
*/
@@ -350,8 +347,8 @@ public class SiteBundle {
}
/**
- * Sets the bundle version.
- * Throws a runtime exception if this object is marked read-only.
+ * Sets the bundle version. Throws a runtime exception if this object is marked
+ * read-only.
*
* @param bundleVersion bundle version
*/
@@ -361,6 +358,7 @@ public class SiteBundle {
/**
* Sets the label.
+ *
* @param label The label to set
*/
public void setLabel(String label) {
@@ -368,8 +366,8 @@ public class SiteBundle {
}
/**
- * Sets the locale specification.
- * Throws a runtime exception if this object is marked read-only.
+ * Sets the locale specification. Throws a runtime exception if this object is
+ * marked read-only.
*
* @param nl locale specification as a comma-separated list
*/
@@ -378,8 +376,8 @@ public class SiteBundle {
}
/**
- * Sets the operating system specification.
- * Throws a runtime exception if this object is marked read-only.
+ * Sets the operating system specification. Throws a runtime exception if this
+ * object is marked read-only.
*
* @param os operating system specification as a comma-separated list
*/
@@ -395,8 +393,8 @@ public class SiteBundle {
}
/**
- * Sets the site for the referenced.
- * Throws a runtime exception if this object is marked read-only.
+ * Sets the site for the referenced. Throws a runtime exception if this object
+ * is marked read-only.
*
* @param site site for the reference
*/
@@ -405,8 +403,8 @@ public class SiteBundle {
}
/**
- * Sets the referenced bundle type.
- * Throws a runtime exception if this object is marked read-only.
+ * Sets the referenced bundle type. Throws a runtime exception if this object is
+ * marked read-only.
*
* @param type referenced bundle type
*/
@@ -415,8 +413,8 @@ public class SiteBundle {
}
/**
- * Sets the unresolved URL for the bundle reference.
- * Throws a runtime exception if this object is marked read-only.
+ * Sets the unresolved URL for the bundle reference. Throws a runtime exception
+ * if this object is marked read-only.
*
* @param urlString unresolved URL string
*/
@@ -426,8 +424,8 @@ public class SiteBundle {
}
/**
- * Sets the windowing system specification.
- * Throws a runtime exception if this object is marked read-only.
+ * Sets the windowing system specification. Throws a runtime exception if this
+ * object is marked read-only.
*
* @param ws windowing system specification as a comma-separated list
*/

Back to the top