[Mulgara-svn] r486 - branches/nw-interface/src/jar/util/java/org/mulgara/util

pag at mulgara.org pag at mulgara.org
Thu Oct 18 22:05:34 UTC 2007


Author: pag
Date: 2007-10-18 17:05:32 -0500 (Thu, 18 Oct 2007)
New Revision: 486

Modified:
   branches/nw-interface/src/jar/util/java/org/mulgara/util/Reflect.java
Log:
Reduced some of the debug statements from the exception message.

Modified: branches/nw-interface/src/jar/util/java/org/mulgara/util/Reflect.java
===================================================================
--- branches/nw-interface/src/jar/util/java/org/mulgara/util/Reflect.java	2007-10-18 22:01:40 UTC (rev 485)
+++ branches/nw-interface/src/jar/util/java/org/mulgara/util/Reflect.java	2007-10-18 22:05:32 UTC (rev 486)
@@ -37,7 +37,7 @@
     } catch (SecurityException e) {
       throw new RuntimeException("Not permitted to create " + clazz.getName(), e);
     } catch (NoSuchMethodException e) {
-      throw new RuntimeException("No constructor of the requested form: " + clazz.getName() + "\n" + fullLog(clazz, e, args), e);
+      throw new RuntimeException("No constructor of the requested form: " + clazz.getName() + argList(args), e);
     } catch (IllegalArgumentException e) {
       throw new RuntimeException("Bad arguments supplied to constructor for: " + clazz.getName(), e);
     } catch (InstantiationException e) {
@@ -170,13 +170,14 @@
 
   /**
    * Debug only method for printing out the complete stack trace and attempts at
-   * finding a constructor, when getConstructor fails.
+   * finding a constructor, when getConstructor fails with a {@link NoSuchMethodException}.
    * @param clazz The class that a constructor was searched for in.
    * @param e The exception that required this log.
    * @param args The arguments used to find the constructor.
    * @return A string with all the available details coming from the failure to find
    * the constructor.
    */
+  @SuppressWarnings("unused")
   private static String fullLog(Class<?> clazz, Throwable e, Object[] args) {
     String result = argList(args) + "[" + e.getMessage() + "]\n" + StringUtil.strackTraceToString(e);
     result += "Available constructors:\n";




More information about the Mulgara-svn mailing list