Bug 255974

Summary: Abusive usage of InvalidInputException in the compiler
Product: [Eclipse Project] JDT Reporter: Olivier Thomann <Olivier_Thomann>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jerome_lanneluc
Version: 3.5   
Target Milestone: 3.5 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed fix none

Description Olivier Thomann CLA 2008-11-20 09:30:52 EST
This exception should only be used in the context of the scanner.
It appears to be used in the configuration of the compiler when reading the classpath arguments.
In this context (batch compiler, compiler.apt and compiler.tool) we should use an IllegalArgumentException instead.
Comment 1 Olivier Thomann CLA 2008-11-20 10:43:39 EST
Created attachment 118371 [details]
Proposed fix
Comment 2 Olivier Thomann CLA 2008-11-20 10:43:56 EST
Jérôme, please review.
Comment 3 Olivier Thomann CLA 2008-11-20 10:57:13 EST
Released for 3.4M5.
To verify, the source code needs to be verified or do a search for InvalidInputException.
Comment 4 Jerome Lanneluc CLA 2008-11-20 11:14:01 EST
(In reply to comment #2)
> Jérôme, please review.
Looks good. I just removed an unused import, an unnecessary qualification to LIB, and ensured that the create jar was deleted in a finally in BatchCompilerTest.
Comment 5 Frederic Fusier CLA 2008-12-09 07:16:06 EST
Verified for 3.5M4 looking at references in 'thrown exceptions' in code of v_929.
Only found matches in Scanner or Parser hierarchy...