Changeset 16625 in josm


Ignore:
Timestamp:
2020-06-14T14:55:20+02:00 (8 weeks ago)
Author:
simon04
Message:

see #19334 - https://errorprone.info/bugpattern/UnusedVariable

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/build.xml

    r16624 r16625  
    302302            <!-- Undocumented argument to ignore "Sun internal proprietary API" warning, see http://stackoverflow.com/a/13862308/2257172 -->
    303303            <compilerarg value="-XDignore.symbol.file"/>
    304             <compilerarg value="-Xplugin:ErrorProne -XepExcludedPaths:.*/parsergen/.* -Xep:ReferenceEquality:OFF -Xep:ImmutableEnumChecker:OFF -Xep:FutureReturnValueIgnored:OFF -Xep:FloatingPointLiteralPrecision:OFF -Xep:ShortCircuitBoolean:OFF -Xep:StringSplitter:OFF -Xep:JdkObsolete:OFF -Xep:UnnecessaryParentheses:OFF -Xep:EqualsGetClass:OFF -Xep:UndefinedEquals:OFF -Xep:MixedMutabilityReturnType:OFF -Xep:JavaTimeDefaultTimeZone:OFF -Xep:UnusedVariable:OFF -Xep:BadImport:OFF -Xep:AnnotateFormatMethod:OFF -Xep:MutablePublicArray:OFF"/>
     304            <compilerarg value="-Xplugin:ErrorProne -XepExcludedPaths:.*/parsergen/.* -Xep:ReferenceEquality:OFF -Xep:ImmutableEnumChecker:OFF -Xep:FutureReturnValueIgnored:OFF -Xep:FloatingPointLiteralPrecision:OFF -Xep:ShortCircuitBoolean:OFF -Xep:StringSplitter:OFF -Xep:JdkObsolete:OFF -Xep:UnnecessaryParentheses:OFF -Xep:EqualsGetClass:OFF -Xep:UndefinedEquals:OFF -Xep:MixedMutabilityReturnType:OFF -Xep:JavaTimeDefaultTimeZone:OFF -Xep:BadImport:OFF -Xep:AnnotateFormatMethod:OFF -Xep:MutablePublicArray:OFF"/>
    305305            <compilerarg line="-Xmaxwarns 1000"/>
    306306            <classpath>
  • trunk/src/org/openstreetmap/josm/gui/MapStatus.java

    r16438 r16625  
    317317                }
    318318
    319                 // This try/catch is a hack to stop the flooding bug reports about this.
    320                 // The exception needed to handle with in the first place, means that this
    321                 // access to the data need to be restarted, if the main thread modifies the data.
    322                 DataSet ds = null;
    323319                // The popup != null check is required because a left-click produces several events as well,
    324320                // which would make this variable true. Of course we only want the popup to show
     
    328324                boolean middleMouseDown = (ms.modifiers & MouseEvent.BUTTON2_DOWN_MASK) != 0;
    329325
    330                 ds = mv.getLayerManager().getActiveDataSet();
     326                DataSet ds = mv.getLayerManager().getActiveDataSet();
    331327                if (ds != null) {
    332328                    // This is not perfect, if current dataset was changed during execution, the lock would be useless
     
    340336                    }
    341337                }
     338                // This try/catch is a hack to stop the flooding bug reports about this.
     339                // The exception needed to handle with in the first place, means that this
     340                // access to the data need to be restarted, if the main thread modifies the data.
    342341                try {
    343342                    // Set the text label in the bottom status bar
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableColumnModel.java

    r13675 r16625  
    2222     */
    2323    public MemberTableColumnModel(AutoCompletionManager autoCompletionManager, Relation relation) {
    24         TableColumn col = null;
     24        TableColumn col;
    2525
    2626        // column 0 - the member role
  • trunk/src/org/openstreetmap/josm/gui/io/importexport/GpxImporter.java

    r15593 r16625  
    146146    public static GpxImporterData loadLayers(final GpxData data, final boolean parsedProperly,
    147147            final String gpxLayerName, String markerLayerName) {
    148         GpxLayer gpxLayer = null;
    149148        MarkerLayer markerLayer = null;
    150         gpxLayer = new GpxLayer(data, gpxLayerName, data.storageFile != null);
     149        GpxLayer gpxLayer = new GpxLayer(data, gpxLayerName, data.storageFile != null);
    151150        if (Config.getPref().getBoolean("marker.makeautomarkers", true) && !data.waypoints.isEmpty()) {
    152151            markerLayer = new MarkerLayer(data, markerLayerName, data.storageFile, gpxLayer);
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityAction.java

    r16601 r16625  
    285285        msg.add(scrollPane, GBC.eol().fill(GBC.BOTH));
    286286
    287         int v = 1;
    288287        // build dialog
    289288        ExtendedDialog ed = new ExtendedDialog(MainApplication.getMainFrame(),
     
    313312        ed.showDialog();
    314313        dateFilter.saveInPrefs();
    315         v = ed.getValue();
     314        int v = ed.getValue();
    316315        // cancel for unknown buttons and copy back original settings
    317316        if (v != 2 && v != 3) {
  • trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java

    r16607 r16625  
    376376    }
    377377
    378     @SuppressWarnings("PMD.UnusedFormalParameter")
     378    @SuppressWarnings({"PMD.UnusedFormalParameter", "UnusedVariable"})
    379379    private static boolean isRemoveColor(ColorEntry ce) {
    380380        return false;
Note: See TracChangeset for help on using the changeset viewer.