Skip to content

Commit

Permalink
Fixed code style and javadocs format errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikolay Artamonov committed Dec 25, 2024
1 parent f854c7b commit 0336a52
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
8 changes: 8 additions & 0 deletions build.mill
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,14 @@ trait MillJavaModule extends JavaModule {
Deps.jline,
Deps.jna
)

def javadocOptions = super.javadocOptions() ++ Seq(
// Disable warnings for missing documentation comments or tags (for example,
// a missing comment or class, or a missing @return tag or similar tag on a method).
// We have many methods without JavaDoc comments, so those warnings are useless
// and significantly clutter the output.
"-Xdoclint:all,-missing"
)
}

trait MillPublishJavaModule extends MillJavaModule with PublishModule {
Expand Down
9 changes: 4 additions & 5 deletions main/client/src/mill/main/client/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ public static final int ExitServerCodeWhenVersionMismatch() {
* Determines if we have an interactive console attached to the application.
* <p>
* Before JDK 22 we could use <code>System.console() != null</code> to do that check.
* However, with JDK >= 22 it no longer works because <code>System.console()</code>
* However, with JDK &gt;= 22 it no longer works because <code>System.console()</code>
* always returns a console instance even for redirected streams. Instead,
* JDK >= 22 introduced the method <a href="https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/io/Console.html#isTerminal()">`Console.isTerminal`</a>.
* JDK &gt;= 22 introduced the method <a href="https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/io/Console.html#isTerminal()">`Console.isTerminal`</a>.
* See: JLine As The Default Console Provider (JDK-8308591)
* <p>
* This method takes into account these differences and is compatible with
* both JDK versions < 22 and later.
* both JDK versions before 22 and later.
*/
public static boolean hasConsole() {
Console console = System.console();
Expand All @@ -63,8 +63,7 @@ public static boolean hasConsole() {
} catch (InvocationTargetException | NoSuchMethodException | IllegalAccessException ignored) {
return true;
}
} else
return false;
} else return false;
}

public static String[] parseArgs(InputStream argStream) throws IOException {
Expand Down

0 comments on commit 0336a52

Please sign in to comment.