Skip to content

Remove duplicated flag ignoreCase in JpaOrder and use the super class instead. #2928

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

Closed
wants to merge 2 commits into from
Closed
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
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa-parent</artifactId>
<version>3.1.0-SNAPSHOT</version>
<version>3.1.0-remove-ignore-case-SNAPSHOT</version>
<packaging>pom</packaging>

<name>Spring Data JPA Parent</name>
Expand Down Expand Up @@ -37,7 +37,7 @@
<jsqlparser>4.5</jsqlparser>
<mysql-connector-java>8.0.31</mysql-connector-java>
<postgresql>42.5.0</postgresql>
<springdata.commons>3.1.0-SNAPSHOT</springdata.commons>
<springdata.commons>3.1.0-order-constructor-SNAPSHOT</springdata.commons>
<vavr>0.10.3</vavr>

<hibernate.groupId>org.hibernate</hibernate.groupId>
Expand Down
4 changes: 2 additions & 2 deletions spring-data-envers/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

<groupId>org.springframework.data</groupId>
<artifactId>spring-data-envers</artifactId>
<version>3.1.0-SNAPSHOT</version>
<version>3.1.0-remove-ignore-case-SNAPSHOT</version>

<parent>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa-parent</artifactId>
<version>3.1.0-SNAPSHOT</version>
<version>3.1.0-remove-ignore-case-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion spring-data-jpa-distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa-parent</artifactId>
<version>3.1.0-SNAPSHOT</version>
<version>3.1.0-remove-ignore-case-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
4 changes: 2 additions & 2 deletions spring-data-jpa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>3.1.0-SNAPSHOT</version>
<version>3.1.0-remove-ignore-case-SNAPSHOT</version>

<name>Spring Data JPA</name>
<description>Spring Data module for JPA repositories.</description>
Expand All @@ -15,7 +15,7 @@
<parent>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa-parent</artifactId>
<version>3.1.0-SNAPSHOT</version>
<version>3.1.0-remove-ignore-case-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,7 @@ public String toString() {

/**
* Custom {@link Order} that keeps a flag to indicate unsafe property handling, i.e. the String provided is not
* necessarily a property but can be an arbitrary expression piped into the query execution. We also keep an
* additional {@code ignoreCase} flag around as the constructor of the superclass is private currently.
* necessarily a property but can be an arbitrary expression piped into the query execution.
*
* @author Christoph Strobl
* @author Oliver Gierke
Expand All @@ -364,7 +363,6 @@ public static class JpaOrder extends Order {
private static final long serialVersionUID = 1L;

private final boolean unsafe;
private final boolean ignoreCase;

/**
* Creates a new {@link JpaOrder} instance. if order is {@literal null} then order defaults to
Expand Down Expand Up @@ -392,8 +390,7 @@ private JpaOrder(@Nullable Direction direction, String property, NullHandling nu
private JpaOrder(@Nullable Direction direction, String property, NullHandling nullHandling, boolean ignoreCase,
boolean unsafe) {

super(direction, property, nullHandling);
this.ignoreCase = ignoreCase;
super(direction, property, ignoreCase, nullHandling);
this.unsafe = unsafe;
}

Expand Down Expand Up @@ -432,11 +429,6 @@ public JpaOrder ignoreCase() {
return new JpaOrder(getDirection(), getProperty(), getNullHandling(), true, this.unsafe);
}

@Override
public boolean isIgnoreCase() {
return super.isIgnoreCase() || ignoreCase;
}

/**
* @return true if {@link JpaOrder} created {@link #withUnsafe(String...)}.
*/
Expand Down