commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dflo...@apache.org
Subject svn commit: r154823 - in jakarta/commons/sandbox/contract/trunk/src: examples/org/apache/commons/contract/example/ java/org/apache/commons/contract/ java/org/apache/commons/contract/constraints/ java/org/apache/commons/contract/descriptor/ java/org/apache/commons/contract/i18n/ java/org/apache/commons/contract/store/ java/org/apache/commons/contract/util/
Date Tue, 22 Feb 2005 10:06:17 GMT
Author: dflorey
Date: Tue Feb 22 02:06:08 2005
New Revision: 154823

URL: http://svn.apache.org/viewcvs?view=rev&rev=154823
Log:
Migration to current i18n-snapshot

Added:
    jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/i18n/ParameterBundle.java
      - copied, changed from r149259, jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/i18n/ParameterMessage.java
Removed:
    jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/i18n/ParameterMessage.java
Modified:
    jakarta/commons/sandbox/contract/trunk/src/examples/org/apache/commons/contract/example/LoginProcessor.java
    jakarta/commons/sandbox/contract/trunk/src/examples/org/apache/commons/contract/example/SpeedCalculator.java
    jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/ContractViolationException.java
    jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/EnvironmentConsumer.java
    jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/EnvironmentProvider.java
    jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/Executor.java
    jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/Information.java
    jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/StoreException.java
    jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/ArrayConstraints.java
    jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/BooleanConstraints.java
    jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/CastException.java
    jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/Constraints.java
    jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/DateConstraints.java
    jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/ListConstraints.java
    jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/LocaleConstraints.java
    jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/MapConstraints.java
    jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/NumberConstraints.java
    jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/StringConstraints.java
    jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/TreeConstraints.java
    jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/Unconstrained.java
    jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/ValidationException.java
    jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/descriptor/Descriptor.java
    jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/descriptor/ParameterDescriptor.java
    jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/descriptor/ProvidedEnvironmentDescriptor.java
    jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/descriptor/RequiredEnvironmentDescriptor.java
    jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/descriptor/ResultEntryDescriptor.java
    jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/descriptor/StateDescriptor.java
    jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/store/Environment.java
    jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/util/InteractiveMainWrapper.java
    jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/util/MainWrapper.java

Modified: jakarta/commons/sandbox/contract/trunk/src/examples/org/apache/commons/contract/example/LoginProcessor.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/contract/trunk/src/examples/org/apache/commons/contract/example/LoginProcessor.java?view=diff&r1=154822&r2=154823
==============================================================================
--- jakarta/commons/sandbox/contract/trunk/src/examples/org/apache/commons/contract/example/LoginProcessor.java (original)
+++ jakarta/commons/sandbox/contract/trunk/src/examples/org/apache/commons/contract/example/LoginProcessor.java Tue Feb 22 02:06:08 2005
@@ -29,9 +29,9 @@
 import org.apache.commons.contract.descriptor.ParameterDescriptor;
 import org.apache.commons.contract.descriptor.ResultDescriptor;
 import org.apache.commons.contract.descriptor.StateDescriptor;
