forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r488083 - /forrest/trunk/whiteboard/forrest2/core/src/core/org/apache/forrest/core/Controller.java
Date Mon, 18 Dec 2006 00:05:52 GMT
Author: rgardler
Date: Sun Dec 17 16:05:51 2006
New Revision: 488083

URL: http://svn.apache.org/viewvc?view=rev&rev=488083
Log:
Trap and report an error that is caused by hrefs such as site:plugin

Modified:
    forrest/trunk/whiteboard/forrest2/core/src/core/org/apache/forrest/core/Controller.java

Modified: forrest/trunk/whiteboard/forrest2/core/src/core/org/apache/forrest/core/Controller.java
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/core/src/core/org/apache/forrest/core/Controller.java?view=diff&rev=488083&r1=488082&r2=488083
==============================================================================
--- forrest/trunk/whiteboard/forrest2/core/src/core/org/apache/forrest/core/Controller.java
(original)
+++ forrest/trunk/whiteboard/forrest2/core/src/core/org/apache/forrest/core/Controller.java
Sun Dec 17 16:05:51 2006
@@ -471,11 +471,15 @@
 	 */
 	public AbstractOutputDocument getOutputDocument(final URI requestURI)
 			throws MalformedURLException, ProcessingException {
-		if (requestURI.getPath().endsWith(this.sourceURLExtension)) {
+		String path = requestURI.getPath();
+		if (path == null) {
+			throw new ProcessingException("Unable to process request URI: " + requestURI);
+		}
+		if (path.endsWith(this.sourceURLExtension)) {
 			return getSourceDocumentAsOutput(requestURI);
-		} else if (requestURI.getPath().endsWith(this.internalURLExtension)) {
+		} else if (path.endsWith(this.internalURLExtension)) {
 			return getInternalDocumentAsOutput(requestURI);
-		} else if (requestURI.getPath().endsWith(this.pipelineURLExtension)) {
+		} else if (path.endsWith(this.pipelineURLExtension)) {
 			return getPipelineAsOutput(requestURI);
 		}
 



Mime
View raw message