diff --git a/jOOQ/src/main/java/org/jooq/ParserCLI.java b/jOOQ/src/main/java/org/jooq/ParserCLI.java index 31276ca063..fd8e05e1ba 100644 --- a/jOOQ/src/main/java/org/jooq/ParserCLI.java +++ b/jOOQ/src/main/java/org/jooq/ParserCLI.java @@ -73,7 +73,7 @@ public final class ParserCLI { } else if (a.done) {} else if (a.toDialect == null || a.sql == null) { - System.out.println("Mandatory arguments: -t and -s. Use -h for help"); + System.out.println("Mandatory arguments: -T and -s. Use -h for help"); throw new RuntimeException(); } else { @@ -149,7 +149,7 @@ public final class ParserCLI { invalid(arg, RenderNameCase.class); } } - else if ("f".equals(flag) || "from-dialect".equals(flag)) { + else if ("F".equals(flag) || "from-dialect".equals(flag)) { try { a.fromDialect = SQLDialect.valueOf(arg.toUpperCase()); displayFromDialect(a); @@ -158,7 +158,9 @@ public final class ParserCLI { invalid(arg, SQLDialect.class); } } - else if ("t".equals(flag) || "to-dialect".equals(flag)) { + + // [#9144] /t maintained for backwards compatibility + else if ("t".equals(flag) || "T".equals(flag) || "to-dialect".equals(flag)) { try { a.toDialect = SQLDialect.valueOf(arg.toUpperCase()); displayToDialect(a); @@ -290,7 +292,7 @@ public final class ParserCLI { throw e; } } - else if ("-f".equals(args[i]) || "--from-dialect".equals(args[i])) { + else if ("-F".equals(args[i]) || "--from-dialect".equals(args[i])) { try { result.fromDialect = SQLDialect.valueOf(args[++i].toUpperCase()); continue argsLoop; @@ -300,11 +302,13 @@ public final class ParserCLI { throw e; } catch (ArrayIndexOutOfBoundsException e) { - System.out.println("Flag -f / --from-dialect requires argument"); + System.out.println("Flag -F / --from-dialect requires argument"); throw e; } } - else if ("-t".equals(args[i]) || "--to-dialect".equals(args[i])) { + + // [#9144] -t maintained for backwards compatibility + else if ("-t".equals(args[i]) || "-T".equals(args[i]) || "--to-dialect".equals(args[i])) { try { result.toDialect = SQLDialect.valueOf(args[++i].toUpperCase()); continue argsLoop; @@ -314,7 +318,7 @@ public final class ParserCLI { throw e; } catch (ArrayIndexOutOfBoundsException e) { - System.out.println("Flag -t / --to-dialect requires argument"); + System.out.println("Flag -T / --to-dialect requires argument"); throw e; } } @@ -358,8 +362,8 @@ public final class ParserCLI { System.out.println(" -h / --help Display this help"); System.out.println(" -k / --keyword Specify the output keyword case (org.jooq.conf.RenderKeywordCase)"); System.out.println(" -i / --identifier Specify the output identifier case (org.jooq.conf.RenderNameCase)"); - System.out.println(" -f / --from-dialect Specify the input dialect (org.jooq.SQLDialect)"); - System.out.println(" -t / --to-dialect Specify the output dialect (org.jooq.SQLDialect)"); + System.out.println(" -F / --from-dialect Specify the input dialect (org.jooq.SQLDialect)"); + System.out.println(" -T / --to-dialect Specify the output dialect (org.jooq.SQLDialect)"); System.out.println(" -s / --sql Specify the input SQL string"); System.out.println(""); System.out.println(" -I / --interactive Start interactive mode"); @@ -372,8 +376,8 @@ public final class ParserCLI { System.out.println(" /h or /help Display this help"); System.out.println(" /k or /keyword Specify the output keyword case (org.jooq.conf.RenderKeywordCase)"); System.out.println(" /i or /identifier Specify the output identifier case (org.jooq.conf.RenderNameCase)"); - System.out.println(" /f or /from-dialect Specify the input dialect (org.jooq.SQLDialect)"); - System.out.println(" /t or /to-dialect Specify the output dialect (org.jooq.SQLDialect)"); + System.out.println(" /F or /from-dialect Specify the input dialect (org.jooq.SQLDialect)"); + System.out.println(" /T or /to-dialect Specify the output dialect (org.jooq.SQLDialect)"); System.out.println(" Specify the input SQL string"); System.out.println(""); System.out.println(" /q or /quit Quit");