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
One nasty failure mode for annotation-less "Creator" methods (constructors) is that of Javac not compiling parameter names in byte code. While this can not be directly detected in the sense that we know that a constructor with missing names is an error (there are reasons why it might be disabled on purpose, for example; or for older code compiled with pre-Java 8, even), it seems possible to detect likely problem case:
One visible args-taking constructor; no default (no-args) constructor
No other creators (static factory method)
Deserialized as POJO (no custom deserializer)
and if so, we could perhaps improve exception message to suggest that lack of parameter names for otherwise visible Constructor is likely reason for issue.
The text was updated successfully, but these errors were encountered:
(note: follow-up on #2852)
One nasty failure mode for annotation-less "Creator" methods (constructors) is that of Javac not compiling parameter names in byte code. While this can not be directly detected in the sense that we know that a constructor with missing names is an error (there are reasons why it might be disabled on purpose, for example; or for older code compiled with pre-Java 8, even), it seems possible to detect likely problem case:
and if so, we could perhaps improve exception message to suggest that lack of parameter names for otherwise visible Constructor is likely reason for issue.
The text was updated successfully, but these errors were encountered: