From 528f05e09ba5745c56bcd66e02d88ce7ad8bb596 Mon Sep 17 00:00:00 2001 From: remm Date: Wed, 19 May 2021 15:58:32 +0200 Subject: [PATCH] Remove deprecated -verbose option --- CHANGES.md | 1 + .../java/org/apache/tomcat/jakartaee/MigrationCLI.java | 10 ---------- .../org/apache/tomcat/jakartaee/MigrationTest.java | 2 +- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index ad44c6c..6e3beef 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,6 +3,7 @@ ## 1.0.1 (in progress) - Fix [#20](https://github.com/apache/tomcat-jakartaee-migration/issues/20) by using commons-compression instead of the Java zip code (remm) +- Remove deprecated `-verbose` command line option (remm) ## 1.0.0 diff --git a/src/main/java/org/apache/tomcat/jakartaee/MigrationCLI.java b/src/main/java/org/apache/tomcat/jakartaee/MigrationCLI.java index 36e9dc5..1b7c92f 100644 --- a/src/main/java/org/apache/tomcat/jakartaee/MigrationCLI.java +++ b/src/main/java/org/apache/tomcat/jakartaee/MigrationCLI.java @@ -33,9 +33,6 @@ public class MigrationCLI { private static final String EXCLUDE_ARG = "-exclude="; private static final String LOGLEVEL_ARG = "-logLevel="; private static final String PROFILE_ARG = "-profile="; - // Will be removed for 1.0.0 - @Deprecated - private static final String VERBOSE_ARG = "-verbose"; private static final String ZIPINMEMORY_ARG = "-zipInMemory"; public static void main(String[] args) throws IOException { @@ -81,13 +78,6 @@ public static void main(String[] args) throws IOException { } else if (argument.equals(ZIPINMEMORY_ARG)) { iter.remove(); migration.setZipInMemory(true); - } else if (argument.equals(VERBOSE_ARG)) { - iter.remove(); - // Ignore if LOGLEVEL_ARG has set something different - if (Logger.getGlobal().getParent().getLevel().equals(Level.INFO)) { - Logger.getGlobal().getParent().getHandlers()[0].setLevel(Level.FINE); - Logger.getGlobal().getParent().setLevel(Level.FINE); - } } } diff --git a/src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java b/src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java index e4384be..0d61442 100644 --- a/src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java +++ b/src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java @@ -57,7 +57,7 @@ public void testMigrateSingleSourceFile() throws Exception { @Test public void testMigrateSingleSourceFileWithProfile() throws Exception { File migratedFile = new File("target/test-classes/HelloServlet.migrated.java"); - MigrationCLI.main(new String[] {"-verbose", "-profile=EE", "target/test-classes/HelloServlet.java", migratedFile.getAbsolutePath()}); + MigrationCLI.main(new String[] {"-logLevel=FINE", "-profile=EE", "target/test-classes/HelloServlet.java", migratedFile.getAbsolutePath()}); assertTrue("Migrated file not found", migratedFile.exists());