Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Jonathan Feinberg
2014-04-16 23:17:59 -04:00
3 changed files with 13 additions and 4 deletions

View File

@@ -20,13 +20,12 @@
</condition>
<!-- Require Java 7 to bootstrap, otherwise there will be sadness.
And I guess Java 8 should work too? Sorta? -->
Java 1.8 caused build problems (with ECJ?) so not supported. -->
<fail message="Unsupported Java version: ${java.version}. Make sure that Java 7 (aka Java 1.7) is installed.">
<condition>
<not>
<or>
<contains string="${java.version}" substring="1.7" />
<contains string="${java.version}" substring="1.8" />
</or>
</not>
</condition>
@@ -152,7 +151,7 @@
</condition>
<!-- Set the version of Java that must be present to build. -->
<property name="jdk.update.macosx" value="51" />
<property name="jdk.update.macosx" value="55" />
<property name="jdk.path.macosx" value="/Library/Java/JavaVirtualMachines/jdk1.7.0_${jdk.update.macosx}.jdk" />
<available file="${jdk.path.macosx}" property="macosx_jdk_found" />

View File

@@ -2087,7 +2087,12 @@ public class Table {
if (piece == null) {
indexData[row] = missingCategory;
} else {
indexData[row] = columnCategories[col].index(String.valueOf(piece));
String peace = String.valueOf(piece);
if (peace.equals(missingString)) { // missingString might be null
indexData[row] = missingCategory;
} else {
indexData[row] = columnCategories[col].index(peace);
}
}
break;
default:
@@ -2933,6 +2938,9 @@ public class Table {
}
/**
* Treat entries with this string as "missing". Also used for categorial.
*/
public void setMissingString(String value) {
missingString = value;
}
@@ -3562,6 +3570,7 @@ public class Table {
read(input);
}
/** gets the index, and creates one if it doesn't already exist. */
int index(String key) {
Integer value = dataToIndex.get(key);
if (value != null) {

View File

@@ -1,4 +1,5 @@
0226 core
X fix parsing with missing categorical values
_ XML.getChildren() throwing NPE when getInt() called on non-existent var