String.isEmpty() is no longer there (?!).
git-svn-id: http://google-refine.googlecode.com/svn/trunk@61 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
c194beb11a
commit
a025b272bd
@ -32,7 +32,7 @@ public class ExpressionUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static public boolean isBlank(Object o) {
|
static public boolean isBlank(Object o) {
|
||||||
return o == null || (o instanceof String && ((String) o).isEmpty());
|
return o == null || (o instanceof String && ((String) o).length() == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static public boolean isTrue(Object o) {
|
static public boolean isTrue(Object o) {
|
||||||
|
@ -25,7 +25,7 @@ public class TsvCsvImporter implements Importer {
|
|||||||
int cellCount = 1;
|
int cellCount = 1;
|
||||||
|
|
||||||
while ((line = lnReader.readLine()) != null) {
|
while ((line = lnReader.readLine()) != null) {
|
||||||
if (line.trim().isEmpty()) {
|
if (line.trim().length() == 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ public class Row implements Serializable, HasFields, Jsonizable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected boolean isValueBlank(Object value) {
|
protected boolean isValueBlank(Object value) {
|
||||||
return value == null || !(value instanceof String) || ((String) value).trim().isEmpty();
|
return value == null || !(value instanceof String) || ((String) value).trim().length() == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCell(int cellIndex, Cell cell) {
|
public void setCell(int cellIndex, Cell cell) {
|
||||||
|
Loading…
Reference in New Issue
Block a user