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

feat(java): expose list_known_features #197

Merged
merged 2 commits into from
Jan 14, 2025
Merged

Conversation

sighphyre
Copy link
Member

Exposes list_known_features in the Java layer so we can start to swap out MoreOperations in the Java SDK

@Test
public void testClientSpec() throws Exception {
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
File basePath = Paths.get("../client-specification/specifications").toFile();
File indexFile = new File(basePath, "index.json");
List<String> testSuites =
objectMapper.readValue(indexFile, new TypeReference<List<String>>() {});
List<String> testSuites = objectMapper.readValue(indexFile, new TypeReference<List<String>>() {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line and everything below is formatter, sorry

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries

Copy link
Member

@chriswk chriswk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except for the Q about optional this LGTM

return name;
}

public Optional<String> getType() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why an optional when your constructor takes a string?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I'd like the constructor to take an Optional too but apparently Jackson hates that so I figured me wanting that was wrong for some reason.

@Test
public void testClientSpec() throws Exception {
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
File basePath = Paths.get("../client-specification/specifications").toFile();
File indexFile = new File(basePath, "index.json");
List<String> testSuites =
objectMapper.readValue(indexFile, new TypeReference<List<String>>() {});
List<String> testSuites = objectMapper.readValue(indexFile, new TypeReference<List<String>>() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries

…ods can be exposed and do memory management that should work on Java 18 and above (#198)

* refactor(java): rework java engine so that static methods can be exposed cleanly

* feat(java): expose core version in java engine layer (#199)

* fix(java): force native encoding to utf-8 so windows doesn't set it to something horrible (#200)
@sighphyre sighphyre merged commit 9ef5c46 into main Jan 14, 2025
3 checks passed
@sighphyre sighphyre deleted the feat/java-list-known-features branch January 14, 2025 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants