18
18
*/
19
19
20
20
/*
21
- * Copyright (c) 2006, 2022 , Oracle and/or its affiliates. All rights reserved.
21
+ * Copyright (c) 2006, 2025 , Oracle and/or its affiliates. All rights reserved.
22
22
* Portions Copyright (c) 2018, Chris Fraire <[email protected] >.
23
23
*/
24
24
package org .opengrok .indexer .configuration ;
@@ -148,6 +148,7 @@ public Project() {
148
148
*/
149
149
public Project (String name ) {
150
150
this .name = name ;
151
+ this .tabSize = 0 ;
151
152
}
152
153
153
154
/**
@@ -159,6 +160,7 @@ public Project(String name) {
159
160
public Project (String name , String path ) {
160
161
this .name = name ;
161
162
this .path = Util .fixPathIfWindows (path );
163
+ this .tabSize = 0 ;
162
164
completeWithDefaults ();
163
165
}
164
166
@@ -238,7 +240,7 @@ public void setIndexed(boolean flag) {
238
240
*
239
241
* @param tabSize the size of tabs in this project
240
242
*/
241
- public void setTabSize (int tabSize ) {
243
+ public final void setTabSize (int tabSize ) {
242
244
this .tabSize = tabSize ;
243
245
}
244
246
@@ -267,7 +269,7 @@ public boolean isNavigateWindowEnabled() {
267
269
*
268
270
* @param navigateWindowEnabled new value of navigateWindowEnabled
269
271
*/
270
- public void setNavigateWindowEnabled (boolean navigateWindowEnabled ) {
272
+ public final void setNavigateWindowEnabled (boolean navigateWindowEnabled ) {
271
273
this .navigateWindowEnabled = navigateWindowEnabled ;
272
274
}
273
275
@@ -288,7 +290,7 @@ public boolean isMergeCommitsEnabled() {
288
290
/**
289
291
* @param flag true if project should handle renamed files, false otherwise.
290
292
*/
291
- public void setHandleRenamedFiles (boolean flag ) {
293
+ public final void setHandleRenamedFiles (boolean flag ) {
292
294
this .handleRenamedFiles = flag ;
293
295
}
294
296
@@ -302,7 +304,7 @@ public boolean isHistoryEnabled() {
302
304
/**
303
305
* @param flag true if project should have history cache, false otherwise.
304
306
*/
305
- public void setHistoryEnabled (boolean flag ) {
307
+ public final void setHistoryEnabled (boolean flag ) {
306
308
this .historyEnabled = flag ;
307
309
}
308
310
@@ -316,7 +318,7 @@ public boolean isHistoryCacheEnabled() {
316
318
/**
317
319
* @param flag true if project should have history cache, false otherwise.
318
320
*/
319
- public void setHistoryCacheEnabled (boolean flag ) {
321
+ public final void setHistoryCacheEnabled (boolean flag ) {
320
322
this .historyCacheEnabled = flag ;
321
323
}
322
324
@@ -330,14 +332,14 @@ public boolean isAnnotationCacheEnabled() {
330
332
/**
331
333
* @param flag true if project should have annotation cache, false otherwise.
332
334
*/
333
- public void setAnnotationCacheEnabled (boolean flag ) {
335
+ public final void setAnnotationCacheEnabled (boolean flag ) {
334
336
this .annotationCacheEnabled = flag ;
335
337
}
336
338
337
339
/**
338
340
* @param flag true if project's repositories should deal with merge commits.
339
341
*/
340
- public void setMergeCommitsEnabled (boolean flag ) {
342
+ public final void setMergeCommitsEnabled (boolean flag ) {
341
343
this .mergeCommitsEnabled = flag ;
342
344
}
343
345
@@ -351,7 +353,7 @@ public boolean isHistoryBasedReindex() {
351
353
/**
352
354
* @param flag true if project should handle renamed files, false otherwise.
353
355
*/
354
- public void setHistoryBasedReindex (boolean flag ) {
356
+ public final void setHistoryBasedReindex (boolean flag ) {
355
357
this .historyBasedReindex = flag ;
356
358
}
357
359
@@ -419,7 +421,7 @@ public void addGroup(Group group) {
419
421
}
420
422
}
421
423
422
- public void setBugPage (String bugPage ) {
424
+ public final void setBugPage (String bugPage ) {
423
425
this .bugPage = bugPage ;
424
426
}
425
427
@@ -439,7 +441,7 @@ public String getBugPage() {
439
441
* does not contain at least one capture group and the group does not
440
442
* contain a single character
441
443
*/
442
- public void setBugPattern (String bugPattern ) throws PatternSyntaxException {
444
+ public final void setBugPattern (String bugPattern ) throws PatternSyntaxException {
443
445
this .bugPattern = compilePattern (bugPattern );
444
446
}
445
447
@@ -459,7 +461,7 @@ public String getReviewPage() {
459
461
}
460
462
}
461
463
462
- public void setReviewPage (String reviewPage ) {
464
+ public final void setReviewPage (String reviewPage ) {
463
465
this .reviewPage = reviewPage ;
464
466
}
465
467
@@ -479,7 +481,7 @@ public String getReviewPattern() {
479
481
* does not contain at least one capture group and the group does not
480
482
* contain a single character
481
483
*/
482
- public void setReviewPattern (String reviewPattern ) throws PatternSyntaxException {
484
+ public final void setReviewPattern (String reviewPattern ) throws PatternSyntaxException {
483
485
this .reviewPattern = compilePattern (reviewPattern );
484
486
}
485
487
@@ -504,7 +506,7 @@ public final void completeWithDefaults() {
504
506
* 1) if the project has some non-default value; use that
505
507
* 2) if the project has a default value; use the provided configuration
506
508
*/
507
- if (getTabSize () == defaultCfg .getTabSize ()) {
509
+ if (tabSize == defaultCfg .getTabSize ()) {
508
510
setTabSize (env .getTabSize ());
509
511
}
510
512
0 commit comments