Skip to content

Commit 9cc163a

Browse files
committedApr 23, 2024
8330178: Clean up non-standard use of /** comments in java.base
Reviewed-by: darcy, iris, dfuchs, aivanov, naoto
1 parent 88a5dce commit 9cc163a

23 files changed

+78
-84
lines changed
 

‎src/java.base/macosx/classes/apple/security/AppleProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import java.security.*;
2929
import static sun.security.util.SecurityConstants.PROVIDER_VER;
3030

31-
/**
31+
/*
3232
* The Apple Security Provider.
3333
*/
3434

‎src/java.base/macosx/classes/java/net/DefaultInterface.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525

2626
package java.net;
2727

28+
import java.security.AccessController;
29+
import java.security.PrivilegedAction;
30+
import java.util.Enumeration;
31+
import java.io.IOException;
32+
2833
/**
2934
* Choose a network interface to be the default for
3035
* outgoing IPv6 traffic that does not specify a scope_id (and which needs one).
@@ -37,11 +42,6 @@
3742
* that returns null.
3843
*/
3944

40-
import java.security.AccessController;
41-
import java.security.PrivilegedAction;
42-
import java.util.Enumeration;
43-
import java.io.IOException;
44-
4545
class DefaultInterface {
4646

4747
private static final NetworkInterface defaultInterface =

‎src/java.base/share/classes/com/sun/crypto/provider/SunJCE.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
import static sun.security.util.SecurityConstants.PROVIDER_VER;
3535
import static sun.security.util.SecurityProviderConstants.*;
3636

37-
/**
37+
/*
3838
* The "SunJCE" Cryptographic Service Provider.
3939
*
4040
* @author Jan Luehe

‎src/java.base/share/classes/java/io/FilePermission.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -1231,12 +1231,10 @@ public Enumeration<Permission> elements() {
12311231
new ObjectStreamField("permissions", Vector.class),
12321232
};
12331233

1234-
/**
1235-
* @serialData "permissions" field (a Vector containing the FilePermissions).
1236-
*/
12371234
/**
12381235
* Writes the contents of the perms field out as a Vector for
12391236
* serialization compatibility with earlier releases.
1237+
* @serialData "permissions" field (a Vector containing the FilePermissions).
12401238
*
12411239
* @param out the {@code ObjectOutputStream} to which data is written
12421240
* @throws IOException if an I/O error occurs

‎src/java.base/share/classes/java/io/ObjectStreamConstants.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public interface ObjectStreamConstants {
139139
static final int baseWireHandle = 0x7e0000;
140140

141141

142-
/******************************************************/
142+
/* ****************************************************/
143143
/* Bit masks for ObjectStreamClass flag.*/
144144

145145
/**

‎src/java.base/share/classes/java/lang/invoke/LambdaForm.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ boolean nameRefsAreLegal() {
571571
return true;
572572
}
573573

574-
/** Invoke this form on the given arguments. */
574+
// /** Invoke this form on the given arguments. */
575575
// final Object invoke(Object... args) throws Throwable {
576576
// // NYI: fit this into the fast path?
577577
// return interpretWithArguments(args);
@@ -923,9 +923,9 @@ private boolean forceInterpretation() {
923923
return invocationCounter == -1;
924924
}
925925

926+
/** Interpretively invoke this form on the given arguments. */
926927
@Hidden
927928
@DontInline
928-
/** Interpretively invoke this form on the given arguments. */
929929
Object interpretWithArguments(Object... argumentValues) throws Throwable {
930930
if (TRACE_INTERPRETER)
931931
return interpretWithArgumentsTracing(argumentValues);
@@ -940,9 +940,9 @@ Object interpretWithArguments(Object... argumentValues) throws Throwable {
940940
return rv;
941941
}
942942

943+
/** Evaluate a single Name within this form, applying its function to its arguments. */
943944
@Hidden
944945
@DontInline
945-
/** Evaluate a single Name within this form, applying its function to its arguments. */
946946
Object interpretName(Name name, Object[] values) throws Throwable {
947947
if (TRACE_INTERPRETER)
948948
traceInterpreter("| interpretName", name.debugString(), (Object[]) null);

‎src/java.base/share/classes/java/math/BigInteger.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -4843,7 +4843,7 @@ private static int[] makePositive(int[] a) {
48434843
0x40000000, 0x4cfa3cc1, 0x5c13d840, 0x6d91b519, 0x39aa400
48444844
};
48454845

4846-
/**
4846+
/*
48474847
* These routines provide access to the two's complement representation
48484848
* of BigIntegers.
48494849
*/

‎src/java.base/share/classes/java/math/MutableBigInteger.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525

2626
package java.math;
2727

28+
import static java.math.BigDecimal.INFLATED;
29+
import static java.math.BigInteger.LONG_MASK;
30+
import java.util.Arrays;
31+
2832
/**
2933
* A class used to represent multiprecision integers that makes efficient
3034
* use of allocated space by allowing a number to occupy only part of
@@ -42,10 +46,6 @@
4246
* @since 1.3
4347
*/
4448

45-
import static java.math.BigDecimal.INFLATED;
46-
import static java.math.BigInteger.LONG_MASK;
47-
import java.util.Arrays;
48-
4949
class MutableBigInteger {
5050
/**
5151
* Holds the magnitude of this MutableBigInteger in big endian order.

‎src/java.base/share/classes/java/net/HttpURLConnection.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ public InputStream getErrorStream() {
675675
return null;
676676
}
677677

678-
/**
678+
/*
679679
* The response codes for HTTP, as of version 1.1.
680680
*/
681681

‎src/java.base/share/classes/java/util/regex/Pattern.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -2225,7 +2225,7 @@ private static final boolean isSupplementary(int ch) {
22252225
Character.isSurrogate((char)ch);
22262226
}
22272227

2228-
/**
2228+
/*
22292229
* The following methods handle the main parsing. They are sorted
22302230
* according to their precedence order, the lowest one first.
22312231
*/
@@ -2282,10 +2282,10 @@ private Node expr(Node end) {
22822282
}
22832283
}
22842284

2285-
@SuppressWarnings("fallthrough")
22862285
/**
22872286
* Parsing of sequences between alternations.
22882287
*/
2288+
@SuppressWarnings("fallthrough")
22892289
private Node sequence(Node end) {
22902290
Node head = null;
22912291
Node tail = null;
@@ -2409,10 +2409,10 @@ private Node sequence(Node end) {
24092409
return head;
24102410
}
24112411

2412-
@SuppressWarnings("fallthrough")
24132412
/**
24142413
* Parse and add a new Single or Slice.
24152414
*/
2415+
@SuppressWarnings("fallthrough")
24162416
private Node atom() {
24172417
int first = 0;
24182418
int prev = -1;
@@ -3322,10 +3322,10 @@ private Node createGroup(boolean anonymous) {
33223322
return head;
33233323
}
33243324

3325-
@SuppressWarnings("fallthrough")
33263325
/**
33273326
* Parses inlined match flags and set them appropriately.
33283327
*/
3328+
@SuppressWarnings("fallthrough")
33293329
private void addFlag() {
33303330
int ch = peek();
33313331
for (;;) {
@@ -3364,11 +3364,11 @@ private void addFlag() {
33643364
}
33653365
}
33663366

3367-
@SuppressWarnings("fallthrough")
33683367
/**
33693368
* Parses the second part of inlined match flags and turns off
33703369
* flags appropriately.
33713370
*/
3371+
@SuppressWarnings("fallthrough")
33723372
private void subFlag() {
33733373
int ch = peek();
33743374
for (;;) {
@@ -3708,7 +3708,7 @@ private Node newSlice(int[] buf, int count, boolean hasSupplementary) {
37083708
return hasSupplementary ? new SliceS(tmp) : new Slice(tmp);
37093709
}
37103710

3711-
/**
3711+
/*
37123712
* The following classes are the building components of the object
37133713
* tree that represents a compiled regular expression. The object tree
37143714
* is made of individual elements that handle constructs in the Pattern.

‎src/java.base/share/classes/jdk/internal/access/JavaAWTFontAccess.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
* questions.
2424
*/
2525

26+
package jdk.internal.access;
27+
2628
/**
2729
* SharedSecrets interface used for the access from java.text.Bidi
2830
*/
2931

30-
package jdk.internal.access;
31-
3232
public interface JavaAWTFontAccess {
3333

3434
// java.awt.font.TextAttribute constants

‎src/java.base/share/classes/jdk/internal/icu/lang/UCharacter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* questions.
2424
*/
2525

26-
/**
26+
/*
2727
*******************************************************************************
2828
* Copyright (C) 1996-2014, International Business Machines Corporation and
2929
* others. All Rights Reserved.

‎src/java.base/share/classes/jdk/internal/icu/text/BidiBase.java

+10-10
Original file line numberDiff line numberDiff line change
@@ -2409,9 +2409,9 @@ else if (dirProp == PDI) {
24092409
return directionFromFlags();
24102410
}
24112411

2412-
/*********************************************************************/
2412+
/* *******************************************************************/
24132413
/* The Properties state machine table */
2414-
/*********************************************************************/
2414+
/* *******************************************************************/
24152415
/* */
24162416
/* All table cells are 8 bits: */
24172417
/* bits 0..4: next state */
@@ -2422,9 +2422,9 @@ else if (dirProp == PDI) {
24222422
/* Cells may also be of format "_(x,y)" where x represents an action */
24232423
/* to perform and y represents the next state. */
24242424
/* */
2425-
/*********************************************************************/
2425+
/* *******************************************************************/
24262426
/* Definitions and type for properties state tables */
2427-
/*********************************************************************/
2427+
/* *******************************************************************/
24282428
private static final int IMPTABPROPS_COLUMNS = 16;
24292429
private static final int IMPTABPROPS_RES = IMPTABPROPS_COLUMNS - 1;
24302430
private static short GetStateProps(short cell) {
@@ -2447,7 +2447,7 @@ private static short GetActionProps(short cell) {
24472447
private static final short _S = 5;
24482448
private static final short _B = 6; /* reduced dirProp */
24492449

2450-
/*********************************************************************/
2450+
/* *******************************************************************/
24512451
/* */
24522452
/* PROPERTIES STATE TABLE */
24532453
/* */
@@ -2510,9 +2510,9 @@ private static short GetActionProps(short cell) {
25102510
/*23 ENR+ET */ { 32+1, 32+2, 21, 32+5, 32+7, 32+15, 32+17, 32+7, 23, 32+7, 23, 23, 32+3, 18, 21, _AN }
25112511
};
25122512

2513-
/*********************************************************************/
2513+
/* *******************************************************************/
25142514
/* The levels state machine tables */
2515-
/*********************************************************************/
2515+
/* *******************************************************************/
25162516
/* */
25172517
/* All table cells are 8 bits: */
25182518
/* bits 0..3: next state */
@@ -2525,9 +2525,9 @@ private static short GetActionProps(short cell) {
25252525
/* */
25262526
/* This format limits each table to 16 states each and to 15 actions.*/
25272527
/* */
2528-
/*********************************************************************/
2528+
/* *******************************************************************/
25292529
/* Definitions and type for levels state tables */
2530-
/*********************************************************************/
2530+
/* *******************************************************************/
25312531
private static final int IMPTABLEVELS_COLUMNS = _B + 2;
25322532
private static final int IMPTABLEVELS_RES = IMPTABLEVELS_COLUMNS - 1;
25332533
private static short GetState(byte cell) { return (short)(cell & 0x0f); }
@@ -2544,7 +2544,7 @@ private static class ImpTabPair {
25442544
}
25452545
}
25462546

2547-
/*********************************************************************/
2547+
/* *******************************************************************/
25482548
/* */
25492549
/* LEVELS STATE TABLES */
25502550
/* */

‎src/java.base/share/classes/jdk/internal/icu/text/UTF16.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* or visit www.oracle.com if you need additional information or have any
2323
* questions.
2424
*/
25-
/**
25+
/*
2626
*******************************************************************************
2727
* Copyright (C) 1996-2014, International Business Machines Corporation and
2828
* others. All Rights Reserved.

‎src/java.base/share/classes/jdk/internal/platform/Metrics.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public static Metrics systemMetrics() {
7272
public String getProvider();
7373

7474

75-
/*****************************************************************
75+
/* ***************************************************************
7676
* CPU Accounting Subsystem
7777
****************************************************************/
7878

@@ -123,7 +123,7 @@ public static Metrics systemMetrics() {
123123
*/
124124
public long getCpuSystemUsage();
125125

126-
/*****************************************************************
126+
/* ***************************************************************
127127
* CPU Scheduling Metrics
128128
****************************************************************/
129129

@@ -215,7 +215,7 @@ public static Metrics systemMetrics() {
215215
*/
216216
public long getEffectiveCpuCount();
217217

218-
/*****************************************************************
218+
/* ***************************************************************
219219
* CPU Sets
220220
****************************************************************/
221221

@@ -271,7 +271,7 @@ public static Metrics systemMetrics() {
271271
*/
272272
public int[] getEffectiveCpuSetMems();
273273

274-
/*****************************************************************
274+
/* ***************************************************************
275275
* Memory Subsystem
276276
****************************************************************/
277277

@@ -352,7 +352,7 @@ public static Metrics systemMetrics() {
352352
*/
353353
public long getMemorySoftLimit();
354354

355-
/*****************************************************************
355+
/* ***************************************************************
356356
* pids subsystem
357357
****************************************************************/
358358

@@ -373,7 +373,7 @@ public static Metrics systemMetrics() {
373373
*/
374374
public long getPidsCurrent();
375375

376-
/*****************************************************************
376+
/* ***************************************************************
377377
* BlKIO Subsystem
378378
****************************************************************/
379379

‎src/java.base/share/classes/sun/net/www/content/text/plain.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@
2323
* questions.
2424
*/
2525

26-
/**
27-
* Plain text file handler.
28-
* @author Steven B. Byrne
29-
*/
3026
package sun.net.www.content.text;
3127
import java.net.*;
3228
import java.io.InputStream;
3329
import java.io.IOException;
3430

31+
/**
32+
* Plain text file handler.
33+
* @author Steven B. Byrne
34+
*/
3535
public class plain extends ContentHandler {
3636
/**
3737
* Returns a PlainTextInputStream object from which data

‎src/java.base/share/classes/sun/net/www/protocol/file/FileURLConnection.java

+5-6
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@
2323
* questions.
2424
*/
2525

26-
/**
27-
* Open an file input stream given a URL.
28-
* @author James Gosling
29-
* @author Steven B. Byrne
30-
*/
31-
3226
package sun.net.www.protocol.file;
3327

3428
import java.net.URL;
@@ -40,6 +34,11 @@
4034
import java.util.*;
4135
import java.text.SimpleDateFormat;
4236

37+
/**
38+
* Open a file input stream given a URL.
39+
* @author James Gosling
40+
* @author Steven B. Byrne
41+
*/
4342
public class FileURLConnection extends URLConnection {
4443

4544
private static final String CONTENT_LENGTH = "content-length";

‎src/java.base/share/classes/sun/net/www/protocol/https/AbstractDelegateHttpsURLConnection.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
@@ -65,7 +65,7 @@ protected AbstractDelegateHttpsURLConnection(URL url, Proxy p,
6565

6666
protected abstract javax.net.ssl.HostnameVerifier getHostnameVerifier();
6767

68-
/**
68+
/*
6969
* No user application is able to call these routines, as no one
7070
* should ever get access to an instance of
7171
* DelegateHttpsURLConnection (sun.* or com.*)

‎src/java.base/share/classes/sun/nio/ch/Interruptible.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
* questions.
2424
*/
2525

26+
package sun.nio.ch;
27+
2628
/**
2729
* An object that interrupts a thread blocked in an I/O operation.
2830
*/
2931

30-
package sun.nio.ch;
31-
3232
public interface Interruptible {
3333

3434
/**

‎src/java.base/share/classes/sun/security/pkcs/ParsingException.java

+4-5
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,15 @@
2323
* questions.
2424
*/
2525

26+
package sun.security.pkcs;
27+
28+
import java.io.IOException;
29+
2630
/**
2731
* Generic PKCS Parsing exception.
2832
*
2933
* @author Benjamin Renaud
3034
*/
31-
32-
package sun.security.pkcs;
33-
34-
import java.io.IOException;
35-
3635
public class ParsingException extends IOException {
3736

3837
@java.io.Serial

‎src/java.base/share/classes/sun/security/provider/SeedGenerator.java

+11-11
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,17 @@
2525

2626
package sun.security.provider;
2727

28+
import java.security.*;
29+
import java.io.*;
30+
import java.util.Properties;
31+
import java.util.Enumeration;
32+
import java.net.*;
33+
import java.nio.file.DirectoryStream;
34+
import java.nio.file.Files;
35+
import java.nio.file.Path;
36+
import java.util.Random;
37+
import sun.security.util.Debug;
38+
2839
/**
2940
* This class generates seeds for the SHA1PRNG cryptographically strong
3041
* random number generator.
@@ -66,17 +77,6 @@
6677
* @author Gadi Guy
6778
*/
6879

69-
import java.security.*;
70-
import java.io.*;
71-
import java.util.Properties;
72-
import java.util.Enumeration;
73-
import java.net.*;
74-
import java.nio.file.DirectoryStream;
75-
import java.nio.file.Files;
76-
import java.nio.file.Path;
77-
import java.util.Random;
78-
import sun.security.util.Debug;
79-
8080
abstract class SeedGenerator {
8181

8282
// Static instance is created at link time

‎src/java.base/share/classes/sun/security/util/ByteArrayTagOrder.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
* questions.
2424
*/
2525

26+
package sun.security.util;
27+
28+
import java.util.Comparator;
2629

2730
/**
2831
* ByteArrayTagOrder: a class for comparing two DER encodings by the
@@ -31,10 +34,6 @@
3134
* @author D. N. Hoover
3235
*/
3336

34-
package sun.security.util;
35-
36-
import java.util.Comparator;
37-
3837
public class ByteArrayTagOrder implements Comparator<byte[]> {
3938

4039
/**

‎src/java.base/share/classes/sun/security/util/IOUtils.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,15 @@
2323
* questions.
2424
*/
2525

26-
/**
27-
* IOUtils: A collection of IO-related public static methods.
28-
*/
29-
3026
package sun.security.util;
3127

3228
import java.io.EOFException;
3329
import java.io.IOException;
3430
import java.io.InputStream;
3531

32+
/**
33+
* IOUtils: A collection of IO-related public static methods.
34+
*/
3635
public class IOUtils {
3736

3837
/**

0 commit comments

Comments
 (0)
Please sign in to comment.