-import org.apache.commons.contract.i18n.ParameterMessage;
-import org.apache.commons.i18n.LocalizedError;
-import org.apache.commons.i18n.LocalizedMessage;
+import org.apache.commons.contract.i18n.ParameterBundle;
+import org.apache.commons.i18n.bundles.ErrorBundle;
+import org.apache.commons.i18n.bundles.MessageBundle;
 
 /**
  * @author Daniel Florey
@@ -40,7 +40,7 @@
 public class LoginProcessor implements Processor {
     public final static String LOGIN_FAILED = "loginFailed";
     public final static StateDescriptor LOGIN_FAILED_DESCRIPTOR = new StateDescriptor(
-            LOGIN_FAILED, new LocalizedMessage(
+            LOGIN_FAILED, new MessageBundle(
                     "loginProcessor/state/loginFailed"));
 
     private final static String USERNAME = "login";
@@ -48,10 +48,10 @@
     private final int PWD_MIN_LENGTH = 4, PWD_MAX_LENGTH = 14;
 
     private ParameterDescriptor[] parameterDescriptors = new ParameterDescriptor[]{
-            new ParameterDescriptor(USERNAME, new ParameterMessage(
+            new ParameterDescriptor(USERNAME, new ParameterBundle(
                     "loginProcessor/parameter/username"),
                     StringConstraints.NOT_EMPTY),
-            new ParameterDescriptor(PASSWORD, new ParameterMessage(
+            new ParameterDescriptor(PASSWORD, new ParameterBundle(
                     "loginProcessor/parameter/password"), new StringConstraints(
                     PWD_MIN_LENGTH, PWD_MAX_LENGTH))};
 
@@ -64,7 +64,7 @@
         String password = (String) parameter.get(PASSWORD);
         if (username.equals("Daniel") && !password.equals("Florey")) {
             context.addInformation(new Information(Information.ERROR,
-                    new LocalizedError("loginProcessor/information/wrongPassword"),
+                    new ErrorBundle("loginProcessor/information/wrongPassword"),
                     new String[]{ USERNAME, PASSWORD }));
             return new Result(LOGIN_FAILED);
         }

Modified: jakarta/commons/sandbox/contract/trunk/src/examples/org/apache/commons/contract/example/SpeedCalculator.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/contract/trunk/src/examples/org/apache/commons/contract/example/SpeedCalculator.java?view=diff&r1=154822&r2=154823
==============================================================================
--- jakarta/commons/sandbox/contract/trunk/src/examples/org/apache/commons/contract/example/SpeedCalculator.java (original)
+++ jakarta/commons/sandbox/contract/trunk/src/examples/org/apache/commons/contract/example/SpeedCalculator.java Tue Feb 22 02:06:08 2005
@@ -30,8 +30,8 @@
 import org.apache.commons.contract.descriptor.ResultDescriptor;
 import org.apache.commons.contract.descriptor.ResultEntryDescriptor;
 import org.apache.commons.contract.descriptor.StateDescriptor;
-import org.apache.commons.contract.i18n.ParameterMessage;
-import org.apache.commons.i18n.LocalizedMessage;
+import org.apache.commons.contract.i18n.ParameterBundle;
+import org.apache.commons.i18n.bundles.MessageBundle;
 
 public class SpeedCalculator implements Processor {
     public final static String SPEED = "speed";
@@ -44,20 +44,20 @@
     private final static String HOURS = "h";
 
     private ParameterDescriptor[] parameterDescriptors = new ParameterDescriptor[]{
-            new ParameterDescriptor(DISTANCE, new ParameterMessage(
+            new ParameterDescriptor(DISTANCE, new ParameterBundle(
                     "computeSpeed/parameter/distance"), new NumberConstraints(
                     new Integer(0), null, true)),
-            new ParameterDescriptor(UNIT, new ParameterMessage(
+            new ParameterDescriptor(UNIT, new ParameterBundle(
                     "computeSpeed/parameter/unit"), new StringConstraints(
                     new String[]{SECONDS, MINUTES, HOURS})),
-            new ParameterDescriptor(TIME, new ParameterMessage(
+            new ParameterDescriptor(TIME, new ParameterBundle(
                     "computeSpeed/parameter/time"), NumberConstraints.POSITIVE)};
 
     private ResultDescriptor[] resultDescriptors = new ResultDescriptor[]{new ResultDescriptor(
             StateDescriptor.OK_DESCRIPTOR,
             new ResultEntryDescriptor[]{new ResultEntryDescriptor(SPEED,
-                    new LocalizedMessage("computeSpeed/result/speed"),
-                    new NumberConstraints(new Float(0.1), new Integer(
+                    new MessageBundle("computeSpeed/result/speed"),
+                    new NumberConstraints(new Float(0), new Integer(
                             Integer.MAX_VALUE)))})};
 
     /**

Modified: jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/ContractViolationException.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/ContractViolationException.java?view=diff&r1=154822&r2=154823
==============================================================================
--- jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/ContractViolationException.java (original)
+++ jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/ContractViolationException.java Tue Feb 22 02:06:08 2005
@@ -1,7 +1,7 @@
 /*
  * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons-sandbox//contract/src/java/org/apache/commons/contract/ContractViolationException.java,v 1.1 2004/10/08 09:36:20 dflorey Exp $
  * $Revision: 1.1 $
- * $Date: 2004/10/08 09:36:20 $
+ * $Date$
  *
  * ====================================================================
  *
@@ -23,15 +23,15 @@
 
 package org.apache.commons.contract;
 
-import org.apache.commons.i18n.LocalizedError;
 import org.apache.commons.i18n.LocalizedException;
+import org.apache.commons.i18n.bundles.ErrorBundle;
 
 public class ContractViolationException extends LocalizedException {
-    public ContractViolationException(LocalizedError errorMessage, Throwable cause) {
+    public ContractViolationException(ErrorBundle errorMessage, Throwable cause) {
         super(errorMessage, cause);
     }
 
-    public ContractViolationException(LocalizedError errorMessage) {
+    public ContractViolationException(ErrorBundle errorMessage) {
         super(errorMessage);
     }
 }

Modified: jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/EnvironmentConsumer.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/EnvironmentConsumer.java?view=diff&r1=154822&r2=154823
==============================================================================
--- jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/EnvironmentConsumer.java (original)
+++ jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/EnvironmentConsumer.java Tue Feb 22 02:06:08 2005
@@ -1,7 +1,7 @@
 /*
  * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons-sandbox//contract/src/java/org/apache/commons/contract/EnvironmentConsumer.java,v 1.1 2004/10/08 09:36:20 dflorey Exp $
  * $Revision: 1.1 $
- * $Date: 2004/10/08 09:36:20 $
+ * $Date$
  *
  * ====================================================================
  *

Modified: jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/EnvironmentProvider.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/EnvironmentProvider.java?view=diff&r1=154822&r2=154823
==============================================================================
--- jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/EnvironmentProvider.java (original)
+++ jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/EnvironmentProvider.java Tue Feb 22 02:06:08 2005
@@ -1,7 +1,7 @@
 /*
  * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons-sandbox//contract/src/java/org/apache/commons/contract/EnvironmentProvider.java,v 1.1 2004/10/08 09:36:20 dflorey Exp $
  * $Revision: 1.1 $
- * $Date: 2004/10/08 09:36:20 $
+ * $Date$
  *
  * ====================================================================
  *

Modified: jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/Executor.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/Executor.java?view=diff&r1=154822&r2=154823
==============================================================================
--- jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/Executor.java (original)
+++ jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/Executor.java Tue Feb 22 02:06:08 2005
@@ -8,8 +8,8 @@
 import org.apache.commons.contract.descriptor.RequiredEnvironmentDescriptor;
 import org.apache.commons.contract.descriptor.ResultDescriptor;
 import org.apache.commons.contract.descriptor.ResultEntryDescriptor;
-import org.apache.commons.i18n.LocalizedError;
 import org.apache.commons.i18n.XMLMessageProvider;
+import org.apache.commons.i18n.bundles.ErrorBundle;
 
 public class Executor {
     static {
@@ -42,7 +42,7 @@
     	Object preparedValue;
     	if ( value == null ) {
             if ( parameterDescriptor.isRequired() ) {
-                throw new ContractViolationException(new LocalizedError("requiredParameterMissing", new String[] { parameterDescriptor.getName() }));
+                throw new ContractViolationException(new ErrorBundle("requiredParameterMissing", new String[] { parameterDescriptor.getName() }));
             } else {
                 preparedValue = parameterDescriptor.getDefaultValue();
             }
@@ -51,7 +51,7 @@
                 preparedValue = parameterDescriptor.getConstraints().cast(value, context);
                 parameterDescriptor.getConstraints().validate(preparedValue, context);
             } catch ( ContractViolationException exception ) {
-                throw new ContractViolationException(new LocalizedError("invalidParameter", new Object[] { parameterDescriptor.getName() }), exception);
+                throw new ContractViolationException(new ErrorBundle("invalidParameter", new Object[] { parameterDescriptor.getName() }), exception);
             }
     	}
     	return preparedValue;
@@ -65,7 +65,7 @@
                 Object value = store.get(requirementDescriptor[i].getName(), context);
                 if ( value == null ) {
                     if ( requirementDescriptor[i].isRequired() ) {
-                        throw new ValidationException(new LocalizedError("requiredContextMissing", new Object[] { requirementDescriptor[i].getName(), requirementDescriptor[i].getStore()}));
+                        throw new ValidationException(new ErrorBundle("requiredContextMissing", new Object[] { requirementDescriptor[i].getName(), requirementDescriptor[i].getStore()}));
                     } else {
                         value = requirementDescriptor[i].getDefaultValue();
                         store.put(requirementDescriptor[i].getName(), value, context);
@@ -77,7 +77,7 @@
                     store.put(requirementDescriptor[i].getName(), castedValue, context);
                 }
             } catch ( StoreException exception ) {
-                throw new ContractViolationException(new LocalizedError("storeUnaccessable", new Object[] { requirementDescriptor[i].getName(), requirementDescriptor[i].getStore()}));
+                throw new ContractViolationException(new ErrorBundle("storeUnaccessable", new Object[] { requirementDescriptor[i].getName(), requirementDescriptor[i].getStore()}));
             }
         }
     }
@@ -93,15 +93,15 @@
                 ResultEntryDescriptor entryDescriptor = entryDescriptors[i];
                 name = entryDescriptor.getName();
                 value = resultEntries.get(name);
-                if ( value == null ) throw new ContractViolationException(new LocalizedError("missingResultEntry", new String[] { name }));
+                if ( value == null ) throw new ContractViolationException(new ErrorBundle("missingResultEntry", new String[] { name }));
                 Constraints constraints = entryDescriptor.getConstraints();
-                if ( constraints == null ) throw new ContractViolationException(new LocalizedError("undefinedResultEntryConstraints", new String[] { name }));
+                if ( constraints == null ) throw new ContractViolationException(new ErrorBundle("undefinedResultEntryConstraints", new String[] { name }));
                 value = constraints.cast(value, context);
                 entryDescriptor.getConstraints().validate(value, context);
                 resultEntries.put(name, value);
             } 
         } catch ( ValidationException exception ) {
-            throw new ContractViolationException(new LocalizedError("invalidResultEntry", new Object[] { name, value }), exception);
+            throw new ContractViolationException(new ErrorBundle("invalidResultEntry", new Object[] { name, value }), exception);
         }
     }
 
@@ -111,6 +111,6 @@
                 return resultDescriptors[i];
             }
         }
-        throw new ContractViolationException(new LocalizedError("stateNotDefined", new Object[] { state }));
+        throw new ContractViolationException(new ErrorBundle("stateNotDefined", new Object[] { state }));
     }
 }

Modified: jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/Information.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/Information.java?view=diff&r1=154822&r2=154823
==============================================================================
--- jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/Information.java (original)
+++ jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/Information.java Tue Feb 22 02:06:08 2005
@@ -1,6 +1,6 @@
 package org.apache.commons.contract;
 
-import org.apache.commons.i18n.LocalizedError;
+import org.apache.commons.i18n.bundles.ErrorBundle;
 
 /**
  * @version $Revision: 1.1 $
@@ -13,10 +13,10 @@
     public final static int ERROR = 3;
 
     private int severity, number;
-    private LocalizedError errorMessage;
+    private ErrorBundle errorMessage;
     private String[] involvedParameters;
 
-    public Information(int severity, LocalizedError errorMessage, String[] involvedParameters) {
+    public Information(int severity, ErrorBundle errorMessage, String[] involvedParameters) {
         this.severity = severity;
         this.errorMessage = errorMessage;
         this.involvedParameters = involvedParameters;
@@ -34,7 +34,7 @@
         return severity;
     }
 
-    public LocalizedError getLocalizedError() {
+    public ErrorBundle getErrorBundle() {
         return errorMessage;
     }
 

Modified: jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/StoreException.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/StoreException.java?view=diff&r1=154822&r2=154823
==============================================================================
--- jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/StoreException.java (original)
+++ jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/StoreException.java Tue Feb 22 02:06:08 2005
@@ -1,7 +1,7 @@
 /*
  * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons-sandbox//contract/src/java/org/apache/commons/contract/StoreException.java,v 1.1 2004/10/08 09:36:20 dflorey Exp $
  * $Revision: 1.1 $
- * $Date: 2004/10/08 09:36:20 $
+ * $Date$
  *
  * ====================================================================
  *
@@ -23,15 +23,15 @@
 
 package org.apache.commons.contract;
 
-import org.apache.commons.i18n.LocalizedError;
 import org.apache.commons.i18n.LocalizedException;
+import org.apache.commons.i18n.bundles.ErrorBundle;
 
 public class StoreException extends LocalizedException {
-    public StoreException(LocalizedError errorMessage, Throwable cause) {
+    public StoreException(ErrorBundle errorMessage, Throwable cause) {
         super(errorMessage, cause);
     }
 
-    public StoreException(LocalizedError errorMessage) {
+    public StoreException(ErrorBundle errorMessage) {
         super(errorMessage);
     }
 }

Modified: jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/ArrayConstraints.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/ArrayConstraints.java?view=diff&r1=154822&r2=154823
==============================================================================
--- jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/ArrayConstraints.java (original)
+++ jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/ArrayConstraints.java Tue Feb 22 02:06:08 2005
@@ -2,10 +2,11 @@
 
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 
 import org.apache.commons.contract.Context;
-import org.apache.commons.i18n.LocalizedError;
-import org.apache.commons.i18n.LocalizedText;
+import org.apache.commons.i18n.bundles.ErrorBundle;
+import org.apache.commons.i18n.bundles.TextBundle;
 
 public class ArrayConstraints implements Constraints {
     public static final ArrayConstraints UNCONSTRAINED = new ArrayConstraints();
@@ -44,7 +45,7 @@
                     try {
                         entry = ((Evaluatable)entry).evaluate(context);
                     } catch (Exception e) {
-                        throw new CastException(new LocalizedError("evaluatingAnyFailed"), e);
+                        throw new CastException(new ErrorBundle("evaluatingAnyFailed"), e);
                     }
                 }
  				array[counter] = entryValueDescriptor.cast(entry, context);
@@ -58,13 +59,13 @@
                     try {
                         entry = ((Evaluatable)entry).evaluate(context);
                     } catch (Exception e) {
-                        throw new CastException(new LocalizedError("evaluatingAnyFailed"), e);
+                        throw new CastException(new ErrorBundle("evaluatingAnyFailed"), e);
                     }
                 }
    				array[i] = entryValueDescriptor.cast(entry, context);
     		}
     	} else {
-    		throw new CastException(new LocalizedError("uncastableArray", new Object[] { value }));
+    		throw new CastException(new ErrorBundle("uncastableArray", new Object[] { value }));
     	}
 		return array;
     }
@@ -78,16 +79,16 @@
     			}
     		}
     	} catch ( ValidationException exception ) {
-    		throw new ValidationException(new LocalizedError("invalidArrayEntry", new Object[] { value }), exception);
+    		throw new ValidationException(new ErrorBundle("invalidArrayEntry", new Object[] { value }), exception);
     	}
     }
     
-    public LocalizedText verboseConstraints() {
+    public TextBundle verboseConstraints() {
         if ( entryValueDescriptor == Unconstrained.UNCONSTRAINED ) {
-            return new LocalizedText("unconstrainedArray");
+            return new TextBundle("unconstrainedArray");
         } else {
-            LocalizedText verbosedEntryContrstaints = entryValueDescriptor.verboseConstraints();
-            return new LocalizedText("constrainedArray", new String[] {  verbosedEntryContrstaints.getText() });
+            TextBundle verbosedEntryContrstaints = entryValueDescriptor.verboseConstraints();
+            return new TextBundle("constrainedArray", new String[] {  verbosedEntryContrstaints.getText(Locale.getDefault()) });
         }
     }
 }

Modified: jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/BooleanConstraints.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/BooleanConstraints.java?view=diff&r1=154822&r2=154823
==============================================================================
--- jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/BooleanConstraints.java (original)
+++ jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/BooleanConstraints.java Tue Feb 22 02:06:08 2005
@@ -1,8 +1,8 @@
 package org.apache.commons.contract.constraints;
 
 import org.apache.commons.contract.Context;
-import org.apache.commons.i18n.LocalizedError;
-import org.apache.commons.i18n.LocalizedText;
+import org.apache.commons.i18n.bundles.ErrorBundle;
+import org.apache.commons.i18n.bundles.TextBundle;
 
 public class BooleanConstraints implements Constraints {
 	public final static String TRUE = Boolean.toString(true);
@@ -15,14 +15,14 @@
         try {
             return Boolean.valueOf(StringConstraints.UNCONSTRAINED.cast(value, null).toString());
         } catch ( CastException exception ) {
-            throw new CastException(new LocalizedError("uncastableBooleanValue", new Object[] { value }));
+            throw new CastException(new ErrorBundle("uncastableBooleanValue", new Object[] { value }));
         }
     }
     
     public void validate(Object value, Context context) throws ValidationException {
     }
     
-    public LocalizedText verboseConstraints() {
-        return new LocalizedText("unconstrainedBoolean");
+    public TextBundle verboseConstraints() {
+        return new TextBundle("unconstrainedBoolean");
     }
 }

Modified: jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/CastException.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/CastException.java?view=diff&r1=154822&r2=154823
==============================================================================
--- jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/CastException.java (original)
+++ jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/CastException.java Tue Feb 22 02:06:08 2005
@@ -1,7 +1,7 @@
 /*
  * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons-sandbox//contract/src/java/org/apache/commons/contract/constraints/CastException.java,v 1.1 2004/10/08 09:36:18 dflorey Exp $
  * $Revision: 1.1 $
- * $Date: 2004/10/08 09:36:18 $
+ * $Date$
  *
  * ====================================================================
  *
@@ -23,14 +23,14 @@
 
 package org.apache.commons.contract.constraints;
 
-import org.apache.commons.i18n.LocalizedError;
+import org.apache.commons.i18n.bundles.ErrorBundle;
 
 public class CastException extends ValidationException {
-    public CastException(LocalizedError errorMessage, Throwable cause) {
+    public CastException(ErrorBundle errorMessage, Throwable cause) {
         super(errorMessage, cause);
     }
 
-    public CastException(LocalizedError errorMessage) {
+    public CastException(ErrorBundle errorMessage) {
         super(errorMessage);
     }
 }

Modified: jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/Constraints.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/Constraints.java?view=diff&r1=154822&r2=154823
==============================================================================
--- jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/Constraints.java (original)
+++ jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/Constraints.java Tue Feb 22 02:06:08 2005
@@ -19,8 +19,8 @@
 */
 package org.apache.commons.contract.constraints;
 
