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 253671 - [newcodemodel] java.lang.ClassCastException
Summary: [newcodemodel] java.lang.ClassCastException
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.1
Hardware: PC Solaris
: P2 normal (vote)
Assignee: Alexander Simon
URL:
Keywords: REGRESSION
: 253858 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-07-23 08:57 UTC by Alexander Simon
Modified: 2015-07-29 15:15 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Simon 2015-07-23 08:57:54 UTC
Exception from tests log.
    [junit] java.lang.ClassCastException: org.netbeans.modules.cnd.modelimpl.csm.core.Unresolved$UnresolvedFile cannot be cast to org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl
    [junit] 	at org.netbeans.modules.cnd.modelimpl.repository.OffsetableKey.<init>(OffsetableKey.java:68)
    [junit] 	at org.netbeans.modules.cnd.modelimpl.repository.MacroKey.<init>(MacroKey.java:65)
    [junit] 	at org.netbeans.modules.cnd.modelimpl.repository.KeyUtilities.createMacroKey(KeyUtilities.java:146)
    [junit] 	at org.netbeans.modules.cnd.modelimpl.uid.UIDUtilities$MacroUID.<init>(UIDUtilities.java:687)
    [junit] 	at org.netbeans.modules.cnd.modelimpl.uid.UIDUtilities.createMacroUID(UIDUtilities.java:145)
    [junit] 	at org.netbeans.modules.cnd.modelimpl.csm.MacroImpl.createUID(MacroImpl.java:214)
    [junit] 	at org.netbeans.modules.cnd.modelimpl.csm.core.OffsetableIdentifiableBase.getUID(OffsetableIdentifiableBase.java:93)
    [junit] 	at org.netbeans.modules.cnd.modelimpl.uid.UIDProviderIml.get(UIDProviderIml.java:95)
    [junit] 	at org.netbeans.modules.cnd.modelimpl.uid.UIDProviderIml.get(UIDProviderIml.java:86)
    [junit] 	at org.netbeans.modules.cnd.api.model.util.UIDs.get(UIDs.java:70)
    [junit] 	at org.netbeans.modules.cnd.modelimpl.content.file.FileComponentReferences.addReferenceImpl(FileComponentReferences.java:292)
    [junit] 	at org.netbeans.modules.cnd.modelimpl.content.file.FileComponentReferences.addReference(FileComponentReferences.java:280)
    [junit] 	at org.netbeans.modules.cnd.modelimpl.content.file.FileContent.addReference(FileContent.java:379)
    [junit] 	at org.netbeans.modules.cnd.modelimpl.parser.clank.ClankTokenStreamProducer.addMacroUsage(ClankTokenStreamProducer.java:552)
    [junit] 	at org.netbeans.modules.cnd.modelimpl.parser.clank.ClankTokenStreamProducer.addMacroExpansions(ClankTokenStreamProducer.java:544)
    [junit] 	at org.netbeans.modules.cnd.modelimpl.parser.clank.ClankTokenStreamProducer.getTokenStream(ClankTokenStreamProducer.java:173)
    [junit] 	at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.doParse(FileImpl.java:1448)
    [junit] 	at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl._parse(FileImpl.java:1108)
    [junit] 	at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.ensureParsedImpl(FileImpl.java:698)
    [junit] 	at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.ensureParsed(FileImpl.java:624)
    [junit] 	at org.netbeans.modules.cnd.modelimpl.csm.core.ParserThread._run(ParserThread.java:148)
    [junit] 	at org.netbeans.modules.cnd.modelimpl.csm.core.ParserThread.run(ParserThread.java:74)
    [junit] 	at org.netbeans.modules.cnd.modelimpl.csm.core.ParserThreadManager$Wrapper.run(ParserThreadManager.java:92)
Comment 1 Vladimir Voskresensky 2015-07-23 12:24:44 UTC
This is incomplete implementation of Macro Refs on-parse. <built-in> macros have key based on UnresolvedFile
Comment 2 Vladimir Voskresensky 2015-07-23 12:34:10 UTC
We have the following choices:
1) complete MacroRef on-parse implementation
2) Move it on-demand as before and collect only for one requested file
Comment 3 Alexander Simon 2015-07-24 13:05:57 UTC
fixed, change set:
http://hg.netbeans.org/cnd-main/rev/5308e8d451a5

Selected first choice is "1) complete MacroRef on-parse implementation".
Comment 4 Quality Engineering 2015-07-25 01:16:35 UTC
Integrated into 'main-silver', will be available in build *201507250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/5308e8d451a5
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed Bug 253671 [newcodemodel] java.lang.ClassCastException
Comment 5 DimaZh 2015-07-29 15:13:16 UTC
*** Bug 253858 has been marked as a duplicate of this bug. ***