openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1307827 - in /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation: AnyLiteral.java DefaultLiteral.java
Date Sat, 31 Mar 2012 15:25:43 GMT
Author: struberg
Date: Sat Mar 31 15:25:42 2012
New Revision: 1307827

URL: http://svn.apache.org/viewvc?rev=1307827&view=rev
Log:
OWB-661 overwrite slow AnnotationLiteral methods

provide static tostring names to help some vms

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/AnyLiteral.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/DefaultLiteral.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/AnyLiteral.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/AnyLiteral.java?rev=1307827&r1=1307826&r2=1307827&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/AnyLiteral.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/AnyLiteral.java
Sat Mar 31 15:25:42 2012
@@ -23,6 +23,8 @@ import javax.enterprise.util.AnnotationL
 
 public class AnyLiteral extends AnnotationLiteral<Any> implements Any
 {
+    private static final String TOSTRING = "@javax.enterprise.inject.Any()";
+
     @Override
     public int hashCode()
     {
@@ -46,7 +48,7 @@ public class AnyLiteral extends Annotati
     public String toString()
     {
         // implemented for performance reasons
-        return "@javax.enterprise.inject.Any()";
+        return TOSTRING;
     }
 
 }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/DefaultLiteral.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/DefaultLiteral.java?rev=1307827&r1=1307826&r2=1307827&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/DefaultLiteral.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/DefaultLiteral.java
Sat Mar 31 15:25:42 2012
@@ -28,6 +28,8 @@ import javax.enterprise.util.AnnotationL
  */
 public class DefaultLiteral extends AnnotationLiteral<Default> implements Default
 {
+    private static final String TOSTRING = "@javax.enterprise.inject.Default()";
+
     @Override
     public int hashCode()
     {
@@ -51,6 +53,6 @@ public class DefaultLiteral extends Anno
     public String toString()
     {
         // implemented for performance reasons
-        return "@javax.enterprise.inject.Default()";
+        return TOSTRING;
     }
 }



Mime
View raw message