@@ -1545,9 +1545,6 @@ public static void main(String[] args) {
15451545 // Start the update check early. Will be handled after the splash screen goes away.
15461546 var updateFuture = AppUpdate .autoUpdateCheck ();
15471547
1548- String versionImplementation = version ;
1549- String versionOverride = version ;
1550-
15511548 if (OsDetection .MAC_OS_X ) {
15521549 // On OSX the menu bar at the top of the screen can be enabled at any time, but the
15531550 // title (ie. name of the application) has to be set before the GUI is initialized (by
@@ -1563,8 +1560,8 @@ public static void main(String[] args) {
15631560 }
15641561
15651562 if (MapTool .class .getPackage ().getImplementationVersion () != null ) {
1566- versionImplementation = MapTool .class .getPackage ().getImplementationVersion ().trim ();
1567- log .info ("getting MapTool version from manifest: " + versionImplementation );
1563+ version = MapTool .class .getPackage ().getImplementationVersion ().trim ();
1564+ log .info ("getting MapTool version from manifest: " + version );
15681565 }
15691566
15701567 if (MapTool .class .getPackage ().getImplementationVendor () != null ) {
@@ -1590,7 +1587,7 @@ public SentryEvent process(@Nonnull SentryEvent event, @Nullable Hint hint) {
15901587 // -version
15911588 Options cmdOptions = new Options ();
15921589 cmdOptions .addOption ("d" , "debug" , false , "turn on System.out enhanced debug output" );
1593- cmdOptions .addOption ("v" , "version" , true , "override MapTool version" );
1590+ cmdOptions .addOption ("v" , "version" , true , "override MapTool version (defunct) " );
15941591 cmdOptions .addOption ("m" , "monitor" , true , "sets which monitor to use" );
15951592 cmdOptions .addOption ("f" , "fullscreen" , false , "set to maximize window" );
15961593 cmdOptions .addOption ("w" , "width" , true , "override MapTool window width" );
@@ -1609,7 +1606,6 @@ public SentryEvent process(@Nonnull SentryEvent event, @Nullable Hint hint) {
16091606 cmd = cmdParser .parse (cmdOptions , args );
16101607
16111608 debug = getCommandLineOption (cmd , "debug" );
1612- versionOverride = getCommandLineOption (cmd , "version" , version );
16131609 graphicsMonitor = getCommandLineOption (cmd , "monitor" , graphicsMonitor );
16141610 useFullScreen = getCommandLineOption (cmd , "fullscreen" );
16151611
@@ -1644,13 +1640,10 @@ public SentryEvent process(@Nonnull SentryEvent event, @Nullable Hint hint) {
16441640 }
16451641
16461642 if (cmd .hasOption ("version" )) {
1647- log .info ("overriding MapTool version from command line to: " + versionOverride );
1648- version = versionOverride ;
1649- } else {
1650- version = versionImplementation ;
1651- log .info ("MapTool version: " + version );
1643+ log .warn ("Found -v on command line, but the option is no longer used and will be ignored." );
16521644 }
16531645
1646+ log .info ("MapTool version: " + version );
16541647 log .info ("MapTool vendor: " + vendor );
16551648
16561649 if (cmd .getArgs ().length != 0 ) {
@@ -1666,9 +1659,7 @@ public SentryEvent process(@Nonnull SentryEvent event, @Nullable Hint hint) {
16661659
16671660 // Set MapTool version
16681661 Sentry .setTag ("os" , System .getProperty ("os.name" ));
1669- Sentry .setTag ("version" , MapTool .getVersion ());
1670- Sentry .setTag ("versionImplementation" , versionImplementation );
1671- Sentry .setTag ("versionOverride" , versionOverride );
1662+ Sentry .setTag ("version" , version );
16721663
16731664 if (listMacros ) {
16741665 StringBuilder logOutput = new StringBuilder ();
0 commit comments