Changes between Version 69 and Version 70 of j2p
- Timestamp:
- 05/15/24 13:02:58 (6 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
j2p
v69 v70 127 127 {{{@Nonnull String val}}} or {{{@Nonnull String f() { ... } }}}. Java primitive types like {{{boolean}}} and {{{int}}} can never be null and do not need @Nonnull 128 128 129 Java 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 129 131 {{{#!td style="background: #efe" 130 132 @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.