Skip to main content


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: 56
Registered: July 2009
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: 1853
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:more problem with non null and final fields
Goto Forum:
  


Current Time: Tue Sep 24 11:10:25 GMT 2024

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

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

Back to the top