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

(ref) ref to Reference subclass object is garbage collected NullPoint check..

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P3 P3
    • None
    • 1.4.0
    • core-libs
    • None
    • unknown
    • windows_nt

      In my module in Netbeans project (www.netbeans.org) I have the following piece of code:
      public boolean isImportant(String name) {
        Reference rf = findReference(name);
        if (rf != null) {
          CacheReference ref = (CacheReference)rf;
          return ref.isImporant();
        }
      }

      I've received a bug report (please see: http://javacvs.netbeans.org/issues/show_bug.cgi?id=16422 )
      that under the jdk1.4beta2 this piece of code throws a NPE (sometimes, not regularly) it seems like the ref is null, even when I checked it for that value..

      any ideas what might be wrong? The reporter states that it doesn't happen under jdk1.3..

      thanks..

            mr Mark Reinhold
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: