Skip to content

Commit

Permalink
module-info.java: Remove "transient" from requirements where possible
Browse files Browse the repository at this point in the history
junixsocket-common declares a "require static transient" on compile-time
annotations.

These annotations are optional, and therefore should not be marked
transient.

Moreover, in mysql, we would "require transient" the new MySQL
connector (mysql.connector.j). However, this would prevent us from using
the old MySQL connector (mysql.connector.java).

Remove the "transient" declaration, and reformat module-info.java

#148
  • Loading branch information
kohlschuetter committed Nov 13, 2023
1 parent 563a1e7 commit b9e55ac
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 7 deletions.
6 changes: 3 additions & 3 deletions junixsocket-common/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
* The common junixsocket classes.
*/
// NOPMD -- https://github.com/pmd/pmd/issues/4620
@SuppressWarnings("module")
module org.newsclub.net.unix {
@SuppressWarnings("module") module org.newsclub.net.unix {
exports org.newsclub.net.unix;

requires java.base;
requires static java.rmi;
requires static transitive com.kohlschutter.annotations.compiletime;

requires static com.kohlschutter.annotations.compiletime;
requires static org.eclipse.jdt.annotation;
requires static animal.sniffer.annotations;
}
1 change: 1 addition & 0 deletions junixsocket-darwin/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
exports org.newsclub.net.unix.darwin.system;

requires transitive org.newsclub.net.unix;

requires static com.kohlschutter.annotations.compiletime;
requires static org.eclipse.jdt.annotation;
}
6 changes: 3 additions & 3 deletions junixsocket-demo/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*/
@SuppressWarnings("module") //
module org.newsclub.net.unix.demo {
requires com.kohlschutter.util;
requires org.newsclub.net.unix;
requires org.newsclub.net.unix.tipc;
requires org.newsclub.net.unix.server;
Expand All @@ -15,12 +14,13 @@
requires nanohttpd;
requires okhttp3;
requires mina.core;
requires static com.kohlschutter.annotations.compiletime;
requires static org.eclipse.jdt.annotation;
requires io.netty.common;
requires io.netty.buffer;
requires io.netty.transport;

requires static com.kohlschutter.annotations.compiletime;
requires static org.eclipse.jdt.annotation;

exports org.newsclub.net.unix.demo.rmi.services to java.rmi;
exports org.newsclub.net.unix.demo.rmi.fd to java.rmi;
}
2 changes: 1 addition & 1 deletion junixsocket-mysql/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
requires java.base;

// requires mysql.connector.java; // until 8.0.30
requires transitive mysql.connector.j; // from 8.0.31
requires mysql.connector.j; // from 8.0.31

requires static com.kohlschutter.annotations.compiletime;
requires static org.eclipse.jdt.annotation;
Expand Down
1 change: 1 addition & 0 deletions junixsocket-server/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
exports org.newsclub.net.unix.server;

requires transitive org.newsclub.net.unix;

requires static com.kohlschutter.annotations.compiletime;
requires static org.eclipse.jdt.annotation;
}
1 change: 1 addition & 0 deletions junixsocket-ssl/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
exports org.newsclub.net.unix.ssl;

requires transitive org.newsclub.net.unix;

requires static com.kohlschutter.annotations.compiletime;
requires static org.eclipse.jdt.annotation;
}
1 change: 1 addition & 0 deletions junixsocket-tipc/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
exports org.newsclub.net.unix.tipc;

requires transitive org.newsclub.net.unix;

requires static com.kohlschutter.annotations.compiletime;
requires static org.eclipse.jdt.annotation;
}
1 change: 1 addition & 0 deletions junixsocket-vsock/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
exports org.newsclub.net.unix.vsock;

requires transitive org.newsclub.net.unix;

requires static com.kohlschutter.annotations.compiletime;
requires static org.eclipse.jdt.annotation;
}

0 comments on commit b9e55ac

Please sign in to comment.