Java 11 migrate remaining p (#1122)

* Moves partial-response to Java 11

* Moves pipeline to Java 11

* Moves poison-pill to Java 11

* Moves priority-queue to Java 11

* Moves private-class-data to Java 11

* Moves producer-consumer to Java 11

* Moves promise to Java 11

* Moves property to Java 11

* Moves prototype to Java 11

* Moves proxy to Java 11

* Corrects checkstyle errors

* Fixes build for pipeline pattern
This commit is contained in:
Anurag Agarwal
2020-01-16 11:36:36 +05:30
committed by Ilkka Seppälä
parent 1401accb4f
commit 428efc7d53
82 changed files with 532 additions and 601 deletions

View File

@ -44,30 +44,31 @@ public class App {
* @param args program argument.
*/
public static void main(String[] args) throws Exception {
Map<Integer, Video> videos = Map.of(
var videos = Map.of(
1, new Video(1, "Avatar", 178, "epic science fiction film",
"James Cameron", "English"),
2, new Video(2, "Godzilla Resurgence", 120, "Action & drama movie|",
"Hideaki Anno", "Japanese"),
3, new Video(3, "Interstellar", 169, "Adventure & Sci-Fi",
"Christopher Nolan", "English"));
VideoResource videoResource = new VideoResource(new FieldJsonMapper(), videos);
"Christopher Nolan", "English")
);
var videoResource = new VideoResource(new FieldJsonMapper(), videos);
LOGGER.info("Retrieving full response from server:-");
LOGGER.info("Get all video information:");
String videoDetails = videoResource.getDetails(1);
var videoDetails = videoResource.getDetails(1);
LOGGER.info(videoDetails);
LOGGER.info("----------------------------------------------------------");
LOGGER.info("Retrieving partial response from server:-");
LOGGER.info("Get video @id, @title, @director:");
String specificFieldsDetails = videoResource.getDetails(3, "id", "title", "director");
var specificFieldsDetails = videoResource.getDetails(3, "id", "title", "director");
LOGGER.info(specificFieldsDetails);
LOGGER.info("Get video @id, @length:");
String videoLength = videoResource.getDetails(3, "id", "length");
var videoLength = videoResource.getDetails(3, "id", "length");
LOGGER.info(videoLength);
}
}