tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/util StringManager.java
Date Mon, 12 Feb 2001 03:25:05 GMT
costin      01/02/11 19:25:05

  Modified:    src/share/org/apache/tomcat/util StringManager.java
  Log:
  Bug fix - if the localized bundle is not found, use US.
  ( I just installed a RO-localized linux, and tomcat didn't start )
  
  Revision  Changes    Path
  1.6       +13 -5     jakarta-tomcat/src/share/org/apache/tomcat/util/StringManager.java
  
  Index: StringManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/StringManager.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- StringManager.java	2000/07/11 03:49:05	1.5
  +++ StringManager.java	2001/02/12 03:25:04	1.6
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/StringManager.java,v
1.5 2000/07/11 03:49:05 alex Exp $
  - * $Revision: 1.5 $
  - * $Date: 2000/07/11 03:49:05 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/StringManager.java,v
1.6 2001/02/12 03:25:04 costin Exp $
  + * $Revision: 1.6 $
  + * $Date: 2001/02/12 03:25:04 $
    *
    * ====================================================================
    *
  @@ -109,12 +109,20 @@
   
       private StringManager(String packageName) {
           String bundleName = packageName + ".LocalStrings";
  -        bundle = ResourceBundle.getBundle(bundleName);
  +        try {
  +	    bundle = ResourceBundle.getBundle(bundleName);
  +	} catch( MissingResourceException ex ) {
  +	    bundle= ResourceBundle.getBundle( bundleName, Locale.US);
  +	}
       }
   
       private StringManager(String packageName,Locale loc) {
           String bundleName = packageName + ".LocalStrings";
  -        bundle = ResourceBundle.getBundle(bundleName,loc);
  +        try {
  +	    bundle = ResourceBundle.getBundle(bundleName,loc);
  +	} catch( MissingResourceException ex ) {
  +	    bundle= ResourceBundle.getBundle( bundleName, Locale.US);
  +	}
       }
   
       /**
  
  
  

Mime
View raw message