Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: 1.2
-
Fix Version/s: None
-
Component/s: stub generation
-
Labels:None
-
Testcase included:yes
-
Number of attachments :
Description
I have a test, which looks like this:
@Test(expected = IllegalArgumentException)
void shouldFailOnDifferentCurrencies() {
// impl
}
This results in the following error message when using the GMaven-1.2 stub compiler:
symbol : variable IllegalArgumentException location: class com.nidera.softmar.abw.gl.preprocessor.MultiCurrencyPreprocessorTest
In my IDE (IntelliJ 9.0.3) this works however, which leads me to believe this is quite valid. Adding a .class suffix to the expected class fixes this, but I guess that this is an issue in the stub generation.
Issue Links
- depends upon
-
GROOVY-4354
Stub Generator does not add .class for classes in annotations
-
It's likely that this is a bug in groovyc's stub generator and not GMaven's fault. To verify, check "IDEA -> Preferences -> Compiler -> Groovy Compiler -> Use groovyc's native stub generator" and see if you get the same error in IDEA. By default, IDEA uses its own stub generator, which is more mature than Groovy's.
Meanwhile, are you sure you need stub generation for your tests (i.e. do you have Java->Groovy dependencies in your tests)?