diff --git a/core/src/main/java/org/jclouds/http/functions/config/ParserModule.java b/core/src/main/java/org/jclouds/http/functions/config/ParserModule.java index d78fc6762e..23ee288ab3 100755 --- a/core/src/main/java/org/jclouds/http/functions/config/ParserModule.java +++ b/core/src/main/java/org/jclouds/http/functions/config/ParserModule.java @@ -28,9 +28,7 @@ import java.net.InetAddress; import java.net.UnknownHostException; import javax.inject.Inject; -import javax.inject.Provider; import javax.inject.Singleton; -import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; @@ -38,7 +36,6 @@ import org.jclouds.http.functions.ParseSax; import org.jclouds.http.functions.ParseSax.HandlerWithResult; import org.jclouds.util.DateService; import org.joda.time.DateTime; -import org.xml.sax.SAXException; import org.xml.sax.XMLReader; import com.google.gson.Gson; @@ -68,10 +65,18 @@ public class ParserModule extends AbstractModule { private static class Factory implements ParseSax.Factory { @Inject - private Provider parser; + private SAXParserFactory factory; public ParseSax create(HandlerWithResult handler) { - return new ParseSax(parser.get(), handler); + SAXParser saxParser; + try { + saxParser = factory.newSAXParser(); + XMLReader parser = saxParser.getXMLReader(); + return new ParseSax(parser, handler); + } catch (Exception e) { + throw new RuntimeException(e); + } + } } @@ -92,14 +97,6 @@ public class ParserModule extends AbstractModule { } - @Provides - XMLReader provideXMLReader(SAXParserFactory factory) throws ParserConfigurationException, - SAXException { - SAXParser saxParser = factory.newSAXParser(); - XMLReader parser = saxParser.getXMLReader(); - return parser; - } - @Provides @Singleton SAXParserFactory provideSAXParserFactory() { diff --git a/mezeo/pcs2/core/src/test/java/org/jclouds/mezeo/pcs2/PCSClientLiveTest.java b/mezeo/pcs2/core/src/test/java/org/jclouds/mezeo/pcs2/PCSClientLiveTest.java index 79ad643002..3d304af928 100644 --- a/mezeo/pcs2/core/src/test/java/org/jclouds/mezeo/pcs2/PCSClientLiveTest.java +++ b/mezeo/pcs2/core/src/test/java/org/jclouds/mezeo/pcs2/PCSClientLiveTest.java @@ -113,7 +113,7 @@ public class PCSClientLiveTest { validateMetadataItemNameEquals(containerURI, container); - connection.deleteContainer(containerURI).get(10, TimeUnit.SECONDS); + connection.deleteContainer(containerURI).get(30, TimeUnit.SECONDS); } } diff --git a/vcloudx/core/src/main/java/org/jclouds/vcloudx/functions/ParseLoginResponseFromHeaders.java b/vcloudx/core/src/main/java/org/jclouds/vcloudx/functions/ParseLoginResponseFromHeaders.java index 92d240afe8..d957385a03 100755 --- a/vcloudx/core/src/main/java/org/jclouds/vcloudx/functions/ParseLoginResponseFromHeaders.java +++ b/vcloudx/core/src/main/java/org/jclouds/vcloudx/functions/ParseLoginResponseFromHeaders.java @@ -60,7 +60,6 @@ public class ParseLoginResponseFromHeaders implements Function orgHandlerProvider) { - super(); this.factory = factory; this.orgHandlerProvider = orgHandlerProvider; } diff --git a/vcloudx/core/src/test/resources/log4j.xml b/vcloudx/core/src/test/resources/log4j.xml index a3bff22c6b..c996547bd7 100755 --- a/vcloudx/core/src/test/resources/log4j.xml +++ b/vcloudx/core/src/test/resources/log4j.xml @@ -98,13 +98,13 @@ - + + -->