ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ami...@apache.org
Subject svn commit: r583125 - /webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
Date Tue, 09 Oct 2007 12:16:23 GMT
Author: amilas
Date: Tue Oct  9 05:16:23 2007
New Revision: 583125

URL: http://svn.apache.org/viewvc?rev=583125&view=rev
Log:
remove the unnecessary check statement

Modified:
    webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java?rev=583125&r1=583124&r2=583125&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
(original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
Tue Oct  9 05:16:23 2007
@@ -1099,25 +1099,16 @@
     public static Object getObjectForClass(Class clazz, String value) {
         //first see whether this class has a constructor that can
         //take the string as an argument.
-        boolean continueFlag = false;
         try {
             Constructor stringConstructor = clazz.getConstructor(new Class[] { String.class
});
             return stringConstructor.newInstance(new Object[] { value });
         } catch (NoSuchMethodException e) {
             //oops - no such constructors - continue with the
             //parse method
-            continueFlag = true;
         } catch (Exception e) {
             throw new ObjectConversionException(
                     ADBMessages.getMessage("converter.cannotGenerate",
-                                           clazz.getName()),
-                    e);
-        }
-
-        if (!continueFlag) {
-            throw new ObjectConversionException(
-                    ADBMessages.getMessage("converter.cannotConvert",
-                                           clazz.getName()));
+                                           clazz.getName()), e);
         }
 
         try {



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message