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 121185 - [hints] CompositionViolationException
Summary: [hints] CompositionViolationException
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-05 13:57 UTC by jerome_bouat
Modified: 2008-02-25 16:18 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
.netbeans\5.5.1\var\log\message.log (15.27 KB, application/octet-stream)
2007-11-05 14:01 UTC, jerome_bouat
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jerome_bouat 2007-11-05 13:57:38 UTC
Hello,

While editing the following line
"""
for(Connection c:this.connections.values()) c.close();
"""
I accepted the automatic coding proposed by the "Hints" module
in order to surround the line with "try catch" statement.

But had the following exception while attempting to automatically write the code:
"""
javax.jmi.reflect.CompositionViolationException
	at org.netbeans.modules.javacore.jmiimpl.javamodel.DeferredObject.setComposite(DeferredObject.java:105)
	at org.netbeans.modules.javacore.jmiimpl.javamodel.MetadataElement.createChildrenList(MetadataElement.java:462)
	at org.netbeans.modules.javacore.jmiimpl.javamodel.StatementBlockImpl.setStatements(StatementBlockImpl.java:55)
	at org.netbeans.modules.javacore.jmiimpl.javamodel.StatementBlockClassImpl.createSB(StatementBlockClassImpl.java:58)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.StatementBlockClassImpl.createStatementBlock(StatementBlockClassImpl.java:52)
	at org.netbeans.jmi.javamodel.StatementBlockClass$Impl.createStatementBlock(Unknown Source)
	at org.netbeans.modules.javacore.TryWrapper.wrap(TryWrapper.java:151)
"""
Comment 1 jerome_bouat 2007-11-05 13:59:02 UTC
and the end of the stack trace:
"""
	at org.netbeans.modules.java.hints.TryWrapperJavaHint.implement(TryWrapperJavaHint.java:66)
	at org.netbeans.modules.editor.hints.HintsUI$1.run(HintsUI.java:340)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:499)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:932)
"""
Comment 2 jerome_bouat 2007-11-05 14:01:28 UTC
Created attachment 52521 [details]
.netbeans\5.5.1\var\log\message.log
Comment 3 Jan Lahoda 2007-11-05 19:12:44 UTC
The Java infrastructure and Java hints have been completely rewritten for NB6.0, so this should not happen anymore in
NB6.0. 
Comment 4 Jan Becicka 2008-02-25 16:18:22 UTC
This issue is not valid in current builds any more. Java support was completely
redesigned in 6.0 time frame. Please use NetBeans 6.0 and later.