openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1072776 - in /openwebbeans/trunk: samples/guess/src/main/java/org/apache/webbeans/sample/guess/ webbeans-impl/src/main/java/org/apache/webbeans/inject/impl/ webbeans-web/src/main/java/org/apache/webbeans/web/failover/
Date Sun, 20 Feb 2011 22:20:46 GMT
Author: struberg
Date: Sun Feb 20 22:20:46 2011
New Revision: 1072776

URL: http://svn.apache.org/viewvc?rev=1072776&view=rev
Log:
OWB-461 use valueOf instead of 'new' and remove an unused private method

Modified:
    openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/guess/NumberProducer.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/impl/InjectionPointImpl.java
    openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/failover/DefaultOwbFailOverService.java

Modified: openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/guess/NumberProducer.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/guess/NumberProducer.java?rev=1072776&r1=1072775&r2=1072776&view=diff
==============================================================================
--- openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/guess/NumberProducer.java
(original)
+++ openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/guess/NumberProducer.java
Sun Feb 20 22:20:46 2011
@@ -41,7 +41,7 @@ public class NumberProducer implements S
    @NextNumber
    public Integer next()
    { 
-      return new Integer(new java.util.Random().nextInt(101)); 
+      return Integer.valueOf(new java.util.Random().nextInt(101));
    }
    
    @Produces 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/impl/InjectionPointImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/impl/InjectionPointImpl.java?rev=1072776&r1=1072775&r2=1072776&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/impl/InjectionPointImpl.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/impl/InjectionPointImpl.java
Sun Feb 20 22:20:46 2011
@@ -140,12 +140,12 @@ class InjectionPointImpl implements Inje
         Set<Annotation> qualifiers = this.ownerBean.getQualifiers();
         for(Annotation qualifier : qualifiers)
         {
-            out.writeObject(new Character('-')); // throw-away delimiter so alternating annotations
don't get swallowed in the read.
+            out.writeObject(Character.valueOf('-')); // throw-away delimiter so alternating
annotations don't get swallowed in the read.
             out.writeObject(qualifier);
             
         }
         
-        out.writeObject(new Character('~'));
+        out.writeObject(Character.valueOf('~'));
         
         if(this.injectionMember instanceof Field)
         {
@@ -211,7 +211,7 @@ class InjectionPointImpl implements Inje
         WebBeansContext webBeansContext = WebBeansContext.currentInstance();
         AnnotatedElementFactory annotatedElementFactory = webBeansContext.getAnnotatedElementFactory();
 
-        while(!in.readObject().equals(new Character('~')))   // read throw-away '-' or '~'
terminal delimiter.
+        while(!in.readObject().equals(Character.valueOf('~')))   // read throw-away '-' or
'~' terminal delimiter.
         {
             Annotation ann = (Annotation) in.readObject();  // now read the annotation.
             anns.add(ann);

Modified: openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/failover/DefaultOwbFailOverService.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/failover/DefaultOwbFailOverService.java?rev=1072776&r1=1072775&r2=1072776&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/failover/DefaultOwbFailOverService.java
(original)
+++ openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/failover/DefaultOwbFailOverService.java
Sun Feb 20 22:20:46 2011
@@ -241,14 +241,7 @@ public class DefaultOwbFailOverService i
         }
         return NOT_HANDLED;
     }
-    
-    private static void verifyTest(FailOverBagWrapper bagWrapper) 
-    {        //test code
-        byte[] bytes = getBytes(bagWrapper);
-        FailOverBagWrapper bagWrapper3 = (FailOverBagWrapper)getObject(bytes);
-        System.out.println(bagWrapper3);
-    }
-    
+
     private static byte[] getBytes(Object obj) 
     {
         ByteArrayOutputStream baos = null;



Mime
View raw message