Skip to content

DATAJPA-1813 - Removes dependency to joda.time #434

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 1 commit 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
7 changes: 0 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,6 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>${jodatime}</version>
<optional>true</optional>
</dependency>

<dependency>
<groupId>org.threeten</groupId>
<artifactId>threetenbp</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@

import static org.assertj.core.api.Assertions.*;

import java.sql.Date;
import java.util.List;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import org.joda.time.LocalDate;
import java.time.LocalDate;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
Expand Down Expand Up @@ -249,9 +250,9 @@ void sortByNestedEmbeddedAttribute() {
@Test // DATAJPA-566, DATAJPA-635
void shouldSupportSortByOperatorWithDateExpressions() {

carter.setDateOfBirth(new LocalDate(2000, 2, 1).toDate());
dave.setDateOfBirth(new LocalDate(2000, 1, 1).toDate());
oliver.setDateOfBirth(new LocalDate(2003, 5, 1).toDate());
carter.setDateOfBirth(Date.valueOf(LocalDate.of(2000, 2, 1)));
dave.setDateOfBirth(Date.valueOf(LocalDate.of(2000, 1, 1)));
oliver.setDateOfBirth(Date.valueOf(LocalDate.of(2003, 5, 1)));

List<User> users = predicateExecutor.findAll(QUser.user.dateOfBirth.yearMonth().asc());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@

import static org.assertj.core.api.Assertions.*;

import java.sql.Date;
import java.util.List;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import org.joda.time.LocalDate;
import java.time.LocalDate;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
Expand Down Expand Up @@ -257,9 +258,9 @@ void sortByNestedEmbeddedAttribute() {
@Test // DATAJPA-566, DATAJPA-635
void shouldSupportSortByOperatorWithDateExpressions() {

carter.setDateOfBirth(new LocalDate(2000, 2, 1).toDate());
dave.setDateOfBirth(new LocalDate(2000, 1, 1).toDate());
oliver.setDateOfBirth(new LocalDate(2003, 5, 1).toDate());
carter.setDateOfBirth(Date.valueOf(LocalDate.of(2000, 2, 1)));
dave.setDateOfBirth(Date.valueOf(LocalDate.of(2000, 1, 1)));
oliver.setDateOfBirth(Date.valueOf(LocalDate.of(2003, 5, 1)));

List<User> users = repository.findAll(QUser.user.dateOfBirth.yearMonth().asc());

Expand Down
1 change: 0 additions & 1 deletion template.mf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ Import-Template:
org.aspectj.*;version="${aspectj:[=.=.=,+1.0.0)}";resolution:=optional,
org.eclipse.persistence.*;version="${eclipselink:[=.=.=,+1.0.0)}";resolution:=optional,
org.hibernate.*;version="[3.6.10,4.4.0)";resolution:=optional,
org.joda.time.*;version="${jodatime:[=.=.=,+1.0.0)}";resolution:=optional,
org.slf4j.*;version="${slf4j:[=.=.=,+1.0.0)}",
org.springframework.*;version="${spring:[=.=.=.=,+1.1.0)}",
org.springframework.beans.factory.aspectj;version="${spring:[=.=.=.=,+1.1.0)}";resolution:=optional,
Expand Down