Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

com.sun.istack.internal.Nullable Annotation and Guice

When Guice says that it recognizes any @Nullable annotation here (http://code.google.com/p/google-guice/wiki/UseNullable) does that mean I can use com.sun.istack.internal.Nullable provided by the Java 7 Runtime successfully?

The fact that the package name is com.sun.istack.internal leads me to believe that I probably shouldn't be using it, but it is pretty convenient to use...

like image 775
racc Avatar asked May 07 '26 02:05

racc


1 Answers

You have to use Nullable from javax.annotation package as the example from the site says.

If you check comments on the site, there are links to proper jar library.

        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <version>3.0.2</version>
        </dependency>

In my case I was about to use Nullable annotation from IntelliJ package. :)

like image 134
Milan Baran Avatar answered May 09 '26 14:05

Milan Baran



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!