Ignore:
Timestamp:
2022-01-26T20:13:22+01:00 (2 years ago)
Author:
taylor.smock
Message:

Replace usages of System.exit with Lifecycle.exitJosm

This fixes some coverity scan issues (spotbugs) with respect to exiting the VM.

See #15182: Standalone JOSM validator

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/projection/ProjectionCLI.java

    r16643 r18366  
    2020import org.openstreetmap.josm.data.coor.LatLon;
    2121import org.openstreetmap.josm.data.coor.conversion.LatLonParser;
     22import org.openstreetmap.josm.spi.lifecycle.Lifecycle;
    2223import org.openstreetmap.josm.tools.OptionParser;
    2324
     
    7677        } catch (ProjectionConfigurationException | IllegalArgumentException | IOException ex) {
    7778            System.err.println(tr("Error: {0}", ex.getMessage()));
    78             System.exit(1);
     79            Lifecycle.exitJosm(true, 1);
    7980        }
    80         System.exit(0);
     81        Lifecycle.exitJosm(true, 0);
    8182    }
    8283
     
    8687    private static void showHelp() {
    8788        System.out.println(getHelp());
    88         System.exit(0);
     89        Lifecycle.exitJosm(true, 0);
    8990    }
    9091
Note: See TracChangeset for help on using the changeset viewer.