dims        2003/06/28 13:48:02

  Modified:    java/src/org/apache/axis/utils tcpmon.java
  Log:
  Fix for Bug 17174 - tcpmon shouldn't call System.exit()
  
  Revision  Changes    Path
  1.51      +8 -17     xml-axis/java/src/org/apache/axis/utils/tcpmon.java
  
  Index: tcpmon.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/tcpmon.java,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- tcpmon.java       27 Jun 2003 06:53:05 -0000      1.50
  +++ tcpmon.java       28 Jun 2003 20:48:02 -0000      1.51
  @@ -1818,7 +1818,7 @@
       }
   
   
  -    public tcpmon(int listenPort, String targetHost, int targetPort) {
  +    public tcpmon(int listenPort, String targetHost, int targetPort, boolean 
embedded) {
           super ( getMessage("tcpmon00", "TCPMonitor") );
   
           notebook = new JTabbedPane();
  @@ -1856,26 +1856,17 @@
                   }
               }
           }
  -
  +        
  +        if(!embedded) {
  +            this.setDefaultCloseOperation(EXIT_ON_CLOSE);
  +        }
           this.pack();
           this.setSize( 600, 600 );
           this.setVisible( true );
       }
  -
  -    protected void processWindowEvent(WindowEvent event) {
  -        switch ( event.getID() ) {
  -        case WindowEvent.WINDOW_CLOSING:
  -            exit();
  -            break ;
  -
  -        default:
  -            super.processWindowEvent(event);
  -            break ;
  -        }
  -    }
  -
  -    private void exit() {
  -        System.exit(0);
  +    
  +    public tcpmon(int listenPort, String targetHost, int targetPort) {
  +        this(listenPort, targetHost, targetPort, false);
       }
   
       public void setInputPort(int port) {
  
  
  

Reply via email to