archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1229065 - /archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultCommonServices.java
Date Mon, 09 Jan 2012 09:09:35 GMT
Author: olamy
Date: Mon Jan  9 09:09:35 2012
New Revision: 1229065

URL: http://svn.apache.org/viewvc?rev=1229065&view=rev
Log:
avoid noise for asked locale en as it is default

Modified:
    archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultCommonServices.java

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultCommonServices.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultCommonServices.java?rev=1229065&r1=1229064&r2=1229065&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultCommonServices.java
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultCommonServices.java
Mon Jan  9 09:09:35 2012
@@ -73,12 +73,13 @@ public class DefaultCommonServices
         throws IOException
     {
         // load default
-        loadResource( properties, new StringBuilder( resourceName ).append( ".properties"
).toString() );
+        loadResource( properties, new StringBuilder( resourceName ).append( ".properties"
).toString(), locale );
         // if locale override with locale content
         if ( StringUtils.isNotEmpty( locale ) )
         {
             loadResource( properties,
-                          new StringBuilder( resourceName ).append( "_" + locale ).append(
".properties" ).toString() );
+                          new StringBuilder( resourceName ).append( "_" + locale ).append(
".properties" ).toString(),
+                          locale );
         }
 
     }
@@ -96,7 +97,7 @@ public class DefaultCommonServices
         return output.toString();
     }
 
-    private void loadResource( final Properties finalProperties, String resourceName )
+    private void loadResource( final Properties finalProperties, String resourceName, String
locale )
         throws IOException
     {
         InputStream is = null;
@@ -111,7 +112,10 @@ public class DefaultCommonServices
             }
             else
             {
-                log.info( "cannot load resource {}", resourceName );
+                if ( !StringUtils.equalsIgnoreCase( locale, "en" ) )
+                {
+                    log.info( "cannot load resource {}", resourceName );
+                }
             }
         }
         finally



Mime
View raw message