Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Clean up static checker warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
seanf committed Oct 1, 2013
1 parent 702487c commit 45532b1
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
Expand Up @@ -35,7 +35,7 @@ public boolean equals(Object obj) {
return true;
if (!(obj instanceof ContentType))
return false;
return this.contentType == ((ContentType) obj).contentType;
return this.contentType.equals(((ContentType) obj).contentType);
}

@Override
Expand Down
Expand Up @@ -21,9 +21,8 @@ public class DTOUtil {
@SuppressWarnings({ "unchecked" })
public static <T> String toXML(T obj) {
try {
Marshaller m = null;
JAXBContext jc = JAXBContext.newInstance(obj.getClass());
m = jc.createMarshaller();
Marshaller m = jc.createMarshaller();
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
m.setProperty(Marshaller.JAXB_FRAGMENT, true);
StringWriter writer = new StringWriter();
Expand Down
Expand Up @@ -280,7 +280,7 @@ public boolean equals(Object obj) {
} else if (!name.equals(other.name)) {
return false;
}
if (defaultType != other.defaultType) {
if (!defaultType.equals(other.defaultType)) {
return false;
}
if (status != other.status) {
Expand Down
Expand Up @@ -183,7 +183,7 @@ public boolean equals(Object obj) {
if (status != other.status) {
return false;
}
if (projectType != other.projectType) {
if (!projectType.equals(other.projectType)) {
return false;
}
return true;
Expand Down
Expand Up @@ -34,6 +34,12 @@ public int hashCode() {

@Override
public boolean equals(Object obj) {
if(obj == this) {
return true;
}
if (!(obj instanceof URI)) {
return false;
}
return uriString.equals(((URI) obj).toString());
}

Expand Down

0 comments on commit 45532b1

Please sign in to comment.