axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdani...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/encoding DeserializationContext.java
Date Wed, 05 Dec 2001 18:38:57 GMT
gdaniels    01/12/05 10:38:57

  Modified:    java/src/org/apache/axis/encoding
                        DeserializationContext.java
  Log:
  Don't use Exceptions where not really needed.
  
  Revision  Changes    Path
  1.42      +6 -9      xml-axis/java/src/org/apache/axis/encoding/DeserializationContext.java
  
  Index: DeserializationContext.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/DeserializationContext.java,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- DeserializationContext.java	2001/12/04 20:57:23	1.41
  +++ DeserializationContext.java	2001/12/05 18:38:57	1.42
  @@ -320,19 +320,16 @@
        */ 
       public MessageElement getElementByID(String id)
       {
  -        MessageElement ret = null;
  -        if((idMap !=  null)){
  +        if((idMap !=  null)) {
               IDResolver resolver = (IDResolver)idMap.get(id);
               if(resolver != null) {
  -                try {
  -                    ret = (MessageElement)resolver.getReferencedObject(id);
  -                } catch (ClassCastException e) {
  -                    // No can do.
  -                }
  +                Object ret = resolver.getReferencedObject(id);
  +                if (ret instanceof MessageElement)
  +                    return (MessageElement)ret;
               }
           }
           
  -        return ret;
  +        return null;
       }
       
       /**
  @@ -346,7 +343,7 @@
               if((idMap !=  null)){
                   IDResolver resolver = (IDResolver)idMap.get(href);
                   if(resolver != null)
  -                   ret= resolver.getReferencedObject(href);
  +                   ret = resolver.getReferencedObject(href);
               }
               if( null == ret && !href.startsWith("#")){
                   //Could this be an attachment?
  
  
  

Mime
View raw message