github-advanced-security[bot] commented on code in PR #889: URL: https://github.com/apache/incubator-baremaps/pull/889#discussion_r1740194734
########## baremaps-core/src/main/java/org/apache/baremaps/tilestore/raster/GeoTiffReader.java: ########## @@ -0,0 +1,126 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to you under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.baremaps.tilestore.raster; + +import java.nio.file.Path; +import org.apache.baremaps.tilestore.TileCoord; +import org.apache.baremaps.tilestore.TileStoreException; +import org.apache.sis.coverage.grid.*; +import org.apache.sis.geometry.Envelopes; +import org.apache.sis.geometry.GeneralEnvelope; +import org.apache.sis.image.ImageProcessor; +import org.apache.sis.referencing.CRS; +import org.apache.sis.referencing.CommonCRS; +import org.apache.sis.storage.*; +import org.opengis.referencing.crs.CoordinateReferenceSystem; +import org.opengis.util.FactoryException; + +public class GeoTiffReader implements AutoCloseable { + + private static final CoordinateReferenceSystem WEB_MERCATOR; + + static { + try { + WEB_MERCATOR = CRS.fromWKT(""" + ProjectedCRS["WGS 84 / Pseudo-Mercator", + BaseGeodCRS["WGS 84", + Datum["World Geodetic System 1984", + Ellipsoid["WGS 84", 6378137.0, 298.257223563]], + Unit["degree", 0.017453292519943295]], + Conversion["Popular Visualisation Pseudo-Mercator", + Method["Popular Visualisation Pseudo Mercator"]], + CS[Cartesian, 2], + Axis["Easting (X)", east], + Axis["Northing (Y)", north], + Unit["metre", 1], + Scope["Certain Web mapping and visualisation applications."], + Id["EPSG", 3857]] + """); + } catch (FactoryException e) { + throw new RuntimeException(e); + } + } + + private final DataStore dataStore; + + private final GridCoverage gridCoverage; + + public GeoTiffReader(Path path) { + try { + this.dataStore = DataStores.open(path); + var allImages = ((Aggregate) dataStore).components(); + var firstImage = (GridCoverageResource) allImages.iterator().next(); + firstImage.setLoadingStrategy(RasterLoadingStrategy.AT_GET_TILE_TIME); + gridCoverage = firstImage.read(null); + } catch (DataStoreException e) { + throw new RuntimeException(e); + } + } + + public double[] read(TileCoord tileCoord, int size, int buffer) throws TileStoreException { + try { + // Compute the buffer size and expand the envelope + var fullSize = size + 2 * buffer; + var tileEnvelope = tileCoord.envelope(); + var tileWidth = tileEnvelope.getWidth(); + var tileHeight = tileEnvelope.getHeight(); + var pixelWidth = tileWidth / size; + var pixelHeight = tileHeight / size; + tileEnvelope.expandBy(pixelWidth * buffer, pixelHeight * buffer); + + // Create the target grid geometry in the web mercator projection + var sourceEnvelope = new GeneralEnvelope(CommonCRS.WGS84.normalizedGeographic()); + sourceEnvelope.setRange(0, tileEnvelope.getMinX(), tileEnvelope.getMaxX()); + sourceEnvelope.setRange(1, tileEnvelope.getMinY(), tileEnvelope.getMaxY()); + var targetEnvelope = Envelopes.transform(sourceEnvelope, WEB_MERCATOR); + var targetSize = new GridExtent(fullSize, fullSize); + var targetGridGeometry = + new GridGeometry(targetSize, targetEnvelope, GridOrientation.DISPLAY); + + // Resample and render the image + var gridCoverageProcessor = new GridCoverageProcessor(); + gridCoverageProcessor.setInterpolation(new BicubicInterpolation()); + var gridCoverage = gridCoverageProcessor.resample(this.gridCoverage, targetGridGeometry); Review Comment: ## Possible confusion of local and field Potentially confusing name: method [read](1) also refers to field [gridCoverage](2) (as this.gridCoverage). [Show more details](https://github.com/apache/incubator-baremaps/security/code-scanning/1549) ########## baremaps-core/src/main/java/org/apache/baremaps/tilestore/raster/BicubicInterpolation.java: ########## @@ -0,0 +1,58 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to you under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.baremaps.tilestore.raster; + +import java.awt.*; +import java.nio.DoubleBuffer; +import org.apache.sis.image.Interpolation; + +class BicubicInterpolation extends Interpolation { + + public Dimension getSupportSize() { Review Comment: ## Missing Override annotation This method overrides [Interpolation.getSupportSize](1); it is advisable to add an Override annotation. [Show more details](https://github.com/apache/incubator-baremaps/security/code-scanning/1548) ########## baremaps-gdal/src/main/java/org/apache/baremaps/gdal/TranslateOptions.java: ########## @@ -0,0 +1,326 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to you under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.baremaps.gdal; + +/** + * Options for the translate method. + */ +public class TranslateOptions extends Options { + + public TranslateOptions() { + super(); + } + + // Basic Options + public TranslateOptions help() { + add("--help"); + return this; + } + + public TranslateOptions helpGeneral() { + add("--help-general"); + return this; + } + + public TranslateOptions longUsage() { + add("--long-usage"); + return this; + } + + public TranslateOptions outputType(String type) { + add("-ot"); + add(type); + return this; + } + + public TranslateOptions strict() { + add("-strict"); + return this; + } + + public TranslateOptions inputFormat(String format) { + add("-if"); + add(format); + return this; + } + + public TranslateOptions outputFormat(String format) { + add("-of"); + add(format); + return this; + } + + public TranslateOptions band(int band) { + add("-b"); + add(band); + return this; + } + + public TranslateOptions maskBand(int band) { + add("-mask"); + add(band); + return this; + } + + public TranslateOptions expand(String option) { + add("-expand"); + add(option); + return this; + } + + public TranslateOptions outsize(int xsize, int ysize) { + add("-outsize"); + add(xsize); + add(ysize); + return this; + } + + public TranslateOptions outsizePercent(int xpercent, int ypercent) { + add("-outsize"); + add(xpercent + "%"); + add(ypercent + "%"); + return this; + } + + public TranslateOptions targetResolution(double xres, double yres) { + add("-tr"); + add(xres); + add(yres); + return this; + } + + public TranslateOptions overview(int level) { + add("-ovr"); + add(level); + return this; + } + + public TranslateOptions overviewAuto() { + add("-ovr"); + add("AUTO"); + return this; + } + + public TranslateOptions overviewNone() { + add("-ovr"); + add("NONE"); + return this; + } + + public TranslateOptions resamplingMethod(String method) { + add("-r"); + add(method); + return this; + } + + public TranslateOptions unscale() { + add("-unscale"); + return this; + } + + public TranslateOptions scale(int band, double srcMin, double srcMax, double dstMin, + double dstMax) { + add("-scale_" + band); + add(srcMin); + add(srcMax); + add(dstMin); + add(dstMax); + return this; + } + + public TranslateOptions scale(double srcMin, double srcMax, double dstMin, double dstMax) { + add("-scale"); + add(srcMin); + add(srcMax); + add(dstMin); + add(dstMax); + return this; + } + + public TranslateOptions exponent(int band, double expVal) { + add("-exponent_" + band); + add(expVal); + return this; + } + + public TranslateOptions exponent(double expVal) { + add("-exponent"); + add(expVal); + return this; + } + + public TranslateOptions srcWindow(int xoff, int yoff, int xsize, int ysize) { Review Comment: ## Useless parameter The parameter 'ysize' is never used. [Show more details](https://github.com/apache/incubator-baremaps/security/code-scanning/1543) ########## baremaps-dem/src/main/java/org/apache/baremaps/dem/ContourTracer.java: ########## @@ -0,0 +1,509 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to you under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.baremaps.dem; + +import java.util.*; +import org.locationtech.jts.geom.*; +import org.locationtech.jts.geom.util.GeometryFixer; +import org.locationtech.jts.geom.util.GeometryTransformer; +import org.locationtech.jts.operation.linemerge.LineMerger; + +/** + * Provides methods for generating contour lines and contour polygons from digital elevation models + * (DEMs). + */ +public class ContourTracer { + + private static final GeometryFactory GEOMETRY_FACTORY = new GeometryFactory(); + + private static final double EPSILON = 1e-10; + + private final double[] grid; + + private final int width; + + private final int height; + + private final boolean normalize; + + private final boolean polygonize; + + /** + * Constructs a new ContourTracer with the specified grid, width, height, normalization, and + * polygonization options. + * + * @param grid The grid of elevation values + * @param width The width of the grid + * @param height The height of the grid + * @param normalize Whether to normalize the coordinates + * @param polygonize Whether to polygonize the contours + */ + public ContourTracer(double[] grid, int width, int height, boolean normalize, + boolean polygonize) { + this.grid = Arrays.copyOf(grid, grid.length); + this.width = width; + this.height = height; + this.normalize = normalize; + this.polygonize = polygonize; + } + + /** + * Generates isolines for a given grid at a specific level. + * + * @param level The elevation level for which to generate isolines + * @return A list of LineString objects representing the isolines + */ + public List<Geometry> traceContours(double level) { + validateInput(grid, width, height); + + // Process each cell in the grid to generate segments + List<LineString> cells = new ArrayList<>(); + for (int y = 0; y < height - 1; y++) { + for (int x = 0; x < width - 1; x++) { + cells.addAll(processCell(level, x, y)); + } + } + + // Merge the cells + List<Geometry> contours = merge(cells); + + // Polygonize the lines + if (polygonize) { + contours = polygonize(contours); + } + + // Normalize the coordinates + if (normalize) { + contours = normalize(contours); + } + + return contours; + } + + public List<Geometry> merge(List<LineString> lineStrings) { + LineMerger cellMerger = new LineMerger(); + cellMerger.add(lineStrings); + List<Geometry> mergedLineStrings = new ArrayList<>(); + for (Object geometry : cellMerger.getMergedLineStrings()) { + if (geometry instanceof LineString lineString) { + mergedLineStrings.add(new GeometryFixer(lineString).getResult()); + } + } + return mergedLineStrings; + } + + private List<Geometry> polygonize(List<Geometry> geometries) { + var polygons = new ArrayList<>(geometries.stream() + .map(Geometry::getCoordinates) + .map(GEOMETRY_FACTORY::createPolygon) + .map(polygon -> new GeometryFixer(polygon).getResult()) + .map(Polygon.class::cast) + .sorted((a, b) -> Double.compare(b.getArea(), a.getArea())) + .toList()); + + List<Geometry> polygonized = new ArrayList<>(); + for (int i = 0; i < polygons.size(); i++) { + // Skip null polygons + if (polygons.get(i) == null) { + continue; + } + + // Extract the shell and holes + Polygon shell = polygons.get(i); + List<Polygon> holes = new ArrayList<>(); + for (int j = i + 1; j < polygons.size(); j++) { + // Skip null polygons + if (polygons.get(j) == null) { + continue; + } + + Polygon polygon = polygons.get(j); + if (shell.contains(polygon)) { + + // Check if the hole is within a previously found hole + boolean within = false; + for (Polygon hole : holes) { + if (hole.contains(polygon)) { + within = true; + break; + } + } + if (within) { + continue; + } + + // Add the hole to the list + holes.add(polygon); + + // Set the used polygon to null + polygons.set(j, null); + } + } + + // Combine the shell and holes + Polygon combinedPolygon = GEOMETRY_FACTORY.createPolygon( + shell.getExteriorRing(), + holes.stream() + .map(Polygon::getExteriorRing) + .toArray(LinearRing[]::new)); + polygonized.add(combinedPolygon); + + // Set the used polygon to null + polygons.set(i, null); + } + + return polygonized; + } + + private List<Geometry> normalize(List<Geometry> contours) { + NormalizationTransformer transformer = new NormalizationTransformer(); + List<Geometry> normalized = contours.stream() + .map(geometry -> transformer.transform(geometry.copy())) + .toList(); + return normalized; + } + + /** + * Generates contour for a given range of elevation levels. + * + * @param start The starting elevation level (inclusive) + * @param end The ending elevation level (exclusive) + * @param interval The interval between elevation levels + * @return A list of contour geometries + */ + public List<Geometry> traceContours(int start, int end, int interval) { + validateInput(grid, width, height); + List<Geometry> contours = new ArrayList<>(); + for (int level = start; level < end; level += interval) { + contours.addAll(traceContours(level)); + } + return contours; + } + + /** + * Validates the input grid, width, and height. + * + * @param grid The grid of elevation values + * @param width The width of the grid + * @param height The height of the grid + */ + private static void validateInput(double[] grid, int width, int height) { + if (grid == null || grid.length == 0) { + throw new IllegalArgumentException("Grid array cannot be null or empty"); + } + if (width <= 0 || height <= 0) { + throw new IllegalArgumentException("Width and height must be positive"); + } + if (grid.length != width * height) { + throw new IllegalArgumentException("Grid array length does not match width * height"); + } + } + + /** + * Processes a cell in the grid to generate line segments for a given elevation level. + * + * @param level The elevation level + * @param x The x-coordinate of the cell + * @param y The y-coordinate of the cell + * @return A list of line segments + */ + @SuppressWarnings("squid:S3776") + private List<LineString> processCell(double level, int x, int y) { + List<LineString> segments = new ArrayList<>(); + + boolean htb = polygonize && y == height - 2; + boolean hrb = polygonize && x == width - 2; + boolean hbb = polygonize && y == 0; + boolean hlb = polygonize && x == 0; + + Coordinate tlc = new Coordinate(x, y + 1.0); + Coordinate tmc = interpolateCoordinate(level, x, y + 1, x + 1, y + 1); + Coordinate trc = new Coordinate(x + 1.0, y + 1.0); + Coordinate mrc = interpolateCoordinate(level, x + 1, y, x + 1, y + 1); + Coordinate brc = new Coordinate(x + 1.0, y); + Coordinate bmc = interpolateCoordinate(level, x, y, x + 1, y); + Coordinate blc = new Coordinate(x, y); + Coordinate mlc = interpolateCoordinate(level, x, y, x, y + 1); + + double tlv = grid[y * width + x]; + double trv = grid[y * width + (x + 1)]; + double brv = grid[(y + 1) * width + (x + 1)]; + double blv = grid[(y + 1) * width + x]; + double avg = (tlv + trv + brv + blv) / 4.0; Review Comment: ## Unread local variable Variable 'double avg' is never read. [Show more details](https://github.com/apache/incubator-baremaps/security/code-scanning/1547) ########## baremaps-gdal/src/main/java/org/apache/baremaps/gdal/WarpOptions.java: ########## @@ -0,0 +1,376 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to you under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.baremaps.gdal; + +/** + * Options for the warp method. + */ +public class WarpOptions extends Options { + + public WarpOptions() { + super(); + } + + // Basic Options + public WarpOptions help() { + add("--help"); + return this; + } + + public WarpOptions longUsage() { + add("--long-usage"); + return this; + } + + public WarpOptions helpGeneral() { + add("--help-general"); + return this; + } + + public WarpOptions quiet() { + add("--quiet"); + return this; + } + + public WarpOptions overwrite() { + add("-overwrite"); + return this; + } + + public WarpOptions format(String format) { + add("-of"); + add(format); + return this; + } + + public WarpOptions creationOption(String name, String value) { + add("-co"); + add(name + "=" + value); + return this; + } + + public WarpOptions sourceSRS(String srs) { + add("-s_srs"); + add(srs); + return this; + } + + public WarpOptions targetSRS(String srs) { + add("-t_srs"); + add(srs); + return this; + } + + public WarpOptions srcAlpha() { + add("-srcalpha"); + return this; + } + + public WarpOptions noSrcAlpha() { + add("-nosrcalpha"); + return this; + } + + public WarpOptions dstAlpha() { + add("-dstalpha"); + return this; + } + + public WarpOptions targetResolution(double xRes, double yRes) { + add("-tr"); + add(xRes); + add(yRes); + return this; + } + + public WarpOptions targetResolutionSquare(double res) { + add("-tr"); + add(res); + add(res); + return this; + } + + public WarpOptions targetSize(int width, int height) { + add("-ts"); + add(width); + add(height); + return this; + } + + public WarpOptions targetExtent(double xmin, double ymin, double xmax, double ymax) { + add("-te"); + add(xmin); + add(ymin); + add(xmax); + add(ymax); + return this; + } + + public WarpOptions targetExtentSRS(String srs) { + add("-te_srs"); + add(srs); + return this; + } + + public WarpOptions resampling(String resampling) { + add("-r"); + add(resampling); + return this; + } + + public WarpOptions outputFormat(String format) { + add("-of"); + add(format); + return this; + } + + public WarpOptions srcDataset(String datasetName) { + add(datasetName); + return this; + } + + public WarpOptions dstDataset(String datasetName) { + add(datasetName); + return this; + } + + // Advanced Options + public WarpOptions warpOption(String name, String value) { + add("-wo"); + add(name + "=" + value); + return this; + } + + public WarpOptions multi() { + add("-multi"); + return this; + } + + public WarpOptions srcCoordEpoch(String epoch) { + add("-s_coord_epoch"); + add(epoch); + return this; + } + + public WarpOptions tgtCoordEpoch(String epoch) { Review Comment: ## Useless parameter The parameter 'epoch' is never used. [Show more details](https://github.com/apache/incubator-baremaps/security/code-scanning/1544) ########## baremaps-core/src/test/java/org/apache/baremaps/tilestore/raster/VectorHillshadeTileStoreTest.java: ########## @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to you under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.baremaps.tilestore.raster; + +import static org.junit.jupiter.api.Assertions.*; + + +class VectorHillshadeTileStoreTest { Review Comment: ## Unused classes and interfaces Unused class: VectorHillshadeTileStoreTest is not referenced within this codebase. If not used as an external API it should be removed. [Show more details](https://github.com/apache/incubator-baremaps/security/code-scanning/1550) ########## baremaps-dem/src/test/java/org/apache/baremaps/dem/HillShadeRenderer.java: ########## @@ -0,0 +1,158 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to you under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.baremaps.dem; + +import java.awt.*; +import java.awt.image.BufferedImage; +import java.io.IOException; +import java.nio.file.Path; +import javax.imageio.ImageIO; +import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; + +public class HillShadeRenderer extends JFrame { + + private BufferedImage originalImage; + private double[] grid; + private JSlider altitudeSlider; + private JSlider azimuthSlider; + private JSlider scaleSlider; + private JCheckBox isSimpleCheckbox; + private JLabel imageLabel; + private JLabel altitudeLabel; + private JLabel azimuthLabel; + private JLabel scaleLabel; + + public HillShadeRenderer() throws IOException { + super("Hillshade Display"); + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + + // Load the image + originalImage = ImageIO.read( + Path.of("") + .toAbsolutePath() + .resolveSibling("baremaps/baremaps-dem/src/test/resources/fuji.png") + .toAbsolutePath().toFile()); + grid = ElevationUtils.imageToGrid(originalImage, ElevationUtils::pixelToElevationNormal); + + // Create UI components + altitudeSlider = new JSlider(JSlider.VERTICAL, 0, 90, 45); + azimuthSlider = new JSlider(JSlider.VERTICAL, 0, 360, 315); + scaleSlider = new JSlider(JSlider.HORIZONTAL, 1, 100, 10); // Scale from 0.1 to 10.0 + isSimpleCheckbox = new JCheckBox("Simple Algorithm", true); + imageLabel = new JLabel(); + altitudeLabel = new JLabel("Sun Altitude: 45°"); + azimuthLabel = new JLabel("Sun Azimuth: 315°"); + scaleLabel = new JLabel("Scale: 1.0"); + + // Set up sliders + altitudeSlider.setMajorTickSpacing(15); + altitudeSlider.setPaintTicks(true); + altitudeSlider.setPaintLabels(true); + + azimuthSlider.setMajorTickSpacing(45); + azimuthSlider.setPaintTicks(true); + azimuthSlider.setPaintLabels(true); + + scaleSlider.setMajorTickSpacing(10); + scaleSlider.setPaintTicks(true); + scaleSlider.setPaintLabels(true); + + // Add listeners + ChangeListener listener = new ChangeListener() { + public void stateChanged(ChangeEvent e) { Review Comment: ## Missing Override annotation This method overrides [ChangeListener.stateChanged](1); it is advisable to add an Override annotation. [Show more details](https://github.com/apache/incubator-baremaps/security/code-scanning/1546) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
