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/util ProxyHelper.java
Date Sat, 08 Nov 2003 17:33:02 GMT
brj         2003/11/08 09:33:02

  Modified:    src/java/org/apache/ojb/broker/util ProxyHelper.java
  Log:
  catch ClassCastException as proposed by Justis Peters
  
  Revision  Changes    Path
  1.18      +6 -1      db-ojb/src/java/org/apache/ojb/broker/util/ProxyHelper.java
  
  Index: ProxyHelper.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/ProxyHelper.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- ProxyHelper.java	2 Nov 2003 14:38:30 -0000	1.17
  +++ ProxyHelper.java	8 Nov 2003 17:33:02 -0000	1.18
  @@ -152,6 +152,11 @@
                   handler = (IndirectionHandler) Proxy.getInvocationHandler(objectOrProxy);
                   return handler.getRealSubject();
               }
  +            catch (ClassCastException e)
  +            {
  +                log.error("The InvocationHandler for the provided Proxy was not an instance
of org.apache.ojb.broker.accesslayer.IndirectionHandler.");
  +                throw new PersistenceBrokerException("The InvocationHandler for the provided
Proxy was not an instance of org.apache.ojb.broker.accesslayer.IndirectionHandler.", e);
  +            }
               catch (IllegalArgumentException e)
               {
                   log.error("Could not retrieve real object for given Proxy: "+objectOrProxy);
  
  
  

---------------------------------------------------------------------
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