Skip to content

Commit

Permalink
Fix some sonar warning
Browse files Browse the repository at this point in the history
  • Loading branch information
AB-xdev committed Feb 14, 2025
1 parent 9f3dcda commit f206a6f
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@ public InitialResizeDemo()
new LLatLng(reg, 50, 11)
);

final MapContainer mapContainer = new MapContainer(reg, map -> {
final MapContainer mapContainer = new MapContainer(
reg, map ->
// This needs to be done after the map was initially resized
// otherwise the view is calculated incorrectly
map.fitBounds(bounds);
});
map.fitBounds(bounds)
);
mapContainer.setSizeFull();
this.add(mapContainer);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
/**
* @see <a href="https://leafletjs.com/reference.html#circle">Leaflet docs</a>
*/
@SuppressWarnings("java:S110")
public class LCircle extends LAbstractCircle<LCircle>
{
public LCircle(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
/**
* @see <a href="https://leafletjs.com/reference.html#circlemarker">Leaflet docs</a>
*/
@SuppressWarnings("java:S110")
public class LCircleMarker extends LAbstractCircle<LCircleMarker>
{
public LCircleMarker(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
/**
* @see <a href="https://leafletjs.com/reference.html#polygon">Leaflet docs</a>
*/
@SuppressWarnings("java:S110")
public class LPolygon extends LPolyline
{
public LPolygon(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
/**
* @see <a href="https://leafletjs.com/reference.html#rectangle">Leaflet docs</a>
*/
@SuppressWarnings("java:S110")
public class LRectangle extends LPolyline
{
public LRectangle(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import java.io.IOException;
import java.io.Serializable;
import java.io.UncheckedIOException;
import java.util.Collection;
import java.util.Map;
import java.util.Objects;
Expand Down Expand Up @@ -105,7 +106,7 @@ protected String writeOptions(final Object options, final String nullDefault)
}
catch(final JsonProcessingException e)
{
throw new RuntimeException(e);
throw new UncheckedIOException("Failed to write options", e);
}
}

Expand Down

0 comments on commit f206a6f

Please sign in to comment.