lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 34066] - [PATCH] Extension to binary Fields that allows fixed byte buffer
Date Tue, 22 Mar 2005 18:19:36 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34066>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34066





------- Additional Comments From cutting@apache.org  2005-03-22 19:19 -------
Things would be safer if you:

private int fieldsDataLength = -1;

public int binaryLength() { 
   return fieldsDataLength == -1
      ? binaryValue().length
      : fieldsDataLength;
}

public Field(String name, byte[] value, int length, Store store) {
  if (length < 0 || length > value.length)
    throw new IllegalArgumentException("bad length:" + length);

  ...

}
         
No?


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message