Bug 210385 - [compiler] ProblemReporter#getProblemCategory misbehaves when passed ProblemSeverities.Ignore as severity parameter
Summary: [compiler] ProblemReporter#getProblemCategory misbehaves when passed ProblemS...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.6 M1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-20 08:45 EST by Maxime Daniel CLA
Modified: 2009-08-04 07:21 EDT (History)
3 users (show)

See Also:


Attachments
Proposed fix (3.09 KB, patch)
2009-07-22 15:59 EDT, Olivier Thomann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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