IDEMPIERE-455 Discover and fix FindBugs problems / Pattern HE_EQUALS_USE_HASHCODE

This commit is contained in:
Richard Morales 2012-12-11 19:14:19 -05:00
parent 5e425251c9
commit d42b5a12c3
9 changed files with 54 additions and 0 deletions

View File

@ -419,6 +419,12 @@ public class MLocation extends X_C_Location implements Comparator<Object>
return equals(cmp);
} // equals
public int hashCode()
{
assert false : "hashCode not designed";
return 42; // any arbitrary constant will do
}
/**
* Print Address Reverse Order
* @return true if reverse depending on country

View File

@ -276,6 +276,12 @@ public final class MLookup extends Lookup implements Serializable
}
return false;
} // equals
public int hashCode()
{
assert false : "hashCode not designed";
return 42; // any arbitrary constant will do
}
/**
* Return Size

View File

@ -231,6 +231,12 @@ public class MRfQResponseLineQty extends X_C_RfQResponseLineQty implements Compa
}
return false;
} // equals
public int hashCode()
{
assert false : "hashCode not designed";
return 42; // any arbitrary constant will do
}
/**
* Before Save

View File

@ -234,6 +234,12 @@ public final class MultiMap<K,V> implements Map<K,V>, Serializable
{
throw new java.lang.UnsupportedOperationException("Method equals() not implemented.");
}
public int hashCode()
{
assert false : "hashCode not designed";
return 42; // any arbitrary constant will do
}
/**************************************************************************
* Returns class name and number of entries

View File

@ -313,6 +313,12 @@ public abstract class PO
return ((PO)cmp).get_ID() == get_ID();
return super.equals(cmp);
} // equals
public int hashCode()
{
assert false : "hashCode not designed";
return 42; // any arbitrary constant will do
}
/**
* Compare based on DocumentNo, Value, Name, Description

View File

@ -411,6 +411,12 @@ public class CPaper extends Paper
}
return false;
} // equals
public int hashCode()
{
assert false : "hashCode not designed";
return 42; // any arbitrary constant will do
}
/*************************************************************************/

View File

@ -164,6 +164,12 @@ public final class MSort implements Comparator<Object>, Serializable
}
return false;
} // equals
public int hashCode()
{
assert false : "hashCode not designed";
return 42; // any arbitrary constant will do
}
/**
* String Representation

View File

@ -104,6 +104,12 @@ public class ALayoutConstraint implements Comparable<Object>
return false;
} // equal
public int hashCode()
{
assert false : "hashCode not designed";
return 42; // any arbitrary constant will do
}
/**
* To String
* @return info

View File

@ -103,6 +103,12 @@ public class ALayoutConstraint implements Comparable<Object>
return compareTo(o) == 0;
return false;
} // equal
public int hashCode()
{
assert false : "hashCode not designed";
return 42; // any arbitrary constant will do
}
/**
* To String