Skip to content

Commit

Permalink
Merge c093307 into c559a12
Browse files Browse the repository at this point in the history
  • Loading branch information
jspyro committed May 16, 2020
2 parents c559a12 + c093307 commit f45102e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/main/java/au/com/southsky/jfreesane/SaneInputStream.java
Expand Up @@ -55,6 +55,9 @@ public List<SaneDevice> readDeviceList() throws IOException, SaneException {
int length = readWord().integerValue() - 1;

if (length <= 0) {
// remove leftover word from stream to prevent it from breaking
// the following operation in this session
readWord();
return new ArrayList<>(0);
}

Expand Down
2 changes: 0 additions & 2 deletions src/test/java/au/com/southsky/jfreesane/SaneSessionTest.java
Expand Up @@ -3,7 +3,6 @@
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
Expand Down Expand Up @@ -377,7 +376,6 @@ public void arrayOption() throws Exception {
}

@Test
@Ignore // This test fails on Travis with UNSUPPORTED.
public void multipleListDevicesCalls() throws Exception {
session.listDevices();
session.listDevices();
Expand Down

0 comments on commit f45102e

Please sign in to comment.