Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop java 11 support #520

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -301,27 +301,6 @@ jobs:
command: |
./mvnw -ntp -B package -Pci -Dgroups=com.querydsl.core.testutil.Firebird
- save-test-results
testMSSQL:
<<: *defaults
working_directory: ~/querydsl
docker:
- image: velo/toolchains-4-ci-builds:with-21
- image: mcr.microsoft.com/mssql/server:2022-latest
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=Password1!
- MSSQL_PID=Express
steps:
- checkout
- restore_cache:
keys:
- querydsl-dependencies-{{ checksum "pom.xml" }}
- querydsl-dependencies-
- run:
name: 'Test'
command: |
./mvnw -ntp -B package -Pci -Dgroups=com.querydsl.core.testutil.SQLServer
- save-test-results
testEmbedded:
<<: *defaults
working_directory: ~/querydsl
Expand Down Expand Up @@ -443,12 +422,6 @@ workflows:
- 'Resolve dependencies'
filters:
<<: *all-branches
- testMSSQL:
name: 'Test SQL Server'
requires:
- 'Resolve dependencies'
filters:
<<: *all-branches
- testEmbedded:
name: 'Test Embedded databases'
requires:
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-root</artifactId>
<version>6.10-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>

<packaging>pom</packaging>
<name>Querydsl</name>
Expand Down Expand Up @@ -96,7 +96,7 @@
<argLine>-Xms256m -Xmx512m</argLine>

<!-- default bytecode version for src/main -->
<main.java.version>11</main.java.version>
<main.java.version>17</main.java.version>
<latest.java.version>21</latest.java.version>

<git-code-format-maven-plugin.version>5.3</git-code-format-maven-plugin.version>
Expand Down Expand Up @@ -1055,7 +1055,7 @@
<configuration>
<exportDatatables>true</exportDatatables>
<activeRecipes>
<recipe>org.openrewrite.java.migrate.Java8toJava11</recipe>
<recipe>org.openrewrite.java.migrate.UpgradeToJava17</recipe>
</activeRecipes>
</configuration>
</execution>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-root</artifactId>
<version>6.10-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<artifactId>querydsl-docs</artifactId>
Expand Down
6 changes: 1 addition & 5 deletions querydsl-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-root</artifactId>
<version>6.10-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<artifactId>querydsl-examples</artifactId>
Expand All @@ -27,10 +27,6 @@
<module>querydsl-example-r2dbc-sql-codegen</module>
</modules>

