Merge pull request #10382 from DSpace/backport-10381-to-dspace-8_x

[Port dspace-8_x] Remove unused/unnecessary dependencies : `byte-buddy` and `joda-time`
This commit is contained in:
Tim Donohue
2025-02-10 14:03:38 -06:00
committed by GitHub
2 changed files with 2 additions and 14 deletions

View File

@@ -8,6 +8,7 @@
package org.dspace.access.status;
import java.sql.SQLException;
import java.time.Instant;
import java.util.Date;
import java.util.List;
import java.util.Objects;
@@ -26,7 +27,6 @@ import org.dspace.content.service.ItemService;
import org.dspace.core.Constants;
import org.dspace.core.Context;
import org.dspace.eperson.Group;
import org.joda.time.LocalDate;
/**
* Default plugin implementation of the access status helper.
@@ -230,7 +230,7 @@ public class DefaultAccessStatusHelper implements AccessStatusHelper {
// If the policy is not valid there is an active embargo
Date startDate = policy.getStartDate();
if (startDate != null && !startDate.before(LocalDate.now().toDate())) {
if (startDate != null && !startDate.before(Date.from(Instant.now()))) {
// There is an active embargo: aim to take the shortest embargo (account for rare cases where
// more than one resource policy exists)
if (embargoDate == null) {

12
pom.xml
View File

@@ -1538,11 +1538,6 @@
<artifactId>commons-validator</artifactId>
<version>1.9.0</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.13.0</version>
</dependency>
<dependency>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
@@ -1808,13 +1803,6 @@
<artifactId>jakarta.annotation-api</artifactId>
<version>${jakarta-annotation.version}</version>
</dependency>
<!-- mockito-inline and hibernate-ehcache pull in different versions of byte-buddy. Specify which we want. -->
<!-- TODO: We might be able to remove this after hibernate-ehcache is replaced by hibernate-jcache -->
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<version>1.16.1</version>
</dependency>
</dependencies>
</dependencyManagement>