forked from checkstyle/checkstyle
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue checkstyle#12327: Resolve Switch case mutation for ParenPad
- Loading branch information
1 parent
aad6891
commit 801423e
Showing
3 changed files
with
32 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...rces/com/puppycrawl/tools/checkstyle/checks/whitespace/parenpad/InputParenPadForEnum.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
ParenPad | ||
option = (default)nospace | ||
tokens = ENUM_CONSTANT_DEF, CTOR_DEF, CTOR_CALL | ||
*/ | ||
|
||
package com.puppycrawl.tools.checkstyle.checks.whitespace.parenpad; | ||
|
||
public class InputParenPadForEnum extends RuntimeException { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
public enum ErrorType { | ||
ROOM_ALREADY_EXISTS, | ||
USER_ALREADY_EXISTS, | ||
NO_SUCH_ROOM_EXISTS | ||
} | ||
|
||
public InputParenPadForEnum(String description, ErrorType type) { // ok | ||
super(description); // ok | ||
} | ||
} |