commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dflo...@apache.org
Subject cvs commit: jakarta-commons-sandbox/contract/src/java/org/apache/commons/contract/util MainWrapper.java
Date Sat, 18 Dec 2004 15:07:54 GMT
dflorey     2004/12/18 07:07:54

  Modified:    contract/src/examples/org/apache/commons/contract/example
                        TestLogin.java TestSpeedCalculator.java
               contract/src/java/org/apache/commons/contract Executor.java
               contract/src/java/org/apache/commons/contract/util
                        MainWrapper.java
  Log:
  Updated contract to i18n 0.3
  
  Revision  Changes    Path
  1.2       +2 -2      jakarta-commons-sandbox/contract/src/examples/org/apache/commons/contract/example/TestLogin.java
  
  Index: TestLogin.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/contract/src/examples/org/apache/commons/contract/example/TestLogin.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestLogin.java	18 Dec 2004 13:52:16 -0000	1.1
  +++ TestLogin.java	18 Dec 2004 15:07:53 -0000	1.2
  @@ -21,11 +21,11 @@
   
   import org.apache.commons.contract.Result;
   import org.apache.commons.contract.util.InteractiveMainWrapper;
  -import org.apache.commons.i18n.MessageManager;
  +import org.apache.commons.i18n.XMLMessageProvider;
   
   public class TestLogin {
       public static void main(String[] args) {
  -        MessageManager.install("contract/example", Thread.currentThread().getContextClassLoader().getResourceAsStream("example.xml"));
  +        XMLMessageProvider.install("contract/example", Thread.currentThread().getContextClassLoader().getResourceAsStream("example.xml"));
           Result result = InteractiveMainWrapper.main(args, new LoginProcessor());
           if ( result != Result.OK ) {
               System.out.println("Login ist fehlgeschlagen.");
  
  
  
  1.2       +2 -2      jakarta-commons-sandbox/contract/src/examples/org/apache/commons/contract/example/TestSpeedCalculator.java
  
  Index: TestSpeedCalculator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/contract/src/examples/org/apache/commons/contract/example/TestSpeedCalculator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestSpeedCalculator.java	18 Dec 2004 13:52:16 -0000	1.1
  +++ TestSpeedCalculator.java	18 Dec 2004 15:07:53 -0000	1.2
  @@ -21,11 +21,11 @@
   
   import org.apache.commons.contract.Result;
   import org.apache.commons.contract.util.InteractiveMainWrapper;
  -import org.apache.commons.i18n.MessageManager;
  +import org.apache.commons.i18n.XMLMessageProvider;
   
   public class TestSpeedCalculator {
       public static void main(String[] args) {
  -        MessageManager.install("contract/example", Thread.currentThread().getContextClassLoader().getResourceAsStream("example.xml"));
  +        XMLMessageProvider.install("contract/example", Thread.currentThread().getContextClassLoader().getResourceAsStream("example.xml"));
           Result result = InteractiveMainWrapper.main(args, new SpeedCalculator());
           if ( result != null ) {
               System.out.println("Speed: "+result.getResultEntries().get(SpeedCalculator.SPEED));
  
  
  
  1.4       +3 -3      jakarta-commons-sandbox/contract/src/java/org/apache/commons/contract/Executor.java
  
  Index: Executor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/contract/src/java/org/apache/commons/contract/Executor.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Executor.java	7 Dec 2004 20:52:18 -0000	1.3
  +++ Executor.java	18 Dec 2004 15:07:53 -0000	1.4
  @@ -9,12 +9,12 @@
   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.MessageManager;
  +import org.apache.commons.i18n.XMLMessageProvider;
   
   public class Executor {
       static {
  -        MessageManager.install("contract/exceptions", Thread.currentThread().getContextClassLoader().getResourceAsStream("exceptions.xml"));
  -        MessageManager.install("contract/constraints", Thread.currentThread().getContextClassLoader().getResourceAsStream("constraints.xml"));
  +        XMLMessageProvider.install("contract/exceptions", Thread.currentThread().getContextClassLoader().getResourceAsStream("exceptions.xml"));
  +        XMLMessageProvider.install("contract/constraints", Thread.currentThread().getContextClassLoader().getResourceAsStream("constraints.xml"));
       }
       
       public static void init() {};
  
  
  
  1.5       +2 -2      jakarta-commons-sandbox/contract/src/java/org/apache/commons/contract/util/MainWrapper.java
  
  Index: MainWrapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/contract/src/java/org/apache/commons/contract/util/MainWrapper.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- MainWrapper.java	18 Dec 2004 13:52:16 -0000	1.4
  +++ MainWrapper.java	18 Dec 2004 15:07:54 -0000	1.5
  @@ -34,11 +34,11 @@
   import org.apache.commons.contract.descriptor.ParameterDescriptor;
   import org.apache.commons.i18n.LocalizedException;
   import org.apache.commons.i18n.LocalizedMessage;
  -import org.apache.commons.i18n.MessageManager;
  +import org.apache.commons.i18n.XMLMessageProvider;
   
   public class MainWrapper {
       static {
  -        MessageManager.install("contract/util", Thread.currentThread().getContextClassLoader().getResourceAsStream("util.xml"));
  +        XMLMessageProvider.install("contract/util", Thread.currentThread().getContextClassLoader().getResourceAsStream("util.xml"));
       }
       
       private static LocalizedMessage usage = new LocalizedMessage("usage");
  
  
  

---------------------------------------------------------------------
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