Skip to content

Commit 02b0a16

Browse files
committed
Update Lucene from 7.5.0 to 9.9.1 as requested in #1408 to address https://osv.dev/vulnerability/OSV-2023-705
1 parent 6d17c23 commit 02b0a16

24 files changed

+29
-29
lines changed

.classpath

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
<classpathentry exported="true" kind="lib" path="lib/protobuf-java-3.19.6.jar" sourcepath="libsrc/protobuf-java-3.19.6-sources.jar"/>
2424
<classpathentry exported="true" kind="lib" path="lib/javacc.jar"/>
2525
<classpathentry exported="true" kind="lib" path="lib/javax.json.jar" sourcepath="libsrc/javax.json-api-1.0-sources.jar"/>
26-
<classpathentry exported="true" kind="lib" path="lib/lucene-core-7.5.0.jar" sourcepath="libsrc/lucene-core-7.5.0-sources.jar"/>
27-
<classpathentry exported="true" kind="lib" path="lib/lucene-demo-7.5.0.jar" sourcepath="libsrc/lucene-demo-7.5.0-sources.jar"/>
28-
<classpathentry exported="true" kind="lib" path="lib/lucene-analyzers-common-7.5.0.jar" sourcepath="lucene-analyzers-common-7.5.0-sources.jar"/>
29-
<classpathentry exported="true" kind="lib" path="lib/lucene-queryparser-7.5.0.jar" sourcepath="lucene-queryparser-7.5.0-sources.jar"/>
26+
<classpathentry exported="true" kind="lib" path="lib/lucene-core-9.9.1.jar" sourcepath="libsrc/lucene-core-9.9.1-sources.jar"/>
27+
<classpathentry exported="true" kind="lib" path="lib/lucene-demo-9.9.1.jar" sourcepath="libsrc/lucene-demo-9.9.1-sources.jar"/>
28+
<classpathentry exported="true" kind="lib" path="lib/lucene-analysis-common-9.9.1.jar" sourcepath="lucene-analysis-common-9.9.1-sources.jar"/>
29+
<classpathentry exported="true" kind="lib" path="lib/lucene-queryparser-9.9.1.jar" sourcepath="lucene-queryparser-9.9.1-sources.jar"/>
3030
<classpathentry exported="true" kind="lib" path="lib/slf4j-api.jar" sourcepath="libsrc/slf4j-api-1.7.12-sources.jar"/>
3131
<classpathentry exported="true" kind="lib" path="lib/slf4j-simple.jar" sourcepath="libsrc/slf4j-simple-1.7.12-sources.jar"/>
3232
<classpathentry exported="true" kind="lib" path="lib/javax.activation-api-1.2.0.jar" sourcepath="libsrc/javax.activation-api-1.2.0-sources.jar"/>

doc/corenlp/pom-full.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,19 @@
6262
<dependency>
6363
<groupId>org.apache.lucene</groupId>
6464
<artifactId>lucene-queryparser</artifactId>
65-
<version>7.5.0</version>
65+
<version>9.9.1</version>
6666
</dependency>
6767

6868
<dependency>
6969
<groupId>org.apache.lucene</groupId>
70-
<artifactId>lucene-analyzers-common</artifactId>
71-
<version>7.5.0</version>
70+
<artifactId>lucene-analysis-common</artifactId>
71+
<version>9.9.1</version>
7272
</dependency>
7373

7474
<dependency>
7575
<groupId>org.apache.lucene</groupId>
7676
<artifactId>lucene-core</artifactId>
77-
<version>7.5.0</version>
77+
<version>9.9.1</version>
7878
</dependency>
7979

8080
<!-- https://mvnrepository.com/artifact/jakarta.servlet/jakarta.servlet-api -->

lib/README

+7-7
Original file line numberDiff line numberDiff line change
@@ -377,13 +377,13 @@ LAST UPDATE:2014-04-07
377377
LAST UPDATE BY:Sonal Gupta
378378

379379
-----------------------------------------------------------------------
380-
lucene-analyzers-common-7.5.0.jar
381-
lucene-core-7.5.0.jar
382-
lucene-demo-7.5.0.jar
380+
lucene-analysis-common-9.9.1.jar
381+
lucene-core-9.9.1.jar
382+
lucene-demo-9.9.1.jar
383383
lucene-queryparser-7.5.0.jar
384384
ORIGINAL JAR NAME: n/a
385-
VERSION: 7.5.0
386-
RELEASE DATE: 24 Sep 2018
385+
VERSION: 9.9.1
386+
RELEASE DATE: 2023-12-16
387387
SOURCE AVAILABLE: yes
388388
DESCRIPTION: "Apache Lucene is a high-performance, full-featured text
389389
search engine library written entirely in Java. It is a technology
@@ -393,8 +393,8 @@ in has version number, as before. Broken into several Jars in this version."
393393
URL: http://lucene.apache.org/
394394
USED BY: patterns.surface
395395

396-
LAST UPDATE: 2018-11-11
397-
LAST UPDATE BY: Melvin Johnson Premkumar
396+
LAST UPDATE: 2024-01-17
397+
LAST UPDATE BY: John Bauer
398398

399399
-----------------------------------------------------------------
400400
slf4j-api.jar

lib/lucene-analysis-common-9.9.1.jar

