geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jboy...@apache.org
Subject cvs commit: incubator-geronimo/modules/core/src/java/org/apache/geronimo/core/service SimpleInvocationResult.java
Date Wed, 05 Nov 2003 05:03:18 GMT
jboynes     2003/11/04 21:03:18

  Modified:    modules/core/src/java/org/apache/geronimo/core/service
                        SimpleInvocationResult.java
  Log:
  Make constructors a little less confusing
  
  Revision  Changes    Path
  1.2       +18 -1     incubator-geronimo/modules/core/src/java/org/apache/geronimo/core/service/SimpleInvocationResult.java
  
  Index: SimpleInvocationResult.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/core/service/SimpleInvocationResult.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SimpleInvocationResult.java	8 Sep 2003 04:25:19 -0000	1.1
  +++ SimpleInvocationResult.java	5 Nov 2003 05:03:18 -0000	1.2
  @@ -69,14 +69,31 @@
       private final Object result;
       private final boolean normal;
   
  +    /**
  +     * @deprecated too confusing - use SimpleInvocationResult(true, result)
  +     */
       public SimpleInvocationResult(Object result) {
           this.result = result;
           normal = true;
       }
   
  +    /**
  +     * @deprecated too confusing - use SimpleInvocationResult(false, appException)
  +     */
       public SimpleInvocationResult(Exception appException) {
           this.result = appException;
           this.normal = false;
  +    }
  +
  +    /**
  +     * Create a object representing the normal result of an Invocation
  +     * @param normal true if the target returned; false if it threw an application Exception
  +     * @param result the result or Exception
  +     */
  +    public SimpleInvocationResult(boolean normal, Object result) {
  +        assert (normal || result instanceof Throwable) : "Result must be normal or a Throwable";
  +        this.normal = normal;
  +        this.result = result;
       }
   
       public boolean isNormal() {
  
  
  

Mime
View raw message