Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions ide/csl.api/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,6 @@
<specification-version>1.24</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.libs.lucene</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>9</release-version>
<specification-version>9.0</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.csl.types</code-name-base>
<build-prerequisite/>
Expand Down Expand Up @@ -472,6 +463,10 @@
<code-name-base>org.netbeans.libs.junit4</code-name-base>
<compile-dependency/>
</test-dependency>
<test-dependency>
<code-name-base>org.netbeans.libs.lucene</code-name-base>
<compile-dependency/>
</test-dependency>
<test-dependency>
<code-name-base>org.netbeans.modules.editor.bracesmatching</code-name-base>
<compile-dependency/>
Expand Down
5 changes: 3 additions & 2 deletions ide/libs.lucene/external/binaries-list
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
B4B3FBE8608B438D0A810D15187498E6DE974D0E org.apache.lucene:lucene-core:9.12.3
1C25766443C63D4B75C4ACB5D2AE162A67D6F937 org.apache.lucene:lucene-analysis-common:9.12.3
9CF36FB7AAA63A1C994B653F317499AE7D87EFBE org.apache.lucene:lucene-core:10.5.1
461FBD2772DF41469B8A158A6EBE0ED6819D49A1 org.apache.lucene:lucene-analysis-common:10.5.1
C11B462B4AD72CF85FD6F8D3777CC52995D83638 org.apache.lucene:lucene-backward-codecs:10.5.1
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Name: Apache Lucene
Description: Java-based indexing and search technology
Version: 9.12.3
Version: 10.5.1
Origin: Apache Software Foundation
License: Apache-2.0-lucene
URL: https://lucene.apache.org/core/
Source: https://archive.apache.org/dist/lucene/java/9.12.3/
Files: lucene-core-9.12.3.jar lucene-analysis-common-9.12.3.jar
Source: https://archive.apache.org/dist/lucene/java/10.5.1/
Files: lucene-core-10.5.1.jar lucene-analysis-common-10.5.1.jar lucene-backward-codecs-10.5.1.jar


Apache License
Expand Down
4 changes: 2 additions & 2 deletions ide/libs.lucene/manifest.mf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Manifest-Version: 1.0
OpenIDE-Module: org.netbeans.libs.lucene/9
OpenIDE-Module: org.netbeans.libs.lucene/10
OpenIDE-Module-Localizing-Bundle: org/netbeans/libs/lucene/Bundle.properties
OpenIDE-Module-Specification-Version: 9.2
OpenIDE-Module-Specification-Version: 10.0
7 changes: 4 additions & 3 deletions ide/libs.lucene/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
# under the License.

is.autoload=true
javac.release=11
javac.release=21
javac.compilerargs=-Xlint -Xlint:-serial
release.external/lucene-core-9.12.3.jar=modules/ext/lucene-core-9.12.3.jar
release.external/lucene-analysis-common-9.12.3.jar=modules/ext/lucene-analysis-common-9.12.3.jar
release.external/lucene-core-10.5.1.jar=modules/ext/lucene-core-10.5.1.jar
release.external/lucene-analysis-common-10.5.1.jar=modules/ext/lucene-analysis-common-10.5.1.jar
release.external/lucene-backward-codecs-10.5.1.jar=modules/ext/lucene-backward-codecs-10.5.1.jar

# This is an very old library, the complete dependencies were never explored.
# Since subpackage-s are working in new sigtest version, generation of the
Expand Down
12 changes: 8 additions & 4 deletions ide/libs.lucene/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,16 @@
<subpackages>org.apache.lucene</subpackages>
</public-packages>
<class-path-extension>
<runtime-relative-path>ext/lucene-core-9.12.3.jar</runtime-relative-path>
<binary-origin>external/lucene-core-9.12.3.jar</binary-origin>
<runtime-relative-path>ext/lucene-core-10.5.1.jar</runtime-relative-path>
<binary-origin>external/lucene-core-10.5.1.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/lucene-analysis-common-9.12.3.jar</runtime-relative-path>
<binary-origin>external/lucene-analysis-common-9.12.3.jar</binary-origin>
<runtime-relative-path>ext/lucene-analysis-common-10.5.1.jar</runtime-relative-path>
<binary-origin>external/lucene-analysis-common-10.5.1.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/lucene-backward-codecs-10.5.1.jar</runtime-relative-path>
<binary-origin>external/lucene-backward-codecs-10.5.1.jar</binary-origin>
</class-path-extension>
</data>
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion ide/parsing.indexing/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
javac.release=17
javac.release=21
javac.compilerargs=-Xlint -Xlint:-serial
spec.version.base=9.46.0
is.autoload=true
Expand Down
4 changes: 2 additions & 2 deletions ide/parsing.indexing/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>9</release-version>
<specification-version>9.0</specification-version>
<release-version>10</release-version>
<specification-version>10.0</specification-version>
</run-dependency>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion ide/parsing.lucene/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
is.autoload=true
javac.release=17
javac.release=21
javadoc.apichanges=${basedir}/apichanges.xml
javac.compilerargs=-Xlint -Xlint:-serial

