onami-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From as...@apache.org
Subject svn commit: r1606435 - /onami/trunk/lifecycle/core/src/main/java/org/apache/onami/lifecycle/core/AbstractMethodTypeListener.java
Date Sun, 29 Jun 2014 06:38:00 GMT
Author: ash2k
Date: Sun Jun 29 06:38:00 2014
New Revision: 1606435

URL: http://svn.apache.org/r1606435
Log:
Fix possible NPE

Modified:
    onami/trunk/lifecycle/core/src/main/java/org/apache/onami/lifecycle/core/AbstractMethodTypeListener.java

Modified: onami/trunk/lifecycle/core/src/main/java/org/apache/onami/lifecycle/core/AbstractMethodTypeListener.java
URL: http://svn.apache.org/viewvc/onami/trunk/lifecycle/core/src/main/java/org/apache/onami/lifecycle/core/AbstractMethodTypeListener.java?rev=1606435&r1=1606434&r2=1606435&view=diff
==============================================================================
--- onami/trunk/lifecycle/core/src/main/java/org/apache/onami/lifecycle/core/AbstractMethodTypeListener.java
(original)
+++ onami/trunk/lifecycle/core/src/main/java/org/apache/onami/lifecycle/core/AbstractMethodTypeListener.java
Sun Jun 29 06:38:00 2014
@@ -72,7 +72,8 @@ abstract class AbstractMethodTypeListene
      */
     private <I> void hear( final TypeLiteral<I> parentType, Class<? super
I> klass, TypeEncounter<I> encounter )
     {
-        if ( klass == null || klass.getPackage().getName().startsWith( JAVA_PACKAGE ) )
+        Package pkg;
+        if ( klass == null || ( ( pkg = klass.getPackage() ) != null && pkg.getName().startsWith(
JAVA_PACKAGE ) ) )
         {
             return;
         }



Mime
View raw message