Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 65440 invoked from network); 19 Mar 2002 16:16:23 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 19 Mar 2002 16:16:23 -0000 Received: (qmail 13515 invoked by uid 97); 19 Mar 2002 16:13:17 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@jakarta.apache.org Received: (qmail 13498 invoked by uid 97); 19 Mar 2002 16:13:17 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 21419 invoked by uid 97); 19 Mar 2002 15:07:50 -0000 Date: 19 Mar 2002 15:07:48 -0000 Message-ID: <20020319150748.53084.qmail@icarus.apache.org> From: baliuka@apache.org To: jakarta-commons-sandbox-cvs@apache.org Subject: cvs commit: jakarta-commons-sandbox/simplestore/src/java/org/apache/commons/simplestore/persistence/impl PersistentProxy.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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 @@ * baliuka@mwm.lt *@author Gerhard Froehlich * g-froehlich@gmx.de - *@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: For additional commands, e-mail: