[Stripes-dev] SF.net SVN: stripes: [440] trunk

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Stripes-dev] SF.net SVN: stripes: [440] trunk

tfenne
Revision: 440
          http://svn.sourceforge.net/stripes/?rev=440&view=rev
Author:   tfenne
Date:     2006-10-14 06:46:10 -0700 (Sat, 14 Oct 2006)

Log Message:
-----------
Fixed/suppressed a bunch of less than useful compiler warnings.

Modified Paths:
--------------
    trunk/examples/src/net/sourceforge/stripes/examples/bugzooky/ViewResourceActionBean.java
    trunk/stripes/src/net/sourceforge/stripes/controller/StripesRequestWrapper.java
    trunk/stripes/src/net/sourceforge/stripes/mock/MockHttpServletRequest.java
    trunk/stripes/src/net/sourceforge/stripes/mock/MockHttpServletResponse.java
    trunk/stripes/src/net/sourceforge/stripes/mock/MockHttpSession.java
    trunk/stripes/src/net/sourceforge/stripes/mock/MockServletContext.java
    trunk/tests/src/net/sourceforge/stripes/util/bean/PropertyExpressionTests.java

Modified: trunk/examples/src/net/sourceforge/stripes/examples/bugzooky/ViewResourceActionBean.java
===================================================================
--- trunk/examples/src/net/sourceforge/stripes/examples/bugzooky/ViewResourceActionBean.java 2006-10-14 12:55:57 UTC (rev 439)
+++ trunk/examples/src/net/sourceforge/stripes/examples/bugzooky/ViewResourceActionBean.java 2006-10-14 13:46:10 UTC (rev 440)
@@ -77,7 +77,7 @@
      */
     public Collection getAvailableResources() {
         ServletContext ctx = getContext().getRequest().getSession().getServletContext();
-        SortedSet resources = new TreeSet();
+        SortedSet<String> resources = new TreeSet<String>();
         resources.addAll( ctx.getResourcePaths("/bugzooky/"));
         resources.addAll( ctx.getResourcePaths("/bugzooky/layout/"));
         resources.addAll( ctx.getResourcePaths("/WEB-INF/src/"));

Modified: trunk/stripes/src/net/sourceforge/stripes/controller/StripesRequestWrapper.java
===================================================================
--- trunk/stripes/src/net/sourceforge/stripes/controller/StripesRequestWrapper.java 2006-10-14 12:55:57 UTC (rev 439)
+++ trunk/stripes/src/net/sourceforge/stripes/controller/StripesRequestWrapper.java 2006-10-14 13:46:10 UTC (rev 440)
@@ -38,6 +38,7 @@
  *
  * @author Tim Fennell
  */
+@SuppressWarnings("deprecation") // otherwise deprecated methods in super are warned!
 public class StripesRequestWrapper extends HttpServletRequestWrapper {
     /** The Multipart Request that parses out all the pieces. */
     private MultipartWrapper multipart;

Modified: trunk/stripes/src/net/sourceforge/stripes/mock/MockHttpServletRequest.java
===================================================================
--- trunk/stripes/src/net/sourceforge/stripes/mock/MockHttpServletRequest.java 2006-10-14 12:55:57 UTC (rev 439)
+++ trunk/stripes/src/net/sourceforge/stripes/mock/MockHttpServletRequest.java 2006-10-14 13:46:10 UTC (rev 440)
@@ -52,6 +52,7 @@
  * @author Tim Fennell
  * @since Stripes 1.1.1
  */
+@SuppressWarnings("deprecation")
 public class MockHttpServletRequest implements HttpServletRequest {
     private String authType;
     private Cookie[] cookies;

Modified: trunk/stripes/src/net/sourceforge/stripes/mock/MockHttpServletResponse.java
===================================================================
--- trunk/stripes/src/net/sourceforge/stripes/mock/MockHttpServletResponse.java 2006-10-14 12:55:57 UTC (rev 439)
+++ trunk/stripes/src/net/sourceforge/stripes/mock/MockHttpServletResponse.java 2006-10-14 13:46:10 UTC (rev 440)
@@ -36,6 +36,7 @@
  * @author Tim Fennell
  * @since Stripes 1.1.1
  */
+@SuppressWarnings("deprecation")
 public class MockHttpServletResponse implements HttpServletResponse {
     private MockServletOutputStream out = new MockServletOutputStream();
     private PrintWriter writer = new PrintWriter(out, true);

Modified: trunk/stripes/src/net/sourceforge/stripes/mock/MockHttpSession.java
===================================================================
--- trunk/stripes/src/net/sourceforge/stripes/mock/MockHttpSession.java 2006-10-14 12:55:57 UTC (rev 439)
+++ trunk/stripes/src/net/sourceforge/stripes/mock/MockHttpSession.java 2006-10-14 13:46:10 UTC (rev 440)
@@ -16,7 +16,6 @@
 
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpSession;
-import javax.servlet.http.HttpSessionContext;
 import java.util.Collections;
 import java.util.Enumeration;
 import java.util.HashMap;
@@ -29,6 +28,7 @@
  * @author Tim Fennell
  * @since Stripes 1.1.1
  */
+@SuppressWarnings("deprecation")
 public class MockHttpSession implements HttpSession {
     private long creationTime = System.currentTimeMillis();
     private String sessionId = String.valueOf(new Random().nextLong());
@@ -62,7 +62,7 @@
     public int getMaxInactiveInterval() { return Integer.MAX_VALUE; }
 
     /** Deprecated method always returns null. */
-    public HttpSessionContext getSessionContext() { return null; }
+    public javax.servlet.http.HttpSessionContext getSessionContext() { return null; }
 
     /** Returns the value of the named attribute from an internal Map. */
     public Object getAttribute(String key) { return this.attributes.get(key); }

Modified: trunk/stripes/src/net/sourceforge/stripes/mock/MockServletContext.java
===================================================================
--- trunk/stripes/src/net/sourceforge/stripes/mock/MockServletContext.java 2006-10-14 12:55:57 UTC (rev 439)
+++ trunk/stripes/src/net/sourceforge/stripes/mock/MockServletContext.java 2006-10-14 13:46:10 UTC (rev 440)
@@ -50,6 +50,7 @@
  * @author Tim Fennell
  * @since Stripes 1.1.1
  */
+@SuppressWarnings("deprecation")
 public class MockServletContext implements ServletContext {
     private String contextName;
     private Map<String,String> initParameters = new HashMap<String,String>();

Modified: trunk/tests/src/net/sourceforge/stripes/util/bean/PropertyExpressionTests.java
===================================================================
--- trunk/tests/src/net/sourceforge/stripes/util/bean/PropertyExpressionTests.java 2006-10-14 12:55:57 UTC (rev 439)
+++ trunk/tests/src/net/sourceforge/stripes/util/bean/PropertyExpressionTests.java 2006-10-14 13:46:10 UTC (rev 440)
@@ -1,7 +1,6 @@
 package net.sourceforge.stripes.util.bean;
 
 import org.testng.Assert;
-import org.testng.annotations.ExpectedExceptions;
 import org.testng.annotations.Test;
 
 /**
@@ -62,7 +61,7 @@
         Assert.assertEquals(root.getNext().getNext().getStringValue(), "bar");
     }
 
-    @Test(groups="fast") @ExpectedExceptions(ParseException.class)
+    @Test(groups="fast", expectedExceptions=ParseException.class)
     public void testBackToBackQuotedStrings() {
         PropertyExpression expr = PropertyExpression.getExpression("foo['bar''splat']");
     }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Stripes-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-development