From db68aea314a59d1e180c9bb0c4000911ce8ddbec Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Tue, 20 May 2025 15:19:02 -0700 Subject: [PATCH 1/2] Polish --- .../info/InfoEndpointDocumentationTests.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/info/InfoEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/info/InfoEndpointDocumentationTests.java index f81bba2986..b3a5f9c725 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/info/InfoEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/info/InfoEndpointDocumentationTests.java @@ -100,17 +100,17 @@ class InfoEndpointDocumentationTests extends MockMvcEndpointDocumentationTests { .type(JsonFieldType.NUMBER), fieldWithPath("memory").description("Memory information."), fieldWithPath("memory.heap").description("Heap memory."), - fieldWithPath("memory.heap.init").description("The number of bytes initially requested by the JVM."), - fieldWithPath("memory.heap.used").description("The number of bytes currently being used."), - fieldWithPath("memory.heap.committed").description("The number of bytes committed for JVM use."), + fieldWithPath("memory.heap.init").description("Number of bytes initially requested by the JVM."), + fieldWithPath("memory.heap.used").description("Number of bytes currently being used."), + fieldWithPath("memory.heap.committed").description("Number of bytes committed for JVM use."), fieldWithPath("memory.heap.max") - .description("The maximum number of bytes that can be used by the JVM (or -1)."), + .description("Maximum number of bytes that can be used by the JVM (or -1)."), fieldWithPath("memory.nonHeap").description("Non-heap memory."), - fieldWithPath("memory.nonHeap.init").description("The number of bytes initially requested by the JVM."), - fieldWithPath("memory.nonHeap.used").description("The number of bytes currently being used."), - fieldWithPath("memory.nonHeap.committed").description("The number of bytes committed for JVM use."), + fieldWithPath("memory.nonHeap.init").description("Number of bytes initially requested by the JVM."), + fieldWithPath("memory.nonHeap.used").description("Number of bytes currently being used."), + fieldWithPath("memory.nonHeap.committed").description("Number of bytes committed for JVM use."), fieldWithPath("memory.nonHeap.max") - .description("The maximum number of bytes that can be used by the JVM (or -1).")); + .description("Maximum number of bytes that can be used by the JVM (or -1).")); } private ResponseFieldsSnippet javaInfo() { From 004ae93df6100f0c5676cc870de313187f83401f Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Tue, 20 May 2025 15:19:30 -0700 Subject: [PATCH 2/2] Fix process into documentation to include garbage collectors See gh-45631 --- .../autoconfigure/info/InfoEndpointDocumentationTests.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/info/InfoEndpointDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/info/InfoEndpointDocumentationTests.java index f81bba2986..87bbd40f4c 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/info/InfoEndpointDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/info/InfoEndpointDocumentationTests.java @@ -110,7 +110,12 @@ class InfoEndpointDocumentationTests extends MockMvcEndpointDocumentationTests { fieldWithPath("memory.nonHeap.used").description("The number of bytes currently being used."), fieldWithPath("memory.nonHeap.committed").description("The number of bytes committed for JVM use."), fieldWithPath("memory.nonHeap.max") - .description("The maximum number of bytes that can be used by the JVM (or -1).")); + .description("The maximum number of bytes that can be used by the JVM (or -1)."), + fieldWithPath("memory.garbageCollectors").description("Details for garbage collectors."), + fieldWithPath("memory.garbageCollectors[].name").description("Name of of the garbage collector."), + fieldWithPath("memory.garbageCollectors[].collectionCount") + .description("Total number of collections that have occurred.")); + } private ResponseFieldsSnippet javaInfo() {