lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcelo Ochoa <marcelo.oc...@gmail.com>
Subject Re: Different behavior of Directory.fieldLength()
Date Sat, 13 Mar 2010 11:21:23 GMT
Uwe:
> That is not true, the API says:
> "Creates a new File *instance* from a parent pathname string and a child pathname string."
>
> Please note "instance", so it will never create the file on disk. New File() just creates
a file instance but no file on disk. You can check this with a simple test.
  OK but what the about the exception?
  If the creation of the File instance do not throw an exception and
the method File.length() returns 0 if a file does not exists
RAMDirectory and other classes which also override this method should
be modified to return 0.
  Best regards, Marcelo.

-- 
Marcelo F. Ochoa
http://marceloochoa.blogspot.com/
http://mochoa.sites.exa.unicen.edu.ar/
______________
Want to integrate Lucene and Oracle?
http://marceloochoa.blogspot.com/2007/09/running-lucene-inside-your-oracle-jvm.html
Is Oracle 11g REST ready?
http://marceloochoa.blogspot.com/2008/02/is-oracle-11g-rest-ready.html

---------------------------------------------------------------------
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