Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

Proxy config not quite right if mixing typeNames and types in proxyhint #629

Closed
aclement opened this issue Mar 18, 2021 · 4 comments
Closed
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@aclement
Copy link
Contributor

The order of types when creating a JDK Proxy matters, and it would normally respect the order in a ProxyHint expressed in either types= or typeNames=. But if you mix those and use a combination of typeNames= or types= the ordering is not as easily controllable in the resultant proxy-config.json.

@sdeleuze sdeleuze added the status: waiting-for-triage An issue we've not yet triaged or decided on label Mar 18, 2021
@sdeleuze
Copy link
Contributor

sdeleuze commented Mar 18, 2021

Maybe for proxies we should enforce and document types or typeNames not both?

@aclement
Copy link
Contributor Author

We could enforce sticking to one or the other but it feels nasty when you have the .class reference but are forced to write it as a string. After sleeping on it I had thought a simple order=N attribute in the hint annotation would work too.

@sdeleuze
Copy link
Contributor

As discussed, I am more in favor of enforcing and documenting types or typeNames, and raising an error message if both are defined. For TypeHint this would have been blocking, but for ProxyHint I think this is not common enough to deserve a more complex and not so obvious from a programming model perspective mechanism.

@sdeleuze sdeleuze added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Mar 19, 2021
@sdeleuze sdeleuze added this to the 0.9.2 milestone Mar 19, 2021
@aclement
Copy link
Contributor Author

aclement commented Apr 1, 2021

There is a predictable ordering but it will be subtle without hiding something in the javadocs that no-one will ever read. I've done the quick thing, we have other battles to fight. You'll get an early failure if mixing the styles in a proxy hint. As a bonus it will even ll tell you which type contained the hint ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: enhancement A general enhancement
Development

No branches or pull requests

2 participants