Bug 210385

Summary: [compiler] ProblemReporter#getProblemCategory misbehaves when passed ProblemSeverities.Ignore as severity parameter
Product: [Eclipse Project] JDT Reporter: Maxime Daniel <maxime_daniel>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jarthana, Olivier_Thomann, srikanth_sankaran
Version: 3.4   
Target Milestone: 3.6 M1   
Hardware: PC   
OS: All   
Whiteboard:
Attachments:
Description Flags
Proposed fix none

Description Maxime Daniel CLA 2007-11-20 08:45:45 EST
Source based, v_825.

Because (ProblemSeverities.Ignore & ProblemSeverities.Fatal) != 0, getProblemCategory behaves as if passed ProblemSeverities.Fatal when it is passed ProblemSeverities.Ignore (basically, this implies returning CategorizedProblem.CAT_INTERNAL instead of irritant-based categories), which is probably not the desired behavior.

Instead of fixing the getProblemCategory method only, we may consider using another, better value for Ignore itself. This would have the advantage of realigning with ProblemSeverities' doc, which states that when the bit for int value 128 is set then we have a fatal error (Ignore currently sets that bit, and is eventually not qualifying a fatal error). But that may need a careful visit of our code wherever ProblemSeverities constants are used.
Comment 1 Olivier Thomann CLA 2009-07-22 15:59:52 EDT
Created attachment 142317 [details]
Proposed fix
Comment 2 Olivier Thomann CLA 2009-07-22 16:00:46 EDT
Released for 3.6M1.
Code review is required to verify.
Comment 3 Jay Arthanareeswaran CLA 2009-08-04 05:45:46 EDT
Verified for 3.6M1 by code inspection