lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dna...@apache.org
Subject cvs commit: jakarta-lucene/src/java/org/apache/lucene/store MMapDirectory.java
Date Sun, 17 Oct 2004 11:47:05 GMT
dnaber      2004/10/17 04:47:05

  Modified:    src/java/org/apache/lucene/store MMapDirectory.java
  Log:
  fix comments, no functional change
  PR: 31748
  Submitted by: Paul Elschot
  
  Revision  Changes    Path
  1.4       +4 -5      jakarta-lucene/src/java/org/apache/lucene/store/MMapDirectory.java
  
  Index: MMapDirectory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/store/MMapDirectory.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MMapDirectory.java	4 Oct 2004 19:44:11 -0000	1.3
  +++ MMapDirectory.java	17 Oct 2004 11:47:05 -0000	1.4
  @@ -116,7 +116,6 @@
           int bufSize = (length > (bufferStart + maxBufSize))
             ? maxBufSize
             : (int) (length - bufferStart);
  -        //System.out.println("mapping from: "+bufferStart+", size: "+bufSize);
           this.buffers[bufNr] = rafc.map(MapMode.READ_ONLY,bufferStart,bufSize);
           this.bufSizes[bufNr] = bufSize;
           bufferStart += bufSize;
  @@ -129,8 +128,8 @@
         // eg. 128 bytes and readByte() from there.
         if (curAvail == 0) {
           curBufIndex++;
  -        curBuf = buffers[curBufIndex];
  -        curBuf.position(0);      // index out of bounds when too many requested
  +        curBuf = buffers[curBufIndex]; // index out of bounds when too many bytes requested
  +        curBuf.position(0);
           curAvail = bufSizes[curBufIndex];
         }
         curAvail--;
  @@ -143,8 +142,8 @@
           len -= curAvail;
           offset += curAvail;
           curBufIndex++;
  -        curBuf = buffers[curBufIndex];
  -        curBuf.position(0);      // index out of bounds when too many requested
  +        curBuf = buffers[curBufIndex]; // index out of bounds when too many bytes requested
  +        curBuf.position(0);
           curAvail = bufSizes[curBufIndex];
         }
         curBuf.get(b, offset, len);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message