Author: doogie
Date: Mon Mar 15 07:23:35 2010
New Revision: 923096
URL:
http://svn.apache.org/viewvc?rev=923096&view=revLog:
Remove not-needed NullConverter.
Modified:
ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/Converters.java
Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/Converters.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/Converters.java?rev=923096&r1=923095&r2=923096&view=diff==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/Converters.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/Converters.java Mon Mar 15 07:23:35 2010
@@ -41,8 +41,6 @@ public class Converters {
* source object.
*
*/
- public static final Converter<Object, Object> nullConverter = new NullConverter();
-
static {
converterMap.setShared(true);
registerCreator(new PassThruConverterCreator());
@@ -191,39 +189,6 @@ OUTER:
}
}
- /** Null converter used when the source and target java object
- * types are the same. The <code>convert</code> method returns the
- * source object.
- *
- */
- protected static class NullConverter implements Converter<Object, Object> {
- public NullConverter() {
- }
-
- public boolean canConvert(Class<?> sourceClass, Class<?> targetClass) {
- if (sourceClass.getName().equals(targetClass.getName()) || "java.lang.Object".equals(targetClass.getName())) {
- return true;
- }
- return ObjectType.instanceOf(sourceClass, targetClass);
- }
-
- public Object convert(Object obj) throws ConversionException {
- return obj;
- }
-
- public Object convert(Class<? extends Object> targetClass, Object obj) throws ConversionException {
- return obj;
- }
-
- public Class<?> getSourceClass() {
- return Object.class;
- }
-
- public Class<?> getTargetClass() {
- return Object.class;
- }
- }
-
protected static class PassThruConverterCreator implements ConverterCreator{
protected PassThruConverterCreator() {
}