Author: dallen6
Date: 2009-11-30 11:46:51 -0500 (Mon, 30 Nov 2009)
New Revision: 5178
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/util/Reflections.java
Log:
Fixed problem with NoSuchMethodException
Modified: core/trunk/impl/src/main/java/org/jboss/weld/util/Reflections.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/util/Reflections.java 2009-11-30 15:42:09
UTC (rev 5177)
+++ core/trunk/impl/src/main/java/org/jboss/weld/util/Reflections.java 2009-11-30 16:46:51
UTC (rev 5178)
@@ -57,6 +57,8 @@
import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLogger.Level;
+import ch.qos.cal10n.IMessageConveyor;
+
/**
* Utility class for static reflection-type operations
*
@@ -69,6 +71,9 @@
private static final LocLogger log = loggerFactory().getLogger(UTIL);
private static final XLogger xLog = loggerFactory().getXLogger(UTIL);
+ // Exception messages
+ private static final IMessageConveyor messageConveyer =
loggerFactory().getMessageConveyor();
+
public static final Type[] EMPTY_TYPES = {};
public static final Annotation[] EMPTY_ANNOTATIONS = {};
@@ -563,7 +568,7 @@
{
throw new WeldException(ERROR_INVOKING_METHOD, e, methodName,
instance.getClass());
}
- catch (NoSuchMethodException e)
+ catch (java.lang.NoSuchMethodException e)
{
throw new WeldException(ERROR_INVOKING_METHOD, e, methodName,
instance.getClass());
}
@@ -670,7 +675,7 @@
// Expected, nothing to see here.
}
}
- throw new WeldException(NO_SUCH_METHOD, methodName +
Arrays.asList(parameterTypes).toString().replace("[",
"(").replace("]", ")"), c.getName());
+ throw new NoSuchMethodException(messageConveyer.getMessage(NO_SUCH_METHOD,
methodName + Arrays.asList(parameterTypes).toString().replace("[",
"(").replace("]", ")"), c.getName()));
}
/**