// Path: backport/src/java/io/UncheckedIOException.java
// public class UncheckedIOException extends RuntimeException {
//   private static final long serialVersionUID = -5719611140800825697L;
// 
//   public UncheckedIOException(IOException cause) {
//     super(cause);
//   }
// 
// }


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.UncheckedIOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.HashSet;
import java.util.zip.GZIPInputStream;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
package com.github.forax.jrtfs.backport;



public class Check {
  public static void main(String[] args) throws IOException {
    Path sigPath = Paths.get("jdk7-sig.txt");
    Path sigGzipPath = Paths.get("jdk7-sig.txt.gz");
    
    HashSet<String> compatSignatures = new HashSet<>();
    if (Files.exists(sigGzipPath)) {
      try(InputStream input = Files.newInputStream(sigGzipPath);
          GZIPInputStream gzipInput = new GZIPInputStream(input);
          Reader r = new InputStreamReader(gzipInput);
          BufferedReader reader = new BufferedReader(r)) {
        reader.lines().forEach(compatSignatures::add);
      }
    } else {
      Files.lines(sigPath).forEach(compatSignatures::add);
    }
    
    Files.walk(Paths.get("output/classes"))
         .filter(path -> path.toString().endsWith(".class"))
         .forEach(path -> {
           ClassReader reader;
           try {
             reader = new ClassReader(Files.readAllBytes(path));
           } catch (IOException e) {
// Path: backport/src/java/io/UncheckedIOException.java
// public class UncheckedIOException extends RuntimeException {
//   private static final long serialVersionUID = -5719611140800825697L;
// 
//   public UncheckedIOException(IOException cause) {
//     super(cause);
//   }
// 
// }


// Path: backport-build/src/com/github/forax/jrtfs/backport/Check.java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.UncheckedIOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.HashSet;
import java.util.zip.GZIPInputStream;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;

package com.github.forax.jrtfs.backport;



public class Check {
  public static void main(String[] args) throws IOException {
    Path sigPath = Paths.get("jdk7-sig.txt");
    Path sigGzipPath = Paths.get("jdk7-sig.txt.gz");
    
    HashSet<String> compatSignatures = new HashSet<>();
    if (Files.exists(sigGzipPath)) {
      try(InputStream input = Files.newInputStream(sigGzipPath);
          GZIPInputStream gzipInput = new GZIPInputStream(input);
          Reader r = new InputStreamReader(gzipInput);
          BufferedReader reader = new BufferedReader(r)) {
        reader.lines().forEach(compatSignatures::add);
      }
    } else {
      Files.lines(sigPath).forEach(compatSignatures::add);
    }
    
    Files.walk(Paths.get("output/classes"))
         .filter(path -> path.toString().endsWith(".class"))
         .forEach(path -> {
           ClassReader reader;
           try {
             reader = new ClassReader(Files.readAllBytes(path));
           } catch (IOException e) {
             throw new UncheckedIOException(e);