adoptopenjdk / openjdk-api-java-client Goto Github PK
View Code? Open in Web Editor NEWA Java wrapper around the AdoptOpenJDK REST API
License: Apache License 2.0
A Java wrapper around the AdoptOpenJDK REST API
License: Apache License 2.0
See AdoptOpenJDK/openjdk-api#47.
This will trigger:
net.adoptopenjdk.spi.AOParseException: Error parsing JSON data.
Location: https://api.adoptopenjdk.net/openjdk8-openj9/releases @ 1:2
Expected: One of START_ARRAY
Received: START_OBJECT
at net.adoptopenjdk.v1/net.adoptopenjdk.v1.AOv1Parser.parseErrorExpectedReceived(AOv1Parser.java:488)
at net.adoptopenjdk.v1/net.adoptopenjdk.v1.AOv1Parser.parseErrorExpectedReceived(AOv1Parser.java:497)
at net.adoptopenjdk.v1/net.adoptopenjdk.v1.AOv1Parser.requireOneOf(AOv1Parser.java:162)
at net.adoptopenjdk.v1/net.adoptopenjdk.v1.AOv1Parser.parseReleases(AOv1Parser.java:131)
at net.adoptopenjdk.v1/net.adoptopenjdk.v1.AOv1Requests.releasesForVariant(AOv1Requests.java:195)
at net.adoptopenjdk.api/net.adoptopenjdk.api.AdoptOpenJDK$Requests.releasesForVariant(AdoptOpenJDK.java:112)
When the new v3 API arrives, write a new implementation using it!
//usr/bin/env jbang "$0" "$@" ; exit $?
//DEPS net.adoptopenjdk:net.adoptopenjdk.v3.api:0.3.3
//DEPS net.adoptopenjdk:net.adoptopenjdk.v3.vanilla:0.3.3
import net.adoptopenjdk.v3.api.AOV3Exception;
import net.adoptopenjdk.v3.vanilla.AOV3Clients;
import java.io.IOException;
class adoptopenjdk {
public static void main(String... args) throws Exception {
var clients = new AOV3Clients();
try (var client = clients.createClient()) {
var request = client.availableReleases(e -> System.out.println(e));
var releases = request.execute();
}
}
}
results in:
Caused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "most_recent_feature_version" (class net.adoptopenjdk.v3.vanilla.internal.AOV3AST$AOV3AvailableReleasesJSON), not marked as ignorable (4 known properties: "available_releases", "most_recent_lts", "available_lts_releases", "most_recent_feature_release"])
The types are declared such that the checksums are not marked as optional. The code responds by essentially returning a blank string for a missing checksum; this is incorrect! It should return Optional.empty()
.
There's a new v2 API. Support it!
We can change the project coordinates, and the names of the packages and modules very easily.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.