Comments (6)
There's a couple of bugs in annotation parsing in JDK itself. You can find some more info here: http://stackoverflow.com/questions/39952812/why-annotation-on-generic-type-argument-is-not-visible-for-nested-type
I believe it was fixed in JDK 12, but I'm not 100% sure...
from geantyref.
@kaqqao
Oh, it turned out to be a jdk bug, I hope jdk can fix this bug as soon as possible. Thank you very much for your reply.
from geantyref.
No worries :)
Did you verify if it's fixed in newer JDK perhaps?
from geantyref.
I just found this problem in jdk1.8. When I have time, I may download the latest jdk to verify this problem, but what confuses me is how to solve this problem if you have to use jdk1.8.
from geantyref.
You can't fix it... But you can use TypeFactory
to produce the types instead of using the TypeToken
. Another way is to define all classes at the top level, that seems to dodge the bug. You might also need to declare the types produced by TypeToken
as static class fields.
from geantyref.
thanks.:smile:
from geantyref.
Related Issues (18)
- Add support for Java 8 AnnotatedType HOT 1
- No module name described in MANIFEST HOT 4
- Unexpected exception when erasing method return type from a wildcard generic class HOT 2
- GenericTypeReflector.transform visitor visitVariable cannot change type away from variable type HOT 3
- TypeVisitor has protected method that refers to package-private type
- Add a way to resolve bounded types directly HOT 2
- Type parameters don't resolve when enclosing class has a type parameter HOT 4
- Calling hashCode on two equal `TypeToken`s returns different results HOT 2
- getExactParameterTypes() for constructors HOT 1
- reduceBounded StackOverflowError with self-recursing capture HOT 12
- compiling with JDK 11 leads to test failures
- ParameterizedTypeImpl `toString()` method returns wrong method name for nested classes HOT 1
- Current trunk does not build for JDK 11 and has test failures for JDK 8 HOT 9
- Implement getAnnotatedOwnerType() added in JDK9
- Provide a more general type resolution facility HOT 1
- GenericTypeReflector.annotate adds invalid annotations HOT 6
- Mitigate Java's annotation parser bug where possible
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geantyref.