8336039: Doccheck: HTML warnings, broken links and missing files in java.base documentation

Reviewed-by: liach, djelinski
This commit is contained in:
Nizar Benalla 2024-07-22 13:27:12 +00:00 committed by Chen Liang
parent 7ddd02599c
commit 92de2b2d5f
8 changed files with 19 additions and 20 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -37,7 +37,7 @@ import jdk.internal.javac.PreviewFeature;
* and calculating max stack size.
* <p>
* Sample use:
* <p>
*
* {@snippet lang=java :
* var stackTracker = CodeStackTracker.of();
* codeBuilder.transforming(stackTracker, trackedBuilder -> {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -33,11 +33,11 @@
* The main class for reading classfiles is {@link java.lang.classfile.ClassModel}; we
* convert bytes into a {@link java.lang.classfile.ClassModel} with {@link
* java.lang.classfile.ClassFile#parse(byte[])}:
* <p>
*
* {@snippet lang=java :
* ClassModel cm = ClassFile.of().parse(bytes);
* }
* <p>
*
* There are several additional overloads of {@code parse} that let you specify
* various processing options.
* <p>
@ -377,7 +377,7 @@
* <p>
* Then we can compose {@code fooToBar} and {@code instrumentCalls} with {@link
* java.lang.classfile.CodeTransform#andThen(java.lang.classfile.CodeTransform)}:
* <p>
*
* {@snippet lang=java :
* var cc = ClassFile.of();
* byte[] newBytes = cc.transform(cc.parse(bytes),
@ -443,7 +443,7 @@
* or more, zero or one, exactly one), and a list of components. The elements
* of a class are fields, methods, and the attributes that can appear on
* classes:
* <p>
*
* {@snippet lang="text" :
* ClassElement =
* FieldModel*(UtfEntry name, Utf8Entry descriptor)
@ -468,7 +468,7 @@
* | PermittedSubclassesAttribute?(List<ClassEntry> permittedSubclasses)
* | DeclarationElement*
* }
*<p>
*
* where {@code DeclarationElement} are the elements that are common to all declarations
* (classes, methods, fields) and so are factored out:
*

View File

@ -61,7 +61,7 @@ import java.util.function.Consumer;
* by the garbage collector. The scope of an automatic arena is an automatic scope. As
* such, the regions of memory backing memory segments allocated with the automatic arena
* are deallocated at some unspecified time <em>after</em> the automatic arena (and all
* the segments allocated by it) becomes <a href="../../../java/lang/ref/package.html#reachability">unreachable</a>,
* the segments allocated by it) becomes {@linkplain java.lang.ref##reachability unreachable},
* as shown below:
* {@snippet lang = java:
* MemorySegment segment = Arena.ofAuto().allocate(100, 1); // @highlight regex='ofAuto()'

View File

@ -517,7 +517,7 @@ public sealed interface MemorySegment permits AbstractMemorySegmentImpl {
*
* @apiNote When using this method to pass a segment address to some external
* operation (e.g. a JNI function), clients must ensure that the segment is
* kept <a href="../../../java/lang/ref/package.html#reachability">reachable</a>
* kept {@linkplain java.lang.ref##reachability reachable}
* for the entire duration of the operation. A failure to do so might result
* in the premature deallocation of the region of memory backing the memory
* segment, in case the segment has been allocated with an
@ -785,7 +785,7 @@ public sealed interface MemorySegment permits AbstractMemorySegmentImpl {
* backing region of memory is no longer available. Furthermore, if the
* provided scope is the scope of an {@linkplain Arena#ofAuto() automatic arena},
* the cleanup action must not prevent the scope from becoming
* <a href="../../../java/lang/ref/package.html#reachability">unreachable</a>.
* {@linkplain java.lang.ref##reachability unreachable}.
* A failure to do so will permanently prevent the regions of memory
* allocated by the automatic arena from being deallocated.
*
@ -836,7 +836,7 @@ public sealed interface MemorySegment permits AbstractMemorySegmentImpl {
* backing region of memory is no longer available. Furthermore, if the
* provided scope is the scope of an {@linkplain Arena#ofAuto() automatic arena},
* the cleanup action must not prevent the scope from becoming
* <a href="../../../java/lang/ref/package.html#reachability">unreachable</a>.
* {@linkplain java.lang.ref##reachability unreachable}.
* A failure to do so will permanently prevent the regions of memory
* allocated by the automatic arena from being deallocated.
*
@ -2662,7 +2662,7 @@ public sealed interface MemorySegment permits AbstractMemorySegmentImpl {
* invalidated, either {@link Arena#close() explicitly}, or automatically, by the
* garbage collector. A segment scope that is invalidated automatically is an
* <em>automatic scope</em>. An automatic scope is always {@link #isAlive() alive}
* as long as it is <a href="../../../java/lang/ref/package.html#reachability">reachable</a>.
* as long as it is {@linkplain java.lang.ref##reachability reachable}.
* Segments associated with an automatic scope are:
* <ul>
* <li>Segments obtained from an {@linkplain Arena#ofAuto() automatic arena};</li>

View File

@ -219,7 +219,7 @@ public interface SymbolLookup {
* were loaded after this method returned.
* <p>
* Libraries associated with a class loader are unloaded when the class loader becomes
* <a href="../../../java/lang/ref/package.html#reachability">unreachable</a>. The
* {@linkplain java.lang.ref##reachability unreachable}. The
* symbol lookup returned by this method is associated with an automatic
* {@linkplain MemorySegment.Scope scope} which keeps the caller's class loader
* reachable. Therefore, libraries associated with the caller's class loader are

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -92,7 +92,7 @@ public interface InetAddressResolver {
* {@linkplain InetAddressResolver#lookupByName(String, LookupPolicy) looking up host addresses}.
*
* <p> The default platform-wide lookup policy is constructed by consulting
* <a href="doc-files/net-properties.html#Ipv4IPv6">System Properties</a> which affect
* <a href="../doc-files/net-properties.html#Ipv4IPv6">System Properties</a> which affect
* how IPv4 and IPv6 addresses are returned.
*
* @since 18

View File

@ -367,12 +367,11 @@ import java.util.Objects;
*
* <h2>Usage Information</h2>
*
* <p>
*
* The following example demonstrates a general usage of {@code MessageFormat}.
* In internationalized programs, the message format pattern and other
* static strings will likely be obtained from resource bundles.
*
* <p>
* {@snippet lang=java :
* int planet = 7;
* String event = "a disturbance in the Force";

View File

@ -108,9 +108,9 @@ import sun.security.util.ResourcesMgr;
* and {@code callAs} is similar to {@code doAs} except that the
* input type and exceptions thrown are slightly different.
*
* <p><b><a id="sm-allowed">These methods behave differently depending on
* <p id="sm-allowed"><b>These methods behave differently depending on
* whether a security manager is
* <a href="../../../java/lang/SecurityManager.html#set-security-manager">allowed or disallowed</a></a></b>:
* {@linkplain SecurityManager##set-security-manager allowed or disallowed}</b>:
* <ul>
* <li>If a security manager is allowed, which means it is either already set
* or allowed to be set dynamically, a {@code Subject} object is associated