-import org.apache.commons.i18n.LocalizedText;
+import org.apache.commons.i18n.bundles.TextBundle;
 
 public interface Constraints extends Validatable, Castable {
-    LocalizedText verboseConstraints();
+    TextBundle verboseConstraints();
 }

Modified: jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/DateConstraints.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/DateConstraints.java?view=diff&r1=154822&r2=154823
==============================================================================
--- jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/DateConstraints.java (original)
+++ jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/DateConstraints.java Tue Feb 22 02:06:08 2005
@@ -8,8 +8,8 @@
 import java.util.List;
 
 import org.apache.commons.contract.Context;
-import org.apache.commons.i18n.LocalizedError;
-import org.apache.commons.i18n.LocalizedText;
+import org.apache.commons.i18n.bundles.ErrorBundle;
+import org.apache.commons.i18n.bundles.TextBundle;
 
 public class DateConstraints implements Constraints {
     public static final DateConstraints UNCONSTRAINED = new DateConstraints();
@@ -67,11 +67,11 @@
                             date = new SimpleDateFormat(formatPattern).parse(valueAsString);
                         }
         			} catch (ParseException e) {
-        			    throw new CastException(new LocalizedError("uncastableDateValue", new Object[] { value }), e);
+        			    throw new CastException(new ErrorBundle("uncastableDateValue", new Object[] { value }), e);
         			}
         		}
         	} catch ( CastException exception ) {
-        		throw new CastException(new LocalizedError("uncastableDateValue", new Object[] { value }), exception);
+        		throw new CastException(new ErrorBundle("uncastableDateValue", new Object[] { value }), exception);
         	}
         }
         return date;
