You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@onami.apache.org by si...@apache.org on 2012/12/17 16:04:24 UTC

svn commit: r1422970 - /incubator/onami/trunk/lifecycle/src/main/java/org/apache/onami/lifecycle/AbstractLifeCycleModule.java

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;
     }