Author: vgritsenko
Date: Thu Dec 15 13:51:18 2005
New Revision: 357074
URL: http://svn.apache.org/viewcvs?rev=357074&view=rev
Log:
cleanup
Modified:
xml/xindice/trunk/java/src/org/apache/xindice/core/filer/Paged.java
Modified: xml/xindice/trunk/java/src/org/apache/xindice/core/filer/Paged.java
URL:
http://svn.apache.org/viewcvs/xml/xindice/trunk/java/src/org/apache/xindice/core/filer/Paged.java?rev=357074&r1=357073&r2=357074&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/core/filer/Paged.java
(original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/core/filer/Paged.java Thu Dec
15 13:51:18 2005
@@ -69,7 +69,8 @@
* (DEFAULT_DESCRIPTORS_MAX).</li>
* </ul>
*
- * FIXME: Currently it seems that maxkeysize is not used anywhere.
+ * <br>FIXME: Currently it seems that maxkeysize is not used anywhere.
+ * <br>TODO: Introduce Paged interface, implementations.
*
* @version CVS $Revision$, $Date$
*/
@@ -244,24 +245,22 @@
return (RandomAccessFile) descriptors.pop();
}
// Otherwise we need to get one some other way.
- else {
- // First try to create a new one if there's room
- if (descriptorsCount < descriptorsMax) {
- descriptorsCount++;
- return new RandomAccessFile(file, "rw");
- }
- // Otherwise we have to wait for one to be released by another
thread.
- else {
- while (true) {
- try {
- descriptors.wait();
- return (RandomAccessFile) descriptors.pop();
- } catch (InterruptedException e) {
- // Ignore, and continue to wait
- } catch (EmptyStackException e) {
- // Ignore, and continue to wait
- }
- }
+
+ // First try to create a new one if there's room
+ if (descriptorsCount < descriptorsMax) {
+ descriptorsCount++;
+ return new RandomAccessFile(file, "rw");
+ }
+
+ // Otherwise we have to wait for one to be released by another
thread.
+ while (true) {
+ try {
+ descriptors.wait();
+ return (RandomAccessFile) descriptors.pop();
+ } catch (InterruptedException e) {
+ // Ignore, and continue to wait
+ } catch (EmptyStackException e) {
+ // Ignore, and continue to wait
}
}
}