<properties>
<main.java.version>17</main.java.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-examples/querydsl-example-jpa-guice/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-examples</artifactId>
<version>6.10-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<artifactId>querydsl-example-jpa-guice</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-examples/querydsl-example-jpa-quarkus/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-examples</artifactId>
<version>6.10-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<artifactId>querydsl-example-jpa-quarkus</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-examples/querydsl-example-jpa-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-examples</artifactId>
<version>6.10-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<artifactId>querydsl-example-jpa-spring</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-examples/querydsl-example-kotlin-codegen/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-examples</artifactId>
<version>6.10-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>
<artifactId>querydsl-example-kotlin-codegen</artifactId>
<name>Querydsl example - Kotlin Codegen</name>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-examples/querydsl-example-kotlin-jpa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-examples</artifactId>
<version>6.10-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>
<artifactId>querydsl-example-kotlin</artifactId>
<name>Querydsl example - Kotlin JPA</name>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-examples/querydsl-example-kotlin-mongodb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-examples</artifactId>
<version>6.10-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>
<artifactId>querydsl-example-kotlin-mongodb</artifactId>
<name>Querydsl example - Kotlin MongoDB</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-examples</artifactId>
<version>6.10-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<artifactId>querydsl-example-r2dbc-sql-codegen</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-examples/querydsl-example-sql-guice/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-examples</artifactId>
<version>6.10-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<artifactId>querydsl-example-sql-guice</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-examples/querydsl-example-sql-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-examples</artifactId>
<version>6.10-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<artifactId>querydsl-example-sql-spring</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-libraries/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-root</artifactId>
<version>6.10-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<artifactId>querydsl-libraries</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-libraries/querydsl-collections/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-libraries</artifactId>
<version>6.10-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<groupId>io.github.openfeign.querydsl</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ private List evaluateSingleSource(
final List<Expression<?>> sources = Collections.<Expression<?>>singletonList(source);
final Iterable<?> iterable = iterables.values().iterator().next();
List<?> list;
if (iterable instanceof List) {
list = (List) iterable;
if (iterable instanceof List<?> list1) {
list = list1;
} else {
list = IteratorAdapter.asList(iterable.iterator());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import com.querydsl.codegen.utils.Evaluator;
import com.querydsl.core.util.NullSafeComparableComparator;
import java.io.Serial;
import java.io.Serializable;
import java.util.Comparator;

Expand All @@ -29,7 +30,7 @@ public class MultiComparator<T> implements Comparator<T>, Serializable {
@SuppressWarnings("unchecked")
private static final Comparator<Object> naturalOrder = new NullSafeComparableComparator();

private static final long serialVersionUID = 1121416260773566299L;
@Serial private static final long serialVersionUID = 1121416260773566299L;

private final boolean[] asc;

Expand All @@ -45,8 +46,8 @@ public MultiComparator(Evaluator<Object[]> ev, boolean[] directions, boolean[] n

@Override
public int compare(T o1, T o2) {
if (o1 instanceof Object[]) {
return innerCompare(ev.evaluate((Object[]) o1), ev.evaluate((Object[]) o2));
if (o1 instanceof Object[] objects) {
return innerCompare(ev.evaluate(objects), ev.evaluate((Object[]) o2));
} else {
return innerCompare(ev.evaluate(o1), ev.evaluate(o2));
}
Expand Down
2 changes: 1 addition & 1 deletion querydsl-libraries/querydsl-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-libraries</artifactId>
<version>6.10-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<artifactId>querydsl-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import com.querydsl.core.types.ExpressionUtils;
import com.querydsl.core.types.Predicate;
import com.querydsl.core.types.Visitor;
import java.io.Serial;
import java.util.Objects;
import org.jetbrains.annotations.Nullable;

Expand All @@ -38,7 +39,7 @@
*/
public final class BooleanBuilder implements Predicate, Cloneable {

private static final long serialVersionUID = -4129485177345542519L;
@Serial private static final long serialVersionUID = -4129485177345542519L;

@Nullable private Predicate predicate;

Expand Down Expand Up @@ -113,8 +114,8 @@ public BooleanBuilder clone() throws CloneNotSupportedException {
public boolean equals(Object o) {
if (o == this) {
return true;
} else if (o instanceof BooleanBuilder) {
return Objects.equals(((BooleanBuilder) o).getValue(), predicate);
} else if (o instanceof BooleanBuilder builder) {
return Objects.equals(builder.getValue(), predicate);
} else {
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import com.querydsl.core.types.Predicate;
import com.querydsl.core.types.ValidatingVisitor;
import com.querydsl.core.util.CollectionUtils;
import java.io.Serial;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
Expand All @@ -50,7 +51,7 @@
*/
public class DefaultQueryMetadata implements QueryMetadata, Cloneable {

private static final long serialVersionUID = 317736313966701232L;
@Serial private static final long serialVersionUID = 317736313966701232L;

private boolean distinct;

Expand Down Expand Up @@ -158,7 +159,7 @@ private void addLastJoin() {
public void addJoin(JoinType joinType, Expression<?> expr) {
addLastJoin();
if (!exprInJoins.contains(expr)) {
if (expr instanceof Path && ((Path<?>) expr).getMetadata().isRoot()) {
if (expr instanceof Path<?> path && path.getMetadata().isRoot()) {
exprInJoins.add(expr);
} else {
validate(expr);
Expand Down Expand Up @@ -378,8 +379,7 @@ public void setValidatingVisitor(ValidatingVisitor visitor) {

@Override
public boolean equals(Object o) {
if (o instanceof QueryMetadata) {
var q = (QueryMetadata) o;
if (o instanceof QueryMetadata q) {
return q.getFlags().equals(flags)
&& q.getGroupBy().equals(groupBy)
&& Objects.equals(q.getHaving(), having)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import com.querydsl.core.types.OrderSpecifier;
import com.querydsl.core.types.ParamExpression;
import com.querydsl.core.types.Predicate;
import java.io.Serial;
import java.util.Collections;
import java.util.List;
import java.util.Map;
Expand All @@ -31,7 +32,7 @@
*/
public final class EmptyMetadata implements QueryMetadata {

private static final long serialVersionUID = 134750105981272499L;
@Serial private static final long serialVersionUID = 134750105981272499L;

public static final QueryMetadata DEFAULT = new EmptyMetadata();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import com.querydsl.core.types.Expression;
import com.querydsl.core.types.Predicate;
import com.querydsl.core.util.CollectionUtils;
import java.io.Serial;
import java.io.Serializable;
import java.util.Collections;
import java.util.Objects;
Expand All @@ -31,7 +32,7 @@
@Immutable
public final class JoinExpression implements Serializable {

private static final long serialVersionUID = -1131755765747174886L;
@Serial private static final long serialVersionUID = -1131755765747174886L;

@Nullable private final Predicate condition;

Expand Down Expand Up @@ -107,8 +108,7 @@ public int hashCode() {
public boolean equals(Object o) {
if (o == this) {
return true;
} else if (o instanceof JoinExpression) {
var j = (JoinExpression) o;
} else if (o instanceof JoinExpression j) {
return Objects.equals(condition, j.condition)
&& Objects.equals(target, j.target)
&& Objects.equals(type, j.type);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import com.querydsl.core.annotations.Immutable;
import com.querydsl.core.types.Expression;
import com.querydsl.core.types.ExpressionUtils;
import java.io.Serial;
import java.io.Serializable;

/**
Expand Down Expand Up @@ -48,7 +49,7 @@ public enum Position {
END
}

private static final long serialVersionUID = -688265393547206465L;
@Serial private static final long serialVersionUID = -688265393547206465L;

private final Expression<?> flag;

Expand Down Expand Up @@ -106,8 +107,8 @@ public int hashCode() {
public boolean equals(Object obj) {
if (obj == this) {
return true;
} else if (obj instanceof JoinFlag) {
return ((JoinFlag) obj).flag.equals(flag);
} else if (obj instanceof JoinFlag joinFlag) {
return joinFlag.flag.equals(flag);
} else {
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
*/
package com.querydsl.core;

import java.io.Serial;

/**
* {@code NonUniqueResultException} is thrown for query results where one result row is expected,
* but multiple are retrieved.
Expand All @@ -21,7 +23,7 @@
*/
public class NonUniqueResultException extends QueryException {

private static final long serialVersionUID = -1757423191400510323L;
@Serial private static final long serialVersionUID = -1757423191400510323L;

public NonUniqueResultException() {
super("Only one result is allowed for fetchOne calls");
Expand Down
Loading
Loading