click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From med...@apache.org
Subject svn commit: r922539 - in /click/trunk/click/framework/src/org/apache/click/control: AbstractLink.java ActionButton.java ActionLink.java
Date Sat, 13 Mar 2010 11:49:55 GMT
Author: medgar
Date: Sat Mar 13 11:49:54 2010
New Revision: 922539

URL: http://svn.apache.org/viewvc?rev=922539&view=rev
Log:
CLK-606

Modified:
    click/trunk/click/framework/src/org/apache/click/control/AbstractLink.java
    click/trunk/click/framework/src/org/apache/click/control/ActionButton.java
    click/trunk/click/framework/src/org/apache/click/control/ActionLink.java

Modified: click/trunk/click/framework/src/org/apache/click/control/AbstractLink.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/control/AbstractLink.java?rev=922539&r1=922538&r2=922539&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/control/AbstractLink.java (original)
+++ click/trunk/click/framework/src/org/apache/click/control/AbstractLink.java Sat Mar 13
11:49:54 2010
@@ -63,7 +63,7 @@ public abstract class AbstractLink exten
     protected String label;
 
     /** The link parameters map. */
-    protected Map parameters;
+    protected Map<String, Object> parameters;
 
     /** The link 'tabindex' attribute. */
     protected int tabindex;
@@ -380,9 +380,9 @@ public abstract class AbstractLink exten
      *
      * @return the AbstractLink parameters Map
      */
-    public Map getParameters() {
+    public Map<String, Object> getParameters() {
         if (parameters == null) {
-            parameters = new HashMap(4);
+            parameters = new HashMap<String, Object>(4);
         }
         return parameters;
     }
@@ -615,12 +615,12 @@ public abstract class AbstractLink exten
      * @param parameters the parameters to render
      * @param context the request context
      */
-    protected void renderParameters(HtmlStringBuffer buffer, Map parameters,
+    protected void renderParameters(HtmlStringBuffer buffer, Map<String, Object> parameters,
         Context context) {
 
-        Iterator i = parameters.keySet().iterator();
+        Iterator<String> i = parameters.keySet().iterator();
         while (i.hasNext()) {
-            String paramName = i.next().toString();
+            String paramName = i.next();
             Object paramValue = getParameters().get(paramName);
 
             // Check for multivalued parameter
@@ -653,6 +653,7 @@ public abstract class AbstractLink exten
      *
      * @param context the request context
      */
+    @SuppressWarnings("unchecked")
     protected void bindRequestParameters(Context context) {
         HttpServletRequest request = context.getRequest();
         Enumeration paramNames = request.getParameterNames();

Modified: click/trunk/click/framework/src/org/apache/click/control/ActionButton.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/control/ActionButton.java?rev=922539&r1=922538&r2=922539&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/control/ActionButton.java (original)
+++ click/trunk/click/framework/src/org/apache/click/control/ActionButton.java Sat Mar 13
11:49:54 2010
@@ -80,7 +80,7 @@ public class ActionButton extends Button
 
 
     /** The link parameters map. */
-    protected Map parameters;
+    protected Map<String, String> parameters;
 
     // ----------------------------------------------------------- Constructors
 
@@ -272,9 +272,9 @@ public class ActionButton extends Button
         }
 
         if (hasParameters()) {
-            Iterator i = getParameters().keySet().iterator();
+            Iterator<String> i = getParameters().keySet().iterator();
             while (i.hasNext()) {
-                String name = i.next().toString();
+                String name = i.next();
                 if (!name.equals(ACTION_BUTTON) && !name.equals(VALUE)) {
                     Object paramValue = getParameters().get(name);
                     String encodedValue
@@ -340,9 +340,9 @@ public class ActionButton extends Button
      *
      * @return the ActionButton parameters Map
      */
-    public Map getParameters() {
+    public Map<String, String> getParameters() {
         if (parameters == null) {
-            parameters = new HashMap(4);
+            parameters = new HashMap<String, String>(4);
         }
         return parameters;
     }
@@ -457,6 +457,7 @@ public class ActionButton extends Button
      * This method binds the submitted request value to the ActionLink's
      * value.
      */
+    @SuppressWarnings("unchecked")
     public void bindRequestValue() {
         Context context = getContext();
         if (context.isMultipartRequest()) {

Modified: click/trunk/click/framework/src/org/apache/click/control/ActionLink.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/control/ActionLink.java?rev=922539&r1=922538&r2=922539&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/control/ActionLink.java (original)
+++ click/trunk/click/framework/src/org/apache/click/control/ActionLink.java Sat Mar 13 11:49:54
2010
@@ -307,9 +307,9 @@ public class ActionLink extends Abstract
         }
 
         if (hasParameters()) {
-            Iterator i = getParameters().keySet().iterator();
+            Iterator<String> i = getParameters().keySet().iterator();
             while (i.hasNext()) {
-                String paramName = i.next().toString();
+                String paramName = i.next();
                 if (!paramName.equals(ACTION_LINK) && !paramName.equals(VALUE)) {
                     Object paramValue = getParameters().get(paramName);
 



Mime
View raw message