[jboss-cvs] JBossAS SVN: r70733 - in projects/jboss-deployers/trunk: deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer and 7 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Mar 11 06:26:45 EDT 2008
Author: alesj
Date: 2008-03-11 06:26:44 -0400 (Tue, 11 Mar 2008)
New Revision: 70733
Added:
projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/
projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/support/
projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/support/MyVFSDeploymentContext.java
projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/support/MyVirtualFile.java
projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/support/TestJaxbDeployer.java
projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/support/TestXmlDeployer.java
projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/test/
projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/test/DeployersValidateInputTestCase.java
Modified:
projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/deployer/AbstractVFSParsingDeployer.java
projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/deployer/JAXBDeployer.java
projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/deployer/JAXPDeployer.java
projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/deployer/SchemaResolverDeployer.java
projects/jboss-deployers/trunk/deployers-vfs/src/main/org/jboss/deployers/vfs/deployer/kernel/Properties2BeansDeployer.java
projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/jaxp/VFSDeployerTestSuite.java
projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/jaxp/support/TestXmlDeployer.java
projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/nonmetadata/support/MockBshDeployer.java
Log:
JBDEPLOY-1; validate input stream before usage.
Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/org/jboss/deployers/vfs/deployer/kernel/Properties2BeansDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/org/jboss/deployers/vfs/deployer/kernel/Properties2BeansDeployer.java 2008-03-11 08:44:26 UTC (rev 70732)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/org/jboss/deployers/vfs/deployer/kernel/Properties2BeansDeployer.java 2008-03-11 10:26:44 UTC (rev 70733)
@@ -62,7 +62,7 @@
protected KernelDeployment parse(VFSDeploymentUnit unit, VirtualFile file, KernelDeployment root) throws Exception
{
Properties properties = new Properties();
- InputStream is = file.openStream();
+ InputStream is = openStreamAndValidate(file);
try
{
properties.load(is);
Modified: projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/jaxp/VFSDeployerTestSuite.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/jaxp/VFSDeployerTestSuite.java 2008-03-11 08:44:26 UTC (rev 70732)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/jaxp/VFSDeployerTestSuite.java 2008-03-11 10:26:44 UTC (rev 70733)
@@ -22,6 +22,7 @@
package org.jboss.test.deployers.vfs.deployer.jaxp;
import org.jboss.test.deployers.vfs.deployer.jaxp.test.JAXPDeployerUnitTestCase;
+import org.jboss.test.deployers.vfs.deployer.validate.test.DeployersValidateInputTestCase;
import junit.framework.Test;
import junit.framework.TestSuite;
@@ -45,7 +46,8 @@
TestSuite suite = new TestSuite("VFS Deployer Tests");
suite.addTest(JAXPDeployerUnitTestCase.suite());
-
+ suite.addTest(DeployersValidateInputTestCase.suite());
+
return suite;
}
}
Modified: projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/jaxp/support/TestXmlDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/jaxp/support/TestXmlDeployer.java 2008-03-11 08:44:26 UTC (rev 70732)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/jaxp/support/TestXmlDeployer.java 2008-03-11 10:26:44 UTC (rev 70733)
@@ -5,6 +5,9 @@
import org.jboss.virtual.VirtualFile;
import org.w3c.dom.Document;
+/**
+ * @author adrian at jboss.org
+ */
public class TestXmlDeployer extends JAXPDeployer<SomeBean>
{
private SomeBean lastBean;
Modified: projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/nonmetadata/support/MockBshDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/nonmetadata/support/MockBshDeployer.java 2008-03-11 08:44:26 UTC (rev 70732)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/nonmetadata/support/MockBshDeployer.java 2008-03-11 10:26:44 UTC (rev 70733)
@@ -47,7 +47,7 @@
protected BshScript parse(VFSDeploymentUnit unit, VirtualFile file, BshScript root) throws Exception
{
- InputStream inputStream = file.openStream();
+ InputStream inputStream = openStreamAndValidate(file);
try
{
return new BshScript(inputStream);
Added: projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/support/MyVFSDeploymentContext.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/support/MyVFSDeploymentContext.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/support/MyVFSDeploymentContext.java 2008-03-11 10:26:44 UTC (rev 70733)
@@ -0,0 +1,53 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.deployers.vfs.deployer.validate.support;
+
+import java.util.List;
+import java.util.Collections;
+
+import org.jboss.deployers.vfs.plugins.structure.AbstractVFSDeploymentContext;
+import org.jboss.virtual.VirtualFile;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class MyVFSDeploymentContext extends AbstractVFSDeploymentContext
+{
+ public MyVFSDeploymentContext()
+ {
+ }
+
+ public MyVFSDeploymentContext(VirtualFile root, String relativePath)
+ {
+ super(root, relativePath);
+ }
+
+ public VirtualFile getMetaDataFile(String name)
+ {
+ return getRoot();
+ }
+
+ public List<VirtualFile> getMetaDataFiles(String name, String suffix)
+ {
+ return Collections.singletonList(getRoot());
+ }
+}
Added: projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/support/MyVirtualFile.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/support/MyVirtualFile.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/support/MyVirtualFile.java 2008-03-11 10:26:44 UTC (rev 70733)
@@ -0,0 +1,161 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.deployers.vfs.deployer.validate.support;
+
+import java.net.URL;
+import java.net.MalformedURLException;
+import java.net.URISyntaxException;
+import java.net.URI;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.List;
+
+import org.jboss.virtual.VirtualFile;
+import org.jboss.virtual.spi.VirtualFileHandler;
+import org.jboss.virtual.spi.VFSContext;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class MyVirtualFile extends VirtualFile
+{
+ /**
+ * The serialVersionUID
+ */
+ private static final long serialVersionUID = 1L;
+
+ public MyVirtualFile()
+ {
+ super(getVirtualFileHandler());
+ }
+
+ public String getName()
+ {
+ return "";
+ }
+
+ public InputStream openStream() throws IOException
+ {
+ return null;
+ }
+
+ private static VirtualFileHandler getVirtualFileHandler()
+ {
+ return new VirtualFileHandler()
+ {
+ /**
+ * The serialVersionUID
+ */
+ private static final long serialVersionUID = 1L;
+
+ public String getName()
+ {
+ return null;
+ }
+
+ public String getPathName()
+ {
+ return null;
+ }
+
+ public URL toVfsUrl() throws MalformedURLException, URISyntaxException
+ {
+ return null;
+ }
+
+ public URI toURI() throws URISyntaxException
+ {
+ return null;
+ }
+
+ public URL toURL() throws MalformedURLException, URISyntaxException
+ {
+ return null;
+ }
+
+ public long getLastModified() throws IOException
+ {
+ return 0;
+ }
+
+ public boolean hasBeenModified() throws IOException
+ {
+ return false;
+ }
+
+ public long getSize() throws IOException
+ {
+ return 0;
+ }
+
+ public boolean exists() throws IOException
+ {
+ return false;
+ }
+
+ public boolean isLeaf() throws IOException
+ {
+ return true;
+ }
+
+ public boolean isHidden() throws IOException
+ {
+ return false;
+ }
+
+ public InputStream openStream() throws IOException
+ {
+ return null;
+ }
+
+ public VirtualFileHandler getParent() throws IOException
+ {
+ return null;
+ }
+
+ public List<VirtualFileHandler> getChildren(boolean ignoreErrors) throws IOException
+ {
+ return null;
+ }
+
+ public VirtualFileHandler getChild(String path) throws IOException
+ {
+ return null;
+ }
+
+ public VFSContext getVFSContext()
+ {
+ return null;
+ }
+
+ public VirtualFile getVirtualFile()
+ {
+ return null;
+ }
+
+ public void close()
+ {
+
+ }
+ };
+ }
+}
Added: projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/support/TestJaxbDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/support/TestJaxbDeployer.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/support/TestJaxbDeployer.java 2008-03-11 10:26:44 UTC (rev 70733)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.deployers.vfs.deployer.validate.support;
+
+import org.jboss.deployers.vfs.spi.deployer.JAXBDeployer;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class TestJaxbDeployer extends JAXBDeployer<Object>
+{
+ public TestJaxbDeployer()
+ {
+ super(Object.class);
+ try
+ {
+ create();
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+}
Added: projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/support/TestXmlDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/support/TestXmlDeployer.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/support/TestXmlDeployer.java 2008-03-11 10:26:44 UTC (rev 70733)
@@ -0,0 +1,60 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.deployers.vfs.deployer.validate.support;
+
+import org.jboss.test.deployers.vfs.deployer.jaxp.support.SomeBean;
+import org.jboss.deployers.vfs.spi.deployer.JAXPDeployer;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.virtual.VirtualFile;
+import org.w3c.dom.Document;
+
+/**
+ * @author ales.justin at jboss.org
+ */
+public class TestXmlDeployer extends JAXPDeployer<SomeBean>
+{
+ private SomeBean lastBean;
+
+ public TestXmlDeployer()
+ {
+ super(SomeBean.class);
+ setSuffix(".jbean");
+ }
+
+ public SomeBean getLastBean()
+ {
+ return lastBean;
+ }
+
+ @Override
+ protected SomeBean parse(VFSDeploymentUnit unit, VirtualFile file, Document doc) throws Exception
+ {
+ String name = doc.getDocumentElement().getAttribute("name");
+ String version = doc.getDocumentElement().getAttribute("version");
+
+ SomeBean bean = new SomeBean();
+ bean.setName(name);
+ bean.setVersion(version);
+ lastBean = bean;
+ return bean;
+ }
+}
Added: projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/test/DeployersValidateInputTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/test/DeployersValidateInputTestCase.java (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/tests/org/jboss/test/deployers/vfs/deployer/validate/test/DeployersValidateInputTestCase.java 2008-03-11 10:26:44 UTC (rev 70733)
@@ -0,0 +1,86 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.deployers.vfs.deployer.validate.test;
+
+import java.io.IOException;
+
+import junit.framework.Test;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.deployers.vfs.deployer.kernel.Properties2BeansDeployer;
+import org.jboss.deployers.vfs.plugins.structure.AbstractVFSDeploymentContext;
+import org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer;
+import org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer;
+import org.jboss.test.BaseTestCase;
+import org.jboss.test.deployers.vfs.deployer.nonmetadata.support.MockBshDeployer;
+import org.jboss.test.deployers.vfs.deployer.validate.support.MyVFSDeploymentContext;
+import org.jboss.test.deployers.vfs.deployer.validate.support.MyVirtualFile;
+import org.jboss.test.deployers.vfs.deployer.validate.support.TestXmlDeployer;
+import org.jboss.virtual.VirtualFile;
+
+/**
+ * Validate deployers.
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class DeployersValidateInputTestCase extends BaseTestCase
+{
+ public DeployersValidateInputTestCase(String name)
+ {
+ super(name);
+ }
+
+ public static Test suite()
+ {
+ return suite(DeployersValidateInputTestCase.class);
+ }
+
+ public void testNullStream() throws Exception
+ {
+ AbstractVFSParsingDeployer[] deployers = new AbstractVFSParsingDeployer[]
+ {
+ new Properties2BeansDeployer(),
+ new MockBshDeployer(),
+// new TestJaxbDeployer(),
+ new TestXmlDeployer(),
+ new SchemaResolverDeployer<Object>(Object.class),
+ };
+
+ VirtualFile root = new MyVirtualFile();
+ AbstractVFSDeploymentContext context = new MyVFSDeploymentContext(root, "");
+ DeploymentUnit unit = context.getDeploymentUnit();
+
+ for(AbstractVFSParsingDeployer deployer : deployers)
+ {
+ try
+ {
+ deployer.deploy(unit);
+ fail("Should not be here.");
+ }
+ catch(Exception e)
+ {
+ assertInstanceOf(e, DeploymentException.class);
+ assertInstanceOf(e.getCause(), IOException.class);
+ }
+ }
+ }
+}
Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/deployer/AbstractVFSParsingDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/deployer/AbstractVFSParsingDeployer.java 2008-03-11 08:44:26 UTC (rev 70732)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/deployer/AbstractVFSParsingDeployer.java 2008-03-11 10:26:44 UTC (rev 70733)
@@ -22,6 +22,8 @@
package org.jboss.deployers.vfs.spi.deployer;
import java.util.List;
+import java.io.InputStream;
+import java.io.IOException;
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput;
@@ -83,6 +85,25 @@
return accepts((VFSDeploymentUnit) unit);
}
+ /**
+ * Open stream and validate if not null.
+ *
+ * @param file the virtual file
+ * @return non-null input stream
+ * @throws Exception for any error or if file's stream is null
+ */
+ protected InputStream openStreamAndValidate(VirtualFile file) throws Exception
+ {
+ if (file == null)
+ throw new IllegalArgumentException("Null file");
+
+ InputStream inputStream = SecurityActions.openStream(file);
+ if (inputStream == null)
+ throw new IOException("Null file stream: " + file);
+
+ return inputStream;
+ }
+
@Override
protected T parse(DeploymentUnit unit, String name, T root) throws Exception
{
Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/deployer/JAXBDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/deployer/JAXBDeployer.java 2008-03-11 08:44:26 UTC (rev 70732)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/deployer/JAXBDeployer.java 2008-03-11 10:26:44 UTC (rev 70733)
@@ -102,7 +102,7 @@
protected T parse(VFSDeploymentUnit unit, VirtualFile file, T root) throws Exception
{
Unmarshaller unmarshaller = context.createUnmarshaller();
- InputStream is = file.openStream();
+ InputStream is = openStreamAndValidate(file);
try
{
InputSource source = new InputSource(is);
Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/deployer/JAXPDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/deployer/JAXPDeployer.java 2008-03-11 08:44:26 UTC (rev 70732)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/deployer/JAXPDeployer.java 2008-03-11 10:26:44 UTC (rev 70733)
@@ -169,7 +169,7 @@
log.trace("Parsing: " + file.getName());
- InputStream is = SecurityActions.openStream(file);
+ InputStream is = openStreamAndValidate(file);
try
{
DocumentBuilder parser = getDocumentBuilderFactory().newDocumentBuilder();
Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/deployer/SchemaResolverDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/deployer/SchemaResolverDeployer.java 2008-03-11 08:44:26 UTC (rev 70732)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/deployer/SchemaResolverDeployer.java 2008-03-11 10:26:44 UTC (rev 70733)
@@ -113,7 +113,7 @@
Unmarshaller unmarshaller = factory.newUnmarshaller();
unmarshaller.setSchemaValidation(isUseSchemaValidation());
unmarshaller.setValidation(isUseValidation());
- InputStream is = file.openStream();
+ InputStream is = openStreamAndValidate(file);
Object parsed = null;
try
{
More information about the jboss-cvs-commits
mailing list