8251542: Several small Javadoc errors in java.base

Fixing wrong exception type in throws clause and wrong return type description

Reviewed-by: darcy, dfuchs, mullan, mchung, rriggs
This commit is contained in:
Vipin Sharma 2020-08-25 09:27:36 +01:00 committed by Julia Boes
parent eaeddeddb1
commit d4626d89cc
8 changed files with 11 additions and 13 deletions

View file

@ -80,7 +80,7 @@ javax.crypto.interfaces.DHPrivateKey, Serializable {
* @param p the prime modulus * @param p the prime modulus
* @param g the base generator * @param g the base generator
* *
* @exception ProviderException if the key cannot be encoded * @throws ProviderException if the key cannot be encoded
*/ */
DHPrivateKey(BigInteger x, BigInteger p, BigInteger g) DHPrivateKey(BigInteger x, BigInteger p, BigInteger g)
throws InvalidKeyException { throws InvalidKeyException {
@ -97,7 +97,7 @@ javax.crypto.interfaces.DHPrivateKey, Serializable {
* @param g the base generator * @param g the base generator
* @param l the private-value length * @param l the private-value length
* *
* @exception InvalidKeyException if the key cannot be encoded * @throws ProviderException if the key cannot be encoded
*/ */
DHPrivateKey(BigInteger x, BigInteger p, BigInteger g, int l) { DHPrivateKey(BigInteger x, BigInteger p, BigInteger g, int l) {
this.x = x; this.x = x;
@ -118,7 +118,7 @@ javax.crypto.interfaces.DHPrivateKey, Serializable {
* *
* @param encodedKey the encoded key * @param encodedKey the encoded key
* *
* @exception InvalidKeyException if the encoded key does not represent * @throws InvalidKeyException if the encoded key does not represent
* a Diffie-Hellman private key * a Diffie-Hellman private key
*/ */
DHPrivateKey(byte[] encodedKey) throws InvalidKeyException { DHPrivateKey(byte[] encodedKey) throws InvalidKeyException {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -208,7 +208,7 @@ import static sun.invoke.util.Wrapper.isWrapperType;
* *
* @return a CallSite, which, when invoked, will return an instance of the * @return a CallSite, which, when invoked, will return an instance of the
* functional interface * functional interface
* @throws ReflectiveOperationException * @throws LambdaConversionException
*/ */
abstract CallSite buildCallSite() abstract CallSite buildCallSite()
throws LambdaConversionException; throws LambdaConversionException;

View file

@ -200,7 +200,6 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*;
* *
* @return a CallSite, which, when invoked, will return an instance of the * @return a CallSite, which, when invoked, will return an instance of the
* functional interface * functional interface
* @throws ReflectiveOperationException
* @throws LambdaConversionException If properly formed functional interface * @throws LambdaConversionException If properly formed functional interface
* is not found * is not found
*/ */

View file

@ -5403,7 +5403,7 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
* *
* @param n the numerator; must be negative * @param n the numerator; must be negative
* @param d the denominator; must not be unity * @param d the denominator; must not be unity
* @return a two-element {@long} array with the remainder and quotient in * @return a two-element {@code long} array with the remainder and quotient in
* the initial and final elements, respectively * the initial and final elements, respectively
*/ */
private static long[] divRemNegativeLong(long n, long d) { private static long[] divRemNegativeLong(long n, long d) {

View file

@ -145,7 +145,6 @@ class MutableBigInteger {
* Makes this number an {@code n}-int number all of whose bits are ones. * Makes this number an {@code n}-int number all of whose bits are ones.
* Used by Burnikel-Ziegler division. * Used by Burnikel-Ziegler division.
* @param n number of ints in the {@code value} array * @param n number of ints in the {@code value} array
* @return a number equal to {@code ((1<<(32*n)))-1}
*/ */
private void ones(int n) { private void ones(int n) {
if (n > value.length) if (n > value.length)

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1995, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -315,7 +315,7 @@ public class ServerSocket implements java.io.Closeable {
/** /**
* Creates the socket implementation. * Creates the socket implementation.
* *
* @throws IOException if creation fails * @throws SocketException if creation fails
* @since 1.4 * @since 1.4
*/ */
void createImpl() throws SocketException { void createImpl() throws SocketException {

View file

@ -533,7 +533,7 @@ public class Socket implements java.io.Closeable {
* *
* @param stream a {@code boolean} value : {@code true} for a TCP socket, * @param stream a {@code boolean} value : {@code true} for a TCP socket,
* {@code false} for UDP. * {@code false} for UDP.
* @throws IOException if creation fails * @throws SocketException if creation fails
* @since 1.4 * @since 1.4
*/ */
void createImpl(boolean stream) throws SocketException { void createImpl(boolean stream) throws SocketException {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -773,7 +773,7 @@ public class AnnotationParser {
* an "annotation structure" OR two bytes into an annotation * an "annotation structure" OR two bytes into an annotation
* structure (i.e., after the type index). * structure (i.e., after the type index).
* *
* @parameter complete true if the byte buffer points to the beginning * @param complete true if the byte buffer points to the beginning
* of an annotation structure (rather than two bytes in). * of an annotation structure (rather than two bytes in).
*/ */
private static void skipAnnotation(ByteBuffer buf, boolean complete) { private static void skipAnnotation(ByteBuffer buf, boolean complete) {