[MCOMPILER-498] Recompilation when class name doesn't match file name
T3rm1 opened MCOMPILER-498 and commented
The compiler plugin detects a file as stale whenever the class defined inside has a different name than the file.
Steps to reproduce:
Create a file named SpecialTest.java in directory {}foo{}.
Paste in following content:
package foo;
class UncommonTest {
}
class CommonTest {
}
Run mvn -X test-compile
It'll report on each invocation: [DEBUG] Stale source detected: F:\Git\bug\src\test\java\foo\SpecialTest.java
That's because the plugin is looking for a file {}SpecialTest.class{}.
This is a problem because it can easily happen that you have a typo in your class or file name so that they don't match.
No further details from MCOMPILER-498
Olivier Lamy commented
I would say what is the use case to have class name different from file name?
it's possible for sure but really sounds a bit weird way and generating so much possible issues ...