Skip to content

Commit

Permalink
sonar warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
msbarry committed Jun 27, 2024
2 parents cf534c1 + 837f92d commit 8b93e23
Showing 1 changed file with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,18 @@ protected Converter makeConverter(Context child) {
return new StructConverter(child) {

@Override
public void start() {}
public void start() {
// don't start a new struct
}

@Override
protected Converter makeConverter(Context child) {
return new StructConverter(child) {

@Override
public void start() {}
public void start() {
// don't start a new struct
}

@Override
public void end() {
Expand Down Expand Up @@ -235,12 +239,6 @@ public void addDouble(double value) {

@Override
protected Converter makeConverter(Context child) {
class CoordinateSetter extends PrimitiveConverter {
@Override
public void addDouble(double value) {
super.addDouble(value);
}
}
return switch (child.type.getName()) {
case "x" -> ordinateSetter(0);
case "y" -> ordinateSetter(1);
Expand Down Expand Up @@ -593,12 +591,12 @@ public boolean isGeoArrowCoordSeq() {
repeatedElement.asGroupType().getFieldCount() != 1) {
return false;
}
return isGeoarrowCoordinate(repeatedElement.asGroupType().getType(0));
return isGeoArrowCoordinate(repeatedElement.asGroupType().getType(0));
}

public boolean isGeoArrowCoordinate() {
String geoArrowType = getGeoArrowType();
return geoArrowType != null && geoArrowType.contains("point") && isGeoarrowCoordinate(type);
return geoArrowType != null && geoArrowType.contains("point") && isGeoArrowCoordinate(type);
}

private String getGeoArrowType() {
Expand All @@ -612,7 +610,7 @@ private String getGeoArrowType() {
}
}

private static boolean isGeoarrowCoordinate(Type struct) {
private static boolean isGeoArrowCoordinate(Type struct) {
if (struct.isPrimitive()) {
return false;
}
Expand Down

0 comments on commit 8b93e23

Please sign in to comment.