cid#1326861,1326862: Eq: Problems with implementation of equals()
Cloneable, odd additional equals overloads, odd hasCode implementation---all smells like clueless cargo cult. And I see no place where it would get used. Change-Id: Icca89531ce9181fb47eacfb6fae704f4f45012a9
This commit is contained in:
@@ -21,7 +21,7 @@ package com.sun.star.script.framework.container;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class ScriptEntry implements Cloneable {
|
||||
public class ScriptEntry {
|
||||
|
||||
private final String language;
|
||||
private final String languagename;
|
||||
@@ -56,23 +56,6 @@ public class ScriptEntry implements Cloneable {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object clone() throws CloneNotSupportedException {
|
||||
return super.clone();
|
||||
}
|
||||
|
||||
public boolean equals(ScriptEntry other) {
|
||||
return language.equals(other.getLanguage()) &&
|
||||
languagename.equals(other.getLanguageName()) &&
|
||||
logicalname.equals(other.getLogicalName()) &&
|
||||
languagedepprops.equals(other.getLanguageProperties());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public Map<String, String> getLanguageProperties() {
|
||||
return languagedepprops;
|
||||
}
|
||||
|
||||
@@ -66,15 +66,6 @@ public class ScriptMetaData extends ScriptEntry {
|
||||
return (source != null && hasSource) ? source.getBytes() : null;
|
||||
}
|
||||
|
||||
public boolean equals(ScriptMetaData other) {
|
||||
return super.equals(other) && hasSource == other.hasSource();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public String getScriptFullURL() {
|
||||
String url = "vnd.sun.star.script:" + parent.getName() + "."
|
||||
+ getLanguageName() + "?" + "language=" + getLanguage()
|
||||
|
||||
Reference in New Issue
Block a user