File tree Expand file tree Collapse file tree 4 files changed +50
-0
lines changed
java/ql/integration-tests/java/maven-java16-with-higher-jdk
src/main/java/com/example Expand file tree Collapse file tree 4 files changed +50
-0
lines changed Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+
3+ <project xmlns =" http://maven.apache.org/POM/4.0.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
4+ <modelVersion >4.0.0</modelVersion >
5+
6+ <groupId >com.example</groupId >
7+ <artifactId >maven-java16-with-higher-jdk</artifactId >
8+ <version >1.0-SNAPSHOT</version >
9+
10+ <name >maven-java16-with-higher-jdk</name >
11+ <description >Test case: Java 16 target when only Java 17+ is available.</description >
12+
13+ <properties >
14+ <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
15+ <java .version>16</java .version>
16+ </properties >
17+
18+ <build >
19+ <plugins >
20+ <plugin >
21+ <groupId >org.apache.maven.plugins</groupId >
22+ <artifactId >maven-compiler-plugin</artifactId >
23+ <version >3.11.0</version >
24+ <configuration >
25+ <release >${java.version} </release >
26+ </configuration >
27+ </plugin >
28+ </plugins >
29+ </build >
30+ </project >
Original file line number Diff line number Diff line change 1+ pom.xml
2+ src/main/java/com/example/App.java
3+ target/maven-archiver/pom.properties
Original file line number Diff line number Diff line change 1+ package com .example ;
2+
3+ import java .util .List ;
4+
5+ /**
6+ * Simple class using Java 16 features (e.g.,records).
7+ */
8+ public class App {
9+ public static void main (String [] args ) {
10+ Person person = new Person ("Bob" , 42 );
11+ System .out .println (person );
12+ }
13+ }
14+
15+ record Person (String name , int age ) {}
Original file line number Diff line number Diff line change 1+ def test (codeql , java ):
2+ codeql .database .create ()
You can’t perform that action at this time.
0 commit comments