axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject cvs commit: ws-axis/java/src/org/apache/axis/client ServiceFactory.java
Date Mon, 10 May 2004 20:21:29 GMT
gawor       2004/05/10 13:21:29

  Modified:    java/src/org/apache/axis/client ServiceFactory.java
  Log:
  unnecessary wrapping of ServiceExceptions
  
  Revision  Changes    Path
  1.26      +5 -3      ws-axis/java/src/org/apache/axis/client/ServiceFactory.java
  
  Index: ServiceFactory.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/client/ServiceFactory.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- ServiceFactory.java	10 May 2004 17:18:55 -0000	1.25
  +++ ServiceFactory.java	10 May 2004 20:21:29 -0000	1.26
  @@ -299,10 +299,10 @@
       }
   
       private Service createService(String serviceImplementationName) throws ServiceException
{
  +        if(serviceImplementationName == null) {
  +            throw new IllegalArgumentException(Messages.getMessage("serviceFactoryInvalidServiceName"));
  +        }
           try {
  -            if(serviceImplementationName == null) {
  -                throw new IllegalArgumentException(Messages.getMessage("serviceFactoryInvalidServiceName"));
  -            }
               Class serviceImplementationClass;
               serviceImplementationClass = Thread.currentThread().getContextClassLoader().loadClass(serviceImplementationName);
               if (!(org.apache.axis.client.Service.class).isAssignableFrom(serviceImplementationClass))
{
  @@ -315,6 +315,8 @@
               } else {
                   throw new ServiceException(Messages.getMessage("serviceFactoryInvalidServiceName"));
               }
  +        } catch (ServiceException e) {
  +            throw e;
           } catch (Exception e){
               throw new ServiceException(e);
           }
  
  
  

Mime
View raw message