I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 3fac888f authored by zzz's avatar zzz
Browse files

* DataHelper: Deprecate inefficient eq() methods

parent d843646b
No related branches found
No related tags found
No related merge requests found
......@@ -712,12 +712,14 @@ public class DataHelper {
*
*/
public final static boolean eq(byte lhs[], byte rhs[]) {
// this appears to be the way Arrays.equals is defined, so all the extra tests are unnecessary?
boolean eq = (((lhs == null) && (rhs == null)) || ((lhs != null) && (rhs != null) && (Arrays.equals(lhs, rhs))));
return eq;
}
/**
* Compare two integers, really just for consistency.
* @deprecated inefficient
*/
public final static boolean eq(int lhs, int rhs) {
return lhs == rhs;
......@@ -725,6 +727,7 @@ public class DataHelper {
/**
* Compare two longs, really just for consistency.
* @deprecated inefficient
*/
public final static boolean eq(long lhs, long rhs) {
return lhs == rhs;
......@@ -732,6 +735,7 @@ public class DataHelper {
/**
* Compare two bytes, really just for consistency.
* @deprecated inefficient
*/
public final static boolean eq(byte lhs, byte rhs) {
return lhs == rhs;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment