Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4125114

Non-GUI application with awt class doesn't exit automatically in JDK1.2

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P3 P3
    • None
    • 1.2.0
    • client-libs
    • generic
    • generic



      Name: moC74494 Date: 04/02/98


      Non-GUI application but uses awt classes, doesn't
      exit automatically in JDK1.2, it freezes. In JDK1.1.x, that
      application exit automatically even if that doesn't
      contain System.exit().

      Sample Program:

      import java.awt.Color ;

      public class ct {

        public int error = 0 ;

        public static void main(String args[]) {
              jnth0010 test = new jnth0010() ;

              test.check_awt_Color() ;

              if (test.error == 0) {
                  System.out.println("*** jnth0010 : pass ***") ;
              } else {
                  System.out.println("+++ jnth0010 : ng : " +
                                      test.error + " errors +++ ") ;
              }
        }

        public void check_awt_Color() {

          Color col1 = new Color(100,100,100) ;
          int r1,g1,b1 ;
          Color col2 ;
          int r2,g2,b2 ;

          col2 = col1.darker() ;
          r1 = (col1.darker()).getRed() ;
          g1 = (col1.darker()).getGreen() ;
          b1 = (col1.darker()).getBlue() ;
          r2 = col2.getRed() ;
          g2 = col2.getGreen() ;
          b2 = col2.getBlue() ;
          if (r1 != r2) error++ ;
          if (g1 != g2) error++ ;
          if (b1 != b2) error++ ;

          col2 = col1.brighter() ;
          r1 = (col1.brighter()).getRed() ;
          g1 = (col1.brighter()).getGreen() ;
          b1 = (col1.brighter()).getBlue() ;
          r2 = col2.getRed() ;
          g2 = col2.getGreen() ;
          b2 = col2.getBlue() ;
          if (r1 != r2) error++ ;
          if (g1 != g2) error++ ;
          if (b1 != b2) error++ ;
        }
      }
      (Review ID: 27659)
      ======================================================================

            dmendenhsunw David Mendenhall (Inactive)
            moanceasunw Mircea Oancea (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: