tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject cvs commit: jakarta-tapestry/web new.html
Date Fri, 25 Apr 2003 23:18:27 GMT
hlship      2003/04/25 16:18:27

  Modified:    junit/src/org/apache/tapestry/junit TestBindings.java
               framework/src/org/apache/tapestry/binding
                        AbstractBinding.java
               framework/src/org/apache/tapestry TapestryStrings.properties
               web      new.html
  Log:
  [ 19340 ] exception does not give class information
  
  Revision  Changes    Path
  1.5       +48 -20    jakarta-tapestry/junit/src/org/apache/tapestry/junit/TestBindings.java
  
  Index: TestBindings.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/junit/src/org/apache/tapestry/junit/TestBindings.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestBindings.java	17 Apr 2003 21:33:51 -0000	1.4
  +++ TestBindings.java	25 Apr 2003 23:18:27 -0000	1.5
  @@ -97,8 +97,8 @@
   
           private TestBinding(Object object)
           {
  -        	super(null);
  -        	
  +            super(null);
  +
               _object = object;
           }
   
  @@ -165,14 +165,22 @@
   
       public void testGetObject()
       {
  -        IBinding binding = new FieldBinding(_resolver, "org.apache.tapestry.junit.TestBindings.STRING_FIELD",
null);
  +        IBinding binding =
  +            new FieldBinding(
  +                _resolver,
  +                "org.apache.tapestry.junit.TestBindings.STRING_FIELD",
  +                null);
   
           assertEquals("Object", STRING_FIELD, binding.getObject());
       }
   
       public void testToString()
       {
  -        IBinding binding = new FieldBinding(_resolver, "org.apache.tapestry.junit.TestBindings.STRING_FIELD",
null);
  +        IBinding binding =
  +            new FieldBinding(
  +                _resolver,
  +                "org.apache.tapestry.junit.TestBindings.STRING_FIELD",
  +                null);
   
           assertEquals(
               "String value (before access)",
  @@ -215,7 +223,11 @@
   
       public void testMissingField()
       {
  -        IBinding binding = new FieldBinding(_resolver, "org.apache.tapestry.junit.TestBindings.MISSING_FIELD",
null);
  +        IBinding binding =
  +            new FieldBinding(
  +                _resolver,
  +                "org.apache.tapestry.junit.TestBindings.MISSING_FIELD",
  +                null);
   
           try
           {
  @@ -225,7 +237,9 @@
           }
           catch (BindingException ex)
           {
  -            checkException(ex, "Field org.apache.tapestry.junit.TestBindings.MISSING_FIELD
does not exist.");
  +            checkException(
  +                ex,
  +                "Field org.apache.tapestry.junit.TestBindings.MISSING_FIELD does not exist.");
   
               assertEquals("Binding", binding, ex.getBinding());
           }
  @@ -235,7 +249,11 @@
   
       public void testInstanceAccess()
       {
  -        IBinding binding = new FieldBinding(_resolver, "org.apache.tapestry.junit.TestBindings.INSTANCE_FIELD",
null);
  +        IBinding binding =
  +            new FieldBinding(
  +                _resolver,
  +                "org.apache.tapestry.junit.TestBindings.INSTANCE_FIELD",
  +                null);
   
           try
           {
  @@ -427,7 +445,10 @@
           }
           catch (BindingException ex)
           {
  -            checkException(ex, "Parameter foo (Hello) is not type java.lang.Number.");
  +            assertEquals(
  +                "Parameter foo (Hello) is an instance of java.lang.String, "
  +                    + "which does not inherit from java.lang.Number.",
  +                ex.getMessage());
   
               assertEquals("Binding", binding, ex.getBinding());
           }
  @@ -443,7 +464,10 @@
           }
           catch (BindingException ex)
           {
  -            checkException(ex, "Parameter bar (Goodbye) does not implement interface org.apache.tapestry.IRequestCycle.");
  +            assertEquals(
  +                "Parameter bar (Goodbye) is an instance of java.lang.String, which does
not "
  +                    + "implement interface org.apache.tapestry.IRequestCycle.",
  +                ex.getMessage());
   
               assertEquals("Binding", binding, ex.getBinding());
           }
  @@ -687,7 +711,9 @@
           }
           catch (BindingException ex)
           {
  -            checkException(ex, "Inappropriate invocation of getInt() on instance of ListenerBinding.");
  +            checkException(
  +                ex,
  +                "Inappropriate invocation of getInt() on instance of ListenerBinding.");
           }
       }
   
  @@ -705,7 +731,9 @@
           }
           catch (BindingException ex)
           {
  -            checkException(ex, "Inappropriate invocation of getDouble() on instance of
ListenerBinding.");
  +            checkException(
  +                ex,
  +                "Inappropriate invocation of getDouble() on instance of ListenerBinding.");
           }
       }
   
  @@ -717,16 +745,16 @@
   
           assertSame(b, b.getObject());
       }
  -    
  +
       /** @since 3.0 **/
  -    
  +
       public void testStringBinding()
       {
  -    	IComponent c = new MockPage();
  -    	
  -    	StringBinding b = new StringBinding(c, "foo", null);
  -    	
  -    	assertSame(c, b.getComponent());
  -    	assertEquals("foo", b.getKey());
  +        IComponent c = new MockPage();
  +
  +        StringBinding b = new StringBinding(c, "foo", null);
  +
  +        assertSame(c, b.getComponent());
  +        assertEquals("foo", b.getKey());
       }
   }
  
  
  
  1.6       +5 -2      jakarta-tapestry/framework/src/org/apache/tapestry/binding/AbstractBinding.java
  
  Index: AbstractBinding.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/org/apache/tapestry/binding/AbstractBinding.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AbstractBinding.java	21 Apr 2003 13:15:30 -0000	1.5
  +++ AbstractBinding.java	25 Apr 2003 23:18:27 -0000	1.6
  @@ -262,7 +262,10 @@
           String key =
               type.isInterface() ? "AbstractBinding.wrong-interface" : "AbstractBinding.wrong-type";
   
  -        String message = Tapestry.getString(key, parameterName, result, type.getName());
  +        String message =
  +            Tapestry.getString(
  +                key,
  +                new Object[] { parameterName, result, resultClass.getName(), type.getName()});
   
           throw new BindingException(message, this);
       }
  
  
  
  1.19      +3 -3      jakarta-tapestry/framework/src/org/apache/tapestry/TapestryStrings.properties
  
  Index: TapestryStrings.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/org/apache/tapestry/TapestryStrings.properties,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- TapestryStrings.properties	25 Apr 2003 01:18:33 -0000	1.18
  +++ TapestryStrings.properties	25 Apr 2003 23:18:27 -0000	1.19
  @@ -82,8 +82,8 @@
   
   # org.apache.tapestry.binding
   
  -AbstractBinding.wrong-type=Parameter {0} ({1}) is not type {2}.
  -AbstractBinding.wrong-interface=Parameter {0} ({1}) does not implement interface {2}.
  +AbstractBinding.wrong-type=Parameter {0} ({1}) is an instance of {2}, which does not inherit
from {3}.
  +AbstractBinding.wrong-interface=Parameter {0} ({1}) is an instance of {2}, which does not
implement interface {3}.
   AbstractBinding.read-only-binding=Binding value may not be updated.
   
   ExpressionBinding.unable-to-resolve-expression=Unable to resolve expression ''{0}'' for
{1}.
  
  
  
  1.162     +2 -1      jakarta-tapestry/web/new.html
  
  Index: new.html
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/web/new.html,v
  retrieving revision 1.161
  retrieving revision 1.162
  diff -u -r1.161 -r1.162
  --- new.html	25 Apr 2003 22:51:57 -0000	1.161
  +++ new.html	25 Apr 2003 23:18:27 -0000	1.162
  @@ -55,6 +55,7 @@
   [ 19153 ] Easier way to override validation messages  
   [ 19263 ] Change error message for null parameter 
   [ 18880 ] DatePicker broken under Mozilla  
  +[ 19340 ] exception does not give class information  
   </pre>
   
   <h3>Release 2.4-alpha-5</h3>
  
  
  

Mime
View raw message