This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 51586 - Java completion after "new |" fails
Summary: Java completion after "new |" fails
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Martin Matula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-17 00:41 UTC by Martin Roskanin
Modified: 2007-09-26 09:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
exc (5.10 KB, text/plain)
2004-11-17 00:42 UTC, Martin Roskanin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Roskanin 2004-11-17 00:41:17 UTC
After about 13 seconds it fails with several
exceptions, like the one attached.
After third invocation completion will show up.

Reporoduced on JDK 1.4.2_03 on last maintrunk dev
build.
Comment 1 Martin Roskanin 2004-11-17 00:42:43 UTC
Created attachment 18929 [details]
exc
Comment 2 Martin Matula 2004-11-18 09:24:25 UTC
This is caused by 51585 - up-to-date checking should be suppressed
during code completion, since it causes concurrent updates of the SN
index. This particular update happens because of some obfuscated?
classses on the classpath.

*** This issue has been marked as a duplicate of 51585 ***
Comment 3 Martin Roskanin 2004-11-18 13:37:44 UTC
I think this is probably something different. JSP completion uses
MDRFinder and Java completion uses another approach via
NbJavaJMICompletionQuery. And it seems JMManager.setSafeTrans(true)
was used at the beginning of the transaction called from
NbJavaJMICompletionQuery also for "new |" call. It is evident also
from the attached stacktrace. Exception occured after the thread passed 
org.netbeans.modules.editor.java.NbJavaJMICompletionQuery.getResult(NbJavaJMICompletionQu
ery.java:58)

((JMManager) JMManager.getManager()).setSafeTrans(true); is on the
56th line.

I am not sure to which module this will finally belong. CCing also
Dusan, whether he doesn't see any clue.

BTW, setSafeTrans helped in issue #51585
Comment 4 Jesse Glick 2004-11-22 14:05:02 UTC
*** Issue 51648 has been marked as a duplicate of this issue. ***
Comment 5 Martin Matula 2004-11-27 21:29:54 UTC
Fixed.

Checking in
src/org/netbeans/modules/javacore/jmiimpl/javamodel/SemiPersistentElement.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/SemiPersistentElement.java,v
 <--  SemiPersistentElement.java
new revision: 1.60; previous revision: 1.59
done
Checking in
src/org/netbeans/modules/javacore/jmiimpl/javamodel/ResourceImpl.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/ResourceImpl.java,v
 <--  ResourceImpl.java
new revision: 1.52; previous revision: 1.51
done
Comment 6 Quality Engineering 2007-09-20 09:52:12 UTC
Reorganization of java component