onami-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1422970 - /incubator/onami/trunk/lifecycle/src/main/java/org/apache/onami/lifecycle/AbstractLifeCycleModule.java
Date Mon, 17 Dec 2012 15:04:24 GMT
Author: simonetripodi
Date: Mon Dec 17 15:04:22 2012
New Revision: 1422970

URL: http://svn.apache.org/viewvc?rev=1422970&view=rev
Log:
[ONAMI-28] Do not use code from com.google.inject.internal - patch provided by Mikhail Mazursky

Modified:
    incubator/onami/trunk/lifecycle/src/main/java/org/apache/onami/lifecycle/AbstractLifeCycleModule.java

Modified: incubator/onami/trunk/lifecycle/src/main/java/org/apache/onami/lifecycle/AbstractLifeCycleModule.java
URL: http://svn.apache.org/viewvc/incubator/onami/trunk/lifecycle/src/main/java/org/apache/onami/lifecycle/AbstractLifeCycleModule.java?rev=1422970&r1=1422969&r2=1422970&view=diff
==============================================================================
--- incubator/onami/trunk/lifecycle/src/main/java/org/apache/onami/lifecycle/AbstractLifeCycleModule.java
(original)
+++ incubator/onami/trunk/lifecycle/src/main/java/org/apache/onami/lifecycle/AbstractLifeCycleModule.java
Mon Dec 17 15:04:22 2012
@@ -19,7 +19,6 @@ package org.apache.onami.lifecycle;
  * under the License.
  */
 
-import static com.google.inject.internal.util.$Preconditions.checkArgument;
 import static com.google.inject.matcher.Matchers.any;
 
 import java.lang.annotation.Annotation;
@@ -64,8 +63,14 @@ abstract class AbstractLifeCycleModule
     public <A extends Annotation> AbstractLifeCycleModule( Class<A> annotationType,
                                                            Matcher<Object> typeMatcher
)
     {
-        checkArgument( annotationType != null, "annotationType must be specified" );
-        checkArgument( typeMatcher != null, "typeMatcher must be specified" );
+        if ( annotationType == null )
+        {
+            throw new IllegalArgumentException( "annotationType must be specified" );
+        }
+        if ( typeMatcher == null )
+        {
+            throw new IllegalArgumentException( "typeMatcher must be specified" );
+        }
         this.annotationType = annotationType;
         this.typeMatcher = typeMatcher;
     }



Mime
View raw message