summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2012-01-09 09:09:35 +0000
committerOlivier Lamy <olamy@apache.org>2012-01-09 09:09:35 +0000
commit8e2309ee394485d276bef07a08761feb43cf46f1 (patch)
tree044b0e0ba932917c82be31a23e6a8d8852fc94ba
parenta2123c92c8a3fccd6b946148f5648573537c0127 (diff)
downloadarchiva-8e2309ee394485d276bef07a08761feb43cf46f1.tar.gz
archiva-8e2309ee394485d276bef07a08761feb43cf46f1.zip
avoid noise for asked locale en as it is default
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1229065 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultCommonServices.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultCommonServices.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultCommonServices.java
index 2400e0ce4..2be887021 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultCommonServices.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultCommonServices.java
@@ -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