Fix a logic to find common package name#147
Fix a logic to find common package name#147sakuna63 wants to merge 3 commits intof2prateek:masterfrom sakuna63:master
Conversation
|
@sakuna63 can you 1-2 tests ? Ideally a test that would break before and the would now be green with your PR. Then we can merge it. Thx a lot ! |
|
@stephanenicolas the issue is that if we have following classes henson-processor find So I fix the issues and add test. Could you review new commits? |
|
Oh...CI fails 😩 I'll try to fix it. |
| .generatesSources(expectedSource1); | ||
| } | ||
|
|
||
| @Test public void samePackage() throws Exception { |
There was a problem hiding this comment.
we should add unit tests for the code you added. Not a generator test to test a lookup method in package name..
| @@ -137,16 +140,36 @@ private String findCommonPackage(Collection<InjectionTarget> targets) { | |||
|
|
|||
| private String findCommonPackage(String commonPackageName, String packageName) { | |||
There was a problem hiding this comment.
this is the method that you should test, in a unit test.
|
We don't understand. can't we do something a bit simpler. For instance:
This is much simpler and with unit tests it would be accepted. Are you interested ? |
|
@sakuna63 @stephanenicolas Any news? |
|
@sakuna63 can you test if the issue happens with the latest release 3.0.1? |
Henson failed to find common package name when we have some classes annotated
@InjectExtrain different packages.e.g.
If we have following classes
henson-processor find
com.example..as common package name and outputs following error