You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getters for AtomicInteger, AtomicLong, etc - usually - look like
public int getCount() {
return count.get();
}
Lombok @Getter generates
public AtomicInteger getCount() {
return count;
}
I propose to add option/flag to @Getter annotation or lombok.config to enable "extraction/unwrapping" of such "wrapped" fields,
to generate return count.get() instead of return count.
To make it more "generic", @Getter could have String property using with the name of the method, it should call
@Getter(using="get")
final AtomicInteger count = new AtomicInteger();
It can be also useful for ThreadLocal, Collection.size() and many others
The text was updated successfully, but these errors were encountered:
magicprinc
changed the title
[FEATURE]
[FEATURE] Getters for AtomicInteger, AtomicLong, etc
Nov 22, 2023
Getters for AtomicInteger, AtomicLong, etc - usually - look like
Lombok
@Getter
generatesI propose to add option/flag to
@Getter
annotation or lombok.config to enable "extraction/unwrapping" of such "wrapped" fields,to generate
return count.get()
instead ofreturn count
.To make it more "generic",
@Getter
could have String propertyusing
with the name of the method, it should callIt can be also useful for ThreadLocal, Collection.size() and many others
The text was updated successfully, but these errors were encountered: