-
Notifications
You must be signed in to change notification settings - Fork 888
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RESTEASY-3081] using Cookie.Builder and NewCookie.Builder
- Loading branch information
Showing
19 changed files
with
267 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
resteasy-core/src/main/java/org/jboss/resteasy/util/CookieUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package org.jboss.resteasy.util; | ||
|
||
import jakarta.ws.rs.ext.RuntimeDelegate; | ||
|
||
public class CookieUtil { | ||
/******* | ||
public static NewCookie valueOf(final Class<NewCookie> clazz, final String value) { | ||
return RuntimeDelegate.getInstance() | ||
.createHeaderDelegate(clazz) | ||
.fromString(value); | ||
} | ||
public static Cookie valueOf(final Class<Cookie> clazz, final String value) { | ||
return RuntimeDelegate.getInstance() | ||
.createHeaderDelegate(clazz) | ||
.fromString(value); | ||
} | ||
*********/ | ||
|
||
/** | ||
* Utility to replace deprectated method Cookie.valueOf | ||
* | ||
* @param clazz must be of type NewCookie or Cookie | ||
* @param value | ||
* @param <S> | ||
* @return | ||
*/ | ||
public static <S> S valueOf(final Class<S> clazz, final String value) { | ||
return RuntimeDelegate.getInstance() | ||
.createHeaderDelegate(clazz) | ||
.fromString(value); | ||
} | ||
|
||
/** | ||
* | ||
* @param clazz | ||
* @param value | ||
* @param <S> | ||
* @return | ||
*/ | ||
public static <S> String toString(final Class<S> clazz, final S value) { | ||
return RuntimeDelegate.getInstance() | ||
.createHeaderDelegate(clazz) | ||
.toString(value); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.