This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Try making outer class from "Inner" on this test case: public class Main { public static class Inner { public static final int CONST = 1 << 23; private int val; public Inner(int val, boolean flag) { this.val = val | (flag ? 1<<30 : 0); } public int getVal() { return val & 0xBFFFFFFF; } } } It will rewrite the "0xBFFFFFFF" constant as "-1073741825, which, while being semantically equivalent, is harder to understand in given context. The refacforing have once even rewritten "1<<30" as a numeric (and again hard to understand) constant, but I can't reproduce this specific case with such a simple test case. Keeping the numeric constants as they are is very important for readability of any code that deals with binary data.
Yes, that is bad. Unfortunately it is represented as an integer literal and when printed at a new place, there is no way how to recognize the original notation. The problem is applicable for octal notation too. Bear in mind that this is problem only when tree is inserted to the new file. During reformat, we have token sequence and we workaround this problem. There isn't any good fix, this has to be fixed in serving (parser) side. Feel free to increase priority. I do not have any idea of replacement 1<<30 as a numeric, this is a left shift expression, cannot find the place where it can be replaced.
Overtake.
Resolving all issues with milestone "future" as LATER. If you feel strongly that it should be implemented please reopen and set the target milestone to "next".
NetBeans.org Migration: changing resolution from LATER to WONTFIX