Skip to content

Commit 8b7d1b3

Browse files
author
Oli B
committed
back to Java 17
1 parent dbe8416 commit 8b7d1b3

File tree

3 files changed

+10
-15
lines changed

3 files changed

+10
-15
lines changed

addressbook/pom.xml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,9 @@
8181
<dependency>
8282
<groupId>org.eclipse.persistence</groupId>
8383
<artifactId>eclipselink</artifactId>
84-
<version>2.6.9</version>
84+
<version>2.7.15</version>
8585
<scope>compile</scope>
8686
</dependency>
87-
<dependency>
88-
<groupId>javax.persistence</groupId>
89-
<artifactId>persistence-api</artifactId>
90-
<version>[1.0,1.1)</version>
91-
</dependency>
9287
<dependency>
9388
<groupId>org.jugs.webdav</groupId>
9489
<artifactId>webdav-jaxrs</artifactId>

addressbook/src/main/java/org/jugs/webdav/addressbook/AddressBook.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,17 @@
1919

2020
package org.jugs.webdav.addressbook;
2121

22-
import org.jugs.webdav.jaxrs.methods.*;
23-
import org.jugs.webdav.jaxrs.xml.elements.*;
24-
import org.jugs.webdav.jaxrs.xml.properties.*;
25-
26-
import javax.persistence.*;
27-
import jakarta.ws.rs.OPTIONS;
2822
import jakarta.ws.rs.*;
2923
import jakarta.ws.rs.core.Context;
3024
import jakarta.ws.rs.core.HttpHeaders;
3125
import jakarta.ws.rs.core.MediaType;
3226
import jakarta.ws.rs.core.UriInfo;
3327
import jakarta.ws.rs.ext.Providers;
28+
import org.jugs.webdav.jaxrs.methods.*;
29+
import org.jugs.webdav.jaxrs.xml.elements.*;
30+
import org.jugs.webdav.jaxrs.xml.properties.*;
31+
32+
import javax.persistence.*;
3433
import java.io.IOException;
3534
import java.io.InputStream;
3635
import java.lang.annotation.Annotation;
@@ -70,7 +69,8 @@ public final MultiStatus propfind(@Context final UriInfo uriInfo, @DefaultValue(
7069
return new MultiStatus(folder);
7170

7271
final Collection<Response> responses = new LinkedList<Response>(Collections.singletonList(folder));
73-
for (final Contact c : (List<Contact>) this.em().createNamedQuery("ListContacts").getResultList())
72+
TypedQuery<Contact> listContacts = this.em().createNamedQuery("ListContacts", Contact.class);
73+
for (final Contact c : listContacts.getResultList())
7474
responses.add(new Response(new HRef(uriInfo.getAbsolutePathBuilder().path(String.format("%s.adr", c.getMatchCode())).build()), null, null, null,
7575
new PropStat(new Prop(new MicrosoftRedirectorPatch2(), new DisplayName(String.format("%s %s", c.getLastName(), c.getFirstName())),
7676
new CreationDate(c.getCreationDate()), new GetLastModified(c.getLastModified()), new GetContentLength(0), new GetContentType(

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252

5353
<properties>
5454
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
55-
<maven.compiler.target>11</maven.compiler.target>
56-
<maven.compiler.source>11</maven.compiler.source>
55+
<maven.compiler.target>17</maven.compiler.target>
56+
<maven.compiler.source>17</maven.compiler.source>
5757
<jersey.version>3.1.9</jersey.version>
5858
<hamcrest.version>3.0</hamcrest.version>
5959
<junit.version>5.11.3</junit.version>

0 commit comments

Comments
 (0)