Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #12282: Resolve Pitest suppression for ParenPad
- Loading branch information
1 parent
f249e37
commit 4c7c3cc
Showing
3 changed files
with
33 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
23 changes: 23 additions & 0 deletions
23
.../puppycrawl/tools/checkstyle/checks/whitespace/parenpad/InputParenPadForSynchronized.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,23 @@ | ||
/* | ||
ParenPad | ||
option = (default)nospace | ||
tokens = LITERAL_SYNCHRONIZED, CTOR_DEF, CTOR_CALL, LITERAL_IF | ||
*/ | ||
|
||
package com.puppycrawl.tools.checkstyle.checks.whitespace.parenpad; | ||
|
||
class InputParenPadForSynchronized { | ||
|
||
private static InputParenPadForSynchronized instance = null; | ||
private InputParenPadForSynchronized() { | ||
} | ||
|
||
public synchronized static InputParenPadForSynchronized getInstance() { | ||
if(instance == null ) { // violation | ||
instance = new InputParenPadForSynchronized(); | ||
} | ||
return instance; | ||
} | ||
} |