-
Notifications
You must be signed in to change notification settings - Fork 781
switch to Java 21 for build/Docker #4759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
# Copyright (c) 2018, 2024 Oracle and/or its affiliates. All rights reserved. | ||
# Copyright (c) 2018, 2025 Oracle and/or its affiliates. All rights reserved. | ||
# Portions Copyright (c) 2020, Chris Fraire <[email protected]>. | ||
|
||
FROM ubuntu:jammy AS build | ||
|
||
# hadolint ignore=DL3008 | ||
RUN apt-get update && apt-get install --no-install-recommends -y openjdk-17-jdk python3 python3-venv && \ | ||
RUN apt-get update && apt-get install --no-install-recommends -y openjdk-21-jdk python3 python3-venv && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
|
@@ -41,7 +41,7 @@ RUN cp `ls -t distribution/target/*.tar.gz | head -1` /opengrok.tar.gz | |
# Store the version in a file so that the tools can report it. | ||
RUN /mvn/mvnw help:evaluate -Dexpression=project.version -q -DforceStdout > /mvn/VERSION | ||
|
||
FROM tomcat:10.1.40-jdk17 | ||
FROM tomcat:10.1.40-jdk21 | ||
LABEL maintainer="https://github.com/oracle/opengrok" | ||
LABEL org.opencontainers.image.source="https://github.com/oracle/opengrok" | ||
LABEL org.opencontainers.image.description="OpenGrok code search" | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
*/ | ||
|
||
/* | ||
* Copyright (c) 2008, 2023, Oracle and/or its affiliates. All rights reserved. | ||
* Copyright (c) 2008, 2025, Oracle and/or its affiliates. All rights reserved. | ||
* Portions Copyright (c) 2018, Chris Fraire <[email protected]>. | ||
*/ | ||
package org.opengrok.indexer.analysis; | ||
|
@@ -66,24 +66,24 @@ public static class LineTagMap implements Serializable { | |
|
||
private static final long serialVersionUID = 1191703801007779481L; | ||
@SuppressWarnings("java:S116") | ||
private final Map<String, Set<Tag>> sym_tags; //NOPMD | ||
private final HashMap<String, Set<Tag>> sym_tags; //NOPMD | ||
|
||
protected LineTagMap() { | ||
this.sym_tags = new HashMap<>(); | ||
} | ||
} | ||
// line number -> tag map | ||
@SuppressWarnings("java:S116") | ||
private final Map<Integer, LineTagMap> line_maps; | ||
private final HashMap<Integer, LineTagMap> line_maps; | ||
|
||
/** | ||
* Map from symbol to the line numbers on which the symbol is defined. | ||
*/ | ||
private final Map<String, Set<Integer>> symbols; | ||
private final HashMap<String, Set<Integer>> symbols; | ||
/** | ||
* List of all the tags. | ||
*/ | ||
private final List<Tag> tags; | ||
private final ArrayList<Tag> tags; | ||
|
||
public Definitions() { | ||
symbols = new HashMap<>(); | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
*/ | ||
|
||
/* | ||
* Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved. | ||
* Copyright (c) 2009, 2025, Oracle and/or its affiliates. All rights reserved. | ||
* Portions Copyright (c) 2017, 2020, Chris Fraire <[email protected]>. | ||
*/ | ||
package org.opengrok.indexer.analysis; | ||
|
@@ -49,6 +49,7 @@ public class JFlexTokenizer extends Tokenizer | |
* will be owned by the {@link JFlexTokenizer}. | ||
* @param matcher a defined instance | ||
*/ | ||
@SuppressWarnings("this-escape") | ||
public JFlexTokenizer(ScanningSymbolMatcher matcher) { | ||
if (matcher == null) { | ||
throw new IllegalArgumentException("`matcher' is null"); | ||
|
@@ -83,12 +84,9 @@ public final void close() throws IOException { | |
matcher.yyclose(); | ||
} | ||
|
||
private final CharTermAttribute termAtt = addAttribute( | ||
CharTermAttribute.class); | ||
private final OffsetAttribute offsetAtt = addAttribute( | ||
OffsetAttribute.class); | ||
private final PositionIncrementAttribute posIncrAtt = addAttribute( | ||
PositionIncrementAttribute.class); | ||
private final CharTermAttribute termAtt = addAttribute(CharTermAttribute.class); | ||
private final OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class); | ||
private final PositionIncrementAttribute posIncrAtt = addAttribute(PositionIncrementAttribute.class); | ||
|
||
/** | ||
* Attempts to advance the stream to the next acceptable token, and updates | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
*/ | ||
|
||
/* | ||
* Copyright (c) 2009, 2021, Oracle and/or its affiliates. All rights reserved. | ||
* Copyright (c) 2009, 2025, Oracle and/or its affiliates. All rights reserved. | ||
* Portions Copyright (c) 2011, Jens Elkner. | ||
* Portions Copyright (c) 2017, 2020, Chris Fraire <[email protected]>. | ||
*/ | ||
|
@@ -37,8 +37,7 @@ | |
/** | ||
* @author Lubos Kosco | ||
*/ | ||
public class JFlexXref implements Xrefer, SymbolMatchedListener, | ||
NonSymbolMatchedListener { | ||
public class JFlexXref implements Xrefer, SymbolMatchedListener, NonSymbolMatchedListener { | ||
|
||
/** | ||
* Used to indicate pre-formatted output with | ||
|
@@ -99,6 +98,7 @@ public class JFlexXref implements Xrefer, SymbolMatchedListener, | |
* will be owned by the {@link JFlexXref}. | ||
* @param matcher a defined instance | ||
*/ | ||
@SuppressWarnings("this-escape") | ||
public JFlexXref(ScanningSymbolMatcher matcher) { | ||
if (matcher == null) { | ||
throw new IllegalArgumentException("`matcher' is null"); | ||
|
@@ -109,11 +109,11 @@ public JFlexXref(ScanningSymbolMatcher matcher) { | |
// The xrefer will own the matcher, so we won't have to unsubscribe. | ||
|
||
userPageLink = RuntimeEnvironment.getInstance().getUserPage(); | ||
if (userPageLink != null && userPageLink.length() == 0) { | ||
if (userPageLink != null && userPageLink.isEmpty()) { | ||
userPageLink = null; | ||
} | ||
userPageSuffix = RuntimeEnvironment.getInstance().getUserPageSuffix(); | ||
if (userPageSuffix != null && userPageSuffix.length() == 0) { | ||
if (userPageSuffix != null && userPageSuffix.isEmpty()) { | ||
userPageSuffix = null; | ||
} | ||
} | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
*/ | ||
|
||
/* | ||
* Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved. | ||
* Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. | ||
* Portions Copyright (c) 2018, Chris Fraire <[email protected]>. | ||
*/ | ||
package org.opengrok.indexer.analysis; | ||
|
@@ -52,7 +52,9 @@ public class PathTokenizer extends Tokenizer { | |
// below should be '/' since we try to convert even windows file separators | ||
// to unix ones | ||
public static final char DEFAULT_DELIMITER = '/'; | ||
@SuppressWarnings("this-escape") | ||
private final CharTermAttribute termAtt = addAttribute(CharTermAttribute.class); | ||
@SuppressWarnings("this-escape") | ||
private final OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class); | ||
private int startPosition = 0; | ||
private final char delimiter; | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
*/ | ||
|
||
/* | ||
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. | ||
* Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved. | ||
* Copyright (c) 2018, 2020, Chris Fraire <[email protected]>. | ||
*/ | ||
package org.opengrok.indexer.analysis.plain; | ||
|
@@ -48,12 +48,12 @@ public class DefinitionsTokenStream extends TokenStream { | |
*/ | ||
private final List<PendingToken> events = new ArrayList<>(); | ||
|
||
private final CharTermAttribute termAtt = addAttribute( | ||
CharTermAttribute.class); | ||
private final OffsetAttribute offsetAtt = addAttribute( | ||
OffsetAttribute.class); | ||
private final PositionIncrementAttribute posIncrAtt = addAttribute( | ||
PositionIncrementAttribute.class); | ||
@SuppressWarnings("this-escape") | ||
private final CharTermAttribute termAtt = addAttribute(CharTermAttribute.class); | ||
@SuppressWarnings("this-escape") | ||
private final OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class); | ||
@SuppressWarnings("this-escape") | ||
private final PositionIncrementAttribute posIncrAtt = addAttribute(PositionIncrementAttribute.class); | ||
|
||
private int offset; | ||
|
||
|
@@ -65,8 +65,7 @@ public class DefinitionsTokenStream extends TokenStream { | |
* @param wrapper an optional instance | ||
* @throws IOException if I/O error occurs | ||
*/ | ||
public void initialize(Definitions defs, StreamSource src, | ||
ReaderWrapper wrapper) throws IOException { | ||
public void initialize(Definitions defs, StreamSource src, ReaderWrapper wrapper) throws IOException { | ||
if (defs == null) { | ||
throw new IllegalArgumentException("`defs' is null"); | ||
} | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
*/ | ||
|
||
/* | ||
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved. | ||
* Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. | ||
* Portions Copyright (c) 2018, Chris Fraire <[email protected]>. | ||
*/ | ||
package org.opengrok.indexer.authorization; | ||
|
@@ -119,14 +119,14 @@ public boolean test(AuthorizationEntity t) { | |
*/ | ||
protected AuthControlFlag flag; | ||
protected String name; | ||
protected Map<String, Object> setup = new TreeMap<>(); | ||
protected transient Map<String, Object> setup = new TreeMap<>(); | ||
/** | ||
* Hold current setup - merged with all ancestor's stacks. | ||
*/ | ||
protected transient Map<String, Object> currentSetup = new TreeMap<>(); | ||
|
||
private Set<String> forProjects = new TreeSet<>(); | ||
private Set<String> forGroups = new TreeSet<>(); | ||
private transient Set<String> forProjects = new TreeSet<>(); | ||
private transient Set<String> forGroups = new TreeSet<>(); | ||
|
||
protected transient boolean working = true; | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
*/ | ||
|
||
/* | ||
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved. | ||
* Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. | ||
* Portions Copyright (c) 2018, Chris Fraire <[email protected]>. | ||
*/ | ||
package org.opengrok.indexer.authorization; | ||
|
@@ -51,7 +51,7 @@ public class AuthorizationStack extends AuthorizationEntity { | |
|
||
private static final Logger LOGGER = LoggerFactory.getLogger(AuthorizationStack.class); | ||
|
||
private List<AuthorizationEntity> stack = new ArrayList<>(); | ||
private transient List<AuthorizationEntity> stack = new ArrayList<>(); | ||
|
||
public AuthorizationStack() { | ||
} | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
*/ | ||
|
||
/* | ||
* Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved. | ||
* Copyright (c) 2010, 2025, Oracle and/or its affiliates. All rights reserved. | ||
* Portions Copyright (c) 2020, Chris Fraire <[email protected]>. | ||
*/ | ||
package org.opengrok.indexer.configuration; | ||
|
@@ -37,11 +37,11 @@ public class Filter implements Serializable { | |
private static final long serialVersionUID = 3L; | ||
|
||
/** The list of exact filenames. */ | ||
private final Set<String> filenames; | ||
private final transient Set<String> filenames; | ||
/** The list of filenames with wildcards. */ | ||
private final List<Pattern> patterns; | ||
private final transient List<Pattern> patterns; | ||
/** The list of paths. */ | ||
private final List<String> paths; | ||
private final transient List<String> paths; | ||
/** | ||
* The full list of all patterns. This list will be saved in the | ||
* configuration file (if used). | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.