openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1838806 - in /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation: BeforeDestroyedLiteral.java InitializedLiteral.java
Date Fri, 24 Aug 2018 09:53:59 GMT
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();
+    }
 }



Mime
View raw message