Skip to content

Commit 9a5a1de

Browse files
committed
Fix Javadoc for Java 14 by avoiding e.g. <h3>
Also, don't bother with </p>
1 parent 591bf5d commit 9a5a1de

File tree

10 files changed

+42
-67
lines changed

10 files changed

+42
-67
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/analysis/pascal/PascalUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class PascalUtils {
3636
* ¹Correctness in a long sequence of apostrophes is limited because Java
3737
* look-behind is not variable length but instead must have a definite
3838
* upper bound in the regex definition.
39-
* </p>
39+
*
4040
*/
4141
public static final Pattern CHARLITERAL_APOS_DELIMITER =
4242
Pattern.compile("\\'((?<=^.(?!\\'))|(?<=[^\\'].(?!\\'))|(?<=^(\\'\\'){1,3}.(?!\\'))|(?<=[^\\'](\\'\\'){1,3}.(?!\\')))");

opengrok-indexer/src/main/java/org/opengrok/indexer/authorization/AuthorizationFramework.java

Lines changed: 29 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -268,18 +268,18 @@ public void addPlugin(AuthorizationStack stack, IAuthorizationPlugin plugin) {
268268

269269
/**
270270
* Add a plug-in into the plug-in array.
271-
*
272-
* <h3>Configured plugin</h3>
273-
* For plug-in that has an entry in configuration, the new plug-in is put
271+
* <p>
272+
* <p>Configured plugin:
273+
* <p>For plug-in that has an entry in configuration, the new plug-in is put
274274
* in the place respecting the user-defined order of execution.
275-
*
276-
* <h3>New plugin</h3>
277-
* If there is no entry in configuration for this class, the plugin is
275+
* <p>
276+
* <p>New plugin:
277+
* <p>If there is no entry in configuration for this class, the plugin is
278278
* appended to the end of the plugin stack with flag <code>flag</code>
279-
*
280-
* <p><b>The plug-in's load method is NOT invoked at this point</b></p>
281279
* <p>
282-
* This has the same effect as invoking
280+
* <p><b>The plug-in's load method is NOT invoked at this point</b>
281+
* <p>
282+
* <p>This has the same effect as invoking
283283
* {@code addPlugin(new AuthorizationEntity(stack, flag,
284284
* getClassName(plugin), plugin)}.
285285
*
@@ -358,17 +358,14 @@ protected void beforeReload() {
358358

359359
/**
360360
* Calling this function forces the framework to reload its stack.
361-
*
362361
* <p>
363-
* Plugins are taken from the pluginDirectory.</p>
364-
*
362+
* <p>Plugins are taken from the pluginDirectory.
365363
* <p>
366-
* Old instances in stack are removed and new list of stack is constructed.
367-
* Unload and load event is fired on each plugin.</p>
368-
*
364+
* <p>Old instances in stack are removed and new list of stack is constructed.
365+
* Unload and load event is fired on each plugin.
369366
* <p>
370-
* This method is thread safe with respect to the currently running
371-
* authorization checks.</p>
367+
* <p>This method is thread safe with respect to the currently running
368+
* authorization checks.
372369
*
373370
* @see IAuthorizationPlugin#load(java.util.Map)
374371
* @see IAuthorizationPlugin#unload()
@@ -453,43 +450,40 @@ private boolean isSessionInvalid(HttpSession session) {
453450
/**
454451
* Checks if the request should have an access to a resource. This method is
455452
* thread safe with respect to the concurrent reload of plugins.
456-
*
457453
* <p>
458-
* Internally performed with a predicate. Using cache in request
459-
* attributes.</p>
460-
*
461-
* <h3>Order of plugin invocation</h3>
462-
*
454+
* <p>Internally performed with a predicate. Using cache in request
455+
* attributes.
456+
* <p>
457+
* <p>Order of plugin invocation:
463458
* <p>
464459
* The order of plugin invocation is given by the stack and appropriate
465460
* actions are taken when traversing the stack with set of keywords,
466-
* such as:</p>
467-
*
468-
* <h4>required</h4>
461+
* such as:
462+
* <p>
463+
* <p>required:
469464
* Failure of such a plugin will ultimately lead to the authorization
470465
* framework returning failure but only after the remaining plugins have
471466
* been invoked.
472-
*
473-
* <h4>requisite</h4>
467+
* <p>
468+
* <p>requisite:
474469
* Like required, however, in the case that such a plugin returns a failure,
475470
* control is directly returned to the application. The return value is that
476471
* associated with the first required or requisite plugin to fail.
477-
*
478-
* <h4>sufficient</h4>
479-
* If such a plugin succeeds and no prior required plugin has failed the
472+
* <p>
473+
* <p>sufficient
474+
* <p>If such a plugin succeeds and no prior required plugin has failed the
480475
* authorization framework returns success to the application immediately
481476
* without calling any further plugins in the stack. A failure of a
482477
* sufficient plugin is ignored and processing of the plugin list continues
483478
* unaffected.
484-
*
479+
* <p>
485480
* <p>
486481
* Loaded plugins which do not occur in the configuration are appended to
487482
* the list with "required" keyword. As of the nature of the class discovery
488483
* this means that the order of invocation of these plugins is rather
489-
* random.</p>
490-
*
484+
* random.
491485
* <p>
492-
* Plugins in the configuration which have not been loaded are skipped.</p>
486+
* <p>Plugins in the configuration which have not been loaded are skipped.
493487
*
494488
* @param request request object
495489
* @param cache cache

opengrok-indexer/src/main/java/org/opengrok/indexer/authorization/AuthorizationPlugin.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,11 @@ public AuthorizationPlugin(AuthControlFlag flag, String name, IAuthorizationPlug
8282
* Call the load method on the underlying plugin if the plugin exists. Note
8383
* that the load method can throw any throwable from its body and it should
8484
* not stop the application.
85-
*
8685
* <p>
87-
* If the method is unable to load the plugin because of any reason (mostly
86+
* <p>If the method is unable to load the plugin because of any reason (mostly
8887
* the class is not found, not instantiable or the load method throws an
8988
* exception) then any authorization check should fail for this plugin in
9089
* the future.
91-
* </p>
9290
*
9391
* @param parameters parameters given in the configuration
9492
*

opengrok-indexer/src/main/java/org/opengrok/indexer/authorization/AuthorizationStack.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,10 @@ public void remove(AuthorizationEntity s) {
116116

117117
/**
118118
* Load all authorization entities in this stack.
119-
*
120119
* <p>
121-
* If the method is unable to load any of the entities contained in this
120+
* <p>If the method is unable to load any of the entities contained in this
122121
* stack then this stack is marked as failed. Note that it does not affect
123122
* the authorization decision made by this stack.
124-
* </p>
125123
*
126124
* @param parameters parameters given in the configuration
127125
*
@@ -286,13 +284,11 @@ protected boolean processStack(Nameable entity,
286284
* Set the plugin to all classes in this stack which requires this class in
287285
* the configuration. This creates a new instance of the plugin for each
288286
* class which needs it.
289-
*
290287
* <p>
291-
* This is where the loaded plugin classes get to be a part of the
288+
* <p>This is where the loaded plugin classes get to be a part of the
292289
* authorization process. When the {@link AuthorizationPlugin} does not get
293290
* its {@link IAuthorizationPlugin} it is marked as failed and returns false
294291
* to all authorization decisions.
295-
* </p>
296292
*
297293
* @param plugin the new instance of a plugin
298294
* @return true if there is such case; false otherwise

opengrok-indexer/src/main/java/org/opengrok/indexer/framework/PluginFramework.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,9 @@ public PluginType handleLoadClass(String classname) {
186186
/**
187187
* Load a class into JVM with custom class loader. Call a non-parametric
188188
* constructor to create a new instance of that class.
189-
*
190189
* <p>
191-
* The classes implementing/extending the {@code PluginType} type are
190+
* <p>The classes implementing/extending the {@code PluginType} type are
192191
* returned and initialized with a call to a non-parametric constructor.
193-
* </p>
194192
*
195193
* @param classname the full name of the class to load
196194
* @return the class implementing/extending the {@code PluginType} class
@@ -345,9 +343,8 @@ private String getClassName(JarEntry f) {
345343

346344
/**
347345
* Calling this function forces the framework to reload the plugins.
348-
*
349346
* <p>
350-
* Plugins are taken from the pluginDirectory.</p>
347+
* <p>Plugins are taken from the pluginDirectory.
351348
*/
352349
public final void reload() {
353350
if (pluginDirectory == null || !pluginDirectory.isDirectory() || !pluginDirectory.canRead()) {

opengrok-indexer/src/main/java/org/opengrok/indexer/history/Repository.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,12 @@ public String getRepoCommand() {
124124
/**
125125
* <p>
126126
* Get the history after a specified revision.
127-
* </p>
128-
*
129127
* <p>
130-
* The default implementation first fetches the full history and then throws
128+
* <p>The default implementation first fetches the full history and then throws
131129
* away the oldest revisions. This is not efficient, so subclasses should
132130
* override it in order to get good performance. Once every subclass has
133131
* implemented a more efficient method, the default implementation should be
134132
* removed and made abstract.
135-
* </p>
136133
*
137134
* @param file the file to get the history for
138135
* @param sinceRevision the revision right before the first one to return,

opengrok-indexer/src/test/java/org/opengrok/indexer/analysis/JFlexXrefTest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,11 +272,9 @@ public void bug16883() throws Exception {
272272
}
273273

274274
/**
275-
* <p>
276275
* Test the handling of #include in C and C++. In particular, these issues
277276
* are tested:
278-
* </p>
279-
*
277+
* <p>
280278
* <ul>
281279
*
282280
* <li>

opengrok-indexer/src/test/java/org/opengrok/indexer/web/DummyHttpServletRequest.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,15 @@
5151
import static org.opengrok.indexer.util.RandomString.generate;
5252

5353
/**
54-
* <p>
5554
* An dummy implementation of {@code HttpServletRequest} in which most methods
5655
* simply throw an exception. Unit tests that need an instance of
5756
* {@code HttpServletRequest} can create sub-classes that implement those
5857
* methods needed by the test case.
59-
* </p>
60-
*
6158
* <p>
62-
* Some methods that would have similar implementations in all sub-classes,
59+
* <p>Some methods that would have similar implementations in all sub-classes,
6360
* like set/get pairs, could be implemented here. Methods that would require
6461
* different implementations depending on the test, should rather just throw
6562
* an exception and let the tests override them.
66-
* </p>
6763
*/
6864
public class DummyHttpServletRequest implements HttpServletRequest {
6965

opengrok-web/src/main/java/org/opengrok/web/PageConfig.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ public String canProcess() {
430430
*
431431
* <p>
432432
* For the root directory (/xref/) an authorization is performed for each
433-
* project in case that projects are used.</p>
433+
* project in case that projects are used.
434434
*
435435
* @see #getResourceFile()
436436
* @see #isDir()
@@ -1748,7 +1748,7 @@ private SortedSet<AcceptedMessage> getProjectMessages() {
17481748
* <p>
17491749
* The resource is modified since the weak ETag value in the request, the ETag is
17501750
* computed using:
1751-
* </p>
1751+
*
17521752
* <ul>
17531753
* <li>the source file modification</li>
17541754
* <li>project messages</li>
@@ -1758,7 +1758,7 @@ private SortedSet<AcceptedMessage> getProjectMessages() {
17581758
*
17591759
* <p>
17601760
* If the resource was modified, appropriate headers in the response are filled.
1761-
* </p>
1761+
*
17621762
*
17631763
* @param request the http request containing the headers
17641764
* @param response the http response for setting the headers

plugins/src/main/java/opengrok/auth/plugin/AbstractLdapPlugin.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
/**
3939
* Abstract class for all plug-ins working with LDAP. Takes care of
40-
* <ul>
40+
* <p><ul>
4141
* <li>controlling the established session</li>
4242
* <li>controlling if the session belongs to the user</li>
4343
* </ul>
@@ -46,7 +46,6 @@
4646
* The intended methods to implement are the
4747
* {@link #checkEntity(HttpServletRequest, Project)} and
4848
* {@link #checkEntity(HttpServletRequest, Group)}.
49-
* </p>
5049
*
5150
* @author Krystof Tulinger
5251
*/

0 commit comments

Comments
 (0)