Skip to content

Commit a8851ab

Browse files
ginoaugustinevladak
authored andcommitted
Junit error in Suggester Controller Test
Signed-off-by: Gino Augustine <[email protected]>
1 parent 2cc47b3 commit a8851ab

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

suggester/src/main/java/org/opengrok/suggest/SuggesterProjectData.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ private void initSearchCountMap() throws IOException {
315315
m = new ChronicleMapAdapter(field, conf.getAverageKeySize(), conf.getEntries(), f);
316316
} catch (IllegalArgumentException e) {
317317
logger.log(Level.SEVERE, String.format("Could not create ChronicleMap for field %s in directory " +
318-
"'%s' due to invalid key size (%f) or number of entries: (%d):",
318+
"'%s' due to invalid key size (%f) or number of entries: (%d):",
319319
field, suggesterDir, conf.getAverageKeySize(), conf.getEntries()), e);
320320
return;
321321
} catch (Throwable t) {
@@ -324,8 +324,14 @@ private void initSearchCountMap() throws IOException {
324324
+ " , most popular completion disabled, if you are using "
325325
+ "JDK9+ make sure to specify: "
326326
+ "--add-exports java.base/jdk.internal.ref=ALL-UNNAMED "
327-
+ "--add-exports java.base/jdk.internal.misc=ALL-UNNAMED "
328-
+ "--add-exports java.base/sun.nio.ch=ALL-UNNAMED", field, suggesterDir), t);
327+
+ "--add-exports java.base/sun.nio.ch=ALL-UNNAMED "
328+
+ "--add-exports jdk.unsupported/sun.misc=ALL-UNNAMED "
329+
+ "--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED "
330+
+ "--add-opens jdk.compiler/com.sun.tools.javac=ALL-UNNAMED "
331+
+ "--add-opens java.base/java.lang=ALL-UNNAMED "
332+
+ "--add-opens java.base/java.lang.reflect=ALL-UNNAMED "
333+
+ "--add-opens java.base/java.io=ALL-UNNAMED "
334+
+ "--add-opens java.base/java.util=ALL-UNNAMED", field, suggesterDir), t);
329335
return;
330336
}
331337

suggester/src/main/java/org/opengrok/suggest/SuggesterSearcher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ private int getPhraseScore(final ComplexQueryData data, final int docBase, final
293293
while (postingsEnum.nextDoc() != DocIdSetIterator.NO_MORE_DOCS) {
294294
int docId = postingsEnum.docID();
295295
if (data.documentIds.has(docBase + docId)) {
296-
IntsHolder positions = data.scorer.getPositions(docBase + docId);
296+
IntsHolder positions = data.scorer.getPositions(docId);
297297
if (positions == null) {
298298
continue;
299299
}

0 commit comments

Comments
 (0)