In case of module-info.java of module has "provides with" statement with service implementation, which has no public no-arg constructor (has public constructor with args or has not public constructor), compile-time error is expected due to jigsaw-1.1.3-230
It is a compile-time error if the service implementation named by the with clause of a provides statement is abstract, or is not public, or does not have a public no-args constructor, or is an inner class (JLS 8.1.3).
but no error is resulted.
It is a compile-time error if the service implementation named by the with clause of a provides statement is abstract, or is not public, or does not have a public no-args constructor, or is an inner class (JLS 8.1.3).
but no error is resulted.
- duplicates
-
JDK-8145839 javac report error if service doesn't have a no-args constructor
-
- Resolved
-