Closed sebawagner closed 3 years ago
Can this be merged? I don't see much risk in doing.
Hello @sebawagner,
it seems my English is not understandable
I see no need in these changes at this stage
additional constructor params are pure evil :( leading to the code like this: https://sonarcloud.io/project/issues?id=apache_openmeetings&resolved=false&rules=java%3AS107&types=CODE_SMELL
I would once again suggest you to create some sort of cluster ready code (in OM or separate repo) before refactoring OM code ....
Closed
Hello @sebawagner,
it seems my English is not understandable
I see no need in these changes at this stage
additional constructor params are pure evil :( leading to the code like this: https://sonarcloud.io/project/issues?id=apache_openmeetings&resolved=false&rules=java%3AS107&types=CODE_SMELL
I would once again suggest you to create some sort of cluster ready code (in OM or separate repo) before refactoring OM code ....
Arguing that with the number of parameters initialising dependencies of a class via constructor is a "code-smell" it sounds far fetched. That is basically why you have @Autowired and other annotations, so that the constructor doesn't get too big. But the problem with those classes are that they are not beans.
They are a mix of "behaviour" and "storage" which is the nature of the problem why you need some strange constructs in order to load dependencies into them.
Behaviour should be in Controllers. Holding information should be DTOs. Mixing them leads to issues. Which is one of the reasons why it would be good to refactor this part of the code.
They are a mix of "behaviour" and "storage" which is the nature of the problem why you need some strange constructs in order to load dependencies into them.
Behaviour should be in Controllers. Holding information should be DTOs. Mixing them leads to issues. Which is one of the reasons why it would be good to refactor this part of the code.
In such case we can
I can do some investigation on this should not take too much time :)))
will write back here :)
@sebawagner I was able to perform @Autowire
'ing for KStream
using @Configurable
(IApplication.getBean
works as expected but it is "less magical" :)))
I can create dumb PR with PoC Or can commit the real code
what do you prefer?
Move:
I think it makes it actually quite a lot easier.