User: salborini
  Date: 00/09/28 12:14:29

  Modified:    src/main/org/jboss/metadata MetaData.java
  Log:
  Added tests for NPE
  
  Revision  Changes    Path
  1.9       +3 -3      jboss/src/main/org/jboss/metadata/MetaData.java
  
  Index: MetaData.java
  ===================================================================
  RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/metadata/MetaData.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- MetaData.java     2000/08/26 20:10:41     1.8
  +++ MetaData.java     2000/09/28 19:14:28     1.9
  @@ -22,7 +22,7 @@
    *      
    *   @see <related>
    *   @author <a href="mailto:[EMAIL PROTECTED]">Sebastien Alborini</a>
  - *   @version $Revision: 1.8 $
  + *   @version $Revision: 1.9 $
    */
   public abstract class MetaData implements XmlLoadable {
       // Constants -----------------------------------------------------
  @@ -60,7 +60,7 @@
   
                Iterator goodChildren = getChildrenByTagName(element, tagName);
                
  -             if (goodChildren.hasNext()) {
  +             if (goodChildren != null && goodChildren.hasNext()) {
                        Element child = (Element)goodChildren.next();
                        if (goodChildren.hasNext()) {
                                throw new DeploymentException("expected only one " + 
tagName + " tag");
  @@ -76,7 +76,7 @@
   
                Iterator goodChildren = getChildrenByTagName(element, tagName);
   
  -             if (goodChildren.hasNext()) {
  +             if (goodChildren != null && goodChildren.hasNext()) {
                        Element child = (Element)goodChildren.next();
                        if (goodChildren.hasNext()) {
                                throw new DeploymentException("expected only one " + 
tagName + " tag");
  
  
  

Reply via email to