Comments (12)
From the jackson-core thread it seems like I have to find a way to deserialize from a Type
without creating a TypeReference
.
from autorest-clientruntime-for-java.
I'm planning to ship 1.0.0 tomorrow!
from autorest-clientruntime-for-java.
I opened FasterXML/jackson-core#347 to track it also on Jackson side based on this elastic/elasticsearch#22679 (comment).
from autorest-clientruntime-for-java.
Just out of curiosity, does guava's new TypeToken()
constructor have similar issues? like this: https://github.com/Azure/azure-sdk-for-java/blob/master/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachinesInner.java#L474
from autorest-clientruntime-for-java.
Thanks!
from autorest-clientruntime-for-java.
I know this is a late comment, but looking at the original question I am wondering why the code does not use:
mapper.constructType(type)
to get JavaType
to pass instead of TypeReference
. This would probably hit the same problem, of course, but is bit more straightforward to use. Use of TypeReference
here does not achieve anything as it is meant to pass compile-time signature which is not being passed here.
from autorest-clientruntime-for-java.
Ha! @cowtowncoder we just started using that a couple days ago: https://github.com/Azure/autorest-clientruntime-for-java/blob/master/client-runtime/src/main/java/com/microsoft/rest/serializer/JacksonAdapter.java#L118
from autorest-clientruntime-for-java.
@jianghaolu Ah ok. Makes more sense!
from autorest-clientruntime-for-java.
@cowtowncoder I don't see any underlying calls to getGenericSuperclass()
in constructing the JavaType
, which was what's causing the problem according to elastic/elasticsearch#22679 (comment).
from autorest-clientruntime-for-java.
@jianghaolu There should be calls, indirectly, since that is the only way to resolve generic type parameterization, but it is possible that the problem only occurs for some specific case: that is, many/most calls to getGenericSuperclass()
should work just fine. For example, perhaps issues are related to non-static inner-classes, like what occurs with sub-classing of TypeReference
as anonymous inner class.
from autorest-clientruntime-for-java.
@cowtowncoder make sense. I'll keep it as this unless the problem isn't resolved or re-occurs. Thanks for your input!
from autorest-clientruntime-for-java.
@jianghaolu Do you plan to release a new Beta version of this module?
from autorest-clientruntime-for-java.
Related Issues (20)
- Missing Thread#sleep call in the ExponentialBackoffRetryStrategy implementation? HOT 1
- Dependency Upgrade to fix CVE Vulnerabilities
- [BUG] FlatteningSerializer breaks "." in key of template json HOT 1
- Support for multi-tenant authentication
- Missing domain for Servicebus
- Replacing Adal4j with Msal4j HOT 1
- [Feature-Request] Support Service Principal with Cert in AzureCliCredential
- [Feature-Request] Support customized Azure Environment in AzureCliCredential
- Dependency vulnerabilities
- Add timeout to ApplicationTokenCredentials.getToken() HOT 1
- Illegal reflective access by com.microsoft.rest.Validator HOT 2
- okhttp dependency issu: java.lang.NoSuchMethodError: okhttp3.Cookie.toString(Z)Ljava/lang/String; HOT 2
- azure-client-authentication using msal4j HOT 2
- AzureCliToken isMRRT flag is not updated correctly on token clone HOT 2
- Deserialization fails for com.microsoft.azure.ExpressionEvaluationDetails class
- Validator Attempts to Reflectively Access Internal JDK APIs HOT 4
- Upgrade com.squareup.okhttp3:okhttp libraries to >= 4.9.2 due to critical security vulnerability HOT 2
- This repo is missing important files
- Deserialization failure of CloudError HOT 1
- NullPointerException on ServiceFuture.cancel()
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 autorest-clientruntime-for-java.