incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r802833 - in /sling/trunk/contrib: launchpad/testing/pom.xml scripting/xproc/src/main/java/org/apache/sling/scripting/xproc/cocoon/generator/SlingGenerator.java
Date Mon, 10 Aug 2009 15:41:52 GMT
Author: bdelacretaz
Date: Mon Aug 10 15:41:52 2009
New Revision: 802833

URL: http://svn.apache.org/viewvc?rev=802833&view=rev
Log:
Fix xproc module tests, failed due to use of text/xml mime type

Modified:
    sling/trunk/contrib/launchpad/testing/pom.xml
    sling/trunk/contrib/scripting/xproc/src/main/java/org/apache/sling/scripting/xproc/cocoon/generator/SlingGenerator.java

Modified: sling/trunk/contrib/launchpad/testing/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/launchpad/testing/pom.xml?rev=802833&r1=802832&r2=802833&view=diff
==============================================================================
--- sling/trunk/contrib/launchpad/testing/pom.xml (original)
+++ sling/trunk/contrib/launchpad/testing/pom.xml Mon Aug 10 15:41:52 2009
@@ -702,7 +702,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.commons.testing</artifactId>
-            <version>2.0.4-incubator</version>
+            <version>2.0.5-SNAPSHOT</version>
             <scope>test</scope>
         </dependency>
         <dependency>

Modified: sling/trunk/contrib/scripting/xproc/src/main/java/org/apache/sling/scripting/xproc/cocoon/generator/SlingGenerator.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/scripting/xproc/src/main/java/org/apache/sling/scripting/xproc/cocoon/generator/SlingGenerator.java?rev=802833&r1=802832&r2=802833&view=diff
==============================================================================
--- sling/trunk/contrib/scripting/xproc/src/main/java/org/apache/sling/scripting/xproc/cocoon/generator/SlingGenerator.java
(original)
+++ sling/trunk/contrib/scripting/xproc/src/main/java/org/apache/sling/scripting/xproc/cocoon/generator/SlingGenerator.java
Mon Aug 10 15:41:52 2009
@@ -31,7 +31,6 @@
 import org.apache.sling.api.SlingHttpServletResponse;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.scripting.SlingScriptHelper;
-import org.apache.sling.commons.mime.MimeTypeService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -51,16 +50,12 @@
 	
 	private final Logger log = LoggerFactory.getLogger(getClass());
 	
-	private static final String XML_MIME_TYPE = "text/xml";
-	
 	private SlingHttpServletRequest request;
 	private SlingHttpServletResponse response;
-	private MimeTypeService mimeTypeService; 
 	
 	public SlingGenerator(SlingScriptHelper sling) {
 		this.request = sling.getRequest();
 		this.response = sling.getResponse();
-		this.mimeTypeService = sling.getService(MimeTypeService.class);
 	}
 	
 	public void execute() {
@@ -82,7 +77,7 @@
 	
 	private InputStream genXmlSource() throws Exception {
 	
-		String xmlPath = request.getResource().getPath() + "." +  mimeTypeService.getExtension(XML_MIME_TYPE);
+		String xmlPath = request.getResource().getPath() + ".xml";
 		
 		// The source is a xml file
 		Resource xmlResource = this.request.getResourceResolver().resolve(xmlPath);



Mime
View raw message