kohsuke / libpam4j

libpam4j
http://libpam4j.kohsuke.org/
MIT License
44 stars 47 forks source link

Fails to build with Java 9: _ as keyword #19

Closed FauxFaux closed 6 years ago

FauxFaux commented 7 years ago

Please remove the use of _ as an identifier in the codebase, as this breaks building with Java 9.

https://github.com/kohsuke/libpam4j/blob/da77d06208b12d9ab30648ce622293b6abf4b40c/src/main/java/org/jvnet/libpam/PAM.java#L74

Alternatively, change the -source to 1.8, which allows this deprecated feature.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.4:jar (default-cli) on project libpam4j: MavenReportException: Error while generating Javadoc: 
[ERROR] Exit code: 1 - /build/libpam4j-1.4/src/main/java/org/jvnet/libpam/PAM.java:74: error: as of release 9, '_' is a keyword, and may not be used as an identifier
[ERROR]             public int callback(int num_msg, Pointer msg, Pointer resp, Pointer _) {
[ERROR]                                                                                 ^
[ERROR] /build/libpam4j-1.4/src/main/java/org/jvnet/libpam/impl/PAMLibrary.java:102: error: as of release 9, '_' is a keyword, and may not be used as an identifier
[ERROR]             int callback(int num_msg, Pointer msg, Pointer resp, Pointer _);
[ERROR]                                                                          ^
[ERROR] /build/libpam4j-1.4/src/main/java/org/jvnet/libpam/impl/PAMLibrary.java:105: error: as of release 9, '_' is a keyword, and may not be used as an identifier
[ERROR]         public Pointer _;
[ERROR]                        ^
[ERROR] 
[ERROR] Command line was: /usr/lib/jvm/java-9-openjdk-amd64/bin/javadoc @options @packages
[ERROR] 
[ERROR] Refer to the generated Javadoc files in '/build/libpam4j-1.4/target/apidocs' dir.
[ERROR] 
[ERROR] -> [Help 1]