--- old/src/java.naming/share/classes/javax/naming/event/NamingEvent.java 2015-08-04 13:14:46.896900669 +0300 +++ new/src/java.naming/share/classes/javax/naming/event/NamingEvent.java 2015-08-04 13:14:46.488900660 +0300 @@ -30,9 +30,9 @@ /** * This class represents an event fired by a naming/directory service. *

- * The NamingEvent's state consists of + * The {@code NamingEvent}'s state consists of *

*

- * Note that the event source is always the same EventContext + * Note that the event source is always the same {@code EventContext} * instance that the listener has registered with. * Furthermore, the names of the bindings in - * the NamingEvent are always relative to that instance. + * the {@code NamingEvent} are always relative to that instance. * For example, suppose a listener makes the following registration: *

   *     NamespaceChangeListener listener = ...;
   *     src.addNamingListener("x", SUBTREE_SCOPE, listener);
   *
* When an object named "x/y" is subsequently deleted, the corresponding - * NamingEvent (evt) must contain: + * {@code NamingEvent} ({@code evt}) must contain: *
   *     evt.getEventContext() == src
   *     evt.getOldBinding().getName().equals("x/y")
   *
* * Care must be taken when multiple threads are accessing the same - * EventContext concurrently. + * {@code EventContext} concurrently. * See the * package description * for more information on threading issues. @@ -73,13 +73,13 @@ public class NamingEvent extends java.util.EventObject { /** * Naming event type for indicating that a new object has been added. - * The value of this constant is 0. + * The value of this constant is {@code 0}. */ public static final int OBJECT_ADDED = 0; /** * Naming event type for indicating that an object has been removed. - * The value of this constant is 1. + * The value of this constant is {@code 1}. */ public static final int OBJECT_REMOVED = 1; @@ -90,7 +90,7 @@ * be implemented by adding a binding with the new name and removing * the old binding. *

- * The old/new binding in NamingEvent may be null if the old + * The old/new binding in {@code NamingEvent} may be null if the old * name or new name is outside of the scope for which the listener * has registered. *

@@ -102,7 +102,7 @@ * corresponding provider might not be able to prevent those * notifications from being propagated to the listeners. *

- * The value of this constant is 2. + * The value of this constant is {@code 2}. */ public static final int OBJECT_RENAMED = 2; @@ -114,7 +114,7 @@ * be implemented by first removing the old binding and adding * a new binding containing the same name but a different object. *

- * The value of this constant is 3. + * The value of this constant is {@code 3}. */ public static final int OBJECT_CHANGED = 3; @@ -147,16 +147,16 @@ protected Binding newBinding; /** - * Constructs an instance of NamingEvent. + * Constructs an instance of {@code NamingEvent}. *

- * The names in newBd and oldBd are to be resolved relative - * to the event source source. + * The names in {@code newBd} and {@code oldBd} are to be resolved relative + * to the event source {@code source}. * - * For an OBJECT_ADDED event type, newBd must not be null. - * For an OBJECT_REMOVED event type, oldBd must not be null. - * For an OBJECT_CHANGED event type, newBd and - * oldBd must not be null. For an OBJECT_RENAMED event type, - * one of newBd or oldBd may be null if the new or old + * For an {@code OBJECT_ADDED} event type, {@code newBd} must not be null. + * For an {@code OBJECT_REMOVED} event type, {@code oldBd} must not be null. + * For an {@code OBJECT_CHANGED} event type, {@code newBd} and + * {@code oldBd} must not be null. For an {@code OBJECT_RENAMED} event type, + * one of {@code newBd} or {@code oldBd} may be null if the new or old * binding is outside of the scope for which the listener has registered. * * @param source The non-null context that fired this event. @@ -192,13 +192,13 @@ /** * Retrieves the event source that fired this event. - * This returns the same object as EventObject.getSource(). + * This returns the same object as {@code EventObject.getSource()}. *

* If the result of this method is used to access the * event source, for example, to look up the object or get its attributes, - * then it needs to be locked because implementations of Context + * then it needs to be locked because implementations of {@code Context} * are not guaranteed to be thread-safe - * (and EventContext is a subinterface of Context). + * (and {@code EventContext} is a subinterface of {@code Context}). * See the * package description * for more information on threading issues. @@ -213,16 +213,16 @@ * Retrieves the binding of the object before the change. *

* The binding must be nonnull if the object existed before the change - * relative to the source context (getEventContext()). - * That is, it must be nonnull for OBJECT_REMOVED and - * OBJECT_CHANGED. - * For OBJECT_RENAMED, it is null if the object before the rename + * relative to the source context ({@code getEventContext()}). + * That is, it must be nonnull for {@code OBJECT_REMOVED} and + * {@code OBJECT_CHANGED}. + * For {@code OBJECT_RENAMED}, it is null if the object before the rename * is outside of the scope for which the listener has registered interest; * it is nonnull if the object is inside the scope before the rename. *

* The name in the binding is to be resolved relative - * to the event source getEventContext(). - * The object returned by Binding.getObject() may be null if + * to the event source {@code getEventContext()}. + * The object returned by {@code Binding.getObject()} may be null if * such information is unavailable. * * @return The possibly null binding of the object before the change. @@ -235,16 +235,16 @@ * Retrieves the binding of the object after the change. *

* The binding must be nonnull if the object existed after the change - * relative to the source context (getEventContext()). - * That is, it must be nonnull for OBJECT_ADDED and - * OBJECT_CHANGED. For OBJECT_RENAMED, + * relative to the source context ({@code getEventContext()}). + * That is, it must be nonnull for {@code OBJECT_ADDED} and + * {@code OBJECT_CHANGED}. For {@code OBJECT_RENAMED}, * it is null if the object after the rename is outside the scope for * which the listener registered interest; it is nonnull if the object * is inside the scope after the rename. *

* The name in the binding is to be resolved relative - * to the event source getEventContext(). - * The object returned by Binding.getObject() may be null if + * to the event source {@code getEventContext()}. + * The object returned by {@code Binding.getObject()} may be null if * such information is unavailable. * * @return The possibly null binding of the object after the change. @@ -268,8 +268,8 @@ * Invokes the appropriate listener method on this event. * The default implementation of * this method handles the following event types: - * OBJECT_ADDED, OBJECT_REMOVED, - * OBJECT_RENAMED, OBJECT_CHANGED. + * {@code OBJECT_ADDED, OBJECT_REMOVED, + * OBJECT_RENAMED, OBJECT_CHANGED}. *

* The listener method is executed in the same thread * as this method. See the