Skip to content

Commit

Permalink
Fixes JavaDoc
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Pinčuk <alexander.v.pinchuk@gmail.com>
  • Loading branch information
avpinchuk committed Jun 13, 2024
1 parent 4137234 commit 21a7ca4
Showing 1 changed file with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ public interface ClassFinder {
*/
private volatile String name;


/**
* @throws IllegalArgumentException when the delegate does not have same parent
* as this classloader.
Expand All @@ -111,13 +110,10 @@ public DelegatingClassLoader(ClassLoader parent) {
* a delegate to be added that has a different parent.
* @param d ClassFinder to add to the list of delegates
* @return true if the delegate is added, false otherwise.
* @throws IllegalStateException when this method is called after the
* classloader has been used to load any class.
* @throws IllegalArgumentException when the delegate does not have same parent
* as this classloader.
*/
public boolean addDelegate(ClassFinder d) throws
IllegalStateException, IllegalArgumentException {
public boolean addDelegate(ClassFinder d) throws IllegalArgumentException {
checkDelegate(d);
return delegates.addIfAbsent(d);
}
Expand All @@ -137,13 +133,10 @@ private void checkDelegate(ClassFinder d) throws IllegalArgumentException {
}

/**
* Removes a ClassFinder from list of delegates. This method must not be used
* once this classloader has beed used to load any class. If attempted to
* do so, this method throws IllegalStateException
* Removes a ClassFinder from list of delegates.
*
* @param d ClassFinder to remove from the list of delegates
* @return true if the delegate was removed, false otherwise.
* @throws IllegalStateException when this method is called after the
* classloader has been used to load any class.
*/
public boolean removeDelegate(ClassFinder d) {
return delegates.remove(d);
Expand Down

0 comments on commit 21a7ca4

Please sign in to comment.