| Summary: | Formatter fails silently if Java source contains 0x8000000000000000L | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Fernando Colombo <fernacolo> |
| Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | amj87.iitr, daniel_megert, kdevolder, marco.kaufmann, Olivier_Thomann, shiose, srikanth_sankaran |
| Version: | 3.7.1 | Flags: | daniel_megert:
pmc_approved+
|
| Target Milestone: | 3.7.2 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
Can reproduce using I20110927-0800. Fix is trivial. I think we should backport the fix to 3.7.2 as there is no workaround. Fixed for 3.8M3. Commit 35e16686684b05bd7e21fa56e9152b82d8651f61 Fixed. (In reply to comment #3) > I think we should backport the fix to 3.7.2 as there is no workaround. Yes. And it worked in 3.7. Fixed and released for 3.7.2. Commit 0ae3a6d7f76cc62f69bfafe0f0bf3e4ef6c2f3e5 *** Bug 360600 has been marked as a duplicate of this bug. *** It's not clear to me, from the bug description and comments that an analogous case for the contant 0x80000000 (i.e 'minimum' Integer instead of Long) has also been fixed. If it is also covered and fixed then please just ignore my comment. (In reply to comment #10) > It's not clear to me, from the bug description and comments that an analogous > case for the contant 0x80000000 (i.e 'minimum' Integer instead of Long) has > also been fixed. > > If it is also covered and fixed then please just ignore my comment. I checked that both cases are now fixed before marking dups. Verified for 3.8 M3 using build id: N20111022-2000 *** Bug 367913 has been marked as a duplicate of this bug. *** Verified for 3.7.2RC2 using build M20120118-0800 *** Bug 384361 has been marked as a duplicate of this bug. *** |
Build Identifier: 3.7.1, M20110909-1335 Try to format this code (Ctrl+Shift+F or right-click > Source > Format): public class FormatterBug { public static void main(String[] args) { long x = 0x8000000000000000L; System. out . println(x); } } It won't work. Now remove a zero from 0x8000000000000000L or replace it by Long.MIN_VALUE. Then format again and notice it now works. Reproducible: Always