Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0045138Openbravo ERPA. Platformpublic2020-09-25 08:142022-02-01 08:07
vmromanos 
Triage Platform Base 
normalminorN/A
newopen 
5
 
 
Core
No
0045138: Add support for @NonNull and @Nullable annotations
See https://help.eclipse.org/2020-09/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftask-using_null_annotations.htm [^]

Ideally we should use the Mandatory flag in AD_Column to automatically set as @NonNull/@Nullable the return object in the getters() and the parameter in the setters() of any class generated from the AD_Table definition.

Other manually generated classes could use both annotations too.

The usage of these annotations could help to detect NullPointerException easily at compilation time.
Write a code that uses a method where null might be returned. Example:

invoice.getDescription().concat("Expected NPE if description is null");

It would be nice that the eclipse compiler showing a warning to the developer.
No tags attached.
Issue History
2020-09-25 08:14vmromanosNew Issue
2020-09-25 08:14vmromanosAssigned To => platform
2020-09-25 08:14vmromanosModules => Core
2020-09-25 08:14vmromanosTriggers an Emergency Pack => No
2020-09-25 08:23vmromanosNote Added: 0123364
2022-02-01 08:07alostaleAssigned Toplatform => Triage Platform Base

Notes
(0123364)
vmromanos   
2020-09-25 08:23   
See java 8 annotations as another option to implement the same thing https://help.eclipse.org/2020-09/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftask-using_null_type_annotations.htm [^]