Skip to content

Commit

Permalink
resolve compile warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
rsearls committed Jun 8, 2021
1 parent c146217 commit 4f4d29f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
Expand Up @@ -5,6 +5,7 @@
import org.jboss.resteasy.util.MediaTypeHelper;
import org.jboss.resteasy.util.ReadFromStream;

import jakarta.ws.rs.ext.RuntimeDelegate;
import jakarta.ws.rs.client.ClientRequestContext;
import jakarta.ws.rs.client.ClientRequestFilter;
import jakarta.ws.rs.client.ClientResponseContext;
Expand Down Expand Up @@ -132,7 +133,9 @@ public void updateOnNotModified(ClientRequestContext request, BrowserCache.Entry

if (cc != null)
{
CacheControl cacheControl = CacheControl.valueOf(cc);
CacheControl cacheControl = RuntimeDelegate.getInstance()
.createHeaderDelegate(CacheControl.class)
.fromString(cc);
if (cacheControl.isNoCache())
{
useCacheEntry(response, old);
Expand Down Expand Up @@ -188,7 +191,9 @@ public void cacheIfPossible(ClientRequestContext request, ClientResponseContext

if (cc != null)
{
CacheControl cacheControl = CacheControl.valueOf(cc);
CacheControl cacheControl = RuntimeDelegate.getInstance()
.createHeaderDelegate(CacheControl.class)
.fromString(cc);
if (cacheControl.isNoCache()) return;
expires = cacheControl.getMaxAge();
}
Expand Down
Expand Up @@ -6,6 +6,7 @@
import org.jboss.resteasy.util.MediaTypeHelper;
import org.jboss.resteasy.util.WeightedLanguage;

import jakarta.ws.rs.ext.RuntimeDelegate;
import jakarta.ws.rs.core.CacheControl;
import jakarta.ws.rs.core.Cookie;
import jakarta.ws.rs.core.HttpHeaders;
Expand Down Expand Up @@ -303,7 +304,9 @@ public Map<String, Cookie> getCookies()
else
{
String str = configuration.toHeaderString(obj);
Cookie cookie = Cookie.valueOf(str);
Cookie cookie = RuntimeDelegate.getInstance()
.createHeaderDelegate(Cookie.class)
.fromString(str);
cookies.put(cookie.getName(), cookie);
}
}
Expand Down
Expand Up @@ -33,16 +33,24 @@ public class Netty4ApplicationPathTest
@ApplicationPath("/rest-test")
public static class TestApplication extends Application
{
private final Set<Object> singletons = new HashSet<>();
private final Set<Class<?>> singletons = new HashSet<>();

public TestApplication()
{
singletons.add(new EchoService());
singletons.add(EchoService.class);
}

@Override
public Set<Object> getSingletons()
{
public Set<Object> getSingletons() {
Set<Object> tmp = new HashSet<>();
for (Class<?> clazz : singletons) {
tmp.add(clazz);
}
return tmp;
}

@Override
public Set<Class<?>> getClasses() {
return singletons;
}
}
Expand Down

0 comments on commit 4f4d29f

Please sign in to comment.