dain        2004/06/23 18:46:30

  Modified:    modules/kernel/src/java/org/apache/geronimo/gbean/jmx
                        GBeanMBeanReference.java
  Log:
  Start and stop now print a warning if called while offline and ingore the call
  It is not an error to do this, but bad usage
  This was causing a null pointer exception
  
  Revision  Changes    Path
  1.10      +11 -1     
incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/gbean/jmx/GBeanMBeanReference.java
  
  Index: GBeanMBeanReference.java
  ===================================================================
  RCS file: 
/home/cvs/incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/gbean/jmx/GBeanMBeanReference.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- GBeanMBeanReference.java  3 Jun 2004 15:27:28 -0000       1.9
  +++ GBeanMBeanReference.java  24 Jun 2004 01:46:30 -0000      1.10
  @@ -241,12 +241,22 @@
       }
   
       public synchronized void start() throws WaitingException {
  +        if (proxy == null) {
  +            log.debug("Stop should not be called on an offline reference");
  +            return;
  +        }
  +
           if (!patterns.isEmpty()) {
               proxy.start();
           }
       }
   
       public synchronized void stop() {
  +        if (proxy == null) {
  +            log.debug("Stop should not be called on an offline reference");
  +            return;
  +        }
  +
           if (!patterns.isEmpty()) {
               proxy.stop();
           }
  
  
  

Reply via email to