click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bck...@apache.org
Subject svn commit: r961507 - in /click/trunk/click/mock/test/org/apache/click: ./ pages/ servlet/
Date Wed, 07 Jul 2010 20:56:16 GMT
Author: bckfnn
Date: Wed Jul  7 20:56:15 2010
New Revision: 961507

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

Modified:
    click/trunk/click/mock/test/org/apache/click/MockContextTest.java
    click/trunk/click/mock/test/org/apache/click/MockRequestTest.java
    click/trunk/click/mock/test/org/apache/click/pages/BorderPage.java
    click/trunk/click/mock/test/org/apache/click/pages/BorderTestPage.java
    click/trunk/click/mock/test/org/apache/click/pages/FormPage.java
    click/trunk/click/mock/test/org/apache/click/pages/ForwardPage.java
    click/trunk/click/mock/test/org/apache/click/pages/RedirectPage.java
    click/trunk/click/mock/test/org/apache/click/pages/TestPage.java
    click/trunk/click/mock/test/org/apache/click/servlet/MockTests.java

Modified: click/trunk/click/mock/test/org/apache/click/MockContextTest.java
URL: http://svn.apache.org/viewvc/click/trunk/click/mock/test/org/apache/click/MockContextTest.java?rev=961507&r1=961506&r2=961507&view=diff
==============================================================================
--- click/trunk/click/mock/test/org/apache/click/MockContextTest.java (original)
+++ click/trunk/click/mock/test/org/apache/click/MockContextTest.java Wed Jul  7 20:56:15
2010
@@ -57,13 +57,15 @@ public class MockContextTest extends Tes
      */
     public void testFireActionListeners() {
         MockContext context = MockContext.initContext();
-        MockRequest request = (MockRequest) context.getMockRequest();
+        MockRequest request = context.getMockRequest();
         request.setParameter("save", "save");
 
         submitCalled = false;
         Submit submit = new Submit("save");
         // Registry a listener which must be invoked
         submit.setActionListener(new ActionListener() {
+            private static final long serialVersionUID = 1L;
+
             public boolean onAction(Control source) {
                 // When action is invoked, set flag to true
                 return submitCalled = true;
@@ -94,12 +96,14 @@ public class MockContextTest extends Tes
      */
     public void testResetActionListeners() {
         MockContext context = MockContext.initContext();
-        MockRequest request = (MockRequest) context.getMockRequest();
+        MockRequest request = context.getMockRequest();
         request.setParameter("save", "save");
 
         Submit submit = new Submit("save");
         // Registry a listener which must be invoked
         submit.setActionListener(new ActionListener() {
+            private static final long serialVersionUID = 1L;
+
             public boolean onAction(Control source) {
                 // When action is invoked, set flag to true
                 return true;
@@ -128,7 +132,7 @@ public class MockContextTest extends Tes
      */
     public void testFireBehaviors() {
         MockContext context = MockContext.initContext();
-        MockRequest request = (MockRequest) context.getMockRequest();
+        MockRequest request = context.getMockRequest();
         request.setParameter("save", "save");
 
         submitCalled = false;
@@ -136,6 +140,9 @@ public class MockContextTest extends Tes
         Submit submit = new Submit("save");
         // Register an ajax behavior
         submit.addBehavior(new AjaxBehavior() {
+            private static final long serialVersionUID = 1L;
+
+            @Override
             public Partial onAction(Control source) {
                 // When action is invoked, set flag to true
                 submitCalled = true;
@@ -164,12 +171,15 @@ public class MockContextTest extends Tes
      */
     public void testResetBehaviors() {
         MockContext context = MockContext.initContext();
-        MockRequest request = (MockRequest) context.getMockRequest();
+        MockRequest request = context.getMockRequest();
         request.setParameter("save", "save");
 
         Submit submit = new Submit("save");
         // Register an ajax behavior
         submit.addBehavior(new AjaxBehavior() {
+            private static final long serialVersionUID = 1L;
+
+            @Override
             public Partial onAction(Control source) {
                 // When action is invoked, set flag to true
                 return new Partial();
@@ -291,7 +301,7 @@ public class MockContextTest extends Tes
      */
     public void testProcessBehaviorAndCallbacks() {
         MockContext context = MockContext.initContext();
-        MockRequest request = (MockRequest) context.getMockRequest();
+        MockRequest request = context.getMockRequest();
         request.setParameter("save", "save");
 
         Submit submit = new Submit("save");
@@ -302,6 +312,7 @@ public class MockContextTest extends Tes
         preDestroyCalled = false;
 
         submit.addBehavior(new AjaxBehavior() {
+            private static final long serialVersionUID = 1L;
 
             @Override
             public Partial onAction(Control source) {

Modified: click/trunk/click/mock/test/org/apache/click/MockRequestTest.java
URL: http://svn.apache.org/viewvc/click/trunk/click/mock/test/org/apache/click/MockRequestTest.java?rev=961507&r1=961506&r2=961507&view=diff
==============================================================================
--- click/trunk/click/mock/test/org/apache/click/MockRequestTest.java (original)
+++ click/trunk/click/mock/test/org/apache/click/MockRequestTest.java Wed Jul  7 20:56:15
2010
@@ -34,9 +34,10 @@ public class MockRequestTest extends Tes
      * Check that MockRequest can dynamically add parameters and trigger
      * a Controls action listener.
      */
+    @SuppressWarnings("unchecked")
     public void testDynamicRequest() {
         MockContext context = MockContext.initContext();
-        MockRequest request = (MockRequest) context.getMockRequest();
+        MockRequest request = context.getMockRequest();
 
         TextArea textArea = new TextArea("text");
         assertEquals("text", textArea.getName());
@@ -46,6 +47,8 @@ public class MockRequestTest extends Tes
 
         // Registry a listener which must be invoked
         textArea.setActionListener(new ActionListener() {
+            private static final long serialVersionUID = 1L;
+
             public boolean onAction(Control source) {
                 // When action is invoked, set flag to true
                 return actionCalled = true;

Modified: click/trunk/click/mock/test/org/apache/click/pages/BorderPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/mock/test/org/apache/click/pages/BorderPage.java?rev=961507&r1=961506&r2=961507&view=diff
==============================================================================
--- click/trunk/click/mock/test/org/apache/click/pages/BorderPage.java (original)
+++ click/trunk/click/mock/test/org/apache/click/pages/BorderPage.java Wed Jul  7 20:56:15
2010
@@ -24,6 +24,7 @@ import org.apache.click.Page;
  * A border page for mock testing.
  */
 public class BorderPage extends Page {
+    private static final long serialVersionUID = 1L;
 
     /**
      * Return border template path.

Modified: click/trunk/click/mock/test/org/apache/click/pages/BorderTestPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/mock/test/org/apache/click/pages/BorderTestPage.java?rev=961507&r1=961506&r2=961507&view=diff
==============================================================================
--- click/trunk/click/mock/test/org/apache/click/pages/BorderTestPage.java (original)
+++ click/trunk/click/mock/test/org/apache/click/pages/BorderTestPage.java Wed Jul  7 20:56:15
2010
@@ -22,6 +22,7 @@ package org.apache.click.pages;
  * Basic test page.
  */
 public class BorderTestPage extends BorderPage {
+    private static final long serialVersionUID = 1L;
 
     public static final String ID_VALUE = "200";
 

Modified: click/trunk/click/mock/test/org/apache/click/pages/FormPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/mock/test/org/apache/click/pages/FormPage.java?rev=961507&r1=961506&r2=961507&view=diff
==============================================================================
--- click/trunk/click/mock/test/org/apache/click/pages/FormPage.java (original)
+++ click/trunk/click/mock/test/org/apache/click/pages/FormPage.java Wed Jul  7 20:56:15 2010
@@ -26,6 +26,7 @@ import org.apache.click.control.TextFiel
  * Form test page.
  */
 public class FormPage extends Page {
+    private static final long serialVersionUID = 1L;
 
     /** Form instance. */
     private Form form = new Form("form");

Modified: click/trunk/click/mock/test/org/apache/click/pages/ForwardPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/mock/test/org/apache/click/pages/ForwardPage.java?rev=961507&r1=961506&r2=961507&view=diff
==============================================================================
--- click/trunk/click/mock/test/org/apache/click/pages/ForwardPage.java (original)
+++ click/trunk/click/mock/test/org/apache/click/pages/ForwardPage.java Wed Jul  7 20:56:15
2010
@@ -24,6 +24,7 @@ import org.apache.click.*;
  * Forward test page.
  */
 public class ForwardPage extends Page {
+    private static final long serialVersionUID = 1L;
 
     public static final String ID_VALUE = "200";
 

Modified: click/trunk/click/mock/test/org/apache/click/pages/RedirectPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/mock/test/org/apache/click/pages/RedirectPage.java?rev=961507&r1=961506&r2=961507&view=diff
==============================================================================
--- click/trunk/click/mock/test/org/apache/click/pages/RedirectPage.java (original)
+++ click/trunk/click/mock/test/org/apache/click/pages/RedirectPage.java Wed Jul  7 20:56:15
2010
@@ -24,6 +24,7 @@ import org.apache.click.*;
  * Redirect test page.
  */
 public class RedirectPage extends Page {
+    private static final long serialVersionUID = 1L;
 
     public static final String ID_VALUE = "200";
 

Modified: click/trunk/click/mock/test/org/apache/click/pages/TestPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/mock/test/org/apache/click/pages/TestPage.java?rev=961507&r1=961506&r2=961507&view=diff
==============================================================================
--- click/trunk/click/mock/test/org/apache/click/pages/TestPage.java (original)
+++ click/trunk/click/mock/test/org/apache/click/pages/TestPage.java Wed Jul  7 20:56:15 2010
@@ -24,6 +24,7 @@ import org.apache.click.*;
  * A test page.
  */
 public class TestPage extends Page {
+    private static final long serialVersionUID = 1L;
 
     public static final String ID_VALUE = "200";
 

Modified: click/trunk/click/mock/test/org/apache/click/servlet/MockTests.java
URL: http://svn.apache.org/viewvc/click/trunk/click/mock/test/org/apache/click/servlet/MockTests.java?rev=961507&r1=961506&r2=961507&view=diff
==============================================================================
--- click/trunk/click/mock/test/org/apache/click/servlet/MockTests.java (original)
+++ click/trunk/click/mock/test/org/apache/click/servlet/MockTests.java Wed Jul  7 20:56:15
2010
@@ -154,7 +154,6 @@ public class MockTests extends TestCase 
             //a mock directory is added to avoid file locking issues when
             //deleting the entire operating system temp dir.
             String tempPath3 = System.getProperty("java.io.tmpdir");
-            File tempDir3 = new File(tempPath3);
             servletContext.setTempPath(tempPath3);
             File convertedTemp = new File(servletContext.getTempPath());
             Assert.assertTrue(convertedTemp.exists());



Mime
View raw message