@@ -80,14 +80,14 @@
     public void validate(Object value, Context context) throws ValidationException {
         Date date = (Date)value;
         if ( constrained && ( date.after(latest) || date.before(earliest) ) ) {
-        	throw new ValidationException(new LocalizedError("invalidDate", new Object[] { date, earliest, latest }));
+        	throw new ValidationException(new ErrorBundle("invalidDate", new Object[] { date, earliest, latest }));
         }
     }
     
-    public LocalizedText verboseConstraints() {
+    public TextBundle verboseConstraints() {
         if ( constrained ) {
-            return new LocalizedText("constrainedDateRange", new Object[] { earliest, latest });
+            return new TextBundle("constrainedDateRange", new Object[] { earliest, latest });
         } 
-        return new LocalizedText("unconstrainedDate");
+        return new TextBundle("unconstrainedDate");
     }
 }

Modified: jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/ListConstraints.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/ListConstraints.java?view=diff&r1=154822&r2=154823
==============================================================================
--- jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/ListConstraints.java (original)
+++ jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/ListConstraints.java Tue Feb 22 02:06:08 2005
@@ -3,10 +3,11 @@
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 
 import org.apache.commons.contract.Context;
-import org.apache.commons.i18n.LocalizedError;
-import org.apache.commons.i18n.LocalizedText;
+import org.apache.commons.i18n.bundles.ErrorBundle;
+import org.apache.commons.i18n.bundles.TextBundle;
 
 public class ListConstraints implements Constraints {
 	protected Constraints entryValueDescriptor;
@@ -40,7 +41,7 @@
                     try {
                         entry = ((Evaluatable)entry).evaluate(context);
                     } catch (Exception e) {
-                        throw new CastException(new LocalizedError("evaluatingAnyFailed"), e);
+                        throw new CastException(new ErrorBundle("evaluatingAnyFailed"), e);
                     }
                 }
     			list.add(entryValueDescriptor.cast(entry, context));
@@ -52,13 +53,13 @@
                     try {
                         entry = ((Evaluatable)entry).evaluate(context);
                     } catch (Exception e) {
-                        throw new CastException(new LocalizedError("evaluatingAnyFailed"), e);
+                        throw new CastException(new ErrorBundle("evaluatingAnyFailed"), e);
                     }
                 }
                 list.add(entryValueDescriptor.cast(entry, context));
     		}
     	} else {
-    		throw new CastException(new LocalizedError("uncastableList", new Object[] { value }));
+    		throw new CastException(new ErrorBundle("uncastableList", new Object[] { value }));
     	}
 		return list;
     }
@@ -73,16 +74,16 @@
     			}
     		}
     	} catch ( ValidationException exception ) {
-    		throw new ValidationException(new LocalizedError("invalidListEntry", new Object[] { value }), exception);
+    		throw new ValidationException(new ErrorBundle("invalidListEntry", new Object[] { value }), exception);
     	}
     }
     
-    public LocalizedText verboseConstraints() {
+    public TextBundle verboseConstraints() {
         if ( entryValueDescriptor == Unconstrained.UNCONSTRAINED ) {
-            return new LocalizedText("unconstrainedList");
+            return new TextBundle("unconstrainedList");
         } else {
-            LocalizedText verbosedEntryContrstaints = entryValueDescriptor.verboseConstraints();
-            return new LocalizedText("constrainedList", new String[] { verbosedEntryContrstaints.getText() });
+            TextBundle verbosedEntryContrstaints = entryValueDescriptor.verboseConstraints();
+            return new TextBundle("constrainedList", new String[] { verbosedEntryContrstaints.getText(Locale.getDefault()) });
         }
     }
 }

Modified: jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/LocaleConstraints.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/LocaleConstraints.java?view=diff&r1=154822&r2=154823
==============================================================================
--- jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/LocaleConstraints.java (original)
+++ jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/LocaleConstraints.java Tue Feb 22 02:06:08 2005
@@ -3,8 +3,8 @@
 import java.util.Locale;
 
 import org.apache.commons.contract.Context;
-import org.apache.commons.i18n.LocalizedError;
-import org.apache.commons.i18n.LocalizedText;
+import org.apache.commons.i18n.bundles.ErrorBundle;
+import org.apache.commons.i18n.bundles.TextBundle;
 
 public class LocaleConstraints implements Constraints {
 	public static final LocaleConstraints UNCONSTRAINED = new LocaleConstraints();
@@ -19,11 +19,11 @@
 		try {
 			return new Locale(StringConstraints.UNCONSTRAINED.cast(value, null).toString());
 		} catch ( CastException exception ) {
-			throw new CastException(new LocalizedError("uncastableLocale", new Object[] { value }));
+			throw new CastException(new ErrorBundle("uncastableLocale", new Object[] { value }));
 		}
 	}
     
-    public LocalizedText verboseConstraints() {
-        return new LocalizedText("unconstrainedLocale");
+    public TextBundle verboseConstraints() {
+        return new TextBundle("unconstrainedLocale");
     }
 }

Modified: jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/MapConstraints.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/MapConstraints.java?view=diff&r1=154822&r2=154823
==============================================================================
--- jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/MapConstraints.java (original)
+++ jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/MapConstraints.java Tue Feb 22 02:06:08 2005
@@ -8,12 +8,12 @@
 
 import org.apache.commons.contract.Context;
 import org.apache.commons.contract.descriptor.ParameterDescriptor;
