Commit 272d704
Fix Java 8 build: use URLEncoder String charset
The follow-up that pre-encodes the OIDC form params changed
urlEncode() to URLEncoder.encode(value, StandardCharsets.UTF_8).
That Charset overload is @SInCE 10, so the source-of-truth JDK 8
build fails to compile: "incompatible types: Charset cannot be
converted to String" at OidcDeviceAuth.java:896.
Revert urlEncode() to the Java 8 String-charset form,
URLEncoder.encode(value, "UTF-8") with the
UnsupportedEncodingException catch, and drop the now-unused
StandardCharsets import. The constructor-time pre-encoding of
clientId/scope/audience/device_code is unchanged.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 8d38d4f commit 272d704
1 file changed
Lines changed: 8 additions & 3 deletions
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | | - | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
892 | 892 | | |
893 | 893 | | |
894 | 894 | | |
895 | | - | |
896 | | - | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
897 | 902 | | |
898 | 903 | | |
899 | 904 | | |
| |||
0 commit comments