commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adri...@apache.org
Subject svn commit: r922493 - /commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/Converters.java
Date Sat, 13 Mar 2010 07:43:14 GMT
Author: adrianc
Date: Sat Mar 13 07:43:14 2010
New Revision: 922493

URL: http://svn.apache.org/viewvc?rev=922493&view=rev
Log:
Removed/replaced OFBiz debug code.

Modified:
    commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/Converters.java

Modified: commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/Converters.java
URL: http://svn.apache.org/viewvc/commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/Converters.java?rev=922493&r1=922492&r2=922493&view=diff
==============================================================================
--- commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/Converters.java (original)
+++ commons/sandbox/convert/trunk/src/java/org/apache/commons/convert/Converters.java Sat
Mar 13 07:43:14 2010
@@ -43,7 +43,7 @@ public class Converters {
                 ConverterLoader converterLoader = converterLoaders.next();
                 converterLoader.loadConverters();
             } catch (Exception e) {
-//                Debug.logError(e, module);
+                e.printStackTrace();
             }
         }
     }
@@ -67,9 +67,6 @@ public class Converters {
      */
     public static <S, T> Converter<S, T> getConverter(Class<S> sourceClass,
Class<T> targetClass) throws ClassNotFoundException {
         String key = sourceClass.getName().concat(DELIMITER).concat(targetClass.getName());
-//        if (Debug.verboseOn()) {
-//            Debug.logVerbose("Getting converter: " + key, module);
-//        }
 OUTER:
         do {
             Converter<?, ?> result = converterMap.get(key);
@@ -92,14 +89,7 @@ OUTER:
                     continue OUTER;
                 }
             }
-            if (noConversions.add(key)) {
-                /*
-                Debug.logWarning("*** No converter found, converting from " +
-                        sourceClass.getName() + " to " + targetClass.getName() +
-                        ". Please report this message to the developer community so " +
-                        "a suitable converter can be created. ***", module);
-                */
-            }
+            noConversions.add(key);
             throw new ClassNotFoundException("No converter found for " + key);
         } while (true);
     }
@@ -133,7 +123,7 @@ OUTER:
                     }
                 }
             } catch (Exception e) {
-//                Debug.logError(e, module);
+                e.printStackTrace();
             }
         }
     }
@@ -176,11 +166,7 @@ OUTER:
             sb.append("<null>");
         }
         String key = sb.toString();
-        if (converterMap.putIfAbsent(key, converter) == null) {
-//            if (Debug.verboseOn()) {
-//                Debug.logVerbose("Registered converter " + converter.getClass().getName(),
module);
-//            }
-        }
+        converterMap.putIfAbsent(key, converter);
     }
 
     protected static class PassThruConverterCreator implements ConverterCreator{



Mime
View raw message