From 99f870c43fea4e31a63240733ab9a471469f282b Mon Sep 17 00:00:00 2001 From: Eirik Bjorsnos Date: Tue, 28 Nov 2023 10:20:11 +0000 Subject: [PATCH] 8320781: Fix whitespace in j.l.Double and j.u.z.ZipInputStream @snippets Reviewed-by: lancea, bpb, darcy, jpai --- src/java.base/share/classes/java/lang/Double.java | 6 +++--- .../share/classes/java/util/zip/ZipInputStream.java | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/java.base/share/classes/java/lang/Double.java b/src/java.base/share/classes/java/lang/Double.java index 14ddcd0de2a..d7df6db3e16 100644 --- a/src/java.base/share/classes/java/lang/Double.java +++ b/src/java.base/share/classes/java/lang/Double.java @@ -316,7 +316,7 @@ import jdk.internal.vm.annotation.IntrinsicCandidate; * * {@snippet lang="java" : * double d = 0.0; - * while(d != 1.0) { // Surprising infinite loop + * while (d != 1.0) { // Surprising infinite loop * d += 0.1; // Sum never _exactly_ equals 1.0 * } * } @@ -325,7 +325,7 @@ import jdk.internal.vm.annotation.IntrinsicCandidate; * * {@snippet lang="java" : * double d = 0.0; - * for(int i = 0; i < 10; i++) { + * for (int i = 0; i < 10; i++) { * d += 0.1; * } // Value of d is equal to Math.nextDown(1.0). * } @@ -335,7 +335,7 @@ import jdk.internal.vm.annotation.IntrinsicCandidate; * * {@snippet lang="java" : * double d = 0.0; - * while(d <= 1.0) { + * while (d <= 1.0) { * d += 0.1; * } // Value of d approximately 1.0999999999999999 * } diff --git a/src/java.base/share/classes/java/util/zip/ZipInputStream.java b/src/java.base/share/classes/java/util/zip/ZipInputStream.java index 9e265fd668e..e583bc28934 100644 --- a/src/java.base/share/classes/java/util/zip/ZipInputStream.java +++ b/src/java.base/share/classes/java/util/zip/ZipInputStream.java @@ -51,12 +51,12 @@ import static java.util.zip.ZipUtils.*; * {@code ZipInputStream} read methods such * as {@link #read(byte[], int, int) read} or {@link #readAllBytes() readAllBytes()}. * For example: - * {@snippet : + * {@snippet lang="java" : * Path jar = Path.of("foo.jar"); * try (InputStream is = Files.newInputStream(jar); * ZipInputStream zis = new ZipInputStream(is)) { * ZipEntry ze; - * while((ze= zis.getNextEntry()) != null) { + * while ((ze = zis.getNextEntry()) != null) { * var bytes = zis.readAllBytes(); * System.out.printf("Entry: %s, bytes read: %s%n", ze.getName(), * bytes.length);