You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@abdera.apache.org by jm...@apache.org on 2006/09/08 18:07:01 UTC
svn commit: r441548 -
/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/Abdera.java
Author: jmsnell
Date: Fri Sep 8 09:07:01 2006
New Revision: 441548
URL: http://svn.apache.org/viewvc?view=rev&rev=441548
Log:
Don't die immediately if various subcomponents are not available (e.g. like xpath)
Modified:
incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/Abdera.java
Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/Abdera.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/Abdera.java?view=diff&rev=441548&r1=441547&r2=441548
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/Abdera.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/Abdera.java Fri Sep 8 09:07:01 2006
@@ -117,42 +117,66 @@
* Return a new instance of org.apache.abdera.factory.Factory
*/
private Factory newFactory() {
- return ServiceUtil.newFactoryInstance(this);
+ try {
+ return ServiceUtil.newFactoryInstance(this);
+ } catch (NoClassDefFoundError n) {
+ return null; // Don't die if the component is not available
+ }
}
/**
* Return a new instance of org.apache.abdera.parser.Parser
*/
private Parser newParser() {
- return ServiceUtil.newParserInstance(this);
+ try {
+ return ServiceUtil.newParserInstance(this);
+ } catch (NoClassDefFoundError n) {
+ return null; // Don't die if the component is not available
+ }
}
/**
* Return a new instance of org.apache.abdera.xpath.XPath
*/
private XPath newXPath() {
- return ServiceUtil.newXPathInstance(this);
+ try {
+ return ServiceUtil.newXPathInstance(this);
+ } catch (NoClassDefFoundError n) {
+ return null; // Don't die if the component is not available
+ }
}
/**
* Return a new instance of org.apache.abdera.parser.ParserFactory
*/
private ParserFactory newParserFactory() {
- return ServiceUtil.newParserFactoryInstance(this);
+ try {
+ return ServiceUtil.newParserFactoryInstance(this);
+ } catch (NoClassDefFoundError n) {
+ return null; // Don't die if the component is not available
+ }
}
/**
* Return a new instance of org.apache.abdera.writer.WriterFactory
*/
private WriterFactory newWriterFactory() {
- return ServiceUtil.newWriterFactoryInstance(this);
+ try {
+ return ServiceUtil.newWriterFactoryInstance(this);
+ } catch (NoClassDefFoundError n) {
+ return null; // Don't die if the component is not available
+ }
}
/**
* Return a new instance of org.apache.abdera.writer.Writer
*/
private Writer newWriter() {
- return ServiceUtil.newWriterInstance(this);
+ try {
+ return ServiceUtil.newWriterInstance(this);
+ } catch (NoClassDefFoundError n) {
+ return null; // Don't die if the component is not available
+ }
}
// Static convenience methods //