Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » null for integral types ?
null for integral types ? [message #1103042] Fri, 06 September 2013 10:17 Go to next message
Nicola  Zanaga is currently offline Nicola ZanagaFriend
Messages: 23
Registered: July 2009
Junior Member
this code give a wrong warning "Null type safety" (eclipse kepler)

import org.eclipse.jdt.annotation.NonNull;

public class TestCase {

    @NonNull 
    public Object test() {
        boolean b = true;
        return b;
    }
}

Re: null for integral types ? [message #1103350 is a reply to message #1103042] Fri, 06 September 2013 16:54 Go to previous message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1036
Registered: July 2009
Senior Member
Yes, we took great care to correctly find NPE due to unboxing, and forgot to mark boxing expressions as non-null.
Luckily this is already being worked on: https://bugs.eclipse.org/407414

cheers,
Stephan
Previous Topic:EclipseCompiler working standalone but not in plugin
Next Topic:Override workspace/project compiler settings for a specific file
Goto Forum:
  


Current Time: Fri Nov 28 06:01:22 GMT 2014

Powered by FUDForum. Page generated in 0.24276 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software