Skip to content

Commit

Permalink
New version of gbif-common resolves problem with missing extension re…
Browse files Browse the repository at this point in the history
…cords.
  • Loading branch information
MattBlissett committed Mar 20, 2018
1 parent 1271de4 commit 259fe9a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<commons-digester.version>3.2</commons-digester.version>
<dwc-api.version>1.18-SNAPSHOT</dwc-api.version>
<freemarker.version>2.3.25-incubating</freemarker.version>
<gbif-common.version>0.36</gbif-common.version>
<gbif-common.version>0.38-SNAPSHOT</gbif-common.version>
<gbif-registry-metadata.version>2.59</gbif-registry-metadata.version>
<guava.version>18.0</guava.version>
<junit.version>4.12</junit.version>
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/gbif/dwc/DwcRecordIterator.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.gbif.utils.file.tabular.TabularDataFileReader;

import java.io.IOException;
import java.text.ParseException;
import java.util.List;
import java.util.Map;

Expand Down Expand Up @@ -63,7 +64,7 @@ public boolean hasNext() {

try {
nextLine = tabularFileReader.read();
} catch (IOException var2) {
} catch (ParseException | IOException var2) {
try {
this.close();
} catch (IOException e) {
Expand Down
8 changes: 3 additions & 5 deletions src/test/java/org/gbif/dwca/io/ArchiveFactoryTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;

import com.google.common.collect.Sets;
import org.junit.Ignore;
import org.junit.Test;

import static org.junit.Assert.assertEquals;
Expand Down Expand Up @@ -234,16 +234,14 @@ public void testExtensionNPE() throws UnsupportedArchiveException, IOException {
* when using the star record iterator.
*/
@Test
@Ignore("currently fails with only 661 records coming through instead of 740")
public void testStarIteratorExtRecords() throws Exception {
File zip = FileUtils.getClasspathFile("checklist_980.zip");
File tmpDir = Files.createTempDirectory("dwca-io-test").toFile();
CompressionUtil.decompressFile(tmpDir, zip);
// read archive from this tmp dir
Archive arch = ArchiveFactory.openArchive(tmpDir);
Archive arch = ArchiveFactory.openArchive(zip, tmpDir);
int counter = 0;
int occCounter = 0;
Set<String> ids = Sets.newHashSet();
Set<String> ids = new HashSet<>();
for (StarRecord rec : arch) {
counter++;
ids.add(rec.core().id());
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/logback-test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} %-5level %msg%n</pattern>
<pattern>%d{HH:mm:ss.SSS} %-5level %logger: %msg%n</pattern>
</encoder>
</appender>

Expand Down

0 comments on commit 259fe9a

Please sign in to comment.