From 7a27e6794ec0088593ceede41d33f9d4b30c4c70 Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Sat, 28 Sep 2024 18:39:06 +0900 Subject: [PATCH] Fix typo in "committed" in ProcessInfo See gh-42471 --- .../java/org/springframework/boot/info/ProcessInfo.java | 2 +- .../org/springframework/boot/info/ProcessInfoTests.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/info/ProcessInfo.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/info/ProcessInfo.java index ce40cde525d8..85f46e0266ce 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/info/ProcessInfo.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/info/ProcessInfo.java @@ -126,7 +126,7 @@ public long getUsed() { return this.memoryUsage.getUsed(); } - public long getCommited() { + public long getCommitted() { return this.memoryUsage.getCommitted(); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/info/ProcessInfoTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/info/ProcessInfoTests.java index f95cfb20fe59..37ba3b0173c0 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/info/ProcessInfoTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/info/ProcessInfoTests.java @@ -45,12 +45,12 @@ void memoryInfoIsAvailable() { MemoryUsageInfo heapUsageInfo = processInfo.getMemory().getHeap(); MemoryUsageInfo nonHeapUsageInfo = processInfo.getMemory().getNonHeap(); assertThat(heapUsageInfo.getInit()).isPositive().isLessThanOrEqualTo(heapUsageInfo.getMax()); - assertThat(heapUsageInfo.getUsed()).isPositive().isLessThanOrEqualTo(heapUsageInfo.getCommited()); - assertThat(heapUsageInfo.getCommited()).isPositive().isLessThanOrEqualTo(heapUsageInfo.getMax()); + assertThat(heapUsageInfo.getUsed()).isPositive().isLessThanOrEqualTo(heapUsageInfo.getCommitted()); + assertThat(heapUsageInfo.getCommitted()).isPositive().isLessThanOrEqualTo(heapUsageInfo.getMax()); assertThat(heapUsageInfo.getMax()).isPositive(); assertThat(nonHeapUsageInfo.getInit()).isPositive(); - assertThat(nonHeapUsageInfo.getUsed()).isPositive().isLessThanOrEqualTo(heapUsageInfo.getCommited()); - assertThat(nonHeapUsageInfo.getCommited()).isPositive(); + assertThat(nonHeapUsageInfo.getUsed()).isPositive().isLessThanOrEqualTo(heapUsageInfo.getCommitted()); + assertThat(nonHeapUsageInfo.getCommitted()).isPositive(); assertThat(nonHeapUsageInfo.getMax()).isEqualTo(-1); }