[ 
https://issues.apache.org/jira/browse/GROOVY-11706?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18003742#comment-18003742
 ] 

Jochen Theodorou commented on GROOVY-11706:
-------------------------------------------

hmm...

public interface Afik05i</*@NotNull*/ T0 extends @NotNull Object, /*@NotNull*/ 
T1 extends @NotNull Object, /*@NotNull*/ T2 extends @NotNull Object> 

here the /*@NotNull*/ are very much for type parameters, which is not included 
in the targets of the annotation. Uncommenting those would lead to compilation 
errors. I am unsure about the @NotNull Object if that is supposed to be a type 
or is still a type parameter. 

public abstract @Nullable T0 k77OuG(/*@NotNull*/ Object unE1QEP);

Here the  @Nullable T0 should be ok, and uncommenting /*@NotNull*/ Object 
should be also ok.
Other examples are similar.  

>From what I can see Java actually agrees with the "extends Object" part not 
>beeing targetable by that annotation.

But that it works for the CLI and not for the programmatic use, with the same 
version of Groovy cannot be... unless.. as I said the CLI usage does not see 
these annotations at all. You should triple check that.


> How to run Groovy compiler via class loader without altering thread context 
> classloader?
> ----------------------------------------------------------------------------------------
>
>                 Key: GROOVY-11706
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11706
>             Project: Groovy
>          Issue Type: Question
>          Components: Compiler
>            Reporter: Xiaotian Ma
>            Priority: Major
>         Attachments: screenshot-1.png
>
>
> When using direct reflection access to the main method of the 
> FileSystemCompiler class, some transformer classes do not seem to load 
> correctly. (The error is: Could not find class for Transformation Processor 
> org.codehaus.groovy.transform.trait.TraitASTTransformation declared by 
> groovy.transform.Trait)
> My original requirement was to use code instead of accessing multiple Groovy 
> compilers simultaneously from the command line. Since different versions 
> cannot coexist, I need to use classLoader to isolate them.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to