aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetre Eftime <[email protected]>2016-05-06 19:21:07 +0300
committerPetre Eftime <[email protected]>2016-05-09 16:40:21 +0300
commitc07b823b88c35b2e93ca2588afa119c31faf17fe (patch)
tree0cc57174792e245c220590f37f079152e226f544
parent6cb0e158e320720631d135eafe83069e46a6a884 (diff)
java: Properly override equals for BluetoothObject
Signed-off-by: Petre Eftime <[email protected]>
-rw-r--r--java/BluetoothObject.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/java/BluetoothObject.java b/java/BluetoothObject.java
index d1ab0c76..7b1ecb79 100644
--- a/java/BluetoothObject.java
+++ b/java/BluetoothObject.java
@@ -64,12 +64,10 @@ public class BluetoothObject implements Cloneable
delete();
}
- public boolean equals(BluetoothObject obj)
+ public boolean equals(Object obj)
{
- if (obj == null)
- {
+ if (obj == null || !(obj instanceof BluetoothObject))
return false;
- }
- return operatorEqual(obj);
+ return operatorEqual((BluetoothObject)obj);
}
}