summaryrefslogtreecommitdiff
path: root/test/files/neg/t9636.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg/t9636.scala')
-rw-r--r--test/files/neg/t9636.scala17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/files/neg/t9636.scala b/test/files/neg/t9636.scala
new file mode 100644
index 0000000000..7ad5fb3e9e
--- /dev/null
+++ b/test/files/neg/t9636.scala
@@ -0,0 +1,17 @@
+
+import java.io._
+import java.util.zip._
+
+class C {
+ def isWrapper(is: FileInputStream): InputStream = {
+ val pb = new PushbackInputStream(is, 2)
+ val signature = new Array[Byte](2)
+ pb.read(signature)
+ pb.unread(signature)
+ if (signature.sameElements(Array(0x1F, 0x8B))) {
+ new GZIPInputStream(new BufferedInputStream(pb))
+ } else {
+ pb
+ }
+ }
+}