Allow selecting validators via an env var
Port to new JPV
This commit is contained in:
parent
3e4d228486
commit
afcee6c256
8 changed files with 61 additions and 27 deletions
|
|
@ -6,11 +6,14 @@ import java.util.Set;
|
|||
|
||||
import org.fedoraproject.javadeptools.rpm.RpmFile;
|
||||
import org.fedoraproject.javapackages.validator.Decorated;
|
||||
import org.fedoraproject.javapackages.validator.TmtTest;
|
||||
import org.fedoraproject.javapackages.validator.validators.BytecodeVersionJarValidator;
|
||||
import org.fedoraproject.javapackages.validator.helpers.BytecodeVersionJarValidator;
|
||||
|
||||
@TmtTest("/java/jp/bytecode_version")
|
||||
public class BytecodeVersionJarValidatorJP extends BytecodeVersionJarValidator {
|
||||
@Override
|
||||
public String getTestName() {
|
||||
return "/java/jp/bytecode_version";
|
||||
}
|
||||
|
||||
private Set<String> packagesReqVersion8 = Set.of(new String[] {
|
||||
"maven",
|
||||
"apache-commons-cli",
|
||||
|
|
@ -57,10 +60,10 @@ public class BytecodeVersionJarValidatorJP extends BytecodeVersionJarValidator {
|
|||
});
|
||||
|
||||
@Override
|
||||
public void validate(RpmFile rpm, Path jarPath, Map<Path, Short> classVersions) {
|
||||
public void validate(RpmFile rpm, Path jarPath, Map<Path, Version> classVersions) {
|
||||
for (var entry : classVersions.entrySet()) {
|
||||
Path classPath = entry.getKey();
|
||||
int version = entry.getValue();
|
||||
int version = entry.getValue().major();
|
||||
int maxAllowedVersion = 17;
|
||||
int expected;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue