You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by ju...@apache.org on 2018/12/07 00:35:13 UTC
[jspwiki] 02/03: Fix from 2.11.0.M1-rc1: revert change from commit
87bf9b941fdf on 11/Nov/2018 that ended up causing lots of
ClassCastException
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit 4b62c64bd3b2e47ff815d92b533863f4862c9d95
Author: juanpablo <ju...@apache.org>
AuthorDate: Fri Dec 7 01:31:56 2018 +0100
Fix from 2.11.0.M1-rc1: revert change from commit 87bf9b941fdf on 11/Nov/2018 that ended up causing lots of ClassCastException
---
.../src/main/java/org/apache/wiki/preferences/Preferences.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/jspwiki-main/src/main/java/org/apache/wiki/preferences/Preferences.java b/jspwiki-main/src/main/java/org/apache/wiki/preferences/Preferences.java
index 64e4520..139eb24 100644
--- a/jspwiki-main/src/main/java/org/apache/wiki/preferences/Preferences.java
+++ b/jspwiki-main/src/main/java/org/apache/wiki/preferences/Preferences.java
@@ -142,9 +142,9 @@ public class Preferences
for (String key : map.keySet()) {
key = TextUtil.replaceEntities( key );
// Sometimes this is not a String as it comes from the Cookie set by Javascript
- String value = map.get(key);
+ Object value = map.get(key);
if (value != null) {
- prefs.put( key, value );
+ prefs.put( key, value.toString() );
}
}
}