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

Workaround for Groovy bug #967

Closed
jjathman opened this issue Nov 10, 2015 · 3 comments
Closed

Workaround for Groovy bug #967

jjathman opened this issue Nov 10, 2015 · 3 comments

Comments

@jjathman
Copy link

There is a Groovy bug (https://issues.apache.org/jira/browse/GROOVY-6286) which is causing us problems. Basically if a top level class has a static method name that is exactly the same as an inner class, the code will fail. Would it be possible to add alternative method names to Hystrix setter calls as a workaround for this? Obviously Groovy should fix this issue but it seems like it's been a problem for a long time.

Code like this fails:
HystrixThreadPoolProperties.Setter()

Maybe something like this as an alternative method invocation:
HystrixThreadPoolProperties.setterInstance()

This is a problem for HystrixThreadPoolProperties and HystrixCommandProperties. Maybe other places as well.

@mattrjacobs
Copy link
Contributor

Just to be clear on what you're proposing, it would be the addition of new methods (like HystrixCommandProperties.defaultSetter(). Then your Groovy code could choose to invoke those new methods and existing applications using Hystrix would be unaffected?

@jjathman
Copy link
Author

Yeah that seems like the responsible choice if you were willing to add other methods for us. Just having a wrapper method which just turns around and calls the other would be perfect for us.

I'm curious if the Setter() method using a capital letter is a particular style at Netflix? Pretty uncommon to see capitalized method names which must be why this issue with Groovy isn't a bigger deal.

@mattrjacobs
Copy link
Contributor

That code style is not a standard, I'm not sure why that naming approach was chosen.

Can you take a look at #968 to make sure that's what you had in mind?

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

No branches or pull requests

2 participants