From c8567d49a54cf58ebee6c71cc8a7371c440bda3a Mon Sep 17 00:00:00 2001 From: Julian Kniephoff Date: Mon, 17 Jun 2024 15:10:44 +0200 Subject: [PATCH] Address review comments --- .../org/opencast/annotation/endpoint/TestRestService.java | 6 ++++-- pom.xml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/opencast-backend/annotation-impl/src/test/java/org/opencast/annotation/endpoint/TestRestService.java b/opencast-backend/annotation-impl/src/test/java/org/opencast/annotation/endpoint/TestRestService.java index 12d92735b..9139ea847 100644 --- a/opencast-backend/annotation-impl/src/test/java/org/opencast/annotation/endpoint/TestRestService.java +++ b/opencast-backend/annotation-impl/src/test/java/org/opencast/annotation/endpoint/TestRestService.java @@ -26,8 +26,10 @@ import org.opencastproject.security.api.AuthorizationService; import org.opencastproject.security.api.DefaultOrganization; import org.opencastproject.security.api.SecurityService; +import org.opencastproject.security.api.UnauthorizedException; import org.opencastproject.security.api.User; import org.opencastproject.security.util.SecurityUtil; +import org.opencastproject.util.NotFoundException; import org.easymock.EasyMock; import org.junit.Ignore; @@ -44,7 +46,7 @@ public class TestRestService extends AbstractExtendedAnnotationsRestService { // Haven't found out who's responsible forf this but that's the way it is. public static final ExtendedAnnotationServiceJpaImpl extendedAnnotationService = new ExtendedAnnotationServiceJpaImpl(); - static { + static { extendedAnnotationService.setSearchService(getSearchService()); extendedAnnotationService.setSecurityService(getSecurityService()); extendedAnnotationService.setAuthorizationService(getAuthorizationService()); @@ -90,7 +92,7 @@ private static SearchService getSearchService() { SearchService searchService = EasyMock.createNiceMock(SearchService.class); try { EasyMock.expect(searchService.get(EasyMock.anyObject(String.class))).andReturn(mediaPackage).anyTimes(); - } catch (Exception e) { + } catch (UnauthorizedException | NotFoundException e) { // Do nothing. We just have to pretend to handle checked exceptions somehow to appease the compiler. } EasyMock.replay(searchService); diff --git a/pom.xml b/pom.xml index 381f23e8c..c7118be66 100644 --- a/pom.xml +++ b/pom.xml @@ -67,7 +67,7 @@ UTF-8 - 16-SNAPSHOT + 16.0 ;version=16.0