User: juha
Date: 00/07/06 14:08:17
Modified: src/main/org/jboss/metadata/ejbjar EJBXMLReader.java
Log:
Quick fix for the metadata XML parsing bug (nullpointers).
Submitted by Stephan Gruschke. Thanks Stephan!
(Marc, sorry if I stepped on your toes with this and caused conflicts)
Revision Changes Path
1.2 +9 -4 jboss/src/main/org/jboss/metadata/ejbjar/EJBXMLReader.java
Index: EJBXMLReader.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/metadata/ejbjar/EJBXMLReader.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- EJBXMLReader.java 2000/07/04 00:10:05 1.1
+++ EJBXMLReader.java 2000/07/06 21:08:17 1.2
@@ -107,9 +107,14 @@
if(bean != null)
bean.description = contents;
// otherwise, a container transaction description
- } else if(name.equals("display-name"))
- bean.displayName = contents;
- else if(name.equals("home"))
+ } else if(name.equals("display-name")) {
+ if (bean != null) {
+ bean.displayName = contents;
+ } else {
+ // TODO:
+ // set the display name in the ejb-jar file
+ }
+ } else if(name.equals("home"))
try {
bean.homeClass = loadClass(contents);
} catch(ClassNotFoundException e) {
@@ -192,4 +197,4 @@
String ejbName;
boolean isHome;
}
-}
\ No newline at end of file
+}