Expand Down
4 changes: 2 additions & 2 deletions ide/parsing.lucene/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>9</release-version>
<specification-version>9.0</specification-version>
<release-version>10</release-version>
<specification-version>10.0</specification-version>
</run-dependency>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,22 +280,22 @@ public <S, T> void queryDocTerms(
if (cancel != null && cancel.get()) {
throw new InterruptedException();
}
if (q instanceof TermQuery) {
Terms terms = lr.terms(((TermQuery) q).getTerm().field());
if (q instanceof TermQuery termQuery) {
Terms terms = lr.terms(termQuery.getTerm().field());
if (terms != null) {
TermsEnum te = terms.iterator();
if (te.seekExact(((TermQuery) q).getTerm().bytes())) {
if (te.seekExact(termQuery.getTerm().bytes())) {
PostingsEnum pe = te.postings(null);
for (int doc = pe.nextDoc(); doc != DocIdSetIterator.NO_MORE_DOCS; doc = pe.nextDoc()) {
docTermMap.computeIfAbsent(doc, s -> new HashSet<>())
.add(((TermQuery) q).getTerm().bytes());
.add(termQuery.getTerm().bytes());
}
}
}
} else if (q instanceof PrefixQuery) {
Terms terms = lr.terms(((PrefixQuery) q).getField());
} else if (q instanceof PrefixQuery prefixQuery) {
Terms terms = lr.terms(prefixQuery.getField());
if (terms != null) {
TermsEnum te = new CompiledAutomaton(((PrefixQuery) q).getAutomaton()).getTermsEnum(terms);
TermsEnum te = new CompiledAutomaton(prefixQuery.getAutomaton()).getTermsEnum(terms);
for (BytesRef termValue = te.next(); termValue != null; termValue = te.next()) {
PostingsEnum pe = te.postings(null);
BytesRef localRef = null;
Expand All @@ -309,10 +309,10 @@ public <S, T> void queryDocTerms(
}
}
}
} else if (q instanceof RegexpFilter) {
Terms terms = lr.terms(((RegexpFilter) q).getField());
} else if (q instanceof RegexpFilter regexpFilter) {
Terms terms = lr.terms(regexpFilter.getField());
if (terms != null) {
TermsEnum te = ((RegexpFilter) q).getTermsEnum(terms);
TermsEnum te = regexpFilter.getTermsEnum(terms);
for (BytesRef termValue = te.next(); termValue != null; termValue = te.next()) {
PostingsEnum pe = te.postings(null);
BytesRef localRef = null;
Expand Down Expand Up @@ -374,7 +374,7 @@ public <S, T> void queryDocTerms(
}

private static <T> Set<T> convertTerms(final Convertor<? super BytesRef, T> convertor, final Set<? extends BytesRef> terms) {
final Set<T> result = new HashSet<T>(terms.size());
final Set<T> result = HashSet.newHashSet(terms.size());
for (BytesRef term : terms) {
result.add(convertor.convert(term));
}
Expand Down Expand Up @@ -1167,9 +1167,9 @@ private void assertSingleThreadWriter() {
"old owner Thread %s(%d), " + //NOI18N
"new owner Thread %s(%d).", //NOI18N
openThread.first(),
openThread.first().getId(),
openThread.first().threadId(),
Thread.currentThread(),
Thread.currentThread().getId()),
Thread.currentThread().threadId()),
openThread.second() != null ?
openThread.second().second() :
null);
Expand All @@ -1186,10 +1186,10 @@ private void assertNoModifiedWriter() {
"old owner Thread %s(%d) enter time: %d, " + //NOI18N
"new owner Thread %s(%d) enter time: %d.", //NOI18N
txThread.first(),
txThread.first().getId(),
txThread.first().threadId(),
txThread.second().first(),
Thread.currentThread(),
Thread.currentThread().getId(),
Thread.currentThread().threadId(),
System.currentTimeMillis()),
txThread.second().second());
LOGGER.log(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,22 +150,22 @@ public <S, T> void queryDocTerms(
if (cancel != null && cancel.get()) {
throw new InterruptedException();
}
if (q instanceof TermQuery) {
Terms terms = lr.terms(((TermQuery) q).getTerm().field());
if (q instanceof TermQuery termQuery) {
Terms terms = lr.terms(termQuery.getTerm().field());
if (terms != null) {
TermsEnum te = terms.iterator();
if (te.seekExact(((TermQuery) q).getTerm().bytes())) {
if (te.seekExact(termQuery.getTerm().bytes())) {
PostingsEnum pe = te.postings(null);
for (int doc = pe.nextDoc(); doc != DocIdSetIterator.NO_MORE_DOCS; doc = pe.nextDoc()) {
docTermMap.computeIfAbsent(doc, s -> new HashSet<>())
.add(((TermQuery) q).getTerm().bytes());
.add(termQuery.getTerm().bytes());
}
}
}
} else if (q instanceof PrefixQuery) {
Terms terms = lr.terms(((PrefixQuery) q).getField());
} else if (q instanceof PrefixQuery prefixQuery) {
Terms terms = lr.terms(prefixQuery.getField());
if (terms != null) {
TermsEnum te = new CompiledAutomaton(((PrefixQuery) q).getAutomaton()).getTermsEnum(terms);
TermsEnum te = new CompiledAutomaton(prefixQuery.getAutomaton()).getTermsEnum(terms);
for (BytesRef termValue = te.next(); termValue != null; termValue = te.next()) {
PostingsEnum pe = te.postings(null);
BytesRef localRef = null;
Expand All @@ -179,10 +179,10 @@ public <S, T> void queryDocTerms(
}
}
}
} else if (q instanceof RegexpFilter) {
Terms terms = lr.terms(((RegexpFilter) q).getField());
} else if (q instanceof RegexpFilter regexpFilter) {
Terms terms = lr.terms(regexpFilter.getField());
if (terms != null) {
TermsEnum te = ((RegexpFilter) q).getTermsEnum(terms);
TermsEnum te = regexpFilter.getTermsEnum(terms);
for (BytesRef termValue = te.next(); termValue != null; termValue = te.next()) {
PostingsEnum pe = te.postings(null);
BytesRef localRef = null;
Expand Down Expand Up @@ -352,7 +352,7 @@ private synchronized Directory getDirectory() {
}

private static <T> Set<T> convertTerms(final Convertor<? super BytesRef, T> convertor, final Set<? extends BytesRef> terms) {
Set<T> result = new HashSet<>(terms.size());
Set<T> result = HashSet.newHashSet(terms.size());
for (BytesRef term : terms) {
result.add(convertor.convert(term));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public String toString() {
sb.append(this.getClass().getSimpleName());
sb.append("owned by: "); //NOI18N
sb.append(owner);
sb.append('(').append(owner == null ? -1 : owner.getId()).append("); "); //NOI18N
sb.append('(').append(owner == null ? -1 : owner.threadId()).append("); "); //NOI18N
sb.append("created from:\n");
stackTrace(caller == null ? new StackTraceElement[0] : caller.getStackTrace(), sb);
return sb.toString();
Expand Down Expand Up @@ -157,7 +157,7 @@ private static <T extends Exception> T annotateException(
}
if (threads != null) {
final Thread ct = Thread.currentThread();
message.append("current thread: ").append(ct).append('(').append(ct.getId()).append(')'); //NOI18N
message.append("current thread: ").append(ct).append('(').append(ct.threadId()).append(')'); //NOI18N
message.append("threads: \n"); //NOI18N //NOI18N
stackTraces(threads, message);
}
Expand All @@ -172,7 +172,7 @@ private static void stackTraces(
@NonNull final StringBuilder sb) {
for (Map.Entry<Thread,StackTraceElement[]> entry : traces.entrySet()) {
final Thread t = entry.getKey();
sb.append(t).append('(').append(t.getId()).append(")\n"); //NOI18N
sb.append(t).append('(').append(t.threadId()).append(")\n"); //NOI18N
stackTrace(entry.getValue(), sb);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ public Query createRegExpQuery(final @NonNull String name, final @NonNull String
@Override
public Query createAllDocsQuery(final @NonNull String name) {
if (name.isEmpty()) {
return new MatchAllDocsQuery();
return MatchAllDocsQuery.INSTANCE;
} else {
return new FieldExistsQuery(name);
}
Expand Down
9 changes: 0 additions & 9 deletions java/java.hints/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,6 @@
<implementation-version/>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.libs.lucene</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>9</release-version>
<specification-version>9.0</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.editor</code-name-base>
<build-prerequisite/>
Expand Down
4 changes: 2 additions & 2 deletions java/java.source.base/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>9</release-version>
<specification-version>9.0</specification-version>
<release-version>10</release-version>
<specification-version>10.0</specification-version>
</run-dependency>
</dependency>
<dependency>
Expand Down
9 changes: 0 additions & 9 deletions java/java.source/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,6 @@
<implementation-version/>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.libs.lucene</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>9</release-version>
<specification-version>9.0</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.autoupdate.services</code-name-base>
<build-prerequisite/>
Expand Down
4 changes: 2 additions & 2 deletions java/java.sourceui/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>9</release-version>
<specification-version>9.0</specification-version>
<release-version>10</release-version>
<specification-version>10.0</specification-version>
</run-dependency>
</dependency>
<dependency>
Expand Down
12 changes: 3 additions & 9 deletions java/spi.java.hints/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,6 @@
<implementation-version/>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.libs.lucene</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>9</release-version>
<specification-version>9.0</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.code.analysis</code-name-base>
<build-prerequisite/>
Expand Down Expand Up @@ -405,6 +396,9 @@
<code-name-base>org.netbeans.libs.junit4</code-name-base>
<compile-dependency/>
</test-dependency>
<test-dependency>
<code-name-base>org.netbeans.libs.lucene</code-name-base>
</test-dependency>
<test-dependency>
<code-name-base>org.netbeans.modules.classfile</code-name-base>
</test-dependency>
Expand Down
Loading