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

review1: fix generic type adapting #1275

Merged
merged 2 commits into from Apr 29, 2017

Conversation

Projects
None yet
3 participants
@pvojtechovsky
Collaborator

pvojtechovsky commented Apr 27, 2017

Here are fixed other bugs found during implementing of CtMethod#isOverriding(CtMethod).
Following problems are tested and fixed by this PR:

  • The generic types are now adapted recursive into actual type arguments. E.g. List<List<T>> is adapted to List<List<M>>
  • The generic types are now adapted recursive into their bounds. E.g. List<? extendsT> is adapted to List<? extends M>
  • The adapting of wildcard type E.g. List<? extendsT> does not fail with NullPointerException
  • The MethodTypingContext correctly detects isOverriding for child method whose generic types are replaced by concrete types.

@pvojtechovsky pvojtechovsky changed the title from fix generic type adapting to review1: fix generic type adapting Apr 27, 2017

@spoon-bot

This comment has been minimized.

Show comment
Hide comment
@spoon-bot

spoon-bot Apr 27, 2017

Collaborator

Revapi Analysis results

Old API: fr.inria.gforge.spoon:spoon-core:jar:5.7.0-20170427.191244-62

New API: fr.inria.gforge.spoon:spoon-core:jar:5.7.0-SNAPSHOT

Detected changes: 0.

Collaborator

spoon-bot commented Apr 27, 2017

Revapi Analysis results

Old API: fr.inria.gforge.spoon:spoon-core:jar:5.7.0-20170427.191244-62

New API: fr.inria.gforge.spoon:spoon-core:jar:5.7.0-SNAPSHOT

Detected changes: 0.

/**
* Implements common adapting algorithm of {@link ClassTypingContext} and {@link MethodTypingContext}
*/
abstract class AbstractTypingContext implements GenericTypeAdapter {

This comment has been minimized.

@monperrus

monperrus Apr 28, 2017

Collaborator

I like the package visibility

@monperrus

monperrus Apr 28, 2017

Collaborator

I like the package visibility

This comment has been minimized.

@pvojtechovsky

pvojtechovsky Apr 28, 2017

Collaborator

yes, it was intentional. This class is internal

@pvojtechovsky

pvojtechovsky Apr 28, 2017

Collaborator

yes, it was intentional. This class is internal

@spoon-bot

This comment has been minimized.

Show comment
Hide comment
@spoon-bot

spoon-bot Apr 28, 2017

Collaborator

Revapi Analysis results

Old API: fr.inria.gforge.spoon:spoon-core:jar:5.7.0-20170427.224507-63

New API: fr.inria.gforge.spoon:spoon-core:jar:5.7.0-SNAPSHOT

Detected changes: 0.

Collaborator

spoon-bot commented Apr 28, 2017

Revapi Analysis results

Old API: fr.inria.gforge.spoon:spoon-core:jar:5.7.0-20170427.224507-63

New API: fr.inria.gforge.spoon:spoon-core:jar:5.7.0-SNAPSHOT

Detected changes: 0.

@monperrus monperrus merged commit f993132 into INRIA:master Apr 29, 2017

4 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.009%) to 81.428%
Details
pull_request-INRIA-spoon-master-docker /tmp/tmpz2a6y5g5
Details
pull_request-INRIA-spoon-master-revapi /tmp/tmpqaj2cp90
Details
@monperrus

This comment has been minimized.

Show comment
Hide comment
@monperrus

monperrus Apr 29, 2017

Collaborator

thanks Pavel

Collaborator

monperrus commented Apr 29, 2017

thanks Pavel

@pvojtechovsky pvojtechovsky deleted the pvojtechovsky:fixGenericTypeAdapting branch Apr 30, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment