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); return equals(cmp);
} // equals } // equals
public int hashCode()
{
assert false : "hashCode not designed";
return 42; // any arbitrary constant will do
}
/** /**
* Print Address Reverse Order * Print Address Reverse Order
* @return true if reverse depending on country * @return true if reverse depending on country

View File

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

View File

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

View File

@ -235,6 +235,12 @@ public final class MultiMap<K,V> implements Map<K,V>, Serializable
throw new java.lang.UnsupportedOperationException("Method equals() not implemented."); 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 * Returns class name and number of entries
* @return info * @return info

View File

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

View File

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

View File

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

View File

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

View File

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