From 4eaaf88b2d6fb35851d4fe6f838fad346ccf0fe1 Mon Sep 17 00:00:00 2001 From: dreis2211 Date: Thu, 27 Feb 2020 21:48:30 +0100 Subject: [PATCH] Remove redundant code See gh-20339 --- .../documentation/SessionsEndpointDocumentationTests.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/SessionsEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/SessionsEndpointDocumentationTests.java index 97205d9b7b5..d57c041e280 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/SessionsEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/SessionsEndpointDocumentationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -93,10 +93,6 @@ class SessionsEndpointDocumentationTests extends MockMvcEndpointDocumentationTes @Test void sessionWithId() throws Exception { - Map sessions = new HashMap<>(); - sessions.put(sessionOne.getId(), sessionOne); - sessions.put(sessionTwo.getId(), sessionTwo); - sessions.put(sessionThree.getId(), sessionThree); given(this.sessionRepository.findById(sessionTwo.getId())).willReturn(sessionTwo); this.mockMvc.perform(get("/actuator/sessions/{id}", sessionTwo.getId())).andExpect(status().isOk()) .andDo(document("sessions/id", responseFields(sessionFields)));