Skip to content

Commit

Permalink
Avoid CVE-2021-23463 from outdated H2 reference in other examples
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaseder committed Dec 16, 2021
1 parent b702b36 commit a48c240
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
3 changes: 1 addition & 2 deletions jOOQ-examples/jOOQ-javafx-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<org.springframework.version>3.2.6.RELEASE</org.springframework.version>
<org.h2.version>1.4.199</org.h2.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -169,7 +168,7 @@
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${org.h2.version}</version>
<version>${h2.version}</version>
</dependency>
</dependencies>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ CREATE SCHEMA world;

CREATE TABLE world.countries (
code CHAR(2) NOT NULL,
year INT NOT NULL,
"YEAR" INT NOT NULL,
gdp_per_capita DECIMAL(10, 2) NOT NULL,
govt_debt DECIMAL(10, 2) NOT NULL,

CONSTRAINT pk_countries PRIMARY KEY (code, year)
CONSTRAINT pk_countries PRIMARY KEY (code, "YEAR")
);

INSERT INTO world.countries
Expand Down
3 changes: 1 addition & 2 deletions jOOQ-examples/jOOQ-kotlin-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<org.h2.version>1.4.199</org.h2.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -137,7 +136,7 @@
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${org.h2.version}</version>
<version>${h2.version}</version>
</dependency>
</dependencies>
</plugin>
Expand Down
10 changes: 8 additions & 2 deletions jOOQ-examples/jOOQ-spark-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<org.springframework.version>3.2.6.RELEASE</org.springframework.version>
<org.h2.version>1.4.199</org.h2.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -54,6 +53,12 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j18-impl</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<scope>compile</scope>
</dependency>

<!-- Testing -->
Expand Down Expand Up @@ -165,7 +170,7 @@
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${org.h2.version}</version>
<version>${h2.version}</version>
</dependency>
</dependencies>
</plugin>
Expand Down Expand Up @@ -217,6 +222,7 @@
</goals>
<configuration>
<mainClass>org.jooq.example.spark.SparkCRUD</mainClass>
<classpathScope>compile</classpathScope>
</configuration>
</execution>
</executions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ CREATE TABLE book (
title VARCHAR(400) NOT NULL,

CONSTRAINT pk_t_book PRIMARY KEY (id),
CONSTRAINT fk_t_book_author_id FOREIGN KEY (author_id) REFERENCES author(id) ON DELETE CASCADE,
CONSTRAINT fk_t_book_author_id FOREIGN KEY (author_id) REFERENCES author(id) ON DELETE CASCADE
);

INSERT INTO author VALUES (DEFAULT, 'George Orwell');
Expand Down

0 comments on commit a48c240

Please sign in to comment.