Skip to content

Commit

Permalink
Remove deprecated -verbose option
Browse files Browse the repository at this point in the history
  • Loading branch information
rmaucher committed May 19, 2021
1 parent 0bf8836 commit 528f05e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 0 additions & 10 deletions src/main/java/org/apache/tomcat/jakartaee/MigrationCLI.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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);
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down

0 comments on commit 528f05e

Please sign in to comment.