-import org.apache.commons.contract.i18n.ParameterMessage;
-import org.apache.commons.i18n.LocalizedError;
-import org.apache.commons.i18n.LocalizedText;
+import org.apache.commons.contract.i18n.ParameterBundle;
+import org.apache.commons.i18n.bundles.ErrorBundle;
+import org.apache.commons.i18n.bundles.TextBundle;
 
 public class MapConstraints implements Constraints {
-    public final static MapConstraints UNCONSTRAINED = new MapConstraints(new ParameterDescriptor(MapConstraints.ALL, new ParameterMessage("mapEntry/any"), Unconstrained.UNCONSTRAINED)); 
+    public final static MapConstraints UNCONSTRAINED = new MapConstraints(new ParameterDescriptor(MapConstraints.ALL, new ParameterBundle("mapEntry/any"), Unconstrained.UNCONSTRAINED)); 
     public final static String ALL = "*";
 	
 	protected List entryConstraints = new ArrayList();
@@ -45,14 +45,14 @@
     
     public Object cast(Object value, Context context) throws CastException {
         if ( entryConstraints.isEmpty() ) {
-        	throw new CastException(new LocalizedError("noMapEntryDescriptorsFound"));
+        	throw new CastException(new ErrorBundle("noMapEntryDescriptorsFound"));
         }
         if ( value instanceof Map ) {
             return castedMap((Map)value, context);
         } else if ( value instanceof Map ) {
             return castedMap((Map)value, context);
         } else {
-            throw new CastException(new LocalizedError("uncastableMapValue", new Object[] { value }));
+            throw new CastException(new ErrorBundle("uncastableMapValue", new Object[] { value }));
         }
     }
 
@@ -70,7 +70,7 @@
                         try {
                             value = ((Evaluatable)value).evaluate(context);
                         } catch (Exception e) {
-                            throw new CastException(new LocalizedError("evaluatingAnyFailed"), e);
+                            throw new CastException(new ErrorBundle("evaluatingAnyFailed"), e);
                         }
                     }
                    	castedMap.put(entry.getKey(), entryDescriptor.cast(value, context));
@@ -89,7 +89,7 @@
                             try {
                                 object = ((Evaluatable)object).evaluate(context);
                             } catch (Exception e) {
-                                throw new CastException(new LocalizedError("evaluatingAnyFailed"), e);
+                                throw new CastException(new ErrorBundle("evaluatingAnyFailed"), e);
                             }
                         }
             			castedMap.put(key, entryDescriptor.cast(object, context));
@@ -116,7 +116,7 @@
             } else {
             	if ( !map.containsKey(key) ) {
             		if ( parameterDescriptor.isRequired() ) {
-            			throw new ValidationException(new LocalizedError("mapEntryMissing", new String[] { key }));
+            			throw new ValidationException(new ErrorBundle("mapEntryMissing", new String[] { key }));
             		}
             	} else {
             		Object entryValue = map.get(key);
@@ -128,11 +128,11 @@
         }
    }
     
-    public LocalizedText verboseConstraints() {
+    public TextBundle verboseConstraints() {
         if ( entryConstraints.isEmpty() ) {
-            return new LocalizedText("invalidMapConstraints");
+            return new TextBundle("invalidMapConstraints");
         }
-        return new LocalizedText("unconstrainedMap");
+        return new TextBundle("unconstrainedMap");
     }
 
 }

Modified: jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/NumberConstraints.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/NumberConstraints.java?view=diff&r1=154822&r2=154823
==============================================================================
--- jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/NumberConstraints.java (original)
+++ jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/NumberConstraints.java Tue Feb 22 02:06:08 2005
@@ -7,8 +7,8 @@
 import java.util.List;
 
 import org.apache.commons.contract.Context;
-import org.apache.commons.i18n.LocalizedError;
-import org.apache.commons.i18n.LocalizedText;
+import org.apache.commons.i18n.bundles.ErrorBundle;
+import org.apache.commons.i18n.bundles.TextBundle;
 
 public class NumberConstraints implements Constraints {
     public final static NumberConstraints UNCONSTRAINED = new NumberConstraints();
@@ -77,9 +77,9 @@
         	try {
             	return new BigDecimal(StringConstraints.UNCONSTRAINED.cast(value, null).toString());
             } catch ( NumberFormatException exception ) {
-                throw new CastException(new LocalizedError("uncastableNumber", new Object[] { value }), exception);
+                throw new CastException(new ErrorBundle("uncastableNumber", new Object[] { value }), exception);
             } catch ( CastException exception ) {
-                throw new CastException(new LocalizedError("uncastableNumber", new Object[] { value }), exception);
+                throw new CastException(new ErrorBundle("uncastableNumber", new Object[] { value }), exception);
         	}
         }
     }
@@ -94,41 +94,41 @@
     					return;
     				}
     			}
-    			throw new ValidationException(new LocalizedError("invalidNumber", new Object[] { value }));
+    			throw new ValidationException(new ErrorBundle("invalidNumber", new Object[] { value }));
     		} else {
     		    if ( inclusive && minimum != null && minimum.doubleValue() >  number.doubleValue() ) {
-    		        throw new ValidationException(new LocalizedError("numberMustBeGreater", new Object[] { number, minimum }));
+    		        throw new ValidationException(new ErrorBundle("numberMustBeGreater", new Object[] { number, minimum }));
     		    }
                 if ( !inclusive && minimum != null && minimum.doubleValue() >=  number.doubleValue() ) {
-                    throw new ValidationException(new LocalizedError("numberMustBeGreaterOrEqual", new Object[] { number, minimum }));
+                    throw new ValidationException(new ErrorBundle("numberMustBeGreaterOrEqual", new Object[] { number, minimum }));
                 }
                 if ( inclusive && maximum != null && maximum.doubleValue() <  number.doubleValue() ) {
-                    throw new ValidationException(new LocalizedError("numberMustBeLess", new Object[] { number, minimum }));
+                    throw new ValidationException(new ErrorBundle("numberMustBeLess", new Object[] { number, minimum }));
                 }
                 if ( !inclusive && maximum != null && maximum.doubleValue() >=  number.doubleValue() ) {
-                    throw new ValidationException(new LocalizedError("numberMustBeLessOrEqual", new Object[] { number, minimum }));
+                    throw new ValidationException(new ErrorBundle("numberMustBeLessOrEqual", new Object[] { number, minimum }));
                 }
     		}
     	}
     }
     
-    public LocalizedText verboseConstraints() {
+    public TextBundle verboseConstraints() {
         if ( constrained ) {
             if ( inclusive && maximum != null && minimum == null ) {
-                return new LocalizedText("lessOrEqual", new Object[] { maximum } );
+                return new TextBundle("lessOrEqual", new Object[] { maximum } );
             } else if ( !inclusive && maximum != null && minimum == null ) {
-                return new LocalizedText("less", new Object[] { maximum } );
+                return new TextBundle("less", new Object[] { maximum } );
             } else if ( inclusive && minimum != null && maximum == null ) {
-                return new LocalizedText("greaterOrEqual", new Object[] { minimum } );
+                return new TextBundle("greaterOrEqual", new Object[] { minimum } );
             } else if ( !inclusive && minimum != null && maximum == null ) {
-                return new LocalizedText("greater", new Object[] { minimum } );
+                return new TextBundle("greater", new Object[] { minimum } );
             } else if ( inclusive && maximum != null && minimum != null ) {
-                return new LocalizedText("rangeIncluding", new Object[] { minimum, maximum } );
+                return new TextBundle("rangeIncluding", new Object[] { minimum, maximum } );
             } else {
-                return new LocalizedText("rangeExcluding", new Object[] { minimum, maximum } );
+                return new TextBundle("rangeExcluding", new Object[] { minimum, maximum } );
             }
         } else {
-            return new LocalizedText("numbers");
+            return new TextBundle("numbers");
         }
     }
 }

Modified: jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/StringConstraints.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/StringConstraints.java?view=diff&r1=154822&r2=154823
==============================================================================
--- jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/StringConstraints.java (original)
+++ jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/StringConstraints.java Tue Feb 22 02:06:08 2005
@@ -6,8 +6,8 @@
 import java.util.List;
 
 import org.apache.commons.contract.Context;
