baliuka 02/03/19 07:07:48
Modified: simplestore/src/java/org/apache/commons/simplestore/persistence/impl
PersistentProxy.java
Log:
Revision Changes Path
1.21 +3 -20
jakarta-commons-sandbox/simplestore/src/java/org/apache/commons/simplestore/persistence/impl/PersistentProxy.java
Index: PersistentProxy.java
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/simplestore/src/java/org/apache/commons/simplestore/persistence/impl/PersistentProxy.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- PersistentProxy.java 19 Mar 2002 15:03:57 -0000 1.20
+++ PersistentProxy.java 19 Mar 2002 15:07:48 -0000 1.21
@@ -77,14 +77,12 @@
* [EMAIL PROTECTED]</a>
*@author Gerhard Froehlich <a href="mailto:[EMAIL PROTECTED]">
* [EMAIL PROTECTED]</a>
- *@version $Id: PersistentProxy.java,v 1.20 2002/03/19 15:03:57 baliuka Exp $
+ *@version $Id: PersistentProxy.java,v 1.21 2002/03/19 15:07:48 baliuka Exp $
*/
public class PersistentProxy
implements MetaObject, org.apache.commons.simplestore.tools.Constants ,
MethodInterceptor,Cloneable, Serializable {
-
-
- private static Map DEFAULTS = new Hashtable();
+
private static Method HASH_CODE;
private static Method EQUALS;
private static Method TO_STRING;
@@ -343,14 +341,7 @@
return m_context.getStorage().
retrieveObject( method.getReturnType(),value );
}
- if ( value == null && method.getReturnType().isPrimitive() ){
-
- return DEFAULTS.get(method.getReturnType());
-
- }
- if( value == null ){
- return null;
- }
+
return value;
}
throw new java.lang.NoSuchMethodError("pure method invoked: " + method);
@@ -395,14 +386,6 @@
TO_STRING = Object.class.getMethod("toString", null);
EQUALS = Object.class.getMethod("equals", new Class[]{Object.class});
- DEFAULTS.put(byte.class, new Byte((byte) 0));
- DEFAULTS.put(short.class, new Short((short) 0));
- DEFAULTS.put(int.class, new Integer(0));
- DEFAULTS.put(long.class, new Long(0));
- DEFAULTS.put(float.class, new Float(0));
- DEFAULTS.put(double.class, new Double(0));
- DEFAULTS.put(char.class, new Character('\u0000'));
- DEFAULTS.put(boolean.class, new Boolean(false));
} catch (Exception e) {
e.printStackTrace();
throw new Error(e.getMessage());
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>