Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 324150

Summary: LR Parser's action class CPPBuildASTParserAction throws UnsupportedOperationException by its function consumeDeclarationSimple.
Product: [Tools] CDT Reporter: John Liu <john_ws_liu>
Component: cdt-parserAssignee: Project Inbox <cdt-parser-inbox>
Status: RESOLVED FIXED QA Contact: Mike Kucera <mikekucera>
Severity: normal    
Priority: P3 CC: recoskie
Version: 7.0   
Target Milestone: 7.0.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
A fix patch applied to org.eclipse.cdt.core.lrparser recoskie: iplog+

Description John Liu CLA 2010-08-31 18:26:08 EDT
Build Identifier: 

LR Parser's action class CPPBuildASTParserAction throws UnsupportedOperationException by its function consumeDeclarationSimple.

This is caused by Collections.emptyList() used by the function tried to add a an entry, but it doesn't support add operation.

Reproducible: Always
Comment 1 John Liu CLA 2010-08-31 18:44:21 EDT
Created attachment 177900 [details]
A fix patch applied to org.eclipse.cdt.core.lrparser
Comment 2 John Liu CLA 2010-08-31 18:45:24 EDT
The fix patch will target 701 and head stream.
Comment 3 Chris Recoskie CLA 2010-09-01 09:42:14 EDT
Applied to cdt_7_0 and HEAD.
Comment 4 Mike Kucera CLA 2010-09-01 10:02:31 EDT
I think this bug has popped up a couple times now. Might be a good idea to replace all uses of Collections.emptyList() in the actions to ensure it doesn't happen again.
Comment 5 John Liu CLA 2010-09-01 10:12:26 EDT
(In reply to comment #4)
> I think this bug has popped up a couple times now. Might be a good idea to
> replace all uses of Collections.emptyList() in the actions to ensure it doesn't
> happen again.

Thanks, Mike. 

I check my workspace and there is no more parser action function uses it.
Comment 7 John Liu CLA 2010-10-26 12:01:28 EDT
This is fixed.