click-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Finn Bock <>
Subject Type of field Page.messages could be Map<String, String>.
Date Sat, 27 Feb 2010 21:17:27 GMT

I noticed that the field Page.messages is defined as a MessageMap but
as far as I can see, it is only ever used as a Map (now a Map<String,
String>). If the field was defined as a Map<String, String>, it would
be easier to supply my own implementation of message map and still
re-use the field in Page.

There is a small change that subclasses of Page might depend on the
"messages" field being defined as a MessageMap but I doubt it.

My suggested change, as a patch:

Index: click/framework/src/org/apache/click/
--- click/framework/src/org/apache/click/      (revision 916790)
+++ click/framework/src/org/apache/click/      (working copy)
@@ -174,7 +174,7 @@
     protected boolean headersEdited;

     /** The map of localized page resource messages. **/
-    protected transient MessagesMap messages;
+    protected transient Map<String, String> messages;

View raw message