Skip to content

Commit 631639a

Browse files
change OTHER.isEmpty() to act like VARCHAR.isEmpty()
1 parent a8574e8 commit 631639a

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

api/src/org/labkey/api/data/JdbcType.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import org.apache.commons.beanutils.ConversionException;
1919
import org.jetbrains.annotations.NotNull;
2020
import org.jetbrains.annotations.Nullable;
21-
import org.json.JSONArray;
2221
import org.junit.Assert;
2322
import org.junit.Test;
2423
import org.labkey.api.collections.IntHashMap;
@@ -33,7 +32,6 @@
3332
import java.sql.Time;
3433
import java.sql.Timestamp;
3534
import java.sql.Types;
36-
import java.util.Arrays;
3735
import java.util.Collection;
3836
import java.util.Collections;
3937
import java.util.Date;
@@ -400,8 +398,14 @@ else if (value instanceof java.sql.Array sqlArray)
400398

401399
NULL(Types.NULL, Object.class),
402400

403-
OTHER(Types.OTHER, Object.class);
404-
401+
OTHER(Types.OTHER, Object.class)
402+
{
403+
@Override
404+
public boolean isEmpty(Object value)
405+
{
406+
return null==value || "".equals(value);
407+
}
408+
};
405409

406410
public final int sqlType;
407411
public final Class<?> cls;

0 commit comments

Comments
 (0)