diff --git a/build.gradle b/build.gradle index c9021b1e..4e729ae7 100644 --- a/build.gradle +++ b/build.gradle @@ -175,7 +175,8 @@ jar { artifacts { archives jar - archives javadocJar + //this fails with many errors & warnings using gradle 2.2.1 + //archives javadocJar archives sourcesJar } diff --git a/data/gdb/TestCrash.gdb/a00000001.TablesByName.atx b/data/gdb/TestCrash.gdb/a00000001.TablesByName.atx new file mode 100755 index 00000000..56dfa17b Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000001.TablesByName.atx differ diff --git a/data/gdb/TestCrash.gdb/a00000001.gdbindexes b/data/gdb/TestCrash.gdb/a00000001.gdbindexes new file mode 100755 index 00000000..b02aa751 Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000001.gdbindexes differ diff --git a/data/gdb/TestCrash.gdb/a00000001.gdbtable b/data/gdb/TestCrash.gdb/a00000001.gdbtable new file mode 100755 index 00000000..ddf91c4d Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000001.gdbtable differ diff --git a/data/gdb/TestCrash.gdb/a00000001.gdbtablx b/data/gdb/TestCrash.gdb/a00000001.gdbtablx new file mode 100755 index 00000000..ef915a75 Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000001.gdbtablx differ diff --git a/data/gdb/TestCrash.gdb/a00000002.gdbtable b/data/gdb/TestCrash.gdb/a00000002.gdbtable new file mode 100755 index 00000000..a0af90ea Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000002.gdbtable differ diff --git a/data/gdb/TestCrash.gdb/a00000002.gdbtablx b/data/gdb/TestCrash.gdb/a00000002.gdbtablx new file mode 100755 index 00000000..7c12c568 Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000002.gdbtablx differ diff --git a/data/gdb/TestCrash.gdb/a00000003.gdbindexes b/data/gdb/TestCrash.gdb/a00000003.gdbindexes new file mode 100755 index 00000000..58df68d5 Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000003.gdbindexes differ diff --git a/data/gdb/TestCrash.gdb/a00000003.gdbtable b/data/gdb/TestCrash.gdb/a00000003.gdbtable new file mode 100755 index 00000000..d92d38fc Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000003.gdbtable differ diff --git a/data/gdb/TestCrash.gdb/a00000003.gdbtablx b/data/gdb/TestCrash.gdb/a00000003.gdbtablx new file mode 100755 index 00000000..2f80ed4f Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000003.gdbtablx differ diff --git a/data/gdb/TestCrash.gdb/a00000004.CatItemsByPhysicalName.atx b/data/gdb/TestCrash.gdb/a00000004.CatItemsByPhysicalName.atx new file mode 100755 index 00000000..80bbcfaa Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000004.CatItemsByPhysicalName.atx differ diff --git a/data/gdb/TestCrash.gdb/a00000004.CatItemsByType.atx b/data/gdb/TestCrash.gdb/a00000004.CatItemsByType.atx new file mode 100755 index 00000000..d3d48926 Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000004.CatItemsByType.atx differ diff --git a/data/gdb/TestCrash.gdb/a00000004.FDO_UUID.atx b/data/gdb/TestCrash.gdb/a00000004.FDO_UUID.atx new file mode 100755 index 00000000..fafb5fce Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000004.FDO_UUID.atx differ diff --git a/data/gdb/TestCrash.gdb/a00000004.freelist b/data/gdb/TestCrash.gdb/a00000004.freelist new file mode 100755 index 00000000..cf4d31d4 Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000004.freelist differ diff --git a/data/gdb/TestCrash.gdb/a00000004.gdbindexes b/data/gdb/TestCrash.gdb/a00000004.gdbindexes new file mode 100755 index 00000000..a4f334d7 Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000004.gdbindexes differ diff --git a/data/gdb/TestCrash.gdb/a00000004.gdbtable b/data/gdb/TestCrash.gdb/a00000004.gdbtable new file mode 100755 index 00000000..6201db4e Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000004.gdbtable differ diff --git a/data/gdb/TestCrash.gdb/a00000004.gdbtablx b/data/gdb/TestCrash.gdb/a00000004.gdbtablx new file mode 100755 index 00000000..5f2027b3 Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000004.gdbtablx differ diff --git a/data/gdb/TestCrash.gdb/a00000004.spx b/data/gdb/TestCrash.gdb/a00000004.spx new file mode 100755 index 00000000..b5fd1918 Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000004.spx differ diff --git a/data/gdb/TestCrash.gdb/a00000005.CatItemTypesByName.atx b/data/gdb/TestCrash.gdb/a00000005.CatItemTypesByName.atx new file mode 100755 index 00000000..83b7df36 Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000005.CatItemTypesByName.atx differ diff --git a/data/gdb/TestCrash.gdb/a00000005.CatItemTypesByParentTypeID.atx b/data/gdb/TestCrash.gdb/a00000005.CatItemTypesByParentTypeID.atx new file mode 100755 index 00000000..eade39f5 Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000005.CatItemTypesByParentTypeID.atx differ diff --git a/data/gdb/TestCrash.gdb/a00000005.CatItemTypesByUUID.atx b/data/gdb/TestCrash.gdb/a00000005.CatItemTypesByUUID.atx new file mode 100755 index 00000000..b428c71a Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000005.CatItemTypesByUUID.atx differ diff --git a/data/gdb/TestCrash.gdb/a00000005.gdbindexes b/data/gdb/TestCrash.gdb/a00000005.gdbindexes new file mode 100755 index 00000000..bc887093 Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000005.gdbindexes differ diff --git a/data/gdb/TestCrash.gdb/a00000005.gdbtable b/data/gdb/TestCrash.gdb/a00000005.gdbtable new file mode 100755 index 00000000..2dd59c7a Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000005.gdbtable differ diff --git a/data/gdb/TestCrash.gdb/a00000005.gdbtablx b/data/gdb/TestCrash.gdb/a00000005.gdbtablx new file mode 100755 index 00000000..15d5f440 Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000005.gdbtablx differ diff --git a/data/gdb/TestCrash.gdb/a00000006.CatRelsByDestinationID.atx b/data/gdb/TestCrash.gdb/a00000006.CatRelsByDestinationID.atx new file mode 100755 index 00000000..0d64b1a7 Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000006.CatRelsByDestinationID.atx differ diff --git a/data/gdb/TestCrash.gdb/a00000006.CatRelsByOriginID.atx b/data/gdb/TestCrash.gdb/a00000006.CatRelsByOriginID.atx new file mode 100755 index 00000000..737a2975 Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000006.CatRelsByOriginID.atx differ diff --git a/data/gdb/TestCrash.gdb/a00000006.CatRelsByType.atx b/data/gdb/TestCrash.gdb/a00000006.CatRelsByType.atx new file mode 100755 index 00000000..7d07fb2a Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000006.CatRelsByType.atx differ diff --git a/data/gdb/TestCrash.gdb/a00000006.FDO_UUID.atx b/data/gdb/TestCrash.gdb/a00000006.FDO_UUID.atx new file mode 100755 index 00000000..88007302 Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000006.FDO_UUID.atx differ diff --git a/data/gdb/TestCrash.gdb/a00000006.gdbindexes b/data/gdb/TestCrash.gdb/a00000006.gdbindexes new file mode 100755 index 00000000..c608a88b Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000006.gdbindexes differ diff --git a/data/gdb/TestCrash.gdb/a00000006.gdbtable b/data/gdb/TestCrash.gdb/a00000006.gdbtable new file mode 100755 index 00000000..504daac0 Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000006.gdbtable differ diff --git a/data/gdb/TestCrash.gdb/a00000006.gdbtablx b/data/gdb/TestCrash.gdb/a00000006.gdbtablx new file mode 100755 index 00000000..f8184c1e Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000006.gdbtablx differ diff --git a/data/gdb/TestCrash.gdb/a00000007.CatRelTypesByBackwardLabel.atx b/data/gdb/TestCrash.gdb/a00000007.CatRelTypesByBackwardLabel.atx new file mode 100755 index 00000000..3a748d2c Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000007.CatRelTypesByBackwardLabel.atx differ diff --git a/data/gdb/TestCrash.gdb/a00000007.CatRelTypesByDestItemTypeID.atx b/data/gdb/TestCrash.gdb/a00000007.CatRelTypesByDestItemTypeID.atx new file mode 100755 index 00000000..b88d71b0 Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000007.CatRelTypesByDestItemTypeID.atx differ diff --git a/data/gdb/TestCrash.gdb/a00000007.CatRelTypesByForwardLabel.atx b/data/gdb/TestCrash.gdb/a00000007.CatRelTypesByForwardLabel.atx new file mode 100755 index 00000000..806caa11 Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000007.CatRelTypesByForwardLabel.atx differ diff --git a/data/gdb/TestCrash.gdb/a00000007.CatRelTypesByName.atx b/data/gdb/TestCrash.gdb/a00000007.CatRelTypesByName.atx new file mode 100755 index 00000000..adfcb26e Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000007.CatRelTypesByName.atx differ diff --git a/data/gdb/TestCrash.gdb/a00000007.CatRelTypesByOriginItemTypeID.atx b/data/gdb/TestCrash.gdb/a00000007.CatRelTypesByOriginItemTypeID.atx new file mode 100755 index 00000000..38e347c1 Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000007.CatRelTypesByOriginItemTypeID.atx differ diff --git a/data/gdb/TestCrash.gdb/a00000007.CatRelTypesByUUID.atx b/data/gdb/TestCrash.gdb/a00000007.CatRelTypesByUUID.atx new file mode 100755 index 00000000..a6a84493 Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000007.CatRelTypesByUUID.atx differ diff --git a/data/gdb/TestCrash.gdb/a00000007.gdbindexes b/data/gdb/TestCrash.gdb/a00000007.gdbindexes new file mode 100755 index 00000000..2a98c93a Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000007.gdbindexes differ diff --git a/data/gdb/TestCrash.gdb/a00000007.gdbtable b/data/gdb/TestCrash.gdb/a00000007.gdbtable new file mode 100755 index 00000000..9525bc18 Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000007.gdbtable differ diff --git a/data/gdb/TestCrash.gdb/a00000007.gdbtablx b/data/gdb/TestCrash.gdb/a00000007.gdbtablx new file mode 100755 index 00000000..a499848f Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000007.gdbtablx differ diff --git a/data/gdb/TestCrash.gdb/a00000009.gdbindexes b/data/gdb/TestCrash.gdb/a00000009.gdbindexes new file mode 100755 index 00000000..c9d0caa2 Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000009.gdbindexes differ diff --git a/data/gdb/TestCrash.gdb/a00000009.gdbtable b/data/gdb/TestCrash.gdb/a00000009.gdbtable new file mode 100755 index 00000000..fe87a3d8 Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000009.gdbtable differ diff --git a/data/gdb/TestCrash.gdb/a00000009.gdbtablx b/data/gdb/TestCrash.gdb/a00000009.gdbtablx new file mode 100755 index 00000000..6cdce1ac Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000009.gdbtablx differ diff --git a/data/gdb/TestCrash.gdb/a00000009.spx b/data/gdb/TestCrash.gdb/a00000009.spx new file mode 100755 index 00000000..7a5af232 Binary files /dev/null and b/data/gdb/TestCrash.gdb/a00000009.spx differ diff --git a/data/gdb/TestCrash.gdb/a0000000a.gdbindexes b/data/gdb/TestCrash.gdb/a0000000a.gdbindexes new file mode 100755 index 00000000..c9d0caa2 Binary files /dev/null and b/data/gdb/TestCrash.gdb/a0000000a.gdbindexes differ diff --git a/data/gdb/TestCrash.gdb/a0000000a.gdbtable b/data/gdb/TestCrash.gdb/a0000000a.gdbtable new file mode 100755 index 00000000..49e91275 Binary files /dev/null and b/data/gdb/TestCrash.gdb/a0000000a.gdbtable differ diff --git a/data/gdb/TestCrash.gdb/a0000000a.gdbtablx b/data/gdb/TestCrash.gdb/a0000000a.gdbtablx new file mode 100755 index 00000000..f9ee051f Binary files /dev/null and b/data/gdb/TestCrash.gdb/a0000000a.gdbtablx differ diff --git a/data/gdb/TestCrash.gdb/a0000000a.spx b/data/gdb/TestCrash.gdb/a0000000a.spx new file mode 100755 index 00000000..aca87311 Binary files /dev/null and b/data/gdb/TestCrash.gdb/a0000000a.spx differ diff --git a/data/gdb/TestCrash.gdb/gdb b/data/gdb/TestCrash.gdb/gdb new file mode 100755 index 00000000..a786e127 Binary files /dev/null and b/data/gdb/TestCrash.gdb/gdb differ diff --git a/data/gdb/TestCrash.gdb/timestamps b/data/gdb/TestCrash.gdb/timestamps new file mode 100755 index 00000000..06f9607d Binary files /dev/null and b/data/gdb/TestCrash.gdb/timestamps differ diff --git a/filegdb/filegdb/row.cpp b/filegdb/filegdb/row.cpp index bfeb0f0e..aee68fd8 100644 --- a/filegdb/filegdb/row.cpp +++ b/filegdb/filegdb/row.cpp @@ -304,7 +304,8 @@ JNIEXPORT jobjectArray JNICALL Java_org_opensextant_giscore_filegdb_Row_getAttrA int count; fieldInfo->GetFieldCount(count); jclass oclass = me.findClass("java.lang.Object"); - jclass calclass = me.findClass("java.util.GregorianCalendar"); + jclass calclass = me.findClass("java.util.Calendar"); + jmethodID ccgetinstance = env->GetStaticMethodID(calclass, "getInstance", "()Ljava/util/Calendar;"); jmethodID ccsetTime = me.getMethod(calclass, "setTimeInMillis", "(J)V"); jobjectArray rval = env->NewObjectArray(count * 2, oclass, 0L); int ptr = 0; @@ -361,7 +362,7 @@ JNIEXPORT jobjectArray JNICALL Java_org_opensextant_giscore_filegdb_Row_getAttrA tm date; row->GetDate(fieldName, date); time_t dtm = mktime(&date); - jobject cal = env->AllocObject(calclass); + jobject cal = env->CallStaticObjectMethod(calclass, ccgetinstance); env->CallVoidMethod(cal, ccsetTime, me.newLong(1000 * dtm)); val = cal; break; diff --git a/src/test/java/org/opensextant/giscore/test/filegdb/TestFileGDBSupport.java b/src/test/java/org/opensextant/giscore/test/filegdb/TestFileGDBSupport.java index 1fcaf36d..e0f293fd 100755 --- a/src/test/java/org/opensextant/giscore/test/filegdb/TestFileGDBSupport.java +++ b/src/test/java/org/opensextant/giscore/test/filegdb/TestFileGDBSupport.java @@ -261,7 +261,11 @@ private static LinearRing makeRing(int count, double radius, double xoffset, dou @Test public void testReadFeatureGdb() throws IOException { - File path = new File("data/gdb/ftest1.gdb"); + readGdb("data/gdb/ftest1.gdb"); + } + + private void readGdb(String pathname) throws IOException { + File path = new File(pathname); IGISInputStream os = null; try { os = new FileGdbInputStream(path, null);