click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bck...@apache.org
Subject svn commit: r961502 - in /click/trunk/click/framework/test/org/apache/click: ./ control/ pages/ util/ utilinvokelistener/
Date Wed, 07 Jul 2010 20:41:48 GMT
Author: bckfnn
Date: Wed Jul  7 20:41:47 2010
New Revision: 961502

URL: http://svn.apache.org/viewvc?rev=961502&view=rev
Log:
fix minor compile warnings.

Modified:
    click/trunk/click/framework/test/org/apache/click/PageTest.java
    click/trunk/click/framework/test/org/apache/click/control/AbstractContainerTest.java
    click/trunk/click/framework/test/org/apache/click/control/ControlTest.java
    click/trunk/click/framework/test/org/apache/click/control/FieldSetTest.java
    click/trunk/click/framework/test/org/apache/click/control/FormTest.java
    click/trunk/click/framework/test/org/apache/click/control/TableTest.java
    click/trunk/click/framework/test/org/apache/click/control/TextAreaTest.java
    click/trunk/click/framework/test/org/apache/click/control/TextFieldTest.java
    click/trunk/click/framework/test/org/apache/click/pages/BinaryPage.java
    click/trunk/click/framework/test/org/apache/click/pages/JspPage.java
    click/trunk/click/framework/test/org/apache/click/pages/JspRedirectPage.java
    click/trunk/click/framework/test/org/apache/click/pages/ListenerPage.java
    click/trunk/click/framework/test/org/apache/click/pages/RedirectToHtm.java
    click/trunk/click/framework/test/org/apache/click/pages/RedirectToJsp.java
    click/trunk/click/framework/test/org/apache/click/pages/RedirectToSelfPage.java
    click/trunk/click/framework/test/org/apache/click/pages/SetPathToJspPage.java
    click/trunk/click/framework/test/org/apache/click/util/ContainerMessageMapTest.java
    click/trunk/click/framework/test/org/apache/click/util/TestPage.java
    click/trunk/click/framework/test/org/apache/click/utilinvokelistener/ClickUtilsInvokeListenerTest.java

