You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by st...@apache.org on 2018/08/24 09:53:59 UTC
svn commit: r1838806 - in
/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation:
BeforeDestroyedLiteral.java InitializedLiteral.java
Author: struberg
Date: Fri Aug 24 09:53:59 2018
New Revision: 1838806
URL: http://svn.apache.org/viewvc?rev=1838806&view=rev
Log:
OWB-1253 hand tailored equals method for BeforeDestroyed and Initialized literals
Modified:
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/BeforeDestroyedLiteral.java
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/InitializedLiteral.java
Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/BeforeDestroyedLiteral.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/BeforeDestroyedLiteral.java?rev=1838806&r1=1838805&r2=1838806&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/BeforeDestroyedLiteral.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/BeforeDestroyedLiteral.java Fri Aug 24 09:53:59 2018
@@ -69,4 +69,29 @@ public class BeforeDestroyedLiteral exte
{
return TOSTRING + value.getName() + ")";
}
+
+ @Override
+ public boolean equals(Object o)
+ {
+ if (this == o)
+ {
+ return true;
+ }
+ if (! (o instanceof BeforeDestroyed))
+ {
+ return false;
+ }
+
+ BeforeDestroyed that = (BeforeDestroyed) o;
+
+ return this.value != null ? this.value.equals(that.value()) : that.value() == null;
+ }
+
+ // just to make checkstyle happy
+ @Override
+ public int hashCode()
+ {
+ return super.hashCode();
+ }
+
}
Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/InitializedLiteral.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/InitializedLiteral.java?rev=1838806&r1=1838805&r2=1838806&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/InitializedLiteral.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/InitializedLiteral.java Fri Aug 24 09:53:59 2018
@@ -70,4 +70,28 @@ public class InitializedLiteral extends
return TOSTRING + value.getName() + ")";
}
+
+ @Override
+ public boolean equals(Object o)
+ {
+ if (this == o)
+ {
+ return true;
+ }
+ if (! (o instanceof Initialized))
+ {
+ return false;
+ }
+
+ Initialized that = (Initialized) o;
+
+ return this.value != null ? this.value.equals(that.value()) : that.value() == null;
+ }
+
+ // just to make checkstyle happy
+ @Override
+ public int hashCode()
+ {
+ return super.hashCode();
+ }
}