Changeset 18185 in josm for trunk/src/org/openstreetmap/josm


Ignore:
Timestamp:
2021-08-31T18:19:49+02:00 (3 years ago)
Author:
Don-vip
Message:

see #21254 - Fix lint issues, fix broken test (patch by taylor.smock)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/imagery/vectortile/mapbox/Geometry.java

    r18183 r18185  
    4848            int y = 0;
    4949            // Area is used to determine the inner/outer of a polygon
    50             final int maxArraySize = commands.stream().filter(command -> command.getType() != Command.ClosePath).mapToInt(command -> command.getOperations().length).sum();
     50            final int maxArraySize = commands.stream().filter(command -> command.getType() != Command.ClosePath)
     51                    .mapToInt(command -> command.getOperations().length).sum();
    5152            final List<Integer> xArray = new ArrayList<>(maxArraySize);
    5253            final List<Integer> yArray = new ArrayList<>(maxArraySize);
     
    7980                    }
    8081
    81                     final double areaAreaSq = calculateSurveyorsArea(xArray.stream().mapToInt(i -> i).toArray(), yArray.stream().mapToInt(i -> i).toArray());
     82                    final double areaAreaSq = calculateSurveyorsArea(xArray.stream().mapToInt(i -> i).toArray(),
     83                            yArray.stream().mapToInt(i -> i).toArray());
    8284                    Area nArea = new Area(line);
    8385                    // SonarLint thinks that this is never > 0. It can be.
     
    8991                        throw new IllegalArgumentException(tr("{0} cannot have zero area", geometryType));
    9092                    }
     93                    xArray.clear();
     94                    yArray.clear();
    9195                } else {
    9296                    throw new IllegalArgumentException(tr("{0} with {1} arguments is not understood", geometryType, operations.length));
Note: See TracChangeset for help on using the changeset viewer.