Changes between Version 70 and Version 71 of j2p
- Timestamp:
- 05/15/24 15:08:03 (6 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
j2p
v70 v71 129 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 130 131 Also be aware of the subtleties of this notation. For instance 132 {{{@Nonnnull Set<String>}}} is a set that can not be null but that contain null values. 133 {{{@Nonnull Set<@Nonnull String>}}} is a set that can not be null and also can not contain null values. 134 135 131 136 {{{#!td style="background: #efe" 132 137 @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.