openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1682377 - in /openwebbeans/trunk: webbeans-impl/src/main/java/org/apache/webbeans/proxy/ webbeans-impl/src/main/java/org/apache/webbeans/util/ webbeans-web/src/main/java/org/apache/webbeans/web/context/
Date Fri, 29 May 2015 07:10:21 GMT
Author: struberg
Date: Fri May 29 07:10:20 2015
New Revision: 1682377

URL: http://svn.apache.org/r1682377
Log:
OWB-989 avoid empty if blocks

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/SubclassProxyFactory.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java
    openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/SubclassProxyFactory.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/SubclassProxyFactory.java?rev=1682377&r1=1682376&r2=1682377&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/SubclassProxyFactory.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/SubclassProxyFactory.java
Fri May 29 07:10:20 2015
@@ -247,11 +247,7 @@ public class SubclassProxyFactory extend
 
             // and finally invoke the target method on the provided Contextual Instance
             final Type declaringClass = Type.getType(delegatedMethod.getDeclaringClass());
-            if (abstractMethod)
-            {
-                // generate an empty return block
-            }
-            else
+            if (!abstractMethod)
             {
                 // invoke the method on the super class;
                 mv.visitMethodInsn(Opcodes.INVOKESPECIAL, declaringClass.getInternalName(),
delegatedMethod.getName(), methodDescriptor, false);

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java?rev=1682377&r1=1682376&r2=1682377&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java
Fri May 29 07:10:20 2015
@@ -365,11 +365,7 @@ public final class ClassUtil
             }
             else
             {
-                if (isOverridden(methods, method))
-                {
-                    // method is overridden in superclass, so do nothing
-                }
-                else
+                if (!isOverridden(methods, method))
                 {
                     // method is not overridden, so add it
                     methods.add(method);

Modified: openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java?rev=1682377&r1=1682376&r2=1682377&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java
(original)
+++ openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java
Fri May 29 07:10:20 2015
@@ -237,6 +237,7 @@ public class WebContextsService extends
         else if(scopeType.equals(Dependent.class))
         {
             //Do nothing
+            return;
         }
         else if (scopeType.equals(Singleton.class))
         {
@@ -320,6 +321,7 @@ public class WebContextsService extends
         else if (scopeType.equals(Dependent.class))
         {
             //Do nothing
+            return;
         }
         else if (scopeType.equals(Singleton.class))
         {



Mime
View raw message