aboutsummaryrefslogtreecommitdiff
path: root/src/java.base/share/classes/java/security/GuardedObject.java
diff options
context:
space:
mode:
authorBradford Wetmore <wetmore@openjdk.org>2021-03-11 00:26:26 +0000
committerBradford Wetmore <wetmore@openjdk.org>2021-03-11 00:26:26 +0000
commit32cbd193d9655825d10e07be50ab3b7550ecb401 (patch)
tree617019487e06dbdf75bcd3cdb02104b132e3943e /src/java.base/share/classes/java/security/GuardedObject.java
parent6971c23a3a2548eb0e8b6e50e2acadc4e16d32fb (diff)
downloadopenjdk-32cbd193d9655825d10e07be50ab3b7550ecb401.tar.gz
openjdk-32cbd193d9655825d10e07be50ab3b7550ecb401.zip
8263105: security-libs doclint cleanup
Reviewed-by: iris, darcy, dfuchs, mullan
Diffstat (limited to 'src/java.base/share/classes/java/security/GuardedObject.java')
-rw-r--r--src/java.base/share/classes/java/security/GuardedObject.java20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/java.base/share/classes/java/security/GuardedObject.java b/src/java.base/share/classes/java/security/GuardedObject.java
index e5f0591a775..0291b5caa7e 100644
--- a/src/java.base/share/classes/java/security/GuardedObject.java
+++ b/src/java.base/share/classes/java/security/GuardedObject.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2021, 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
@@ -25,6 +25,8 @@
package java.security;
+import java.io.IOException;
+
/**
* A GuardedObject is an object that is used to protect access to
* another object.
@@ -52,10 +54,17 @@ public class GuardedObject implements java.io.Serializable {
@java.io.Serial
private static final long serialVersionUID = -5240450096227834308L;
+ /**
+ * The object we are guarding.
+ */
@SuppressWarnings("serial") // Not statically typed as Serializable
- private Object object; // the object we are guarding
+ private Object object;
+
+ /**
+ * The guard object.
+ */
@SuppressWarnings("serial") // Not statically typed as Serializable
- private Guard guard; // the guard
+ private Guard guard;
/**
* Constructs a GuardedObject using the specified object and guard.
@@ -94,10 +103,13 @@ public class GuardedObject implements java.io.Serializable {
/**
* Writes this object out to a stream (i.e., serializes it).
* We check the guard if there is one.
+ *
+ * @param oos the {@code ObjectOutputStream} to which data is written
+ * @throws IOException if an I/O error occurs
*/
@java.io.Serial
private void writeObject(java.io.ObjectOutputStream oos)
- throws java.io.IOException
+ throws IOException
{
if (guard != null)
guard.checkGuard(object);