commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bali...@apache.org
Subject cvs commit: jakarta-commons-sandbox/simplestore/src/java/org/apache/commons/simplestore/persistence/impl PersistentProxy.java
Date Tue, 19 Mar 2002 15:07:48 GMT
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</a>
    *@author     Gerhard Froehlich <a href="mailto:g-froehlich@gmx.de">
    *      g-froehlich@gmx.de</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:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message