1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
Description: Replaced the deprecated class LimitInputStream removed in Guava 15.0
with ByteStreams.limit() introduced in Guava 14.0. This was fixed upstream
in the v20130411 release.
Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: not-needed
--- a/src/com/google/javascript/jscomp/CommandLineRunner.java
+++ b/src/com/google/javascript/jscomp/CommandLineRunner.java
@@ -22,7 +22,7 @@
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import com.google.common.io.Files;
-import com.google.common.io.LimitInputStream;
+import com.google.common.io.ByteStreams;
import org.kohsuke.args4j.Argument;
import org.kohsuke.args4j.CmdLineException;
@@ -931,7 +931,7 @@
Map<String, SourceFile> externsMap = Maps.newHashMap();
for (ZipEntry entry = null; (entry = zip.getNextEntry()) != null; ) {
BufferedInputStream entryStream = new BufferedInputStream(
- new LimitInputStream(zip, entry.getSize()));
+ ByteStreams.limit(zip, entry.getSize()));
externsMap.put(entry.getName(),
SourceFile.fromInputStream(
// Give the files an odd prefix, so that they do not conflict
|