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

The method or(() -> {}) is undefined for the type Optional<OpenAPI> #2

Open
taufiquealam007 opened this issue Sep 15, 2018 · 0 comments

Comments

@taufiquealam007
Copy link

taufiquealam007 commented Sep 15, 2018

Hi,

Could you please help how to compile this project. As i have gone through your instrictions, but it seems this method is not available in Optional class.

I am using jdk 1.8-144 and IDE is eclipse.

changed the copiler to 1.8.144.

OpenApiRoutePublisher.java

Optional spec = Optional.ofNullable(generatedSpecs.get(path)).or(() -> {
OpenAPI openAPI = OpenApiSpecGenerator.generateOpenApiSpecFromRouter(router, title, version, serverUrl);
generatedSpecs.put(path, openAPI);
return Optional.of(openAPI);
});

HeadHandler.java

uploadManager.findUploadInfo(uploadID).or(() -> {
response.setStatusCode(404);
return Optional.empty();
}).ifPresent(info -> {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant