You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by ro...@apache.org on 2009/12/10 21:16:53 UTC

svn commit: r889405 - in /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5: integration/IntegrationTests.java internal/services/AssetProtectionDispatcherTest.java urlrewriter/SimpleRequestWrapperTest.java

Author: robertdzeigler
Date: Thu Dec 10 20:16:52 2009
New Revision: 889405

URL: http://svn.apache.org/viewvc?rev=889405&view=rev
Log:
TAP5-815: Asset dispatcher allows any file inside the webapp visible and downloadable
Fix broken test and resolve code-style consistency issues.

Modified:
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/IntegrationTests.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/AssetProtectionDispatcherTest.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/urlrewriter/SimpleRequestWrapperTest.java

Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/IntegrationTests.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/IntegrationTests.java?rev=889405&r1=889404&r2=889405&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/IntegrationTests.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/IntegrationTests.java Thu Dec 10 20:16:52 2009
@@ -46,7 +46,8 @@
     public static void main(String[] args) throws Exception {
         IntegrationTests it = new IntegrationTests();
         it.setup();
-        while(true) {
+        while(true) 
+        {
             Thread.sleep(1000);
         }
     }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/AssetProtectionDispatcherTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/AssetProtectionDispatcherTest.java?rev=889405&r1=889404&r2=889405&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/AssetProtectionDispatcherTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/AssetProtectionDispatcherTest.java Thu Dec 10 20:16:52 2009
@@ -75,7 +75,7 @@
         Response response = createMock(Response.class);
         expect(request.getPath()).andReturn(RequestConstants.ASSET_PATH_PREFIX + "/cayenne.xml");
         expect(request.getPath()).andReturn(RequestConstants.ASSET_PATH_PREFIX + "/org/apache/tapestry/default.css");
-        response.sendError(HttpServletResponse.SC_FORBIDDEN, "/cayenne.xml");
+        response.sendError(HttpServletResponse.SC_NOT_FOUND, "/cayenne.xml");
         
         ClasspathAssetAliasManager manager = createMock(ClasspathAssetAliasManager.class);
         expect(manager.toResourcePath(RequestConstants.ASSET_PATH_PREFIX + "/cayenne.xml")).andReturn("/cayenne.xml");

Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/urlrewriter/SimpleRequestWrapperTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/urlrewriter/SimpleRequestWrapperTest.java?rev=889405&r1=889404&r2=889405&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/urlrewriter/SimpleRequestWrapperTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/urlrewriter/SimpleRequestWrapperTest.java Thu Dec 10 20:16:52 2009
@@ -165,10 +165,12 @@
         
         boolean exceptionRaised = false;
 
-        try {
+        try 
+        {
             new SimpleRequestWrapper(request, serverName, path);
         }
-        catch (RuntimeException e) {
+        catch (RuntimeException e) 
+        {
             exceptionRaised = true;
         }
 
@@ -182,10 +184,12 @@
         
         boolean exceptionRaised = false;
 
-        try {
+        try 
+        {
             new SimpleRequestWrapper(request, path);
         }
-        catch (RuntimeException e) {
+        catch (RuntimeException e) 
+        {
             exceptionRaised = true;
         }