Skip to content

Commit 282d9f9

Browse files
authored
GEOMESA-3527 Fix empty string to list GeoTools converter (#3434)
* Tweak make-release-docs script to use latest tag as default
1 parent 8bc7e33 commit 282d9f9

File tree

6 files changed

+356
-299
lines changed

6 files changed

+356
-299
lines changed

build/scripts/make-release-docs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ if ! [[ $(which virtualenv) ]]; then
3838
exit 1
3939
fi
4040

41-
TAG="$(git tag | grep '^geomesa-' | sort -r | head -n 1)"
41+
TAG="$(git tag --list 'geomesa-*' --sort=-creatordate | head -n 1)"
4242
RELEASE="${TAG#geomesa-}"
4343
read -r -p "Enter the release version (default $RELEASE): " REL
4444
if [[ -n "$REL" ]]; then

geomesa-utils-parent/geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/geotools/converters/StringCollectionConverterFactory.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ object StringCollectionConverterFactory {
6262
*
6363
* @param listType type of list elements
6464
*/
65-
class StringToListConverter(listType: Class[_]) extends Converter {
65+
private class StringToListConverter(listType: Class[_]) extends Converter {
6666

6767
override def convert[T](source: scala.Any, target: Class[T]): T = {
6868
val string = source.toString.trim
@@ -71,7 +71,7 @@ object StringCollectionConverterFactory {
7171
// geomesa looks like: value1,value2
7272
val isToString = string.startsWith("[") && string.endsWith("]")
7373
val stripped = if (isToString) string.substring(1, string.length - 1) else string
74-
if (string.isEmpty) {
74+
if (stripped.isEmpty) {
7575
new java.util.ArrayList[Any](0).asInstanceOf[T]
7676
} else {
7777
val result = new java.util.ArrayList[Any]
@@ -101,7 +101,7 @@ object StringCollectionConverterFactory {
101101
* @param keyType map key type
102102
* @param valueType map value type
103103
*/
104-
class StringToMapConverter(keyType: Class[_], valueType: Class[_]) extends Converter {
104+
private class StringToMapConverter(keyType: Class[_], valueType: Class[_]) extends Converter {
105105

106106
override def convert[T](source: scala.Any, target: Class[T]): T = {
107107
val string = source.toString.trim

geomesa-utils-parent/geomesa-utils/src/test/scala/org/locationtech/geomesa/utils/geotools/converters/ConverterFactoriesTest.scala

Lines changed: 0 additions & 295 deletions
This file was deleted.

0 commit comments

Comments
 (0)