src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Fault.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -24,19 +24,17 @@
  */
 
 package com.sun.tools.internal.ws.processor.model;
 
 import com.sun.codemodel.internal.JClass;
-import com.sun.tools.internal.ws.processor.generator.GeneratorUtil;
 import com.sun.tools.internal.ws.processor.model.java.JavaException;
 import com.sun.tools.internal.ws.wsdl.framework.Entity;
 
 import javax.xml.namespace.QName;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Set;
-import java.util.TreeSet;
 
 /**
  *
  * @author WS Development Team
  */

@@ -47,11 +45,10 @@
     }
 
     public Fault(String name, Entity entity) {
         super(entity);
         this.name = name;
-        parentFault = null;
     }
 
     public String getName() {
         return name;
     }

@@ -78,16 +75,12 @@
 
     public void accept(ModelVisitor visitor) throws Exception {
         visitor.visit(this);
     }
 
-    public Fault getParentFault() {
-        return parentFault;
-    }
-
     public Iterator getSubfaults() {
-        if (subfaults.size() == 0) {
+        if (subfaults.isEmpty()) {
             return null;
         }
         return subfaults.iterator();
     }
 

@@ -101,11 +94,11 @@
         subfaults = s;
     }
 
     public Iterator getAllFaults() {
         Set allFaults = getAllFaultsSet();
-        if (allFaults.size() == 0) {
+        if (allFaults.isEmpty()) {
             return null;
         }
         return allFaults.iterator();
     }
 

@@ -158,11 +151,10 @@
 
     private boolean wsdlException = true;
     private String name;
     private Block block;
     private JavaException javaException;
-    private Fault parentFault;
     private Set subfaults = new HashSet();
     private QName elementName = null;
     private String javaMemberName = null;
     private JClass exceptionClass;