Skip to content

Commit 5f28292

Browse files
committed
Make Main.format and processArgs package-private
Only Main.main and the tests of the package call them. Code outside the package that runs the command line in process, through new Main(out, err, in).format(args), no longer compiles; nothing in this repository, the Maven plugin or the GitHub Action does that.
1 parent 9620991 commit 5f28292

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • open-java-format/src/main/java/com/palantir/javaformat/java

‎open-java-format/src/main/java/com/palantir/javaformat/java/Main.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public static void main(String[] args) {
9696
*
9797
* @param args the command-line arguments
9898
*/
99-
public int format(String... args) throws UsageException {
99+
int format(String... args) throws UsageException {
100100
CommandLineOptions parameters = processArgs(args);
101101

102102
if (parameters.version()) {
@@ -251,7 +251,7 @@ private static int exitCode(boolean allOk, boolean anyChanged) {
251251
}
252252

253253
/** Parses and validates command-line flags. */
254-
public static CommandLineOptions processArgs(String... args) throws UsageException {
254+
static CommandLineOptions processArgs(String... args) throws UsageException {
255255
CommandLineOptions parameters;
256256
try {
257257
parameters = CommandLineOptionsParser.parse(Arrays.asList(args));

0 commit comments

Comments
 (0)