mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)
68196: Merged PLATFORM1 (4.3/Cloud) to HEAD-BUG-FIX (4.3/Cloud) 63733: ACE-701: SONAR: Check/fix instances of "Dodgy - Load of known null value" violations in the repository project - Made clear after consulting author. - Ran JUnit tests which covered the code. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@68459 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -424,7 +424,8 @@ public class MLPropertyInterceptor implements MethodInterceptor
|
||||
|
||||
// If the content locale is too specific, try relaxing it to just language
|
||||
Locale contentLocaleLang = I18NUtil.getContentLocaleLang();
|
||||
if (!contentLocaleLang.equals(locale))
|
||||
// We do not expect contentLocaleLang to be null
|
||||
if (contentLocaleLang != null)
|
||||
{
|
||||
locale = I18NUtil.getNearestLocale(contentLocaleLang, locales);
|
||||
if (locale != null)
|
||||
@@ -432,6 +433,10 @@ public class MLPropertyInterceptor implements MethodInterceptor
|
||||
return mlText.getValue(locale);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.warn("contentLocaleLang is null in getClosestValue. This is not expected.");
|
||||
}
|
||||
|
||||
// Just return the default translation
|
||||
return mlText.getDefaultValue();
|
||||
|
Reference in New Issue
Block a user