Skip to content

Commit f91530c

Browse files
authored
[GH-2321] Remove unnecessary commons-lang dependency (#2322)
1 parent 59b0355 commit f91530c

File tree

5 files changed

+4
-16
lines changed

5 files changed

+4
-16
lines changed

pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -328,11 +328,6 @@
328328
<version>${log4j.version}</version>
329329
<scope>test</scope>
330330
</dependency>
331-
<dependency>
332-
<groupId>commons-lang</groupId>
333-
<artifactId>commons-lang</artifactId>
334-
<version>2.6</version>
335-
</dependency>
336331
<dependency>
337332
<groupId>org.apache.commons</groupId>
338333
<artifactId>commons-math3</artifactId>

spark-shaded/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,6 @@
236236
<exclude>org.scala-lang:scala-library</exclude>
237237
<exclude>org.apache.commons:commons-*</exclude>
238238
<exclude>commons-pool:commons-pool</exclude>
239-
<exclude>commons-lang:commons-lang</exclude>
240239
<exclude>commons-io:commons-io</exclude>
241240
<exclude>commons-logging:commons-logging</exclude>
242241
</excludes>

spark/common/pom.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,6 @@
130130
<groupId>edu.ucar</groupId>
131131
<artifactId>cdm-core</artifactId>
132132
</dependency>
133-
<dependency>
134-
<groupId>commons-lang</groupId>
135-
<artifactId>commons-lang</artifactId>
136-
</dependency>
137133
<dependency>
138134
<groupId>org.apache.logging.log4j</groupId>
139135
<artifactId>log4j-1.2-api</artifactId>

spark/common/src/main/java/org/apache/sedona/core/spatialRDD/SpatialRDD.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import java.util.LinkedHashMap;
2626
import java.util.List;
2727
import java.util.Map;
28-
import org.apache.commons.lang.NullArgumentException;
2928
import org.apache.log4j.Logger;
3029
import org.apache.sedona.common.FunctionsGeoTools;
3130
import org.apache.sedona.common.jts2geojson.GeoJSONWriter;
@@ -542,7 +541,7 @@ public boolean analyze(Envelope datasetBoundary, Integer approximateTotalCount)
542541
*/
543542
public void saveAsWKB(String outputLocation) {
544543
if (this.rawSpatialRDD == null) {
545-
throw new NullArgumentException("save as WKB cannot operate on null RDD");
544+
throw new IllegalArgumentException("save as WKB cannot operate on null RDD");
546545
}
547546
this.rawSpatialRDD
548547
.mapPartitions(
@@ -571,7 +570,7 @@ public Iterator<String> call(Iterator<T> iterator) throws Exception {
571570
/** Save as WKT */
572571
public void saveAsWKT(String outputLocation) {
573572
if (this.rawSpatialRDD == null) {
574-
throw new NullArgumentException("save as WKT cannot operate on null RDD");
573+
throw new IllegalArgumentException("save as WKT cannot operate on null RDD");
575574
}
576575
this.rawSpatialRDD
577576
.mapPartitions(

spark/common/src/test/java/org/apache/sedona/core/spatialRDD/SpatialRDDWriterTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import java.io.IOException;
2626
import java.util.List;
2727
import org.apache.commons.io.FileUtils;
28-
import org.apache.commons.lang.NullArgumentException;
2928
import org.apache.sedona.common.enums.FileDataSplitter;
3029
import org.apache.sedona.common.utils.GeomUtils;
3130
import org.junit.AfterClass;
@@ -137,8 +136,8 @@ public void testSaveAsWKT() throws IOException {
137136
verifyResult(resultWKT.rawSpatialRDD.takeOrdered(5), spatialRDD.rawSpatialRDD.takeOrdered(5));
138137
}
139138

140-
/** Test throws NullArgumentException when Spatial RDD is null. */
141-
@Test(expected = NullArgumentException.class)
139+
/** Test throws IllegalArgumentException when Spatial RDD is null. */
140+
@Test(expected = IllegalArgumentException.class)
142141
public void testSaveAsEmptyWKB() {
143142

144143
PointRDD emptySpatialRDD = new PointRDD();

0 commit comments

Comments
 (0)