Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug when using javapoet with Eclipse compiler #303

Closed
wants to merge 6 commits into from
Closed

Fix bug when using javapoet with Eclipse compiler #303

wants to merge 6 commits into from

Commits on Jul 6, 2015

  1. Fix bug when using javapoet with Eclipse compiler

    For the following code:
    
    public interface Interface1 {}
    public interface Interface 2 {}
    public T myMethod(T input) {}
    
    a code generator (javax.annotation.processing.Processor) in eclipse will have a TypeVariable for the return type T instead of a DeclaredType.
    
    This results in a stack overflow exception, because the return value of Collections.singletonList(upperBound) ends up returning a list containing, in essence, the input parameter.
    marcosb committed Jul 6, 2015
    Configuration menu
    Copy the full SHA
    eca5711 View commit details
    Browse the repository at this point in the history

Commits on Jul 7, 2015

  1. Broke a test

    Fixes TypesTest#getTypeVariableTypeMirror
    marcosb committed Jul 7, 2015
    Configuration menu
    Copy the full SHA
    803ba8d View commit details
    Browse the repository at this point in the history
  2. Remove unnecessary list copy

    Did a copy-paste from TypeKind.DECLARED and missed that there's no need to re-create a list here.
    marcosb committed Jul 7, 2015
    Configuration menu
    Copy the full SHA
    ec0d96d View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2015

  1. Re-thinking type variable bounds

    If TypeParameterElement#getBounds does the trick, why complicate it?  This works both in eclipse as well as javac.
    marcosb committed Jul 10, 2015
    Configuration menu
    Copy the full SHA
    17d0bc7 View commit details
    Browse the repository at this point in the history
  2. Fix compile errors from unused imports

    marcosb committed Jul 10, 2015
    Configuration menu
    Copy the full SHA
    2878677 View commit details
    Browse the repository at this point in the history
  3. Update javadoc

    marcosb committed Jul 10, 2015
    Configuration menu
    Copy the full SHA
    f1c0fc9 View commit details
    Browse the repository at this point in the history