From 61c85adac3cca8d012c2256931918c9b3a107ef9 Mon Sep 17 00:00:00 2001 From: Eric Deandrea Date: Fri, 15 Nov 2019 05:42:41 -0500 Subject: [PATCH] Use IntStream instead of int[] (#8) Use an `IntStream` instead of an `int[]` array. --- docs/tracing.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tracing.adoc b/docs/tracing.adoc index 0fc7e55..cc59742 100644 --- a/docs/tracing.adoc +++ b/docs/tracing.adoc @@ -252,7 +252,7 @@ StarWarsService swService; // <1> @Path("/swpeople") @Produces(MediaType.APPLICATION_JSON) public List getCharacters() { - return Arrays.stream(new int[] {1, 2, 3, 4, 5}) // <2> + return IntStream.range(1, 6) // <2> .mapToObj(swService::getPerson) // <3> .collect(Collectors.toList()); // <4> }