Skip to content

Commit

Permalink
Version bump for spotlss and apache commons
Browse files Browse the repository at this point in the history
Spotless fails in 2.x branch with old version with following error
`Caused by: java.lang.NoSuchMethodError: 'long com.sun.tools.javac.tree.DCTree$DCReference.getSourcePosition(com.sun.tools.javac.tree.DCTree$DCDocComment)'`

Signed-off-by: Heemin Kim <[email protected]>
  • Loading branch information
heemin32 committed Sep 5, 2023
1 parent 66c3320 commit 88d88c6
Show file tree
Hide file tree
Showing 57 changed files with 154 additions and 163 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
* Refactor LifecycleComponent package path ([#377](https://github.com/opensearch-project/geospatial/pull/377))
* [Refactor] Strings utility methods to core library ([#379](https://github.com/opensearch-project/geospatial/pull/379))
* Fixed compilation errors after refactoring in core foundation classes ([#380](https://github.com/opensearch-project/geospatial/pull/380))
* Version bump for spotlss and apache commons([#400](https://github.com/opensearch-project/geospatial/pull/400))
### Refactoring
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ buildscript {

dependencies {
classpath "${opensearch_group}.gradle:build-tools:${opensearch_version}"
classpath "com.diffplug.spotless:spotless-plugin-gradle:5.6.1"
classpath "com.diffplug.spotless:spotless-plugin-gradle:6.18.0"
classpath "io.freefair.gradle:lombok-plugin:6.4.3"
}
}
Expand Down Expand Up @@ -158,7 +158,7 @@ dependencies {
yamlRestTestRuntimeOnly "org.apache.logging.log4j:log4j-core:${versions.log4j}"
testImplementation "org.hamcrest:hamcrest:${versions.hamcrest}"
testImplementation 'org.json:json:20230227'
implementation "org.apache.commons:commons-lang3:3.12.0"
implementation "org.apache.commons:commons-lang3:3.13.0"
implementation "org.locationtech.spatial4j:spatial4j:${versions.spatial4j}"
implementation "org.locationtech.jts:jts-core:${versions.jts}"
implementation "org.apache.commons:commons-csv:1.10.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
import java.io.IOException;
import java.util.Map;

import lombok.AllArgsConstructor;
import lombok.NonNull;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.opensearch.action.StepListener;
Expand All @@ -20,6 +17,9 @@
import org.opensearch.core.action.ActionListener;
import org.opensearch.core.xcontent.XContentBuilder;

import lombok.AllArgsConstructor;
import lombok.NonNull;

/**
* IndexManager is responsible for managing index operations like create, delete, etc...
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
import java.io.IOException;
import java.util.function.Supplier;

import lombok.AllArgsConstructor;
import lombok.NonNull;
import lombok.extern.log4j.Log4j2;

import org.opensearch.action.StepListener;
import org.opensearch.action.ingest.DeletePipelineRequest;
import org.opensearch.action.ingest.PutPipelineRequest;
Expand All @@ -25,6 +21,10 @@
import org.opensearch.geospatial.processor.FeatureProcessor;
import org.opensearch.ingest.Pipeline;

import lombok.AllArgsConstructor;
import lombok.NonNull;
import lombok.extern.log4j.Log4j2;

/**
* PipelineManager is responsible for managing pipeline operations like create and delete
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
import java.io.IOException;
import java.util.Objects;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NonNull;

import org.opensearch.action.ActionRequest;
import org.opensearch.action.ActionRequestValidationException;
import org.opensearch.core.common.bytes.BytesReference;
import org.opensearch.core.common.io.stream.StreamInput;
import org.opensearch.core.common.io.stream.StreamOutput;
import org.opensearch.rest.RestRequest;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NonNull;

@AllArgsConstructor
@Getter
public class UploadGeoJSONRequest extends ActionRequest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
import java.util.Map;
import java.util.Objects;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;

import org.opensearch.core.ParseField;
import org.opensearch.core.common.Strings;
import org.opensearch.geospatial.GeospatialParser;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;

/**
* UploadGeoJSONRequestContent is the Data model for UploadGeoJSONRequest's body
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
import java.util.List;
import java.util.Map;

import org.opensearch.geospatial.GeospatialParser;

import lombok.NonNull;
import lombok.Value;

import org.opensearch.geospatial.GeospatialParser;

/**
* FeatureCollection represents GEOJSON of type FeatureCollection. A FeatureCollection object has a member
* with the name "features". The value of "features" is a List.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

import java.util.Map;

import lombok.NonNull;

import org.opensearch.geospatial.geojson.Feature.FeatureBuilder;

import lombok.NonNull;

/**
* FeatureFactory helps to create {@link Feature} instance based on user input
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
import java.util.stream.DoubleStream;
import java.util.stream.IntStream;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import lombok.NonNull;

import org.apache.lucene.geo.XYCircle;
import org.apache.lucene.geo.XYLine;
import org.apache.lucene.geo.XYPoint;
Expand All @@ -26,6 +22,10 @@
import org.opensearch.geometry.Polygon;
import org.opensearch.geometry.Rectangle;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import lombok.NonNull;

/**
* Utility class to convert compatible shapes from opensearch to Lucene
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
import java.util.Locale;
import java.util.Objects;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

import org.opensearch.OpenSearchParseException;
import org.opensearch.core.xcontent.ToXContentFragment;
import org.opensearch.core.xcontent.XContentBuilder;
Expand All @@ -25,6 +21,10 @@
import org.opensearch.geometry.utils.WellKnownText;
import org.opensearch.index.mapper.AbstractPointGeometryFieldMapper;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
* Represents a point in a 2-dimensional planar coordinate system with no range limitations.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
import java.util.Objects;
import java.util.stream.Collectors;

import lombok.AllArgsConstructor;

import org.apache.lucene.document.XYPointField;
import org.apache.lucene.geo.XYPoint;
import org.apache.lucene.index.IndexableField;
Expand All @@ -19,6 +17,8 @@
import org.opensearch.index.mapper.AbstractGeometryFieldMapper;
import org.opensearch.index.mapper.ParseContext;

import lombok.AllArgsConstructor;

/**
* Converts points into Lucene-compatible form{@link XYPoint} for indexing in a xy_point field.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
import java.util.Locale;
import java.util.Objects;

import lombok.AllArgsConstructor;

import org.apache.lucene.document.XYDocValuesField;
import org.apache.lucene.document.XYPointField;
import org.apache.lucene.geo.XYCircle;
Expand Down Expand Up @@ -42,6 +40,8 @@
import org.opensearch.index.query.QueryShardContext;
import org.opensearch.index.query.QueryShardException;

import lombok.AllArgsConstructor;

/**
* Geometry Visitor to create a query to find all cartesian XYPoints
* that comply ShapeRelation with all other XYShapes objects
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
import java.util.List;
import java.util.Locale;

import lombok.NonNull;

import org.apache.lucene.document.ShapeField;
import org.apache.lucene.document.XYShape;
import org.apache.lucene.geo.XYGeometry;
Expand All @@ -23,6 +21,8 @@
import org.opensearch.index.query.QueryShardContext;
import org.opensearch.index.query.QueryShardException;

import lombok.NonNull;

/**
* Query Processor to convert given Geometry into Lucene query
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@

import java.io.IOException;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

import org.opensearch.action.ActionRequest;
import org.opensearch.action.ActionRequestValidationException;
import org.opensearch.core.common.io.stream.StreamInput;
import org.opensearch.core.common.io.stream.StreamOutput;
import org.opensearch.geospatial.ip2geo.common.ParameterValidator;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

/**
* GeoIP datasource delete request
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

import java.io.IOException;

import lombok.extern.log4j.Log4j2;

import org.opensearch.ResourceNotFoundException;
import org.opensearch.action.support.ActionFilters;
import org.opensearch.action.support.HandledTransportAction;
Expand All @@ -29,6 +27,8 @@
import org.opensearch.threadpool.ThreadPool;
import org.opensearch.transport.TransportService;

import lombok.extern.log4j.Log4j2;

/**
* Transport action to delete datasource
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

import java.io.IOException;

import lombok.Getter;
import lombok.Setter;

import org.opensearch.action.ActionRequest;
import org.opensearch.action.ActionRequestValidationException;
import org.opensearch.core.common.io.stream.StreamInput;
import org.opensearch.core.common.io.stream.StreamOutput;

import lombok.Getter;
import lombok.Setter;

/**
* Ip2Geo datasource get request
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
import java.time.Instant;
import java.util.List;

import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import org.opensearch.core.ParseField;
import org.opensearch.core.action.ActionResponse;
import org.opensearch.core.common.io.stream.StreamInput;
Expand All @@ -21,6 +17,10 @@
import org.opensearch.core.xcontent.XContentBuilder;
import org.opensearch.geospatial.ip2geo.jobscheduler.Datasource;

import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

/**
* Ip2Geo datasource get request
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
import java.util.List;
import java.util.Locale;

import lombok.Getter;
import lombok.Setter;
import lombok.extern.log4j.Log4j2;

import org.opensearch.action.ActionRequest;
import org.opensearch.action.ActionRequestValidationException;
import org.opensearch.common.unit.TimeValue;
Expand All @@ -26,6 +22,10 @@
import org.opensearch.geospatial.ip2geo.common.DatasourceManifest;
import org.opensearch.geospatial.ip2geo.common.ParameterValidator;

import lombok.Getter;
import lombok.Setter;
import lombok.extern.log4j.Log4j2;

/**
* Ip2Geo datasource creation request
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
import java.time.Instant;
import java.util.concurrent.atomic.AtomicReference;

import lombok.extern.log4j.Log4j2;

import org.opensearch.ResourceAlreadyExistsException;
import org.opensearch.action.StepListener;
import org.opensearch.action.index.IndexResponse;
Expand All @@ -33,6 +31,8 @@
import org.opensearch.threadpool.ThreadPool;
import org.opensearch.transport.TransportService;

import lombok.extern.log4j.Log4j2;

/**
* Transport action to create datasource
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@
import java.net.URL;
import java.util.Locale;

import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.extern.log4j.Log4j2;

import org.opensearch.action.ActionRequest;
import org.opensearch.action.ActionRequestValidationException;
import org.opensearch.common.unit.TimeValue;
Expand All @@ -26,6 +21,11 @@
import org.opensearch.geospatial.ip2geo.common.DatasourceManifest;
import org.opensearch.geospatial.ip2geo.common.ParameterValidator;

import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.extern.log4j.Log4j2;

/**
* Ip2Geo datasource update request
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
import java.util.List;
import java.util.Locale;

import lombok.extern.log4j.Log4j2;

import org.opensearch.ResourceNotFoundException;
import org.opensearch.action.support.ActionFilters;
import org.opensearch.action.support.HandledTransportAction;
Expand All @@ -35,6 +33,8 @@
import org.opensearch.threadpool.ThreadPool;
import org.opensearch.transport.TransportService;

import lombok.extern.log4j.Log4j2;

/**
* Transport action to update datasource
*/
Expand Down
Loading

0 comments on commit 88d88c6

Please sign in to comment.