Copilot commented on code in PR #2228: URL: https://github.com/apache/groovy/pull/2228#discussion_r2094629980
########## subprojects/groovy-groovydoc/src/spec/doc/groovydoc.adoc: ########## @@ -70,8 +70,23 @@ separated by platform path separator) |-verbose| |Enable verbose output | |--version|Display the version |-windowtitle <text>| |Browser window title for the documentation +|-javaversion <version> | | The version of the Java source files |======================================================================= +=== Java Versions + +The supported Java Versions for `groovydoc` are defined by the JavaLanguageClass. The values follow the below patterns: + +- JAVA_1_0 +- JAVA_1_1 +- JAVA_1_2 +- JAVA_1_3 +- JAVA_1_4 +- JAVA_5, Review Comment: Remove the trailing comma in 'JAVA_5,' to maintain consistency with the other version entries. ```suggestion - JAVA_5 ``` ########## subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovydoc.java: ########## @@ -144,6 +147,23 @@ public void setNoVersionStamp(boolean noVersionStamp) { this.noVersionStamp = noVersionStamp; } + /** + * Defaults to a popular Java version. Otherwise, override here for a specific expected source file version. + * + * @param javaVersion the expected source level of any Java files that may be parsed + */ + public void setJavaVersion(String javaVersion) { + if(javaVersion == null) { + return; + } + + try { + this.javaVersion = JavaLanguageLevel.valueOf(javaVersion); Review Comment: Consider converting 'javaVersion' to uppercase (e.g. using javaVersion.toUpperCase()) before passing it to valueOf, to ensure consistency with the CLI parsing in Main.groovy. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@groovy.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org