Browse Source

Got rid of some detail from an error message, so that the mesage

is independent of the method introspection order.  This is to get
the unit tests to pass with the IBM JVM.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271031 13f79535-47bb-0310-9956-ffa450edef68
master
adammurdoch 23 years ago
parent
commit
0061dd12cf
4 changed files with 4 additions and 10 deletions
  1. +1
    -3
      proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultObjectConfigurer.java
  2. +1
    -1
      proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/Resources.properties
  3. +1
    -3
      proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/DefaultConfigurerTest.java
  4. +1
    -3
      proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/DefaultConfigurerTest.java

+ 1
- 3
proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultObjectConfigurer.java View File

@@ -195,9 +195,7 @@ class DefaultObjectConfigurer
// Both are string, or both are not string // Both are string, or both are not string
final String message = final String message =
REZ.getString( "multiple-typed-adder-methods-for-element.error", REZ.getString( "multiple-typed-adder-methods-for-element.error",
m_class.getName(),
type.getName(),
currentType.getName() );
m_class.getName() );
throw new ConfigurationException( message ); throw new ConfigurationException( message );
} }
else if( currentType != String.class && type == String.class ) else if( currentType != String.class && type == String.class )


+ 1
- 1
proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/Resources.properties View File

@@ -4,7 +4,7 @@ get-ref.error=Could not locate reference "{0}".
mismatch-ref-types.error=Mismatched type for reference "{0}". Was expecting an object of type {1}, instead found an object of type {2}. mismatch-ref-types.error=Mismatched type for reference "{0}". Was expecting an object of type {1}, instead found an object of type {2}.
incompatible-element-types.error=Incompatible creator and adder/setter methods found in class {0} for property "{1}". incompatible-element-types.error=Incompatible creator and adder/setter methods found in class {0} for property "{1}".
multiple-adder-methods-for-element.error=Multiple adder/setter methods found in class {0} for property "{1}". multiple-adder-methods-for-element.error=Multiple adder/setter methods found in class {0} for property "{1}".
multiple-typed-adder-methods-for-element.error=Multiple typed add() methods found in class {0} that accept different types {1} and {2}.
multiple-typed-adder-methods-for-element.error=Multiple typed add() methods found in class {0}.
multiple-creator-methods-for-element.error=Multiple creator methods found in class {0} for property "{1}". multiple-creator-methods-for-element.error=Multiple creator methods found in class {0} for property "{1}".
multiple-content-setter-methods.error=Multiple content setter methods found in class {0}. multiple-content-setter-methods.error=Multiple content setter methods found in class {0}.
pending-property-value.error=An object created using the creator method has not been set using the adder/setter method. pending-property-value.error=An object created using the creator method has not been set using the adder/setter method.


+ 1
- 3
proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/DefaultConfigurerTest.java View File

@@ -409,9 +409,7 @@ public class DefaultConfigurerTest
catch( final ConfigurationException ce ) catch( final ConfigurationException ce )
{ {
final String message = REZ.getString( "multiple-typed-adder-methods-for-element.error", final String message = REZ.getString( "multiple-typed-adder-methods-for-element.error",
ConfigTest5.class.getName(),
MyRole1.class.getName(),
MyRole2.class.getName() );
ConfigTest5.class.getName() );
assertSameMessage( message, ce ); assertSameMessage( message, ce );
} }
} }


+ 1
- 3
proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/DefaultConfigurerTest.java View File

@@ -409,9 +409,7 @@ public class DefaultConfigurerTest
catch( final ConfigurationException ce ) catch( final ConfigurationException ce )
{ {
final String message = REZ.getString( "multiple-typed-adder-methods-for-element.error", final String message = REZ.getString( "multiple-typed-adder-methods-for-element.error",
ConfigTest5.class.getName(),
MyRole1.class.getName(),
MyRole2.class.getName() );
ConfigTest5.class.getName() );
assertSameMessage( message, ce ); assertSameMessage( message, ce );
} }
} }


Loading…
Cancel
Save