You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by cz...@apache.org on 2002/01/04 13:33:18 UTC
cvs commit: jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/i18n XmlBundle.java
cziegeler 02/01/04 04:33:18
Modified: src/scratchpad/org/apache/avalon/excalibur/i18n
XmlBundle.java
Log:
Fixed compilation error
Revision Changes Path
1.7 +11 -9 jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/i18n/XmlBundle.java
Index: XmlBundle.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/i18n/XmlBundle.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- XmlBundle.java 2 Jan 2002 19:48:51 -0000 1.6
+++ XmlBundle.java 4 Jan 2002 12:33:18 -0000 1.7
@@ -35,7 +35,7 @@
* @author <a href="mailto:mengelhart@earthtrip.com">Mike Engelhart</a>
* @author <a href="mailto:neeme@apache.org">Neeme Praks</a>
* @author <a href="mailto:oleg@one.lv">Oleg Podolsky</a>
- * @version $Id: XmlBundle.java,v 1.6 2002/01/02 19:48:51 neeme Exp $
+ * @version $Id: XmlBundle.java,v 1.7 2002/01/04 12:33:18 cziegeler Exp $
*/
public class XmlBundle extends AbstractBundle implements Configurable, Initializable, Disposable, Composable {
@@ -122,7 +122,9 @@
* @exception SAXException if an error occurs while parsing the file
*/
public void initialize(Source source) throws Exception {
- initialize(source.getInputSource());
+ final InputSource newObject = new InputSource( source.getInputStream() );
+ newObject.setSystemId( source.getSystemId() );
+ initialize( newObject );
}
/**
@@ -299,7 +301,7 @@
if (value == null && !cacheNotFoundContains(key))
{
- if (doc != null)
+ if (doc != null)
value = _getString(this.doc.getDocumentElement(), key);
if (value == null)
@@ -350,16 +352,16 @@
for(int i = 0; i < listsize; i++) {
item = list.item(i);
- if(item.getNodeType() != Node.TEXT_NODE)
- return null;
+ if(item.getNodeType() != Node.TEXT_NODE)
+ return null;
itemValue = item.getNodeValue();
- if(itemValue == null)
- return null;
+ if(itemValue == null)
+ return null;
itemValue = itemValue.trim();
- if(itemValue.length() == 0)
- return null;
+ if(itemValue.length() == 0)
+ return null;
return itemValue;
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>