1.65 MB
Binary file not shown.

lib/lucene-analyzers-common-7.5.0.jar

-1.58 MB
Binary file not shown.

lib/lucene-core-7.5.0.jar

-2.91 MB
Binary file not shown.

lib/lucene-core-9.9.1.jar

3.82 MB
Binary file not shown.

lib/lucene-demo-7.5.0.jar

-42.9 KB
Binary file not shown.

lib/lucene-demo-9.9.1.jar

65.9 KB
Binary file not shown.

lib/lucene-queryparser-7.5.0.jar

-373 KB
Binary file not shown.

lib/lucene-queryparser-9.9.1.jar

416 KB
Binary file not shown.
1.31 MB
Binary file not shown.
-1.56 MB
Binary file not shown.

libsrc/lucene-core-7.5.0-sources.jar

-2.01 MB
Binary file not shown.

libsrc/lucene-core-9.9.1-sources.jar

2.53 MB
Binary file not shown.

libsrc/lucene-demo-7.5.0-sources.jar

-38.3 KB
Binary file not shown.

libsrc/lucene-demo-9.9.1-sources.jar

55.7 KB
Binary file not shown.
-379 KB
Binary file not shown.
392 KB
Binary file not shown.

pom-java-11.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,19 @@
6060
<dependency>
6161
<groupId>org.apache.lucene</groupId>
6262
<artifactId>lucene-queryparser</artifactId>
63-
<version>7.5.0</version>
63+
<version>9.9.1</version>
6464
</dependency>
6565

6666
<dependency>
6767
<groupId>org.apache.lucene</groupId>
68-
<artifactId>lucene-analyzers-common</artifactId>
69-
<version>7.5.0</version>
68+
<artifactId>lucene-analysis-common</artifactId>
69+
<version>9.9.1</version>
7070
</dependency>
7171

7272
<dependency>
7373
<groupId>org.apache.lucene</groupId>
7474
<artifactId>lucene-core</artifactId>
75-
<version>7.5.0</version>
75+
<version>9.9.1</version>
7676
</dependency>
7777

7878
<!-- https://mvnrepository.com/artifact/jakarta.servlet/jakarta.servlet-api -->

pom-java-17.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,19 @@
6060
<dependency>
6161
<groupId>org.apache.lucene</groupId>
6262
<artifactId>lucene-queryparser</artifactId>
63-
<version>7.5.0</version>
63+
<version>9.9.1</version>
6464
</dependency>
6565

6666
<dependency>
6767
<groupId>org.apache.lucene</groupId>
68-
<artifactId>lucene-analyzers-common</artifactId>
69-
<version>7.5.0</version>
68+
<artifactId>lucene-analysis-common</artifactId>
69+
<version>9.9.1</version>
7070
</dependency>
7171

7272
<dependency>
7373
<groupId>org.apache.lucene</groupId>
7474
<artifactId>lucene-core</artifactId>
75-
<version>7.5.0</version>
75+
<version>9.9.1</version>
7676
</dependency>
7777

7878
<!-- https://mvnrepository.com/artifact/jakarta.servlet/jakarta.servlet-api -->

pom.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,19 @@
6262
<dependency>
6363
<groupId>org.apache.lucene</groupId>
6464
<artifactId>lucene-queryparser</artifactId>
65-
<version>7.5.0</version>
65+
<version>9.9.1</version>
6666
</dependency>
6767

6868
<dependency>
6969
<groupId>org.apache.lucene</groupId>
70-
<artifactId>lucene-analyzers-common</artifactId>
71-
<version>7.5.0</version>
70+
<artifactId>lucene-analysis-common</artifactId>
71+
<version>9.9.1</version>
7272
</dependency>
7373

7474
<dependency>
7575
<groupId>org.apache.lucene</groupId>
7676
<artifactId>lucene-core</artifactId>
77-
<version>7.5.0</version>
77+
<version>9.9.1</version>
7878
</dependency>
7979

8080
<!-- https://mvnrepository.com/artifact/jakarta.servlet/jakarta.servlet-api -->

src/edu/stanford/nlp/patterns/LuceneSentenceIndex.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ Set<String> queryIndexGetSentences(CollectionValuedMap<String, String> words) th
154154
//Map<String, List<CoreLabel>> sents = null;
155155
TopDocs tp = searcher.search(query, Integer.MAX_VALUE);
156156
Set<String> sentids = new HashSet<>();
157-
if (tp.totalHits > 0) {
157+
if (tp.totalHits.value > 0) {
158158
for (ScoreDoc s : tp.scoreDocs) {
159159
int docId = s.doc;
160160
Document d = searcher.doc(docId);

src/edu/stanford/nlp/patterns/surface/PatternsForEachTokenLucene.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ public Map<Integer, Set<E>> getPatternsForAllTokens(String sentId) {
250250
try {
251251
TermQuery query = new TermQuery(new Term("sentid", sentId));
252252
TopDocs tp = searcher.search(query,1);
253-
if (tp.totalHits > 0) {
253+
if (tp.totalHits.value > 0) {
254254
for (ScoreDoc s : tp.scoreDocs) {
255255
int docId = s.doc;
256256
Document d = searcher.doc(docId);

0 commit comments

Comments
 (0)