[
https://issues.apache.org/jira/browse/LUCENE-6112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14246240#comment-14246240
]
ASF subversion and git services commented on LUCENE-6112:
---------------------------------------------------------
Commit 1645549 from [~okoji091] in branch 'dev/branches/branch_5x'
[ https://svn.apache.org/r1645549 ]
LUCENE-6112: Fix compile error in FST package example code
> Compile error with FST package example code
> -------------------------------------------
>
> Key: LUCENE-6112
> URL: https://issues.apache.org/jira/browse/LUCENE-6112
> Project: Lucene - Core
> Issue Type: Task
> Components: core/FSTs
> Affects Versions: 4.10.2
> Reporter: Tomoko Uchida
> Assignee: Koji Sekiguchi
> Priority: Minor
> Attachments: LUCENE-6112.patch
>
>
> 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.
> {code}
> $ 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
> {code}
> 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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]