private int getOpcode()

in src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java [1306:1322]


    private int getOpcode(CompilerConfiguration compilerConfiguration) {
        String version = compilerConfiguration.getReleaseVersion();
        if (version == null) {
            version = compilerConfiguration.getTargetVersion();
            if (version == null) {
                version = "1.5";
            }
        }
        if (version.startsWith("1.")) {
            version = version.substring(2);
        }
        int iVersion = Integer.parseInt(version);
        if (iVersion < 2) {
            throw new IllegalArgumentException("Unsupported java version '" + version + "'");
        }
        return iVersion - 2 + Opcodes.V1_2;
    }