From 0061dd12cf76826460607a0edca2370059c671d9 Mon Sep 17 00:00:00 2001 From: adammurdoch Date: Fri, 1 Feb 2002 06:46:49 +0000 Subject: [PATCH] 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 --- .../components/configurer/DefaultObjectConfigurer.java | 4 +--- .../myrmidon/components/configurer/Resources.properties | 2 +- .../myrmidon/components/configurer/DefaultConfigurerTest.java | 4 +--- .../myrmidon/components/configurer/DefaultConfigurerTest.java | 4 +--- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultObjectConfigurer.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultObjectConfigurer.java index abd057da6..00d836eb4 100644 --- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultObjectConfigurer.java +++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultObjectConfigurer.java @@ -195,9 +195,7 @@ class DefaultObjectConfigurer // Both are string, or both are not string final String message = REZ.getString( "multiple-typed-adder-methods-for-element.error", - m_class.getName(), - type.getName(), - currentType.getName() ); + m_class.getName() ); throw new ConfigurationException( message ); } else if( currentType != String.class && type == String.class ) diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/Resources.properties b/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/Resources.properties index 746848141..a26083651 100644 --- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/Resources.properties +++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/Resources.properties @@ -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}. 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-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-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. diff --git a/proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/DefaultConfigurerTest.java b/proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/DefaultConfigurerTest.java index 5006b45d0..b2911e9f4 100644 --- a/proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/DefaultConfigurerTest.java +++ b/proposal/myrmidon/src/test/org/apache/myrmidon/components/configurer/DefaultConfigurerTest.java @@ -409,9 +409,7 @@ public class DefaultConfigurerTest catch( final ConfigurationException ce ) { 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 ); } } diff --git a/proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/DefaultConfigurerTest.java b/proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/DefaultConfigurerTest.java index 5006b45d0..b2911e9f4 100644 --- a/proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/DefaultConfigurerTest.java +++ b/proposal/myrmidon/src/testcases/org/apache/myrmidon/components/configurer/DefaultConfigurerTest.java @@ -409,9 +409,7 @@ public class DefaultConfigurerTest catch( final ConfigurationException ce ) { 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 ); } }