Merge pull request #10381 from tdonohue/remove_unused_deps

Remove unused/unnecessary dependencies : `byte-buddy` and `joda-time`
This commit is contained in:
Tim Donohue
2025-02-10 11:28:25 -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; package org.dspace.access.status;
import java.sql.SQLException; import java.sql.SQLException;
import java.time.Instant;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
@@ -26,7 +27,6 @@ import org.dspace.content.service.ItemService;
import org.dspace.core.Constants; import org.dspace.core.Constants;
import org.dspace.core.Context; import org.dspace.core.Context;
import org.dspace.eperson.Group; import org.dspace.eperson.Group;
import org.joda.time.LocalDate;
/** /**
* Default plugin implementation of the access status helper. * 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 // If the policy is not valid there is an active embargo
Date startDate = policy.getStartDate(); 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 // There is an active embargo: aim to take the shortest embargo (account for rare cases where
// more than one resource policy exists) // more than one resource policy exists)
if (embargoDate == null) { if (embargoDate == null) {

12
pom.xml
View File

@@ -1539,11 +1539,6 @@
<artifactId>commons-validator</artifactId> <artifactId>commons-validator</artifactId>
<version>1.9.0</version> <version>1.9.0</version>
</dependency> </dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.13.0</version>
</dependency>
<dependency> <dependency>
<groupId>jakarta.activation</groupId> <groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId> <artifactId>jakarta.activation-api</artifactId>
@@ -1804,13 +1799,6 @@
<artifactId>jakarta.annotation-api</artifactId> <artifactId>jakarta.annotation-api</artifactId>
<version>${jakarta-annotation.version}</version> <version>${jakarta-annotation.version}</version>
</dependency> </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> </dependencies>
</dependencyManagement> </dependencyManagement>