Incorrect reachability with boolean constants and infinite while loops

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P5
    • 1.4.0
    • Affects Version/s: 1.2.0
    • Component/s: tools
    • beta
    • generic
    • solaris_2.5.1

      the jdk1.1.1 javac burps on each method in the following class (and on
      many related variants). do i misunderstand the JLS, or are these bugs?
      if the latter, has anyone reported them?
       
      thanks
      - -andy
       
              public class T
              {
                int foo()
                {
                  while ( false | true )
                    {}
                }
                
                int bar()
                {
                  while ( false == false )
                    {}
                }
              
                int foobar()
                {
                  while ( 1 != 0 )
                    {}
                }
              
                int fubar()
                {
                  while ( 1 + 2 > 0 )
                    {}
                }
              
                int ihtfp()
                {
                  while ( true ? true : false )
                    {}
                }
              }

            Assignee:
            William Maddox (Inactive)
            Reporter:
            David Stoutamire (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: