From 3fac888fe5d924489bc3439970f99e4263e02a13 Mon Sep 17 00:00:00 2001
From: zzz <zzz@mail.i2p>
Date: Mon, 10 May 2010 14:17:05 +0000
Subject: [PATCH]     * DataHelper: Deprecate inefficient eq() methods

---
 core/java/src/net/i2p/data/DataHelper.java | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/core/java/src/net/i2p/data/DataHelper.java b/core/java/src/net/i2p/data/DataHelper.java
index 39771212e4..c39e541b26 100644
--- a/core/java/src/net/i2p/data/DataHelper.java
+++ b/core/java/src/net/i2p/data/DataHelper.java
@@ -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;
-- 
GitLab