[
https://issues.apache.org/jira/browse/GROOVY-10996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17712835#comment-17712835
]
Marat Kamalov commented on GROOVY-10996:
----------------------------------------
I hope this message finds you well. I wanted to share some information about a
Maven project I created for you that includes JUnit tests, specifically
regarding the Groovy classes Service1, Service2, Service3, and Service4. See
attached file: [^groovy_bug.zip]
It appears that there might be a bug related to the import of classes with
different package names. For instance, you mentioned that while a class with a
simple name and import (Service4) works, a class with the same type but with a
full package name defined does not work. This discrepancy could indicate a
potential issue with the import statement or package declaration in your code.
I hope this information is helpful in troubleshooting the bug you encountered.
If you need further assistance or have any other questions, please feel free to
ask.
Apologies for any inconvenience caused by the formatting of my code. Due to
time constraints, I was unable to thoroughly format it.
> Compilation issue in Groovy 4
> -----------------------------
>
> Key: GROOVY-10996
> URL: https://issues.apache.org/jira/browse/GROOVY-10996
> Project: Groovy
> Issue Type: Bug
> Components: Compiler
> Reporter: Marat Kamalov
> Priority: Major
> Attachments: groovy_bug.zip
>
>
> We migrate the application to Groovy 4 and got an issue:
> 1) We use GroovyClassLoader to load *.groovy written classes to a classloader
> 2) Before the migration we used Groovy 3.0.15.
> 3) After the migration to 4.0.10 I've got the following error:
> {code:java}
> Only classes and closures can be used for attribute 'value' in
> @org.openl.rules.ruleservice.core.annotations.ServiceExtraMethod
> @ line 18, column 30.
> @ServiceExtraMethod(value =
> org.openl.generated.services.ServiceExtraMethodHandler2Impl.class)
> ^ {code}
> 4) If the annotation definition changed from @ServiceExtraMethod(value =
> org.openl.generated.services.ServiceExtraMethodHandler2Impl.class) to
> @ServiceExtraMethod(value =
> org.openl.generated.services.ServiceExtraMethodHandler2Impl) then the code is
> compiled successfully.
> Why does the compilation start to fail with .class? I can't reproduce the
> same issue on IntelliJ IDEA.
> Can you suggest what to try? Is it expected for Groovy to stop supporting
> .class in Groovy 4?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)