Skip to content

Commit

Permalink
Issue #4250: fix inspection 'RegExp - Single character alternation'
Browse files Browse the repository at this point in the history
  • Loading branch information
romani committed Apr 23, 2017
1 parent 69a1335 commit d9a7b02
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Expand Up @@ -109,7 +109,7 @@ public class TrailingCommentCheck extends AbstractCheck {
private Pattern legalComment;

/** The regexp to match against. */
private Pattern format = Pattern.compile("^[\\s\\});]*$");
private Pattern format = Pattern.compile("^[\\s});]*$");

/**
* Sets patter for legal trailing comments.
Expand Down
Expand Up @@ -77,7 +77,7 @@ public enum JavadocTagType {

/** Inline tag pattern. */
private static final Pattern INLINE_TAG_PATTERN = Pattern.compile(
".*?\\{@(\\p{Alpha}+)\\s+(.*?)\\}");
".*?\\{@(\\p{Alpha}+)\\s+(.*?)}");

/** Newline pattern. */
private static final Pattern NEWLINE = Pattern.compile("\n");
Expand Down
2 changes: 1 addition & 1 deletion src/xdocs/config_misc.xml
Expand Up @@ -1491,7 +1491,7 @@ d = e / f; // Another comment for this line
<td>format</td>
<td>pattern for strings allowed before the comment</td>
<td><a href="property_types.html#regexp">Regular Expression</a></td>
<td><code>"^[\s\});]*$"</code></td>
<td><code>"^[\s});]*$"</code></td>
</tr>
<tr>
<td>legalComment</td>
Expand Down

0 comments on commit d9a7b02

Please sign in to comment.