You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is from a find bugs report contributed by D. Borza:
com.longevitysoft.android.xml.plist.domain.Data
line 73:
public java.lang.String getValue(boolean decode) {
dataStringer.newBuilder();
if (decode) {
return dataStringer.getBuilder()
.append(new java.lang.String(Base64.
decodeFast(rawData)))
.toString();
} else {
-> return dataStringer.getBuilder().append(rawData).toString();
}
}
The code invokes toString on an array, which will generate a fairly useless result such as [C@16f0472. Consider using Arrays.toString to convert the array into a readable String that gives the contents of the array.
class: com.longevitysoft.android.xml.plist.domain.Array
line 252:
public boolean equals(Object that) {
-> return data.equals(that);
}
This class overrides equals(Object), but does not override hashCode(), and inherits the implementation of hashCode() from java.lang.Object (which returns the identity hash code, an arbitrary value assigned to the object by the VM). Therefore, the class is very likely to violate the invariant that equal objects must have equal hashcodes.
The text was updated successfully, but these errors were encountered:
This is from a find bugs report contributed by D. Borza:
line 73:
public java.lang.String getValue(boolean decode) {
dataStringer.newBuilder();
if (decode) {
return dataStringer.getBuilder()
.append(new java.lang.String(Base64.
decodeFast(rawData)))
.toString();
} else {
-> return dataStringer.getBuilder().append(rawData).toString();
}
}
The code invokes toString on an array, which will generate a fairly useless result such as [C@16f0472. Consider using Arrays.toString to convert the array into a readable String that gives the contents of the array.
line 252:
public boolean equals(Object that) {
-> return data.equals(that);
}
This class overrides equals(Object), but does not override hashCode(), and inherits the implementation of hashCode() from java.lang.Object (which returns the identity hash code, an arbitrary value assigned to the object by the VM). Therefore, the class is very likely to violate the invariant that equal objects must have equal hashcodes.
The text was updated successfully, but these errors were encountered: