You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2013/10/07 13:25:23 UTC
svn commit: r1529819 -
/myfaces/tobago/branches/tobago-1.5.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ClientPropertiesKey.java
Author: lofwyr
Date: Mon Oct 7 11:25:22 2013
New Revision: 1529819
URL: http://svn.apache.org/r1529819
Log:
TOBAGO-1317: Make ClientProperties robust against locale=null
Modified:
myfaces/tobago/branches/tobago-1.5.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ClientPropertiesKey.java
Modified: myfaces/tobago/branches/tobago-1.5.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ClientPropertiesKey.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.5.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ClientPropertiesKey.java?rev=1529819&r1=1529818&r2=1529819&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.5.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ClientPropertiesKey.java (original)
+++ myfaces/tobago/branches/tobago-1.5.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/context/ClientPropertiesKey.java Mon Oct 7 11:25:22 2013
@@ -80,8 +80,14 @@ public final class ClientPropertiesKey i
if (!contentType.equals(that.contentType)) {
return false;
}
- if (!locale.equals(that.locale)) {
- return false;
+ if (locale == null) {
+ if (that.locale != null) {
+ return false;
+ }
+ } else {
+ if (!locale.equals(that.locale)) {
+ return false;
+ }
}
if (!theme.equals(that.theme)) {
return false;
@@ -97,7 +103,9 @@ public final class ClientPropertiesKey i
int result = contentType.hashCode();
result = 31 * result + theme.hashCode();
result = 31 * result + userAgent.hashCode();
- result = 31 * result + locale.hashCode();
+ if (locale != null) {
+ result = 31 * result + locale.hashCode();
+ }
return result;
}