Modified: click/trunk/click/framework/test/org/apache/click/PageTest.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/test/org/apache/click/PageTest.java?rev=961502&r1=961501&r2=961502&view=diff
==============================================================================
--- click/trunk/click/framework/test/org/apache/click/PageTest.java (original)
+++ click/trunk/click/framework/test/org/apache/click/PageTest.java Wed Jul  7 20:41:47 2010
@@ -40,7 +40,7 @@ public class PageTest extends TestCase {
         String contextPath = container.getRequest().getContextPath();
         container.getRequest().setMethod("GET");
 
-        RedirectToHtm page = container.testPage(RedirectToHtm.class);
+        container.testPage(RedirectToHtm.class);
 
         // assert that the Page successfully redirected to test.htm
         String expected = contextPath + "/test.htm";
@@ -58,7 +58,7 @@ public class PageTest extends TestCase {
         String contextPath = container.getRequest().getContextPath();
         container.getRequest().setMethod("GET");
 
-        RedirectToJsp page = container.testPage(RedirectToJsp.class);
+        container.testPage(RedirectToJsp.class);
 
         // assert that the Page successfully redirected to jsp-page.htm, meaning
         // Click converted the Page JSP template from jsp-page.jsp to jsp-page.htm
@@ -77,7 +77,7 @@ public class PageTest extends TestCase {
         String contextPath = container.getRequest().getContextPath();
         container.getRequest().setMethod("GET");
 
-        JspRedirectPage page = container.testPage(JspRedirectPage.class);
+        container.testPage(JspRedirectPage.class);
 
         // assert that the Page successfully redirected to test.jsp, meaning
         // Click DID NOT convert the location from test.jsp to test.htm
@@ -118,7 +118,7 @@ public class PageTest extends TestCase {
         container.start();
         container.getRequest().setMethod("GET");
 
-        RedirectToSelfPage page = container.testPage(RedirectToSelfPage.class);
+        container.testPage(RedirectToSelfPage.class);
 
         assertEquals(RedirectToSelfPage.class.getName(), container.getRedirectPageClass().getName());
 
@@ -135,7 +135,7 @@ public class PageTest extends TestCase {
         container.start();
         container.getRequest().setMethod("GET");
 
-        SetPathToJspPage page = container.testPage(SetPathToJspPage.class);
+        container.testPage(SetPathToJspPage.class);
         assertEquals(SetPathToJspPage.PATH, container.getForward());
 
         container.stop();

Modified: click/trunk/click/framework/test/org/apache/click/control/AbstractContainerTest.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/test/org/apache/click/control/AbstractContainerTest.java?rev=961502&r1=961501&r2=961502&view=diff
==============================================================================
--- click/trunk/click/framework/test/org/apache/click/control/AbstractContainerTest.java (original)
+++ click/trunk/click/framework/test/org/apache/click/control/AbstractContainerTest.java Wed
Jul  7 20:41:47 2010
@@ -32,7 +32,9 @@ public class AbstractContainerTest exten
      */
     public void testInsertPreCondistion() {
         MockContext.initContext();
-        AbstractContainer container = new AbstractContainer("form") {};
+        AbstractContainer container = new AbstractContainer("form") {
+            private static final long serialVersionUID = 1L;
+        };
 
         // Check that adding null control fails
         try {
@@ -64,7 +66,9 @@ public class AbstractContainerTest exten
         }
 
         // Create new container for testing
-        container = new AbstractContainer("form") {};
+        container = new AbstractContainer("form") {
+            private static final long serialVersionUID = 1L;
+        };
 
         // Check that adding TextField with name succeeds
         try {
@@ -94,7 +98,9 @@ public class AbstractContainerTest exten
 
         // Check that adding Container without name succeeds
         try {
-            container.add(new AbstractContainer() {});
+            container.add(new AbstractContainer() {
+                private static final long serialVersionUID = 1L;
+            });
         } catch (Exception e) {
             e.printStackTrace();
             fail("Container does not need to define name");
@@ -156,6 +162,7 @@ public class AbstractContainerTest exten
      */
     public void testReplace() {
         AbstractContainer container = new AbstractContainer("container") {
+            private static final long serialVersionUID = 1L;
         };
 
         // Add two fields named child1 and child2

Modified: click/trunk/click/framework/test/org/apache/click/control/ControlTest.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/test/org/apache/click/control/ControlTest.java?rev=961502&r1=961501&r2=961502&view=diff
==============================================================================
--- click/trunk/click/framework/test/org/apache/click/control/ControlTest.java (original)
+++ click/trunk/click/framework/test/org/apache/click/control/ControlTest.java Wed Jul  7
20:41:47 2010
@@ -99,7 +99,7 @@ public class ControlTest extends TestCas
      * CLK-414.
      */
     public void testAddContainerToItself() {
-        MockContext context = MockContext.initContext();
+        MockContext.initContext();
         try {
             Form form = new Form("form");
             form.add(form);

Modified: click/trunk/click/framework/test/org/apache/click/control/FieldSetTest.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/test/org/apache/click/control/FieldSetTest.java?rev=961502&r1=961501&r2=961502&view=diff
==============================================================================
--- click/trunk/click/framework/test/org/apache/click/control/FieldSetTest.java (original)
+++ click/trunk/click/framework/test/org/apache/click/control/FieldSetTest.java Wed Jul  7
20:41:47 2010
@@ -216,7 +216,7 @@ public class FieldSetTest extends TestCa
         // Check that fieldWidth has entry for field
         assertTrue(testFieldSet.getFieldWidths().size() == 1);
         
-        Integer width = (Integer) testFieldSet.getFieldWidths().get(field.getName());
+        Integer width = testFieldSet.getFieldWidths().get(field.getName());
         assertEquals(4, width.intValue());
 
         testFieldSet.remove(field);
@@ -241,7 +241,7 @@ public class FieldSetTest extends TestCa
         // Check that fieldWidth has entry for table
         assertTrue(testFieldSet.getFieldWidths().size() == 1);
         
-        Integer width = (Integer) testFieldSet.getFieldWidths().get(table.getName());
+        Integer width = testFieldSet.getFieldWidths().get(table.getName());
         assertEquals(4, width.intValue());
 
         testFieldSet.remove(table);
@@ -478,6 +478,7 @@ public class FieldSetTest extends TestCa
      * A custom Div container.
      */
     static class Div extends AbstractContainer {
+        private static final long serialVersionUID = 1L;
 
         /**
          * Construct a new Div with the given name.

Modified: click/trunk/click/framework/test/org/apache/click/control/FormTest.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/test/org/apache/click/control/FormTest.java?rev=961502&r1=961501&r2=961502&view=diff
==============================================================================
--- click/trunk/click/framework/test/org/apache/click/control/FormTest.java (original)
+++ click/trunk/click/framework/test/org/apache/click/control/FormTest.java Wed Jul  7 20:41:47
2010
@@ -58,7 +58,7 @@ public class FormTest extends TestCase {
         Assert.assertNotNull(submitCheckField);
 
         // Add submitCheckField as a request parameter
-        request.getParameterMap().put(Form.SUBMIT_CHECK + form.getName() + "_" + context.getResourcePath(),
submitCheckField.getValue());
+        request.setParameter(Form.SUBMIT_CHECK + form.getName() + "_" + context.getResourcePath(),
submitCheckField.getValue());
         
         // Simulate a second submit check.
         valid = form.onSubmitCheck(page, "/invalid-submit.html");
@@ -76,7 +76,7 @@ public class FormTest extends TestCase {
     public void testOnSubmitCheckMissingParam() {
         MockContext context = MockContext.initContext("test-form.htm");
         MockRequest request = context.getMockRequest();
-        request.getParameterMap().put("form_name", "form");
+        request.setParameter("form_name", "form");
         Page page = new Page();
         Form form = new Form("form");
 
@@ -840,6 +840,7 @@ public class FormTest extends TestCase {
      * Div container used for testing.
      */
     static class Div extends AbstractContainer {
+        private static final long serialVersionUID = 1L;
 
         /**
          * Constructor.

Modified: click/trunk/click/framework/test/org/apache/click/control/TableTest.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/test/org/apache/click/control/TableTest.java?rev=961502&r1=961501&r2=961502&view=diff
==============================================================================
--- click/trunk/click/framework/test/org/apache/click/control/TableTest.java (original)
+++ click/trunk/click/framework/test/org/apache/click/control/TableTest.java Wed Jul  7 20:41:47
2010
@@ -112,6 +112,8 @@ public class TableTest extends TestCase 
         }
 
         Table table = new Table("table") {
+            private static final long serialVersionUID = 1L;
+
             @Override
             protected void addRowAttributes(Map attributes, Object row, int rowIndex) {
                 Foo foo = (Foo) row;

Modified: click/trunk/click/framework/test/org/apache/click/control/TextAreaTest.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/test/org/apache/click/control/TextAreaTest.java?rev=961502&r1=961501&r2=961502&view=diff
==============================================================================
--- click/trunk/click/framework/test/org/apache/click/control/TextAreaTest.java (original)
+++ click/trunk/click/framework/test/org/apache/click/control/TextAreaTest.java Wed Jul  7
20:41:47 2010
@@ -37,14 +37,14 @@ public class TextAreaTest extends TestCa
         TextArea textArea = new TextArea("text");
         assertEquals("text", textArea.getName());
         
-        request.getParameterMap().put("text", "textvalue");
+        request.setParameter("text", "textvalue");
         
         assertTrue(textArea.onProcess());
         assertTrue(textArea.isValid());
         assertEquals("textvalue", textArea.getValue());
         assertEquals("textvalue", textArea.getValueObject());
         
-        request.getParameterMap().put("text", "");
+        request.setParameter("text", "");
         
         assertTrue(textArea.onProcess());
         assertTrue(textArea.isValid());
@@ -58,7 +58,7 @@ public class TextAreaTest extends TestCa
         assertEquals("", textArea.getValue());
         assertEquals(null, textArea.getValueObject());
         
-        request.getParameterMap().put("text", "ratherlongtextvalue");
+        request.setParameter("text", "ratherlongtextvalue");
         
         textArea.setMinLength(10);
         assertTrue(textArea.onProcess());

Modified: click/trunk/click/framework/test/org/apache/click/control/TextFieldTest.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/test/org/apache/click/control/TextFieldTest.java?rev=961502&r1=961501&r2=961502&view=diff
==============================================================================
--- click/trunk/click/framework/test/org/apache/click/control/TextFieldTest.java (original)
+++ click/trunk/click/framework/test/org/apache/click/control/TextFieldTest.java Wed Jul 
7 20:41:47 2010
@@ -37,14 +37,14 @@ public class TextFieldTest extends TestC
         TextField textField = new TextField("text");
         assertEquals("text", textField.getName());
         
-        request.getParameterMap().put("text", "textvalue");
+        request.setParameter("text", "textvalue");
         
         assertTrue(textField.onProcess());
         assertTrue(textField.isValid());
         assertEquals("textvalue", textField.getValue());
         assertEquals("textvalue", textField.getValueObject());
         
-        request.getParameterMap().put("text", "");
+        request.setParameter("text", "");
         
         assertTrue(textField.onProcess());
         assertTrue(textField.isValid());
@@ -58,7 +58,7 @@ public class TextFieldTest extends TestC
         assertEquals("", textField.getValue());
         assertEquals(null, textField.getValueObject());
         
-        request.getParameterMap().put("text", "ratherlongtextvalue");
+        request.setParameter("text", "ratherlongtextvalue");
         
         textField.setMinLength(10);
         assertTrue(textField.onProcess());

Modified: click/trunk/click/framework/test/org/apache/click/pages/BinaryPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/test/org/apache/click/pages/BinaryPage.java?rev=961502&r1=961501&r2=961502&view=diff
==============================================================================
--- click/trunk/click/framework/test/org/apache/click/pages/BinaryPage.java (original)
+++ click/trunk/click/framework/test/org/apache/click/pages/BinaryPage.java Wed Jul  7 20:41:47
2010
@@ -26,6 +26,7 @@ import org.apache.click.Page;
  * Page that renders binary content.
  */
 public class BinaryPage extends Page {
+    private static final long serialVersionUID = 1L;
 
     @Override
     public void onInit() {

Modified: click/trunk/click/framework/test/org/apache/click/pages/JspPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/test/org/apache/click/pages/JspPage.java?rev=961502&r1=961501&r2=961502&view=diff
==============================================================================
--- click/trunk/click/framework/test/org/apache/click/pages/JspPage.java (original)
+++ click/trunk/click/framework/test/org/apache/click/pages/JspPage.java Wed Jul  7 20:41:47
2010
@@ -24,5 +24,6 @@ import org.apache.click.Page;
  * Page with a JSP template.
  */
 public class JspPage extends Page {
+    private static final long serialVersionUID = 1L;
 
 }

Modified: click/trunk/click/framework/test/org/apache/click/pages/JspRedirectPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/test/org/apache/click/pages/JspRedirectPage.java?rev=961502&r1=961501&r2=961502&view=diff
==============================================================================
--- click/trunk/click/framework/test/org/apache/click/pages/JspRedirectPage.java (original)
+++ click/trunk/click/framework/test/org/apache/click/pages/JspRedirectPage.java Wed Jul 
7 20:41:47 2010
@@ -22,6 +22,7 @@ package org.apache.click.pages;
  * Page which redirects to JspPage by specifying the JSP path.
  */
 public class JspRedirectPage extends RedirectToJsp {
+    private static final long serialVersionUID = 1L;
 
     /**
      * Initialize page.

Modified: click/trunk/click/framework/test/org/apache/click/pages/ListenerPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/test/org/apache/click/pages/ListenerPage.java?rev=961502&r1=961501&r2=961502&view=diff
==============================================================================
--- click/trunk/click/framework/test/org/apache/click/pages/ListenerPage.java (original)
+++ click/trunk/click/framework/test/org/apache/click/pages/ListenerPage.java Wed Jul  7 20:41:47
2010
@@ -30,6 +30,7 @@ import org.apache.click.control.TextFiel
  * Page which tests action listener functionality.
  */
 public class ListenerPage extends Page {
+    private static final long serialVersionUID = 1L;
 
     /** Form holder. */
     public Form form = new Form("form");
@@ -49,6 +50,8 @@ public class ListenerPage extends Page {
 
         // Add listener on submit button
         submit.setActionListener(new ActionListener() {
+            private static final long serialVersionUID = 1L;
+
             public boolean onAction(Control source) {
                 // Assert that this listener can access the textfield value
                 Assert.assertEquals("one", form.getFieldValue("field"));

Modified: click/trunk/click/framework/test/org/apache/click/pages/RedirectToHtm.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/test/org/apache/click/pages/RedirectToHtm.java?rev=961502&r1=961501&r2=961502&view=diff
==============================================================================
--- click/trunk/click/framework/test/org/apache/click/pages/RedirectToHtm.java (original)
+++ click/trunk/click/framework/test/org/apache/click/pages/RedirectToHtm.java Wed Jul  7
20:41:47 2010
@@ -24,7 +24,8 @@ import org.apache.click.Page;
  * Page which redirects to another Page through its path.
  */
 public class RedirectToHtm extends Page {
- 
+    private static final long serialVersionUID = 1L;
+
     /**
      * Redirect to test.htm path.
      */

Modified: click/trunk/click/framework/test/org/apache/click/pages/RedirectToJsp.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/test/org/apache/click/pages/RedirectToJsp.java?rev=961502&r1=961501&r2=961502&view=diff
==============================================================================
--- click/trunk/click/framework/test/org/apache/click/pages/RedirectToJsp.java (original)
+++ click/trunk/click/framework/test/org/apache/click/pages/RedirectToJsp.java Wed Jul  7
20:41:47 2010
@@ -24,6 +24,7 @@ import org.apache.click.Page;
  * Page which redirects to another Page through its class.
  */
 public class RedirectToJsp extends Page {
+    private static final long serialVersionUID = 1L;
 
     /**
      * Redirect to JspPage.

Modified: click/trunk/click/framework/test/org/apache/click/pages/RedirectToSelfPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/test/org/apache/click/pages/RedirectToSelfPage.java?rev=961502&r1=961501&r2=961502&view=diff
==============================================================================
--- click/trunk/click/framework/test/org/apache/click/pages/RedirectToSelfPage.java (original)
+++ click/trunk/click/framework/test/org/apache/click/pages/RedirectToSelfPage.java Wed Jul
 7 20:41:47 2010
@@ -24,6 +24,7 @@ import org.apache.click.Page;
  * This page redirects to itself.
  */
 public class RedirectToSelfPage extends Page {
+    private static final long serialVersionUID = 1L;
 
     /**
      * Redirect to self.

Modified: click/trunk/click/framework/test/org/apache/click/pages/SetPathToJspPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/test/org/apache/click/pages/SetPathToJspPage.java?rev=961502&r1=961501&r2=961502&view=diff
==============================================================================
--- click/trunk/click/framework/test/org/apache/click/pages/SetPathToJspPage.java (original)
+++ click/trunk/click/framework/test/org/apache/click/pages/SetPathToJspPage.java Wed Jul
 7 20:41:47 2010
@@ -24,6 +24,7 @@ import org.apache.click.Page;
  * This page sets its path to a JSP.
  */
 public class SetPathToJspPage extends Page {
+    private static final long serialVersionUID = 1L;
 
     public static final String PATH = "dummy.jsp";
 

Modified: click/trunk/click/framework/test/org/apache/click/util/ContainerMessageMapTest.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/test/org/apache/click/util/ContainerMessageMapTest.java?rev=961502&r1=961501&r2=961502&view=diff
==============================================================================
--- click/trunk/click/framework/test/org/apache/click/util/ContainerMessageMapTest.java (original)
+++ click/trunk/click/framework/test/org/apache/click/util/ContainerMessageMapTest.java Wed
Jul  7 20:41:47 2010
@@ -58,6 +58,7 @@ public class ContainerMessageMapTest ext
      * Custom Form class.
      */
     public class MyForm extends Form {
+        private static final long serialVersionUID = 1L;
 
         /**
          * Construct a MyForm instance for the given name.

Modified: click/trunk/click/framework/test/org/apache/click/util/TestPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/test/org/apache/click/util/TestPage.java?rev=961502&r1=961501&r2=961502&view=diff
==============================================================================
--- click/trunk/click/framework/test/org/apache/click/util/TestPage.java (original)
+++ click/trunk/click/framework/test/org/apache/click/util/TestPage.java Wed Jul  7 20:41:47
2010
@@ -24,5 +24,6 @@ import org.apache.click.Page;
  * A test page.
  */
 public class TestPage extends Page {
+    private static final long serialVersionUID = 1L;
 
 }

Modified: click/trunk/click/framework/test/org/apache/click/utilinvokelistener/ClickUtilsInvokeListenerTest.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/test/org/apache/click/utilinvokelistener/ClickUtilsInvokeListenerTest.java?rev=961502&r1=961501&r2=961502&view=diff
==============================================================================
--- click/trunk/click/framework/test/org/apache/click/utilinvokelistener/ClickUtilsInvokeListenerTest.java
(original)
+++ click/trunk/click/framework/test/org/apache/click/utilinvokelistener/ClickUtilsInvokeListenerTest.java
Wed Jul  7 20:41:47 2010
@@ -70,15 +70,19 @@ public class ClickUtilsInvokeListenerTes
         
         //the anonymous inner class
         Object anon = new Object() {
+            @SuppressWarnings("unused")
             public boolean onClick(){
                 return true;
             }
+            @SuppressWarnings("unused")
             private boolean privateMethod(){
                 return true;
             }
+            @SuppressWarnings("unused")
             protected boolean protectedMethod() {
                 return true;
             }
+            @SuppressWarnings("unused")
             boolean packagePrivateMethod(){
                 return false;
             }
@@ -146,6 +150,7 @@ public class ClickUtilsInvokeListenerTes
          *
          * @return true if processing should continue
          */
+        @SuppressWarnings("unused")
         private boolean privateMethod(){
             return true;
         }
@@ -179,6 +184,7 @@ public class ClickUtilsInvokeListenerTes
          *
          * @return true if processing should continue
          */
+        @SuppressWarnings("unused")
         public boolean onClick(){
             return true;
         }



Mime
View raw message