diff --git a/opengrok-indexer/src/main/java/org/opengrok/indexer/configuration/Project.java b/opengrok-indexer/src/main/java/org/opengrok/indexer/configuration/Project.java index cb34b8cedd4..eebbf6ff0e8 100644 --- a/opengrok-indexer/src/main/java/org/opengrok/indexer/configuration/Project.java +++ b/opengrok-indexer/src/main/java/org/opengrok/indexer/configuration/Project.java @@ -18,7 +18,7 @@ */ /* - * Copyright (c) 2006, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2025, Oracle and/or its affiliates. All rights reserved. * Portions Copyright (c) 2018, Chris Fraire . */ package org.opengrok.indexer.configuration; @@ -238,7 +238,7 @@ public void setIndexed(boolean flag) { * * @param tabSize the size of tabs in this project */ - public void setTabSize(int tabSize) { + public final void setTabSize(int tabSize) { this.tabSize = tabSize; } @@ -267,7 +267,7 @@ public boolean isNavigateWindowEnabled() { * * @param navigateWindowEnabled new value of navigateWindowEnabled */ - public void setNavigateWindowEnabled(boolean navigateWindowEnabled) { + public final void setNavigateWindowEnabled(boolean navigateWindowEnabled) { this.navigateWindowEnabled = navigateWindowEnabled; } @@ -288,7 +288,7 @@ public boolean isMergeCommitsEnabled() { /** * @param flag true if project should handle renamed files, false otherwise. */ - public void setHandleRenamedFiles(boolean flag) { + public final void setHandleRenamedFiles(boolean flag) { this.handleRenamedFiles = flag; } @@ -302,7 +302,7 @@ public boolean isHistoryEnabled() { /** * @param flag true if project should have history cache, false otherwise. */ - public void setHistoryEnabled(boolean flag) { + public final void setHistoryEnabled(boolean flag) { this.historyEnabled = flag; } @@ -316,7 +316,7 @@ public boolean isHistoryCacheEnabled() { /** * @param flag true if project should have history cache, false otherwise. */ - public void setHistoryCacheEnabled(boolean flag) { + public final void setHistoryCacheEnabled(boolean flag) { this.historyCacheEnabled = flag; } @@ -330,14 +330,14 @@ public boolean isAnnotationCacheEnabled() { /** * @param flag true if project should have annotation cache, false otherwise. */ - public void setAnnotationCacheEnabled(boolean flag) { + public final void setAnnotationCacheEnabled(boolean flag) { this.annotationCacheEnabled = flag; } /** * @param flag true if project's repositories should deal with merge commits. */ - public void setMergeCommitsEnabled(boolean flag) { + public final void setMergeCommitsEnabled(boolean flag) { this.mergeCommitsEnabled = flag; } @@ -351,7 +351,7 @@ public boolean isHistoryBasedReindex() { /** * @param flag true if project should handle renamed files, false otherwise. */ - public void setHistoryBasedReindex(boolean flag) { + public final void setHistoryBasedReindex(boolean flag) { this.historyBasedReindex = flag; } @@ -419,7 +419,7 @@ public void addGroup(Group group) { } } - public void setBugPage(String bugPage) { + public final void setBugPage(String bugPage) { this.bugPage = bugPage; } @@ -439,7 +439,7 @@ public String getBugPage() { * does not contain at least one capture group and the group does not * contain a single character */ - public void setBugPattern(String bugPattern) throws PatternSyntaxException { + public final void setBugPattern(String bugPattern) throws PatternSyntaxException { this.bugPattern = compilePattern(bugPattern); } @@ -459,7 +459,7 @@ public String getReviewPage() { } } - public void setReviewPage(String reviewPage) { + public final void setReviewPage(String reviewPage) { this.reviewPage = reviewPage; } @@ -479,7 +479,7 @@ public String getReviewPattern() { * does not contain at least one capture group and the group does not * contain a single character */ - public void setReviewPattern(String reviewPattern) throws PatternSyntaxException { + public final void setReviewPattern(String reviewPattern) throws PatternSyntaxException { this.reviewPattern = compilePattern(reviewPattern); } @@ -504,7 +504,7 @@ public final void completeWithDefaults() { * 1) if the project has some non-default value; use that * 2) if the project has a default value; use the provided configuration */ - if (getTabSize() == defaultCfg.getTabSize()) { + if (tabSize == defaultCfg.getTabSize()) { setTabSize(env.getTabSize()); } diff --git a/opengrok-indexer/src/main/java/org/opengrok/indexer/index/IndexDatabase.java b/opengrok-indexer/src/main/java/org/opengrok/indexer/index/IndexDatabase.java index b9eca106406..bfe5406dc93 100644 --- a/opengrok-indexer/src/main/java/org/opengrok/indexer/index/IndexDatabase.java +++ b/opengrok-indexer/src/main/java/org/opengrok/indexer/index/IndexDatabase.java @@ -2209,7 +2209,7 @@ private CountingWriter newXrefWriter(String path, File transientXref, boolean co new FileOutputStream(transientXref)))); } - LockFactory pickLockFactory(RuntimeEnvironment env) { + final LockFactory pickLockFactory(RuntimeEnvironment env) { switch (env.getLuceneLocking()) { case ON: case SIMPLE: