Skip to content

fix mismatched types for invokeExact. Have to tell invokeExact what type we are expecting#2589

Merged
davecramer merged 1 commit into
pgjdbc:masterfrom
davecramer:fixinvokeExact
Aug 15, 2022
Merged

fix mismatched types for invokeExact. Have to tell invokeExact what type we are expecting#2589
davecramer merged 1 commit into
pgjdbc:masterfrom
davecramer:fixinvokeExact

Conversation

@davecramer

Copy link
Copy Markdown
Member

fixes issue #2588

@davecramer davecramer merged commit abf3bcb into pgjdbc:master Aug 15, 2022
@davecramer davecramer deleted the fixinvokeExact branch August 15, 2022 12:37
@davecramer

Copy link
Copy Markdown
Member Author

Hmmm AccessControlContext is deprecated in 17 so javadoc fails.

@vlsi

vlsi commented Aug 15, 2022

Copy link
Copy Markdown
Member

The workaround it is to remove import statement and replace it with fully-qualified class name. Then SuppressWarnings annotation on method would allow suppressing the warning.

However, if AccessControlContext is removed, we won't be able to compile the code.

Should we remove MethodHandle and replace it with regular reflection then?

@davecramer

Copy link
Copy Markdown
Member Author

I was about to push exactly the above fix to get this to work.
So I'll push this and then release so the issue can be resolved
We are going to have to rewrite all of this eventually when they remove it.

@Rob4001

Rob4001 commented Aug 15, 2022

Copy link
Copy Markdown

Sorry, Been trying to get this working within constraints of work policies...
The original change does seem to get past the original issue but the SUBJECT_DO_AS reflection is fetching the wrong method signature, still working on it but I think it needs to be PriviledgedAction instead of PriviledgedExceptionAction

@Rob4001

Rob4001 commented Aug 15, 2022

Copy link
Copy Markdown

Also noticed that "subjectCallAs" is never set

@vlsi

vlsi commented Aug 15, 2022

Copy link
Copy Markdown
Member

Let's resort to a regular reflection then. Apparently, MethodHandle-related code seems too brittle :-/

@davecramer

Copy link
Copy Markdown
Member Author

OK, let me undo that merge then

@davecramer

Copy link
Copy Markdown
Member Author

Since I have merged code I can't revert this easily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants