Details
Description
I run the FST construction example guided package.html with lucene 4.10, and found a compile error.
http://lucene.apache.org/core/4_10_2/core/index.html?org/apache/lucene/util/fst/package-summary.html
javac claimed as below.
"FSTTest" is my test class, just copied from javadoc's example.
$ javac -cp /opt/lucene-4.10.2/core/lucene-core-4.10.2.jar FSTTest.java FSTTest.java:28: error: method toIntsRef in class Util cannot be applied to given types; builder.add(Util.toIntsRef(scratchBytes, scratchInts), outputValues[i]); ^ required: BytesRef,IntsRefBuilder found: BytesRef,IntsRef reason: actual argument IntsRef cannot be converted to IntsRefBuilder by method invocation conversion Note: FSTTest.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 1 error
I modified scratchInts variable type from IntsRef to IntsRefBuilder, it worked fine. (I checked o.a.l.u.fst.TestFSTs.java TestCase and my modification seems to be correct.)
Util.toIntsRef() method takes IntsRefBuilder as 2nd argument instead of IntsRef since 4.10, so Javadocs also should be fixed.