ebean
ebean copied to clipboard
Documentation for TQRootBean.findSingleAttribute incorrect
The method findSingleAttribute
of TQRootBean returns either a single value or null
when no rows match.
However the JavaDoc documentation states https://github.com/ebean-orm/ebean/blob/4cc012b974455e6deea320273e0c483ddc1b28b1/ebean-querybean/src/main/java/io/ebean/typequery/TQRootBean.java#L1782 which I think is incorrect.
Also the method should be annotated with the @Nullable
annotation as it might return a null value. All methods in this class are currently marked as NonNull by default because of the https://github.com/ebean-orm/ebean/blob/4cc012b974455e6deea320273e0c483ddc1b28b1/ebean-querybean/src/main/java/io/ebean/typequery/TQRootBean.java#L61 annotation. This confuses IntelliJ as it thinks findSingleAttribute
cannot return a null value.