Permalink
Browse files

pdf.Stream.getFilters() result is unmodifiable.

  • Loading branch information...
eseifert committed Aug 19, 2017
1 parent 5d1694d commit ff382185175c4d31cb70d0ad440f29e2555ab523
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/test/java/de/erichseifert/vectorgraphics2d/pdf/StreamTest.java
@@ -26,6 +26,7 @@
import static org.junit.Assert.assertThat;
import java.io.IOException;
import java.util.List;
import java.util.zip.DataFormatException;
import java.util.zip.Inflater;
import org.junit.Test;
@@ -130,4 +131,12 @@ public void contentsAreCompressedWhenFlateFilterIsSet() throws DataFormatExcepti
decompressor.inflate(decompressedOutput);
assertThat(decompressedOutput, is(inputData));
}
@Test(expected = UnsupportedOperationException.class)
public void getFiltersResultIsUnmodifiable() {
Stream stream = new Stream();
List<Stream.Filter> filters = stream.getFilters();
filters.add(Stream.Filter.FLATE);
}
}

0 comments on commit ff38218

Please sign in to comment.