db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mka...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker Identity.java
Date Tue, 15 Mar 2005 06:06:33 GMT
mkalen      2005/03/14 22:06:33

  Modified:    src/java/org/apache/ojb/broker Tag: OJB_1_0_RELEASE
                        Identity.java
  Log:
  Add missing throw of createException.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.36.2.7  +8 -11     db-ojb/src/java/org/apache/ojb/broker/Identity.java
  
  Index: Identity.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/Identity.java,v
  retrieving revision 1.36.2.6
  retrieving revision 1.36.2.7
  diff -u -r1.36.2.6 -r1.36.2.7
  --- Identity.java	13 Mar 2005 03:50:48 -0000	1.36.2.6
  +++ Identity.java	15 Mar 2005 06:06:33 -0000	1.36.2.7
  @@ -152,9 +152,9 @@
                       // conversion is done when binding the sql-statement
                       BrokerHelper helper = targetBroker.serviceBrokerHelper();
                       ValueContainer[] pkValues = helper.getKeyValues(cld, objectToIdentify,
false);
  -                    if(pkValues == null || pkValues.length == 0)
  +                    if (pkValues == null || pkValues.length == 0)
                       {
  -                        createException("Can't extract PK value fields", objectToIdentify,
null);
  +                        throw createException("Can't extract PK value fields", objectToIdentify,
null);
                       }
                       m_pkValues = helper.extractValueArray(pkValues);
                   }
  @@ -162,16 +162,13 @@
   
               checkForPrimaryKeys(objectToIdentify);
           }
  +        catch (ClassNotPersistenceCapableException e)
  +        {
  +            throw e;
  +        }
           catch (Exception e)
           {
  -            if(e instanceof ClassNotPersistenceCapableException)
  -            {
  -                throw (ClassNotPersistenceCapableException) e;
  -            }
  -            else
  -            {
  -                throw createException("Can not init Identity for given object.", objectToIdentify,
e);
  -            }
  +            throw createException("Can not init Identity for given object.", objectToIdentify,
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