@@ -86,7 +86,7 @@ public void setUp() {
86
86
}
87
87
88
88
@ Test
89
- public void testDataRoot () throws IOException {
89
+ void testDataRoot () throws IOException {
90
90
RuntimeEnvironment instance = RuntimeEnvironment .getInstance ();
91
91
assertNull (instance .getDataRootFile ());
92
92
assertNull (instance .getDataRootPath ());
@@ -104,7 +104,7 @@ public void testDataRoot() throws IOException {
104
104
}
105
105
106
106
@ Test
107
- public void testIncludeRoot () throws IOException {
107
+ void testIncludeRoot () throws IOException {
108
108
RuntimeEnvironment instance = RuntimeEnvironment .getInstance ();
109
109
assertNull (instance .getIncludeRootPath ());
110
110
@@ -124,7 +124,7 @@ public void testIncludeRoot() throws IOException {
124
124
}
125
125
126
126
@ Test
127
- public void testSourceRoot () throws IOException {
127
+ void testSourceRoot () throws IOException {
128
128
RuntimeEnvironment instance = RuntimeEnvironment .getInstance ();
129
129
assertNull (instance .getSourceRootFile ());
130
130
assertNull (instance .getSourceRootPath ());
@@ -137,7 +137,7 @@ public void testSourceRoot() throws IOException {
137
137
}
138
138
139
139
@ Test
140
- public void testProjects () throws IOException {
140
+ void testProjects () throws IOException {
141
141
RuntimeEnvironment instance = RuntimeEnvironment .getInstance ();
142
142
instance .setProjectsEnabled (true );
143
143
assertFalse (instance .hasProjects ());
@@ -158,7 +158,7 @@ public void testProjects() throws IOException {
158
158
}
159
159
160
160
@ Test
161
- public void testGroups () {
161
+ void testGroups () {
162
162
RuntimeEnvironment instance = RuntimeEnvironment .getInstance ();
163
163
assertFalse (instance .hasGroups ());
164
164
assertNotNull (instance .getGroups ());
@@ -176,7 +176,7 @@ public void testGroups() {
176
176
}
177
177
178
178
@ Test
179
- public void testPerThreadConsistency () throws InterruptedException {
179
+ void testPerThreadConsistency () throws InterruptedException {
180
180
RuntimeEnvironment instance = RuntimeEnvironment .getInstance ();
181
181
String path = "/tmp/dataroot1" ;
182
182
instance .setDataRoot (path );
@@ -191,13 +191,13 @@ public void testPerThreadConsistency() throws InterruptedException {
191
191
}
192
192
193
193
@ Test
194
- public void testUrlPrefix () {
194
+ void testUrlPrefix () {
195
195
RuntimeEnvironment instance = RuntimeEnvironment .getInstance ();
196
196
assertEquals ("/source/s?" , instance .getUrlPrefix ());
197
197
}
198
198
199
199
@ Test
200
- public void testCtags () {
200
+ void testCtags () {
201
201
RuntimeEnvironment instance = RuntimeEnvironment .getInstance ();
202
202
String instanceCtags = instance .getCtags ();
203
203
assertNotNull (instanceCtags );
@@ -216,47 +216,47 @@ public void testCtags() {
216
216
}
217
217
218
218
@ Test
219
- public void testFetchHistoryWhenNotInCache () {
219
+ void testFetchHistoryWhenNotInCache () {
220
220
RuntimeEnvironment instance = RuntimeEnvironment .getInstance ();
221
221
assertTrue (instance .isFetchHistoryWhenNotInCache ());
222
222
instance .setFetchHistoryWhenNotInCache (false );
223
223
assertFalse (instance .isFetchHistoryWhenNotInCache ());
224
224
}
225
225
226
226
@ Test
227
- public void testUseHistoryCache () {
227
+ void testUseHistoryCache () {
228
228
RuntimeEnvironment instance = RuntimeEnvironment .getInstance ();
229
229
assertTrue (instance .useHistoryCache ());
230
230
instance .setUseHistoryCache (false );
231
231
assertFalse (instance .useHistoryCache ());
232
232
}
233
233
234
234
@ Test
235
- public void testGenerateHtml () {
235
+ void testGenerateHtml () {
236
236
RuntimeEnvironment instance = RuntimeEnvironment .getInstance ();
237
237
assertTrue (instance .isGenerateHtml ());
238
238
instance .setGenerateHtml (false );
239
239
assertFalse (instance .isGenerateHtml ());
240
240
}
241
241
242
242
@ Test
243
- public void testCompressXref () {
243
+ void testCompressXref () {
244
244
RuntimeEnvironment instance = RuntimeEnvironment .getInstance ();
245
245
assertTrue (instance .isCompressXref ());
246
246
instance .setCompressXref (false );
247
247
assertFalse (instance .isCompressXref ());
248
248
}
249
249
250
250
@ Test
251
- public void testQuickContextScan () {
251
+ void testQuickContextScan () {
252
252
RuntimeEnvironment instance = RuntimeEnvironment .getInstance ();
253
253
assertTrue (instance .isQuickContextScan ());
254
254
instance .setQuickContextScan (false );
255
255
assertFalse (instance .isQuickContextScan ());
256
256
}
257
257
258
258
@ Test
259
- public void testRepositories () {
259
+ void testRepositories () {
260
260
RuntimeEnvironment instance = RuntimeEnvironment .getInstance ();
261
261
assertNotNull (instance .getRepositories ());
262
262
instance .removeRepositories ();
@@ -267,31 +267,31 @@ public void testRepositories() {
267
267
}
268
268
269
269
@ Test
270
- public void testRamBufferSize () {
270
+ void testRamBufferSize () {
271
271
RuntimeEnvironment instance = RuntimeEnvironment .getInstance ();
272
272
assertEquals (16 , instance .getRamBufferSize (), 0 ); //default is 16
273
273
instance .setRamBufferSize (256 );
274
274
assertEquals (256 , instance .getRamBufferSize (), 0 );
275
275
}
276
276
277
277
@ Test
278
- public void testAllowLeadingWildcard () {
278
+ void testAllowLeadingWildcard () {
279
279
RuntimeEnvironment instance = RuntimeEnvironment .getInstance ();
280
280
assertTrue (instance .isAllowLeadingWildcard ());
281
281
instance .setAllowLeadingWildcard (false );
282
282
assertFalse (instance .isAllowLeadingWildcard ());
283
283
}
284
284
285
285
@ Test
286
- public void testIgnoredNames () {
286
+ void testIgnoredNames () {
287
287
RuntimeEnvironment instance = RuntimeEnvironment .getInstance ();
288
288
assertNotNull (instance .getIgnoredNames ());
289
289
instance .setIgnoredNames (null );
290
290
assertNull (instance .getIgnoredNames ());
291
291
}
292
292
293
293
@ Test
294
- public void testUserPage () {
294
+ void testUserPage () {
295
295
RuntimeEnvironment instance = RuntimeEnvironment .getInstance ();
296
296
String page = "http://www.myserver.org/viewProfile.jspa?username=" ;
297
297
assertNull (instance .getUserPage ()); // default value is null
@@ -300,7 +300,7 @@ public void testUserPage() {
300
300
}
301
301
302
302
@ Test
303
- public void testBugPage () {
303
+ void testBugPage () {
304
304
RuntimeEnvironment instance = RuntimeEnvironment .getInstance ();
305
305
String page = "http://bugs.myserver.org/bugdatabase/view_bug.do?bug_id=" ;
306
306
assertNull (instance .getBugPage ()); // default value is null
@@ -309,7 +309,7 @@ public void testBugPage() {
309
309
}
310
310
311
311
@ Test
312
- public void testBugPattern () {
312
+ void testBugPattern () {
313
313
RuntimeEnvironment instance = RuntimeEnvironment .getInstance ();
314
314
String [] tests = new String []{
315
315
"\\ b([12456789][0-9]{6})\\ b" ,
@@ -324,7 +324,7 @@ public void testBugPattern() {
324
324
}
325
325
326
326
@ Test
327
- public void testInvalidBugPattern () {
327
+ void testInvalidBugPattern () {
328
328
RuntimeEnvironment instance = RuntimeEnvironment .getInstance ();
329
329
String [] tests = new String []{
330
330
"\\ b([" ,
@@ -341,7 +341,7 @@ public void testInvalidBugPattern() {
341
341
}
342
342
343
343
@ Test
344
- public void testReviewPage () {
344
+ void testReviewPage () {
345
345
RuntimeEnvironment instance = RuntimeEnvironment .getInstance ();
346
346
String page = "http://arc.myserver.org/caselog/PSARC/" ;
347
347
assertNull (instance .getReviewPage ()); // default value is null
@@ -350,7 +350,7 @@ public void testReviewPage() {
350
350
}
351
351
352
352
@ Test
353
- public void testReviewPattern () {
353
+ void testReviewPattern () {
354
354
RuntimeEnvironment instance = RuntimeEnvironment .getInstance ();
355
355
String [] tests = new String []{
356
356
"\\ b(\\ d{4}/\\ d{3})\\ b" ,
@@ -365,7 +365,7 @@ public void testReviewPattern() {
365
365
}
366
366
367
367
@ Test
368
- public void testInvalidReviewPattern () {
368
+ void testInvalidReviewPattern () {
369
369
RuntimeEnvironment instance = RuntimeEnvironment .getInstance ();
370
370
String [] tests = new String []{
371
371
"\\ b([" ,
@@ -382,15 +382,15 @@ public void testInvalidReviewPattern() {
382
382
}
383
383
384
384
@ Test
385
- public void testWebappLAF () {
385
+ void testWebappLAF () {
386
386
RuntimeEnvironment instance = RuntimeEnvironment .getInstance ();
387
387
assertEquals ("default" , instance .getWebappLAF ());
388
388
instance .setWebappLAF ("foo" );
389
389
assertEquals ("foo" , instance .getWebappLAF ());
390
390
}
391
391
392
392
@ Test
393
- public void testRemoteScmSupported () {
393
+ void testRemoteScmSupported () {
394
394
RuntimeEnvironment instance = RuntimeEnvironment .getInstance ();
395
395
assertEquals (Configuration .RemoteSCM .OFF , instance .getRemoteScmSupported ());
396
396
instance .setRemoteScmSupported (Configuration .RemoteSCM .ON );
@@ -402,29 +402,29 @@ public void testRemoteScmSupported() {
402
402
}
403
403
404
404
@ Test
405
- public void testOptimizeDatabase () {
405
+ void testOptimizeDatabase () {
406
406
RuntimeEnvironment instance = RuntimeEnvironment .getInstance ();
407
407
assertTrue (instance .isOptimizeDatabase ());
408
408
instance .setOptimizeDatabase (false );
409
409
assertFalse (instance .isOptimizeDatabase ());
410
410
}
411
411
412
412
@ Test
413
- public void testUsingLuceneLocking () {
413
+ void testUsingLuceneLocking () {
414
414
RuntimeEnvironment instance = RuntimeEnvironment .getInstance ();
415
415
assertEquals (LuceneLockName .OFF , instance .getLuceneLocking ());
416
416
}
417
417
418
418
@ Test
419
- public void testIndexVersionedFilesOnly () {
419
+ void testIndexVersionedFilesOnly () {
420
420
RuntimeEnvironment instance = RuntimeEnvironment .getInstance ();
421
421
assertFalse (instance .isIndexVersionedFilesOnly ());
422
422
instance .setIndexVersionedFilesOnly (true );
423
423
assertTrue (instance .isIndexVersionedFilesOnly ());
424
424
}
425
425
426
426
@ Test
427
- public void testXMLencdec () throws IOException {
427
+ void testXMLencdec () throws IOException {
428
428
Configuration c = new Configuration ();
429
429
String m = c .getXMLRepresentationAsString ();
430
430
Configuration o = Configuration .makeXMLStringAsConfiguration (m );
@@ -435,7 +435,7 @@ public void testXMLencdec() throws IOException {
435
435
}
436
436
437
437
@ Test
438
- public void testAuthorizationFlagDecode () throws IOException {
438
+ void testAuthorizationFlagDecode () throws IOException {
439
439
String confString = "<?xml version='1.0' encoding='UTF-8'?>\n "
440
440
+ "<java class=\" java.beans.XMLDecoder\" version=\" 1.8.0_121\" >\n "
441
441
+ " <object class=\" org.opengrok.indexer.configuration.Configuration\" >\n "
@@ -498,7 +498,7 @@ public void testAuthorizationFlagDecode() throws IOException {
498
498
}
499
499
500
500
@ Test
501
- public void testAuthorizationStackDecode () throws IOException {
501
+ void testAuthorizationStackDecode () throws IOException {
502
502
String confString = "<?xml version='1.0' encoding='UTF-8'?>\n "
503
503
+ "<java class=\" java.beans.XMLDecoder\" version=\" 1.8.0_121\" >\n "
504
504
+ " <object class=\" org.opengrok.indexer.configuration.Configuration\" >\n "
@@ -625,7 +625,7 @@ public void testAuthorizationStackDecode() throws IOException {
625
625
assertTrue (pluginConfiguration .getStack ().get (2 ).getFlag ().isRequisite ());
626
626
assertEquals ("Requisite" , pluginConfiguration .getStack ().get (2 ).getName ());
627
627
628
- /**
628
+ /*
629
629
* Third element is a stack which defines two nested plugins.
630
630
*/
631
631
assertTrue (pluginConfiguration .getStack ().get (1 ) instanceof AuthorizationStack );
@@ -647,7 +647,7 @@ public void testAuthorizationStackDecode() throws IOException {
647
647
assertTrue (plugin .getSetup ().get ("plugin" ) instanceof AuthorizationPlugin );
648
648
assertEquals (pluginConfiguration .getStack ().get (0 ), plugin .getSetup ().get ("plugin" ));
649
649
650
- /**
650
+ /*
651
651
* Fourth element is a stack slightly changed from the previous stack.
652
652
* Only the setup for the particular plugin is changed.
653
653
*/
@@ -670,7 +670,7 @@ public void testAuthorizationStackDecode() throws IOException {
670
670
assertTrue (plugin .getSetup ().get ("plugin" ) instanceof AuthorizationPlugin );
671
671
assertEquals (pluginConfiguration .getStack ().get (0 ), plugin .getSetup ().get ("plugin" ));
672
672
673
- /**
673
+ /*
674
674
* Fifth element is a direct copy of the first stack.
675
675
*/
676
676
assertTrue (pluginConfiguration .getStack ().get (4 ) instanceof AuthorizationStack );
@@ -699,7 +699,7 @@ public void testAuthorizationStackDecode() throws IOException {
699
699
* @throws IOException I/O exception
700
700
*/
701
701
@ Test
702
- public void testAuthorizationFlagDecodeInvalid () throws IOException {
702
+ void testAuthorizationFlagDecodeInvalid () throws IOException {
703
703
String confString = "<?xml version='1.0' encoding='UTF-8'?>\n "
704
704
+ "<java class=\" java.beans.XMLDecoder\" version=\" 1.8.0_121\" >\n "
705
705
+ " <object class=\" org.opengrok.indexer.configuration.Configuration\" >\n "
@@ -722,8 +722,6 @@ public void testAuthorizationFlagDecodeInvalid() throws IOException {
722
722
723
723
/**
724
724
* Testing invalid class names for authorization checks.
725
- *
726
- * @throws IOException I/O exception
727
725
*/
728
726
@ Test
729
727
void testAuthorizationDecodeInvalid () {
@@ -748,7 +746,7 @@ void testAuthorizationDecodeInvalid() {
748
746
}
749
747
750
748
@ Test
751
- public void testBug3095 () throws IOException {
749
+ void testBug3095 () throws IOException {
752
750
RuntimeEnvironment instance = RuntimeEnvironment .getInstance ();
753
751
File file = new File ("foobar" );
754
752
assertTrue (file .createNewFile ());
@@ -762,7 +760,7 @@ public void testBug3095() throws IOException {
762
760
}
763
761
764
762
@ Test
765
- public void testBug3154 () throws IOException {
763
+ void testBug3154 () throws IOException {
766
764
RuntimeEnvironment instance = RuntimeEnvironment .getInstance ();
767
765
File file = File .createTempFile ("dataroot" , null );
768
766
assertTrue (file .delete ());
@@ -775,7 +773,7 @@ public void testBug3154() throws IOException {
775
773
}
776
774
777
775
@ Test
778
- public void testObfuscateEMail () throws IOException {
776
+ void testObfuscateEMail () throws IOException {
779
777
RuntimeEnvironment env = RuntimeEnvironment .getInstance ();
780
778
781
779
// By default, don't obfuscate.
@@ -809,7 +807,7 @@ private void assertObfuscated(boolean expected, RuntimeEnvironment env)
809
807
}
810
808
811
809
@ Test
812
- public void isChattyStatusPage () {
810
+ void isChattyStatusPage () {
813
811
RuntimeEnvironment env = RuntimeEnvironment .getInstance ();
814
812
815
813
// By default, status page should not be chatty.
@@ -829,8 +827,8 @@ public void isChattyStatusPage() {
829
827
* @throws ForbiddenSymlinkException forbidden symlink exception
830
828
*/
831
829
@ Test
832
- public void testGetPathRelativeToSourceRoot () throws IOException ,
833
- ForbiddenSymlinkException {
830
+ void testGetPathRelativeToSourceRoot () throws IOException , ForbiddenSymlinkException {
831
+
834
832
RuntimeEnvironment env = RuntimeEnvironment .getInstance ();
835
833
836
834
// Create and set source root.
@@ -861,7 +859,7 @@ public void testGetPathRelativeToSourceRoot() throws IOException,
861
859
expex = e ;
862
860
}
863
861
assertNotNull (expex , "getPathRelativeToSourceRoot() should have thrown " +
864
- "IOexception for symlink that is not allowed" );
862
+ "IOException for symlink that is not allowed" );
865
863
866
864
// Allow the symlink and retest.
867
865
env .setAllowedSymlinks (new HashSet <>(Arrays .asList (symlink .getPath ())));
@@ -874,7 +872,7 @@ public void testGetPathRelativeToSourceRoot() throws IOException,
874
872
}
875
873
876
874
@ Test
877
- public void testPopulateGroupsMultipleTimes () {
875
+ void testPopulateGroupsMultipleTimes () {
878
876
// create a structure with two repositories
879
877
final RuntimeEnvironment env = RuntimeEnvironment .getInstance ();
880
878
Project project1 = new Project ("bar" , "/bar" );
0 commit comments