Skip to content

Commit 4f36020

Browse files
committed
Do not run when not having Java 11 or higher
1 parent 1bab9d7 commit 4f36020

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

  • org.bridgedb.rdb/test/org/bridgedb/rdb

org.bridgedb.rdb/test/org/bridgedb/rdb/Test.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,14 @@ public static void setup() {
6161

6262
@org.junit.jupiter.api.Test
6363
public void testGdbProvider() throws ClassNotFoundException, IDMapperException, IOException{
64+
// only for Java 11 and higher
65+
String specVersion = System.getProperty("java.specification.version");
66+
if (specVersion.contains(".")) specVersion = specVersion.substring(0, specVersion.indexOf('.'));
67+
if (Integer.valueOf(specVersion) < 11) {
68+
System.out.print("Only running testGdbProvider() for Java 11 or higher");
69+
return;
70+
}
71+
6472
Class.forName("org.bridgedb.file.IDMapperText");
6573
ClassLoader classLoader = this.getClass().getClassLoader();
6674

0 commit comments

Comments
 (0)