-import org.apache.commons.i18n.LocalizedError;
-import org.apache.commons.i18n.LocalizedText;
+import org.apache.commons.i18n.bundles.ErrorBundle;
+import org.apache.commons.i18n.bundles.TextBundle;
 
 public class StringConstraints implements Constraints, Castable {
     public final static StringConstraints UNCONSTRAINED = new StringConstraints();
@@ -91,29 +91,29 @@
     					return;
     				}
     			}
-    			throw new ValidationException(new LocalizedError("invalidString", new String[] { (String)value, getEnumeratedValues() }));
+    			throw new ValidationException(new ErrorBundle("invalidString", new String[] { (String)value, getEnumeratedValues() }));
     		} else {
-    			if ( minimumLength != -1 && ((String)value).length() < minimumLength ) throw new ValidationException(new LocalizedError("stringTooShort", new Object[] { new Integer(minimumLength) }));
-    			if ( maximumLength != -1 && ((String)value).length() > maximumLength ) throw new ValidationException(new LocalizedError("stringTooLong", new Object[] { new Integer(maximumLength) }));
+    			if ( minimumLength != -1 && ((String)value).length() < minimumLength ) throw new ValidationException(new ErrorBundle("stringTooShort", new Object[] { new Integer(minimumLength) }));
+    			if ( maximumLength != -1 && ((String)value).length() > maximumLength ) throw new ValidationException(new ErrorBundle("stringTooLong", new Object[] { new Integer(maximumLength) }));
     		}
     	}
     }
 
-    public LocalizedText verboseConstraints() {
+    public TextBundle verboseConstraints() {
         if ( constrained ) {
             if ( isEnumerable() ) {
-                return new LocalizedText("enumeratedStrings", new Object[] { getEnumeratedValues() });
+                return new TextBundle("enumeratedStrings", new Object[] { getEnumeratedValues() });
             } else {
                 if ( minimumLength != -1 && maximumLength == -1 ) {
-                    return new LocalizedText("stringLengthBetween", new Object[] { new Integer(minimumLength), new Integer(maximumLength) });
+                    return new TextBundle("stringLengthBetween", new Object[] { new Integer(minimumLength), new Integer(maximumLength) });
                 } else if ( minimumLength != -1 ) {
-                    return new LocalizedText("stringLengthGreater", new Object[] { new Integer(minimumLength) });
+                    return new TextBundle("stringLengthGreater", new Object[] { new Integer(minimumLength) });
                 } else {
-                    return new LocalizedText("stringLengthLess", new Object[] { new Integer(maximumLength) });
+                    return new TextBundle("stringLengthLess", new Object[] { new Integer(maximumLength) });
                 }
             }
         } else {
-            return new LocalizedText("strings");
+            return new TextBundle("strings");
         }
     }
 

Modified: jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/TreeConstraints.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/TreeConstraints.java?view=diff&r1=154822&r2=154823
==============================================================================
--- jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/TreeConstraints.java (original)
+++ jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/TreeConstraints.java Tue Feb 22 02:06:08 2005
@@ -1,7 +1,7 @@
  /*
  * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons-sandbox//contract/src/java/org/apache/commons/contract/constraints/TreeConstraints.java,v 1.1 2004/10/08 09:36:19 dflorey Exp $
  * $Revision: 1.1 $
- * $Date: 2004/10/08 09:36:19 $
+ * $Date$
  *
  * ====================================================================
  *
@@ -24,7 +24,7 @@
 package org.apache.commons.contract.constraints;
 
 import org.apache.commons.contract.Context;
-import org.apache.commons.i18n.LocalizedText;
+import org.apache.commons.i18n.bundles.TextBundle;
 
 /**
  * The TreeValueDescriptor class
@@ -60,7 +60,7 @@
         }
     }
     
-    public LocalizedText verboseConstraints() {
-        return new LocalizedText("booleansOnly");
+    public TextBundle verboseConstraints() {
+        return new TextBundle("booleansOnly");
     }
 }

Modified: jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/Unconstrained.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/Unconstrained.java?view=diff&r1=154822&r2=154823
==============================================================================
--- jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/Unconstrained.java (original)
+++ jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/Unconstrained.java Tue Feb 22 02:06:08 2005
@@ -1,8 +1,8 @@
 package org.apache.commons.contract.constraints;
 
 import org.apache.commons.contract.Context;
-import org.apache.commons.i18n.LocalizedError;
-import org.apache.commons.i18n.LocalizedText;
+import org.apache.commons.i18n.bundles.ErrorBundle;
+import org.apache.commons.i18n.bundles.TextBundle;
 
 public class Unconstrained implements Constraints {
     public final static Unconstrained UNCONSTRAINED = new Unconstrained();
@@ -23,15 +23,15 @@
     
     public void validate(Object value, Context context) throws ValidationException {
         if ( clazz != null && !clazz.isInstance(value) ) {
-            throw new ValidationException(new LocalizedError("invalidObjectType", new Object[] { clazz, value }));
+            throw new ValidationException(new ErrorBundle("invalidObjectType", new Object[] { clazz, value }));
         }
     }
     
-    public LocalizedText verboseConstraints() {
+    public TextBundle verboseConstraints() {
         if ( clazz == null ) {
-            return new LocalizedText("unconstrained");
+            return new TextBundle("unconstrained");
         } else {
-            return new LocalizedText("constrainedUnconstrained");
+            return new TextBundle("constrainedUnconstrained");
         }
     }
 }

Modified: jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/ValidationException.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/ValidationException.java?view=diff&r1=154822&r2=154823
==============================================================================
--- jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/ValidationException.java (original)
+++ jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/constraints/ValidationException.java Tue Feb 22 02:06:08 2005
@@ -1,7 +1,7 @@
 /*
  * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons-sandbox//contract/src/java/org/apache/commons/contract/constraints/ValidationException.java,v 1.1 2004/10/08 09:36:19 dflorey Exp $
  * $Revision: 1.1 $
- * $Date: 2004/10/08 09:36:19 $
+ * $Date$
  *
  * ====================================================================
  *
@@ -24,18 +24,18 @@
 package org.apache.commons.contract.constraints;
 
 import org.apache.commons.contract.ContractViolationException;
-import org.apache.commons.i18n.LocalizedError;
+import org.apache.commons.i18n.bundles.ErrorBundle;
 
 /**
  * The ValidationException class
  * 
  */
 public class ValidationException extends ContractViolationException {
-    public ValidationException(LocalizedError errorMessage, Throwable cause) {
+    public ValidationException(ErrorBundle errorMessage, Throwable cause) {
         super(errorMessage, cause);
     }
 
-    public ValidationException(LocalizedError errorMessage) {
+    public ValidationException(ErrorBundle errorMessage) {
         super(errorMessage);
     }
 }

Modified: jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/descriptor/Descriptor.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/descriptor/Descriptor.java?view=diff&r1=154822&r2=154823
==============================================================================
--- jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/descriptor/Descriptor.java (original)
+++ jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/descriptor/Descriptor.java Tue Feb 22 02:06:08 2005
@@ -1,12 +1,12 @@
 package org.apache.commons.contract.descriptor;
 
-import org.apache.commons.i18n.LocalizedMessage;
+import org.apache.commons.i18n.bundles.MessageBundle;
 
 public class Descriptor {
     protected String name;
-    protected LocalizedMessage description;
+    protected MessageBundle description;
 
-    public Descriptor(String name, LocalizedMessage description) {
+    public Descriptor(String name, MessageBundle description) {
         this.name = name;
         this.description = description;
     }
@@ -15,7 +15,7 @@
         return name;
     }
 
-    public LocalizedMessage getDescription() {
+    public MessageBundle getDescription() {
         return description;
     }
 }

Modified: jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/descriptor/ParameterDescriptor.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/descriptor/ParameterDescriptor.java?view=diff&r1=154822&r2=154823
==============================================================================
--- jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/descriptor/ParameterDescriptor.java (original)
+++ jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/descriptor/ParameterDescriptor.java Tue Feb 22 02:06:08 2005
@@ -1,7 +1,7 @@
 package org.apache.commons.contract.descriptor;
 
 import org.apache.commons.contract.constraints.Constraints;
-import org.apache.commons.contract.i18n.ParameterMessage;
+import org.apache.commons.contract.i18n.ParameterBundle;
 
 public class ParameterDescriptor extends Descriptor {
 	public final static ParameterDescriptor[] NO_PARAMETERS = new ParameterDescriptor[0];
@@ -10,13 +10,13 @@
     protected Object defaultValue;
     protected boolean required;
 
-    public ParameterDescriptor(String name, ParameterMessage description, Constraints valueDescriptor) {
+    public ParameterDescriptor(String name, ParameterBundle description, Constraints valueDescriptor) {
         super(name, description);
         this.constraints = valueDescriptor;
         this.required = true;
     }
 
-    public ParameterDescriptor(String name, ParameterMessage description, Constraints valueDescriptor, Object defaultValue) {
+    public ParameterDescriptor(String name, ParameterBundle description, Constraints valueDescriptor, Object defaultValue) {
         super(name, description);
         this.constraints = valueDescriptor;
         this.defaultValue  = defaultValue;

Modified: jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/descriptor/ProvidedEnvironmentDescriptor.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/descriptor/ProvidedEnvironmentDescriptor.java?view=diff&r1=154822&r2=154823
==============================================================================
--- jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/descriptor/ProvidedEnvironmentDescriptor.java (original)
+++ jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/descriptor/ProvidedEnvironmentDescriptor.java Tue Feb 22 02:06:08 2005
@@ -1,7 +1,7 @@
 /*
  * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons-sandbox//contract/src/java/org/apache/commons/contract/descriptor/ProvidedEnvironmentDescriptor.java,v 1.1 2004/10/08 09:36:20 dflorey Exp $
  * $Revision: 1.1 $
- * $Date: 2004/10/08 09:36:20 $
+ * $Date$
  *
  * ====================================================================
  *
@@ -24,7 +24,7 @@
 package org.apache.commons.contract.descriptor;
 
 import org.apache.commons.contract.constraints.Constraints;
-import org.apache.commons.i18n.LocalizedMessage;
+import org.apache.commons.i18n.bundles.MessageBundle;
 
 /**
  * The ProvidedEnvironmentDescriptor class
@@ -33,7 +33,7 @@
 public class ProvidedEnvironmentDescriptor extends ResultEntryDescriptor {
     String store;
 
-    public ProvidedEnvironmentDescriptor(String name, LocalizedMessage description, Constraints constraints) {
+    public ProvidedEnvironmentDescriptor(String name, MessageBundle description, Constraints constraints) {
         super(name, description, constraints);
     }
 

Modified: jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/descriptor/RequiredEnvironmentDescriptor.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/descriptor/RequiredEnvironmentDescriptor.java?view=diff&r1=154822&r2=154823
==============================================================================
--- jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/descriptor/RequiredEnvironmentDescriptor.java (original)
+++ jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/descriptor/RequiredEnvironmentDescriptor.java Tue Feb 22 02:06:08 2005
@@ -1,17 +1,17 @@
 package org.apache.commons.contract.descriptor;
 
 import org.apache.commons.contract.constraints.Constraints;
-import org.apache.commons.contract.i18n.ParameterMessage;
+import org.apache.commons.contract.i18n.ParameterBundle;
 
 public class RequiredEnvironmentDescriptor extends ParameterDescriptor {
     protected String store;
 
-    public RequiredEnvironmentDescriptor(String name, String store, ParameterMessage description, Constraints valueDescriptor) {
+    public RequiredEnvironmentDescriptor(String name, String store, ParameterBundle description, Constraints valueDescriptor) {
         super(name, description, valueDescriptor);
         this.store = store;
     }
 
-    public RequiredEnvironmentDescriptor(String name, String store, ParameterMessage description, Constraints valueDescriptor, Object defaultValue) {
+    public RequiredEnvironmentDescriptor(String name, String store, ParameterBundle description, Constraints valueDescriptor, Object defaultValue) {
         super(name, description, valueDescriptor, defaultValue);
         this.store = store;
     }

Modified: jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/descriptor/ResultEntryDescriptor.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/descriptor/ResultEntryDescriptor.java?view=diff&r1=154822&r2=154823
==============================================================================
--- jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/descriptor/ResultEntryDescriptor.java (original)
+++ jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/descriptor/ResultEntryDescriptor.java Tue Feb 22 02:06:08 2005
@@ -1,12 +1,12 @@
 package org.apache.commons.contract.descriptor;
 
 import org.apache.commons.contract.constraints.Constraints;
-import org.apache.commons.i18n.LocalizedMessage;
+import org.apache.commons.i18n.bundles.MessageBundle;
 
 public class ResultEntryDescriptor extends Descriptor {
     protected Constraints constraints;
 
-    public ResultEntryDescriptor(String name, LocalizedMessage description, Constraints constraints) {
+    public ResultEntryDescriptor(String name, MessageBundle description, Constraints constraints) {
         super(name, description);
         this.constraints = constraints;
     }

Modified: jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/descriptor/StateDescriptor.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/descriptor/StateDescriptor.java?view=diff&r1=154822&r2=154823
==============================================================================
--- jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/descriptor/StateDescriptor.java (original)
+++ jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/descriptor/StateDescriptor.java Tue Feb 22 02:06:08 2005
@@ -1,12 +1,12 @@
 package org.apache.commons.contract.descriptor;
 
-import org.apache.commons.i18n.LocalizedMessage;
+import org.apache.commons.i18n.bundles.MessageBundle;
 
 public class StateDescriptor extends Descriptor {
 	public final static String OK = "ok";
-	public final static StateDescriptor OK_DESCRIPTOR = new StateDescriptor(OK, new LocalizedMessage("state/ok"));
+	public final static StateDescriptor OK_DESCRIPTOR = new StateDescriptor(OK, new MessageBundle("state/ok"));
 
-	public StateDescriptor(String state, LocalizedMessage description) {
+	public StateDescriptor(String state, MessageBundle description) {
 		super(state, description);
 	}
 

Copied: jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/i18n/ParameterBundle.java (from r149259, jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/i18n/ParameterMessage.java)
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/i18n/ParameterBundle.java?view=diff&rev=154823&p1=jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/i18n/ParameterMessage.java&r1=149259&p2=jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/i18n/ParameterBundle.java&r2=154823
==============================================================================
--- jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/i18n/ParameterMessage.java (original)
+++ jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/i18n/ParameterBundle.java Tue Feb 22 02:06:08 2005
@@ -2,37 +2,37 @@
 
 import java.util.Locale;
 
-import org.apache.commons.i18n.LocalizedMessage;
+import org.apache.commons.i18n.bundles.MessageBundle;
 
-public class ParameterMessage extends LocalizedMessage {
+public class ParameterBundle extends MessageBundle {
     private final static String PROMPT = "prompt";
     private final static String NO_MESSAGE_AVAILABLE = "noMessageAvailable";
 
-    public ParameterMessage() {
+    public ParameterBundle() {
         super(NO_MESSAGE_AVAILABLE);
     }
 
-    public ParameterMessage(String messageId) {
+    public ParameterBundle(String messageId) {
         super(messageId);
     }
 
-    public ParameterMessage(String messageId, Object[] arguments) {
+    public ParameterBundle(String messageId, Object[] arguments) {
         super(messageId, arguments);
     }
 
     public String getPrompt() {
-        return getText(PROMPT, Locale.getDefault());
+        return getEntry(PROMPT, Locale.getDefault());
     }
 
     public String getPrompt(Locale locale) {
-        return getText(PROMPT, locale);
+        return getEntry(PROMPT, locale);
     }
 
     public String getPrompt(String defaultPrompt) {
-        return getText(PROMPT, defaultPrompt, Locale.getDefault());
+        return getEntry(PROMPT, defaultPrompt, Locale.getDefault());
     }
 
     public String getPrompt(Locale locale, String defaultPrompt) {
-        return getText(PROMPT, defaultPrompt, locale);
+        return getEntry(PROMPT, defaultPrompt, locale);
     }
 }

Modified: jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/store/Environment.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/store/Environment.java?view=diff&r1=154822&r2=154823
==============================================================================
--- jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/store/Environment.java (original)
+++ jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/store/Environment.java Tue Feb 22 02:06:08 2005
@@ -24,7 +24,7 @@
 import org.apache.commons.contract.StoreException;
 import org.apache.commons.contract.constraints.CastException;
 import org.apache.commons.contract.constraints.StringConstraints;
-import org.apache.commons.i18n.LocalizedError;
+import org.apache.commons.i18n.bundles.ErrorBundle;
 
 public class Environment implements Store {
     public final static String ID = "environment";
@@ -33,7 +33,7 @@
         try {
             System.setProperty(key, (String)StringConstraints.UNCONSTRAINED.cast(value, context));
         } catch (CastException e) {
-            throw new StoreException(new LocalizedError("storesStringsOnly"), e);
+            throw new StoreException(new ErrorBundle("storesStringsOnly"), e);
         }
     }
 
@@ -42,7 +42,7 @@
     }
 
     public void dispose(String key, Context context) throws StoreException {
-        throw new StoreException(new LocalizedError("disposeNotAvailable"));
+        throw new StoreException(new ErrorBundle("disposeNotAvailable"));
     }
     
     public String getId() {

Modified: jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/util/InteractiveMainWrapper.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/util/InteractiveMainWrapper.java?view=diff&r1=154822&r2=154823
==============================================================================
--- jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/util/InteractiveMainWrapper.java (original)
+++ jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/util/InteractiveMainWrapper.java Tue Feb 22 02:06:08 2005
@@ -32,7 +32,7 @@
 import org.apache.commons.contract.Result;
 import org.apache.commons.contract.context.VMContext;
 import org.apache.commons.contract.descriptor.ParameterDescriptor;
-import org.apache.commons.contract.i18n.ParameterMessage;
+import org.apache.commons.contract.i18n.ParameterBundle;
 
 public class InteractiveMainWrapper extends MainWrapper {
     public static Result main(String []args, Processor processor) {
@@ -47,7 +47,7 @@
             do {
                 System.out.print(parameterDescriptors[i].getName()+" - ");
             printParameterInfo(parameterDescriptors[i]);
-            System.out.print(((ParameterMessage)parameterDescriptors[i].getDescription()).getPrompt());
+            System.out.print(((ParameterBundle)parameterDescriptors[i].getDescription()).getPrompt());
             try {
                 String userInput = in.readLine();
                 value = Executor.prepareValue(parameterDescriptors[i], userInput, context);

Modified: jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/util/MainWrapper.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/util/MainWrapper.java?view=diff&r1=154822&r2=154823
==============================================================================
--- jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/util/MainWrapper.java (original)
+++ jakarta/commons/sandbox/contract/trunk/src/java/org/apache/commons/contract/util/MainWrapper.java Tue Feb 22 02:06:08 2005
@@ -22,6 +22,7 @@
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 
 import org.apache.commons.contract.Context;
@@ -33,15 +34,15 @@
 import org.apache.commons.contract.context.VMContext;
 import org.apache.commons.contract.descriptor.ParameterDescriptor;
 import org.apache.commons.i18n.LocalizedException;
-import org.apache.commons.i18n.LocalizedMessage;
 import org.apache.commons.i18n.XMLMessageProvider;
+import org.apache.commons.i18n.bundles.MessageBundle;
 
 public class MainWrapper {
     static {
         XMLMessageProvider.install("contract/util", Thread.currentThread().getContextClassLoader().getResourceAsStream("util.xml"));
     }
     
-    private static LocalizedMessage usage = new LocalizedMessage("usage");
+    private static MessageBundle usage = new MessageBundle("usage");
 
     public static Result main(String []args, Processor processor) {
         Context context = new VMContext();
@@ -55,13 +56,13 @@
         try {
             return Executor.process(processor, parameters, context);
         } catch ( ContractViolationException exception ) {
-            System.out.println(exception.getErrorMessage().getTitle());
-            System.out.print(exception.getErrorMessage().getDetails());
+            System.out.println(exception.getErrorMessage().getTitle(Locale.getDefault()));
+            System.out.print(exception.getErrorMessage().getDetails(Locale.getDefault()));
             Throwable throwable = (Throwable)exception;
             while ( throwable.getCause() != null ) {
                 throwable = throwable.getCause();
                 if ( throwable instanceof LocalizedException ) { 
-                   System.out.print(" "+((LocalizedException)throwable).getErrorMessage().getDetails());
+                   System.out.print(" "+((LocalizedException)throwable).getErrorMessage().getDetails(Locale.getDefault()));
                 } else {
                     System.out.print(" "+throwable.getMessage());
                 }
@@ -76,8 +77,8 @@
     }
 
     public static void printUsage(Processor processor) {
-        System.out.println(usage.getTitle());
-        System.out.println(usage.getText());
+        System.out.println(usage.getTitle(Locale.getDefault()));
+        System.out.println(usage.getText(Locale.getDefault()));
         ParameterDescriptor[] parameterDescriptors = processor.getParameterDescriptors();
         for ( int i = 0; i < parameterDescriptors.length; i++ ) {
             System.out.print((i+1)+". ");
@@ -86,19 +87,19 @@
     }
 
     public static void printParameterInfo(ParameterDescriptor parameterDescriptor) {
-        System.out.println(parameterDescriptor.getDescription().getTitle());
-        System.out.println(parameterDescriptor.getDescription().getText());
-        System.out.println(parameterDescriptor.getConstraints().verboseConstraints().getText());
+        System.out.println(parameterDescriptor.getDescription().getTitle(Locale.getDefault()));
+        System.out.println(parameterDescriptor.getDescription().getText(Locale.getDefault()));
+        System.out.println(parameterDescriptor.getConstraints().verboseConstraints().getText(Locale.getDefault()));
     }
 
     public static void printException(ContractViolationException exception) {
-        System.out.println(exception.getErrorMessage().getTitle());
-        System.out.print(exception.getErrorMessage().getDetails());
+        System.out.println(exception.getErrorMessage().getTitle(Locale.getDefault()));
+        System.out.print(exception.getErrorMessage().getDetails(Locale.getDefault()));
         Throwable throwable = (Throwable)exception;
         while ( throwable.getCause() != null ) {
             throwable = throwable.getCause();
             if ( throwable instanceof LocalizedException ) { 
-                System.out.print(" "+((LocalizedException)throwable).getErrorMessage().getDetails());
+                System.out.print(" "+((LocalizedException)throwable).getErrorMessage().getDetails(Locale.getDefault()));
             } else {
                 System.out.print(" "+throwable.getMessage());
             }
@@ -109,7 +110,7 @@
     public static void printInformations(List informations) {
         for ( Iterator i = informations.iterator(); i.hasNext(); ) {
             Information information = (Information)i.next();
-            System.out.println("Folgendes: "+information.getLocalizedError().getText());
+            System.out.println("Folgendes: "+information.getErrorBundle().getText(Locale.getDefault()));
         }
     }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message