Re: svn commit: r686457 - in /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne: BaseContext.java access/DataContext.java

From: Kevin Menard (nirvdru..mail.com)
Date: Sat Aug 16 2008 - 08:49:07 EDT

  • Next message: Andrus Adamchik: "Re: svn commit: r686321 - in /cayenne/main/trunk: docs/doc/src/main/resources/ framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/ framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/"

    Good catch on the message in BaseContext. But, I intended for the message
    not to change in DataContext. Changing the message thrown is itself a
    backwards incompatible change. Perhaps someone has a logging tool that
    greps for that statement or worse, code that looks for it. In any event, I
    think it should still say DataContext from the deprecated method and
    ObjectContext from the new one.

    -- 
    Kevin
    

    > /** > * The most common implementation of ..ink ObjectContext}. DataContext is > an isolated > * container of an object graph, in a sense that any uncommitted changes to > persistent >.. -93,12 +126,7 @@ > *..eprecated since 3.0, replaced by > BaseContex#getThreadObjectContext(). > */ > public static DataContext getThreadDataContext() throws > IllegalStateException { > - try { > - return (DataContext) BaseContext.getThreadObjectContext(); > - } > - catch(final IllegalStateException ex) { > - throw new IllegalStateException("Current thread has no bound > DataContext."); > - } > + return (DataContext) BaseContext.getThreadObjectContext(); > } > > /** > > >



    This archive was generated by hypermail 2.0.0 : Sat Aug 16 2008 - 08:49:40 EDT