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

Java 8 compatibility #216

Closed
arbach opened this issue Dec 16, 2016 · 2 comments
Closed

Java 8 compatibility #216

arbach opened this issue Dec 16, 2016 · 2 comments
Milestone

Comments

@arbach
Copy link

@arbach arbach commented Dec 16, 2016

If I add this line
list.sort(Comparator.comparing( a -> ..

where list is

List<Object>

the whole controller disappears from the docs. Not sure if this is something I am doing wrong ..

@ST-DDT
Copy link

@ST-DDT ST-DDT commented Feb 28, 2017

Can you create a complete class/method that showcases the issue?

@arbach
Copy link
Author

@arbach arbach commented Jul 8, 2017

This class will not show in the documentation. It will show up if you comment the filter line.

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import javax.annotation.security.RolesAllowed;
import org.jsondoc.core.annotation.Api;
import org.jsondoc.core.annotation.ApiAuthToken;
import org.jsondoc.core.annotation.ApiMethod;
import org.jsondoc.core.pojo.ApiStage;
import org.jsondoc.core.pojo.ApiVisibility;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Api(name = "/stream", description = "Stream issue demo", group = "demo", visibility = ApiVisibility.PRIVATE, stage = ApiStage.RC)
@ApiAuthToken(roles = "USER", scheme = "Bearer")
@controller
@RequestMapping(value = "/api")
public class StreamTest {

@RolesAllowed({"ROLE_USER"})
@ApiMethod(description = "demo")
@RequestMapping(value = "/demo", method = RequestMethod.GET)
protected @ResponseBody
Object inputsGet() throws Exception {
    List<String>test = new ArrayList<>();
    test.add("x"); 

// comment the following line
test.stream().filter( i -> i == "x").collect(Collectors.toList());
return "done";
}

}

fabiomaffioletti pushed a commit that referenced this issue Nov 20, 2017
@fabiomaffioletti fabiomaffioletti added this to the 1.2.18 milestone Nov 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants