You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by mp...@apache.org on 2002/07/09 00:05:15 UTC

cvs commit: jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/localization TurbineLocalizationService.java

mpoeschl    2002/07/08 15:05:15

  Modified:    src/java/org/apache/fulcrum/localization
                        TurbineLocalizationService.java
  Log:
  Strings.isValid was renamed to Strings.isNotEmpty
  
  Revision  Changes    Path
  1.2       +8 -8      jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/localization/TurbineLocalizationService.java
  
  Index: TurbineLocalizationService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/localization/TurbineLocalizationService.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TurbineLocalizationService.java	30 May 2002 02:27:23 -0000	1.1
  +++ TurbineLocalizationService.java	8 Jul 2002 22:05:15 -0000	1.2
  @@ -75,7 +75,7 @@
    * Locales.</p>
    *
    * <p>Usage example:</p>
  - * 
  + *
    * <blockquote><code><pre>
    * LocalizationService ls = (LocalizationService) TurbineServices
    *     .getInstance().getService(LocalizationService.SERVICE_NAME);
  @@ -168,7 +168,7 @@
       /**
        * Initialize list of default bundle names.
        *
  -     * @param names Ignored.
  +     * @param ignored names Ignored.
        */
       protected void initBundleNames(String[] ignored)
       {
  @@ -394,7 +394,7 @@
                                                 Map bundlesByLocale)
       {
           ResourceBundle rb = null;
  -        if ( !Strings.isValid(locale.getCountry()) &&
  +        if ( !Strings.isNotEmpty(locale.getCountry()) &&
                defaultLanguage.equals(locale.getLanguage()) )
           {
               /*
  @@ -410,10 +410,10 @@
                   rb = getBundleIgnoreException(bundleName, withDefaultCountry);
               }
           }
  -        else if ( !Strings.isValid(locale.getLanguage()) &&
  +        else if ( !Strings.isNotEmpty(locale.getLanguage()) &&
                     defaultCountry.equals(locale.getCountry()) )
           {
  -            Locale withDefaultLanguage = new Locale(defaultLanguage, 
  +            Locale withDefaultLanguage = new Locale(defaultLanguage,
                                                       locale.getCountry());
               rb = (ResourceBundle) bundlesByLocale.get(withDefaultLanguage);
               if (rb == null)
  @@ -479,7 +479,7 @@
       public Locale getLocale(HttpServletRequest req)
       {
           return getLocale(req.getHeader(ACCEPT_LANGUAGE));
  -// (JSS) Backed out this change because Tomcat seems to be returning 
  +// (JSS) Backed out this change because Tomcat seems to be returning
   //       the wrong result and things just are not working.
   //        Locale l = req.getLocale();
   //        return (l != null ? l : getLocale(req.getHeader(ACCEPT_LANGUAGE)));
  @@ -580,7 +580,7 @@
       /**
        * @see org.apache.fulcrum.localization.LocalizationService#format(String, Locale, String, Object)
        */
  -    public String format(String bundleName, Locale locale, 
  +    public String format(String bundleName, Locale locale,
                            String key, Object arg1)
       {
           return format(bundleName, locale, key, new Object[] { arg1 });
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cvs commit: jakarta-turbine-fulcrum/src/java/org/apache/fulcrum/localization TurbineLocalizationService.java

Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
mpoeschl@apache.org writes:

>  -        if ( !Strings.isValid(locale.getCountry()) &&
>  +        if ( !Strings.isNotEmpty(locale.getCountry()) &&

Argh. So there _was_ a change and I was wondering all the time...

This does not compile with the last version of commons-lang-1.0-dev
which I pulled from jakarta a while (two weeks) ago. You have to get
commons-sandbox CVS head and rebuild the lang jar.

Welcome to DLL nightmare. Could please someone make sure that the current
commons-lang-1.0-dev.jar for fulcrum contains a recent build? Thanks.

	Regards
		Henning

-- 
Henning Schmiedehausen     "Interpol und Deutsche Bank, FBI und
hps@intermeta.de            Scotland Yard, Flensburg und das BKA
henning@forge.franken.de    haben unsere Daten da." -- Kraftwerk, 1981
Anagramme: "Sieg meinen Handschuhen" -- "Sieh es und mache"

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>