db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/metadata/fieldaccess PersistentFieldDirectAccessImpl.java
Date Wed, 20 Aug 2003 19:40:13 GMT
brj         2003/08/20 12:40:13

  Modified:    src/java/org/apache/ojb/broker/metadata/fieldaccess
                        PersistentFieldDirectAccessImpl.java
  Log:
  some style fixes
  
  Revision  Changes    Path
  1.5       +13 -13    db-ojb/src/java/org/apache/ojb/broker/metadata/fieldaccess/PersistentFieldDirectAccessImpl.java
  
  Index: PersistentFieldDirectAccessImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/metadata/fieldaccess/PersistentFieldDirectAccessImpl.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- PersistentFieldDirectAccessImpl.java	11 Jul 2003 07:54:21 -0000	1.4
  +++ PersistentFieldDirectAccessImpl.java	20 Aug 2003 19:40:13 -0000	1.5
  @@ -94,8 +94,8 @@
        */
       public void doSet(Object obj, Object value) throws MetadataException
       {
  -        Field field = getField();
  -        Class type = field.getType();
  +        Field fld = getField();
  +        Class type = fld.getType();
           try
           {
               /**
  @@ -106,24 +106,24 @@
               // thanks to Tomasz Wysocki for this trick
               if ((value != null) || !type.isPrimitive())
               {
  -                field.set(ProxyHelper.getRealObject(obj), value);
  +                fld.set(ProxyHelper.getRealObject(obj), value);
               }
           }
           catch (NullPointerException ignored)
           {
  -            getLog().info("Value for field " + (field != null ? field.getName() : null)
+
  +            getLog().info("Value for field " + (fld != null ? fld.getName() : null) +
                       " of type " + type.getName() + " is null. Can't write into null.",
ignored);
           }
           catch (IllegalAccessException e)
           {
  -            getLog().error("while set field: " + BrokerHelper.buildMessageString(obj, value,
field));
  +            getLog().error("while set field: " + BrokerHelper.buildMessageString(obj, value,
fld));
               throw new MetadataException("IllegalAccess error setting field:" +
  -                    (field != null ? field.getName() : null) + " in object:" + obj.getClass().getName(),
e);
  +                    (fld != null ? fld.getName() : null) + " in object:" + obj.getClass().getName(),
e);
           }
           catch (Exception e)
           {
  -            getLog().error("while set field: " + BrokerHelper.buildMessageString(obj, value,
field), e);
  -            throw new MetadataException("Error setting field:" + (field != null ? field.getName()
: null) +
  +            getLog().error("while set field: " + BrokerHelper.buildMessageString(obj, value,
fld), e);
  +            throw new MetadataException("Error setting field:" + (fld != null ? fld.getName()
: null) +
                       " in object:" + obj.getClass().getName(), e);
           }
       }
  @@ -138,22 +138,22 @@
        */
       public Object doGet(Object obj) throws MetadataException
       {
  -        Field field = getField();
  +        Field fld = getField();
           try
           {
  -            Object result = field.get(ProxyHelper.getRealObject(obj));
  +            Object result = fld.get(ProxyHelper.getRealObject(obj));
               return result;
           }
           catch (IllegalAccessException e)
           {
               throw new MetadataException(
                       "IllegalAccess error getting field:" +
  -                    (field != null ? field.getName() : null) + " in object:" + obj.getClass().getName(),
e);
  +                    (fld != null ? fld.getName() : null) + " in object:" + obj.getClass().getName(),
e);
           }
           catch (Throwable e)
           {
               throw new MetadataException("Error getting field:" +
  -                    (field != null ? field.getName() : null) + " in object:" + obj.getClass().getName(),
e);
  +                    (fld != null ? fld.getName() : null) + " in object:" + obj.getClass().getName(),
e);
           }
       }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message