You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by do...@apache.org on 2002/11/10 04:00:09 UTC

cvs commit: jakarta-avalon/src/java/org/apache/avalon/framework/context DefaultContext.java

donaldp     2002/11/09 19:00:09

  Modified:    src/java/org/apache/avalon/framework/context
                        DefaultContext.java
  Log:
  extract message
  
  Revision  Changes    Path
  1.20      +8 -3      jakarta-avalon/src/java/org/apache/avalon/framework/context/DefaultContext.java
  
  Index: DefaultContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon/src/java/org/apache/avalon/framework/context/DefaultContext.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- DefaultContext.java	7 Nov 2002 08:35:28 -0000	1.19
  +++ DefaultContext.java	10 Nov 2002 03:00:09 -0000	1.20
  @@ -139,7 +139,8 @@
               if( data instanceof Hidden )
               {
                   // Always fail.
  -                throw new ContextException( "Unable to locate " + key );
  +                final String message = "Unable to locate " + key;
  +                throw new ContextException( message );
               }
   
               if( data instanceof Resolvable )
  @@ -154,7 +155,9 @@
           if( null == m_parent )
           {
               // There was no parent, and no data
  -            throw new ContextException( "Unable to resolve context key: " + key );
  +            final String message =
  +                "Unable to resolve context key: " + key;
  +            throw new ContextException( message );
           }
   
           return m_parent.get( key );
  @@ -237,7 +240,9 @@
       {
           if( m_readOnly )
           {
  -            throw new IllegalStateException( "Context is read only and can not be modified" );
  +            final String message =
  +                "Context is read only and can not be modified";
  +            throw new IllegalStateException( message );
           }
       }
   }
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>