ruper2/src/java/core/org/krysalis/ruper/util/xml XMLParser.java,1.3,1.4

[email protected]
Newsgroups gmane.comp.krysalis.metamorphosis.cvs
Message-ID <[email protected]>
Update of /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper/util/xml
In directory sc8-pr-cvs1:/tmp/cvs-serv17764/src/java/core/org/krysalis/ruper/util/xml

Modified Files:
	XMLParser.java 
Log Message:
1) Unit test for messages
2) Fallback to "en" if messages in default locale not available
3) First stab at loading ruper.xml from a resource (classloader) not just file

Index: XMLParser.java
===================================================================
RCS file: /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper/util/xml/XMLParser.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** XMLParser.java	9 Sep 2003 21:49:05 -0000	1.3
--- XMLParser.java	22 Sep 2003 20:18:29 -0000	1.4
***************
*** 70,74 ****
  			buildFileName = url.toString();
  		}
! 		else {
  			throw new XMLException(
  				"Source " + source.getClass().getName() + " not supported");
--- 70,74 ----
  			buildFileName = url.toString();
  		}
! 		else if (!(source instanceof InputStream)) {
  			throw new XMLException(
  				"Source " + source.getClass().getName() + " not supported");
***************
*** 95,101 ****
  				inputStream = new FileInputStream(buildFile);
  			}
! 			else {
  				inputStream = url.openStream();
  				uri = url.toString();
  			}
  
--- 95,104 ----
  				inputStream = new FileInputStream(buildFile);
  			}
! 			else if (url != null) {
  				inputStream = url.openStream();
  				uri = url.toString();
+ 			}
+ 			else {
+ 				inputStream = (InputStream) source;
  			}
  




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.