Unable to set writer implementation via abdera.properties
---------------------------------------------------------
Key: ABDERA-239
URL: https://issues.apache.org/jira/browse/ABDERA-239
Project: Abdera
Issue Type: Bug
Affects Versions: 0.4.0
Reporter: Clayton Coleman
We are trying to override the implementation of StreamWriter used by Abdera.
The documentation recommends defining an abdera.properties file in the root
classloader and adding the following key/value pair:
org.apache.abdera.writer.StreamWriter=org.apache.abdera.parser.stax.StaxStreamWriter
However, even when this is specified, the following snippet from
org/apache/abdera/util/ServiceUtil.java appears to be doing the wrong thing:
@SuppressWarnings("unchecked")
private static Object checkAbderaConfiguration(String id, Abdera abdera) {
String s = abdera.getConfiguration().getConfigurationOption(id);
return (s != null) ? locateInstance(getClassLoader(), id, abdera) : null;
}
The value of s for id="org.apache.abdera.writer.StreamWriter" is
"org.apache.abdera.parser.stax.StaxStreamWriter", but s is never used inside
this method. Should the last line read:
return (s != null) ? locateInstance(getClassLoader(), s, abdera) : null;
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.