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

setter for Navigator is not available in ContextSupport Class #10

Open
UsharaniMarappan opened this issue Jun 26, 2018 · 7 comments
Open

Comments

@UsharaniMarappan
Copy link

No description provided.

@UsharaniMarappan UsharaniMarappan changed the title setter for Navigator is not available in ContextSupport setter for Navigator is not available in ContextSupport Class Jun 26, 2018
@elharo
Copy link
Contributor

elharo commented Jun 26, 2018

Can you elaborate? I.e. what is the problem you're trying to solve here?

@UsharaniMarappan
Copy link
Author

The problem is we cannot use ContextSupport in JEE environment to let container manage the object creation via @Inject and set the attributes later in the code.
If you see ContextSupport class, there are four attributes functionContext, namespaceContext, variableContext and navigator. There is a default constructor and a specific constructor with all the four attributes. I am using default constructor in a JEE environment as I want container to manage the object creation rather than using new keyword. There is a setter for the first three attributes and setter is missing for navigator.
Is there any reason that navigator should not be used when ContextSupport is created via default constructor?

@elharo
Copy link
Contributor

elharo commented Jun 27, 2018

OK, that's plausible. I'm going to need to dig a little deeper and think about this. Adding mutability is not something we can take lightly.

@elharo
Copy link
Contributor

elharo commented Jun 27, 2018

I wonder if there's anywhere we use the no-args ContextSupport constructor? It doesn't seem very useful without this setter.

@UsharaniMarappan
Copy link
Author

yes, no-arg constructor is not useful without this setter.
I hope you are not planning to remove this constructor as this is required to use in JEE env.

@UsharaniMarappan
Copy link
Author

Adding a setter for navigator should not impact mutability of this class as that class already holds three setters.

@UsharaniMarappan
Copy link
Author

Regarding unit test, I dont see any value for a setter. Anyway, if you insist I can write.

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 a pull request may close this issue.

2 participants