Changes between Version 69 and Version 70 of j2p


Ignore:
Timestamp:
05/15/24 13:02:58 (6 months ago)
Author:
wouter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • j2p

    v69 v70  
    127127{{{@Nonnull String val}}} or {{{@Nonnull String f() { ... } }}}. Java primitive types like {{{boolean}}} and {{{int}}} can never be null and do not need @Nonnull
    128128
     129Java code {{{X instanceof C}}} is translated as in Java, so null/None is not an instance of C - C is not "Optional" and you do not need to write {{{X instanceof @Nonnull C}}}.
     130
    129131{{{#!td style="background: #efe"
    130132@Nonnull can be used by the java compiler to do extra checks on your code. You may need to enable this. For instance in Eclipse check Preferences/Java/Compiler/Errors/Warnings and scroll down to "Null Analysis". Note that Eclipse uses its own annotations, you have to add @Nonnull.