Skip to content

Commit 99f870c

Browse files
eirbjojaikiran
authored andcommitted
8320781: Fix whitespace in j.l.Double and j.u.z.ZipInputStream @snippets
Reviewed-by: lancea, bpb, darcy, jpai
1 parent a5ccd3b commit 99f870c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/java.base/share/classes/java/lang/Double.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@
316316
*
317317
* {@snippet lang="java" :
318318
* double d = 0.0;
319-
* while(d != 1.0) { // Surprising infinite loop
319+
* while (d != 1.0) { // Surprising infinite loop
320320
* d += 0.1; // Sum never _exactly_ equals 1.0
321321
* }
322322
* }
@@ -325,7 +325,7 @@
325325
*
326326
* {@snippet lang="java" :
327327
* double d = 0.0;
328-
* for(int i = 0; i < 10; i++) {
328+
* for (int i = 0; i < 10; i++) {
329329
* d += 0.1;
330330
* } // Value of d is equal to Math.nextDown(1.0).
331331
* }
@@ -335,7 +335,7 @@
335335
*
336336
* {@snippet lang="java" :
337337
* double d = 0.0;
338-
* while(d <= 1.0) {
338+
* while (d <= 1.0) {
339339
* d += 0.1;
340340
* } // Value of d approximately 1.0999999999999999
341341
* }

src/java.base/share/classes/java/util/zip/ZipInputStream.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@
5151
* {@code ZipInputStream} read methods such
5252
* as {@link #read(byte[], int, int) read} or {@link #readAllBytes() readAllBytes()}.
5353
* For example:
54-
* {@snippet :
54+
* {@snippet lang="java" :
5555
* Path jar = Path.of("foo.jar");
5656
* try (InputStream is = Files.newInputStream(jar);
5757
* ZipInputStream zis = new ZipInputStream(is)) {
5858
* ZipEntry ze;
59-
* while((ze= zis.getNextEntry()) != null) {
59+
* while ((ze = zis.getNextEntry()) != null) {
6060
* var bytes = zis.readAllBytes();
6161
* System.out.printf("Entry: %s, bytes read: %s%n", ze.getName(),
6262
* bytes.length);

0 commit comments

Comments
 (0)