[jira] Resolved: (JDO-499) JDOImplHelper should catch exceptions in
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache JDO Project > [jira] Resolved: (JDO-499) JDOImplHelper should catch exceptions in




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    [jira] Resolved: (JDO-499) JDOImplHelper should catch exceptions in  
Craig Russell (JIRA)


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-06-07 12:11 AM


[ https://issues.apache.org/jira/brow...ls:all-tabpanel ]

Craig Russell resolved JDO-499.
-------------------------------

Resolution: Fixed

Changes have been checked in.

> JDOImplHelper should catch exceptions in nonBinaryCompatibleGet and nonBin
aryCompatibleIs
> --------------------------------------------------------------------------
---------------
>
>                 Key: JDO-499
>                 URL: https://issues.apache.org/jira/browse/JDO-499
>             Project: JDO
>          Issue Type: Bug
>          Components: api2, api2-legacy
>    Affects Versions: JDO 2 final
>            Reporter: Craig Russell
>            Assignee: Craig Russell
>            Priority: Minor
>             Fix For: JDO 2 maintenance release 1
>
>         Attachments: jdo-499.patch
>
>
> The code to perform non-binary-compatible state tests should catch and ign
ore exceptions thrown from registered implementations. This would protect us
ers from errant implementations.
> For example, the following returns the appropriate result if an implementa
tion (not the implementation responsible for the instance) throws an excepti
on.
>     /**
>      * Return an object associated with a non-binary-compatible instance.
>      * Delegate to all registered StateInterrogation instances until
>      * one of them handles the call (returns a non-null answer).
>      * The caller provides the stateless "method object" that does
>      * the actual call to the StateInterrogation instance.
>      * @param pc the instance whose associated object is needed
>      * @param sibr the method object that delegates to the
>      * non-binary-compatible implementation
>      * @return the associated object or null if the implementation does no
t
>      * manage the class of the instance
>      */
>     public Object nonBinaryCompatibleGet(Object pc,
>             StateInterrogationObjectReturn sibr) {
>         Iterator sit = getStateInterrogationIterator();
>         while (sit.hasNext()) {
>             try {
>                 StateInterrogation si = (StateInterrogation)sit.next();
>                 Object result = sibr.get(pc, si);
>                 if (result != null) return result;
>             } catch (Throwable t) {
>                 // ignore exceptions thrown by non-binary-compatible impls
>             }
>         }
>         return null;
>     }
>

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 07:12 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register