Community
Participate
Working Groups
Helios is flagging a potential NPE in a context where it can't occur. Galileo handles this correctly. Example: if (initStart == null || initEnd == null) { // if both null, default end to now and subtract an hour for start if (initStart == null && initEnd == null) { // default end to when the editor was launched initEnd = editorLaunchDate; // subtract an hour from end for start long timeInMillis = initEnd.getTime() + ONE_HOUR_MILLIS; initStart = new Date(timeInMillis); } else if (initStart == null) { // subtract an hour from end for start /***** Helios says initEnd could be null here, but in fact the logic makes that impossible *****/ long timeInMillis = initEnd.getTime() - ONE_HOUR_MILLIS; initStart = new Date(timeInMillis); } else { // add an hour to start for end long timeInMillis = initStart.getTime() + ONE_HOUR_MILLIS; initEnd = new Date(timeInMillis); } } -- Configuration Details -- Product: Eclipse 1.3.0.20100526-1935 (org.eclipse.epp.package.java.product) Installed Features: org.eclipse.jdt 3.6.0.v20100520-0800-7z8XFUJFMTfCW8oRvdJkums9H155
Ayushman, please investigate
While bulk closing [null][correlation] bugs, I was intrigued by the observation that this had been working as desired in Galileo (3.5). Then I changed the code to //--- void test (Date initStart, Date initEnd, Date editorLaunchDate, boolean b) { if (initStart == null || initEnd == null) { // if both null, default end to now and subtract an hour for start if (initStart == null && b) { // ****CHANGED***** // default end to when the editor was launched initEnd = editorLaunchDate; // subtract an hour from end for start long timeInMillis = initEnd.getTime() + ONE_HOUR_MILLIS; initStart = new Date(timeInMillis); } else if (initStart == null) { // subtract an hour from end for start /***** Helios says initEnd could be null here, but in fact the logic makes that impossible *****/ long timeInMillis = initEnd.getTime() - ONE_HOUR_MILLIS; initStart = new Date(timeInMillis); } else { // add an hour to start for end long timeInMillis = initStart.getTime() + ONE_HOUR_MILLIS; initEnd = new Date(timeInMillis); } } } //--- thusly removing the check that should protect initEnd. Still Galileo kept quiet, so maybe the analysis back then wasn't better but simply incomplete ... Still, might be worth a third look during the Oxygen cycle, before closing either way.
bulk move out of 4.8
.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.