Skip to content
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

Fix PrivilegedAction proxy signature #21

Merged
merged 1 commit into from
Sep 26, 2024
Merged

Conversation

puredanger
Copy link
Contributor

PrivilegedAction.run() is a 0-arity and proxy methods don't take a this like protocol/reify functions do.

PrivilegedAction.run() is a 0-arity and proxy methods don't take a `this` like protocol/reify functions do.
@puredanger
Copy link
Contributor Author

If you call clean in the repl, you can see it will fail at runtime. Found this while doing some regression testing on Clojure 1.12 stuff (where it gets found at compile time).

@quoll
Copy link
Owner

quoll commented Sep 26, 2024

Thanks for calling this out!
On the run method, that's on me. That was a braino where I was thinking it was binding to this. I'd forgotten that's not how proxy works.
It's relevant to older versions of Java (on Windows only. The Linux JVM did not need this), and really not so appropriate now. I think it can go away, but I'll need to confirm that I don't need some kind of contemporary equivalent.

@quoll quoll merged commit ea5c70d into quoll:main Sep 26, 2024
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.

2 participants