otis 2003/11/18 05:05:13 Modified: src/java/org/apache/lucene/store RAMDirectory.java Log: - Renamed a variable to reflect its functionality and fixed indentation. Revision Changes Path 1.11 +19 -19 jakarta-lucene/src/java/org/apache/lucene/store/RAMDirectory.java Index: RAMDirectory.java =================================================================== RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/store/RAMDirectory.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- RAMDirectory.java 22 Oct 2003 16:24:25 -0000 1.10 +++ RAMDirectory.java 18 Nov 2003 13:05:13 -0000 1.11 @@ -87,12 +87,12 @@ * @exception IOException if an error occurs */ public RAMDirectory(Directory dir) throws IOException { - final String[] ar = dir.list(); - for (int i = 0; i < ar.length; i++) { + final String[] files = dir.list(); + for (int i = 0; i < files.length; i++) { // make place on ram disk - OutputStream os = createFile(ar[i]); + OutputStream os = createFile(files[i]); // read current file - InputStream is = dir.openFile(ar[i]); + InputStream is = dir.openFile(files[i]); // and copy to ram disk int len = (int) is.length(); byte[] buf = new byte[len]; @@ -204,22 +204,22 @@ */ public final Lock makeLock(final String name) { return new Lock() { - public boolean obtain() throws IOException { - synchronized (files) { - if (!fileExists(name)) { - createFile(name).close(); - return true; - } - return false; + public boolean obtain() throws IOException { + synchronized (files) { + if (!fileExists(name)) { + createFile(name).close(); + return true; } + return false; } - public void release() { - deleteFile(name); - } - public boolean isLocked() { - return fileExists(name); - } - }; + } + public void release() { + deleteFile(name); + } + public boolean isLocked() { + return fileExists(name); + } + }; } /** Closes the store to future operations. */
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]