summaryrefslogtreecommitdiffstats
path: root/libjava/classpath/java/lang/ref
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/java/lang/ref')
-rw-r--r--libjava/classpath/java/lang/ref/PhantomReference.java8
-rw-r--r--libjava/classpath/java/lang/ref/Reference.java18
-rw-r--r--libjava/classpath/java/lang/ref/ReferenceQueue.java22
-rw-r--r--libjava/classpath/java/lang/ref/SoftReference.java10
-rw-r--r--libjava/classpath/java/lang/ref/WeakReference.java6
5 files changed, 32 insertions, 32 deletions
diff --git a/libjava/classpath/java/lang/ref/PhantomReference.java b/libjava/classpath/java/lang/ref/PhantomReference.java
index 67e97d399cd..29215ead756 100644
--- a/libjava/classpath/java/lang/ref/PhantomReference.java
+++ b/libjava/classpath/java/lang/ref/PhantomReference.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -44,7 +44,7 @@ package java.lang.ref;
* finalized. This is the reason, why <code>get()</code> always
* returns null.
*
- * @author Jochen Hoenicke
+ * @author Jochen Hoenicke
*/
public class PhantomReference<T>
extends Reference<T>
@@ -60,11 +60,11 @@ public class PhantomReference<T>
{
super(referent, q);
}
-
+
/**
* Returns the object, this reference refers to.
* @return <code>null</code>, since the refered object may be
- * finalized and thus not accessible.
+ * finalized and thus not accessible.
*/
public T get()
{
diff --git a/libjava/classpath/java/lang/ref/Reference.java b/libjava/classpath/java/lang/ref/Reference.java
index ce224b891f9..37cda6f02c2 100644
--- a/libjava/classpath/java/lang/ref/Reference.java
+++ b/libjava/classpath/java/lang/ref/Reference.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -89,7 +89,7 @@ public abstract class Reference<T>
* reference is not enqueued. Otherwise it points to the next
* reference. The last reference on a queue will point to itself
* (not to null, that value is used to mark a not enqueued
- * reference).
+ * reference).
*/
volatile Reference nextOnQueue;
@@ -103,7 +103,7 @@ public abstract class Reference<T>
/**
* Creates a new reference that is not registered to any queue.
* Since it is package private, it is not possible to overload this
- * class in a different package.
+ * class in a different package.
* @param ref the object we refer to.
*/
Reference(T ref)
@@ -114,7 +114,7 @@ public abstract class Reference<T>
/**
* Creates a reference that is registered to a queue. Since this is
* package private, it is not possible to overload this class in a
- * different package.
+ * different package.
* @param ref the object we refer to.
* @param q the reference queue to register on.
* @exception NullPointerException if q is null.
@@ -129,21 +129,21 @@ public abstract class Reference<T>
/**
* Returns the object, this reference refers to.
- * @return the object, this reference refers to, or null if the
+ * @return the object, this reference refers to, or null if the
* reference was cleared.
*/
public T get()
{
synchronized (lock)
{
- return referent;
+ return referent;
}
}
/**
* Clears the reference, so that it doesn't refer to its object
* anymore. For soft and weak references this is called by the
- * garbage collector. For phantom references you should call
+ * garbage collector. For phantom references you should call
* this when enqueuing the reference.
*/
public void clear()
@@ -164,12 +164,12 @@ public abstract class Reference<T>
* Enqueue an object on a reference queue. This is normally executed
* by the garbage collector.
*/
- public boolean enqueue()
+ public boolean enqueue()
{
ReferenceQueue q = queue;
if (q != null)
{
- return q.enqueue(this);
+ return q.enqueue(this);
}
return false;
}
diff --git a/libjava/classpath/java/lang/ref/ReferenceQueue.java b/libjava/classpath/java/lang/ref/ReferenceQueue.java
index 28162877905..73f62d64a84 100644
--- a/libjava/classpath/java/lang/ref/ReferenceQueue.java
+++ b/libjava/classpath/java/lang/ref/ReferenceQueue.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -55,9 +55,9 @@ public class ReferenceQueue<T>
/**
* This is a linked list of references. If this is null, the list is
* empty. Otherwise this points to the first reference on the queue.
- * The first reference will point to the next reference via the
+ * The first reference will point to the next reference via the
* <code>nextOnQueue</code> field. The last reference will point to
- * itself (not to null, since <code>nextOnQueue</code> is used to
+ * itself (not to null, since <code>nextOnQueue</code> is used to
* determine if a reference is enqueued).
*/
private Reference<? extends T> first;
@@ -80,15 +80,15 @@ public class ReferenceQueue<T>
* immediately. The reference will be dequeued.
*
* @return a reference on the queue, if there is one,
- * <code>null</code> otherwise.
+ * <code>null</code> otherwise.
*/
public Reference<? extends T> poll()
- {
+ {
return dequeue();
}
/**
- * This is called by reference to enqueue itself on this queue.
+ * This is called by reference to enqueue itself on this queue.
* @param ref the reference that should be enqueued.
* @return true if successful, false if not.
*/
@@ -119,7 +119,7 @@ public class ReferenceQueue<T>
{
if (first == null)
return null;
-
+
Reference<? extends T> result = first;
first = (first == first.nextOnQueue) ? null : first.nextOnQueue;
result.nextOnQueue = null;
@@ -132,8 +132,8 @@ public class ReferenceQueue<T>
* until a reference is enqueued.
* @param timeout the timeout period in milliseconds, <code>0</code> means
* wait forever.
- * @return the reference removed from the queue, or
- * <code>null</code> if timeout period expired.
+ * @return the reference removed from the queue, or
+ * <code>null</code> if timeout period expired.
* @exception InterruptedException if the wait was interrupted.
*/
public Reference<? extends T> remove(long timeout)
@@ -147,13 +147,13 @@ public class ReferenceQueue<T>
return dequeue();
}
-
+
/**
* Removes a reference from the queue, blocking until a reference is
* enqueued.
*
- * @return the reference removed from the queue.
+ * @return the reference removed from the queue.
* @exception InterruptedException if the wait was interrupted.
*/
public Reference<? extends T> remove()
diff --git a/libjava/classpath/java/lang/ref/SoftReference.java b/libjava/classpath/java/lang/ref/SoftReference.java
index 077dc173ddd..269ffd0ec9e 100644
--- a/libjava/classpath/java/lang/ref/SoftReference.java
+++ b/libjava/classpath/java/lang/ref/SoftReference.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -45,7 +45,7 @@ package java.lang.ref;
* references it should clear. This makes a soft reference ideal for
* caches.<br>
*
- * @author Jochen Hoenicke
+ * @author Jochen Hoenicke
*/
public class SoftReference<T>
extends Reference<T>
@@ -69,15 +69,15 @@ public class SoftReference<T>
{
super(referent, q);
}
-
+
/**
* Returns the object, this reference refers to.
- * @return the object, this reference refers to, or null if the
+ * @return the object, this reference refers to, or null if the
* reference was cleared.
*/
public T get()
{
- /* Why is this overloaded???
+ /* Why is this overloaded???
* Maybe for a kind of LRU strategy. */
return super.get();
}
diff --git a/libjava/classpath/java/lang/ref/WeakReference.java b/libjava/classpath/java/lang/ref/WeakReference.java
index 563563bf164..973564336a4 100644
--- a/libjava/classpath/java/lang/ref/WeakReference.java
+++ b/libjava/classpath/java/lang/ref/WeakReference.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -51,8 +51,8 @@ package java.lang.ref;
* an object is not referenced anymore, the reference will
* automatically cleared, and you may remove it from the set. <br>
*
- * @author Jochen Hoenicke
- * @see java.util.WeakHashMap
+ * @author Jochen Hoenicke
+ * @see java.util.WeakHashMap
*/
public class WeakReference<T>
extends Reference<T>
OpenPOWER on IntegriCloud