-
-
Notifications
You must be signed in to change notification settings - Fork 429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[oauth] Fix InaccessibleObjectException
#3449
Conversation
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/oh4-0-0-snapshot-and-m1-google-tts-exception/145046/17 |
Will this change cause everybody having to setup new tokens or can it be made backwards compatible? |
Backwards compatibility should already be ensured by fallback to Lines 244 to 250 in 73b8a3a
|
3f6a1e2
to
510c75c
Compare
Signed-off-by: Jacob Laursen <[email protected]>
510c75c
to
4d65083
Compare
I have tested with the Miele Cloud binding. StorageHandler.For.OAuthClientService.json differences Before: (4.0 and 3.4.x) "[email protected]": {
"class": "java.lang.String",
"value": "{\n \"date\": {\n \"year\": 2023,\n \"month\": 3,\n \"day\": 14\n },\n \"time\": {\n \"hour\": 23,\n \"minute\": 47,\n \"second\": 1,\n \"nano\": 502530800\n }\n}"
}, Now: (this PR)
For backwards compatibility we might need to be able to deserialize something like "{\n "date": {\n "year": 2023,\n "month": 3,\n "day": 14\n },\n "time": {\n "hour": 23,\n "minute": 47,\n "second": 1,\n "nano": 502530800\n }\n}" also. |
It seems to be handled here already (now changed to Lines 308 to 314 in c05fe8a
|
The exceptions reported in the linked issue are fixed, so I'm marking this as ready for review. There are still some issues being sorted out (see details in the issue), but at this point I think it's unrelated and should not block the fixes provided here any longer. |
The fix has now been tested and confirmed by the user. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👍
Signed-off-by: Jacob Laursen <[email protected]> GitOrigin-RevId: 3e1c0b3
This fixes a regression from #3083 and #2994 since JDK internals are now strongly encapsulated. The first mentioned PR removed the type adapter for
LocalDateTime
, which ultimately lead to the issue when Java 17 was introduced.Since type adapters already exist for
Instant
, theInaccessibleObjectException
has been fixed by refactoring remainingLocalDateTime
s toInstant
.JAR: org.openhab.core.auth.oauth2client-4.0.0-SNAPSHOT.jar
Fixes #3447