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

fp.bugs<1738>synchronization on an uninstantiated object does not report an erro

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      1.0beta
    • CPU:
      sparc
    • OS:
      solaris_2.3
    • Verification:
      Not verified

      Description

      ###@###.###

      Description:
      Using the following insert of code;
      void myfunc() {
      synchronize (myobject) {
      ...
      }
      }
      Obviously, if you fail to instantiate myobject, it does not
      have a instance of an object to lock on. However, if you
      do forget to instantiate a locking object, it will not
      throw an exception at runtime. It will allow the lock to
      occur, lock and run the code in the synchronized area,
      and will not release the lock, thus hanging all code
      which synchronizes on this object. Obviously, this is a
      bug in the java application, however, the runtime system
      should throw an exception when you try to synchronize on
      a null object.

        Attachments

          Activity

            People

            Assignee:
            fyellinsunw Frank Yellin (Inactive)
            Reporter:
            duke J. Duke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: