Skip to content

Commit 1862b69

Browse files
committedJan 24, 2019
Merge branch '__rultor'
2 parents a33fc93 + 2681042 commit 1862b69

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed
 

‎qulice-checkstyle/src/test/java/com/qulice/checkstyle/CheckstyleValidatorTest.java

+16
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,22 @@ public void allowsUppercaseAbbreviationExceptions() throws Exception {
674674
this.runValidation("ValidAbbreviationAsWordInName.java", true);
675675
}
676676

677+
/**
678+
* CheckstyleValidator can allow final static fields and overrides
679+
* to have uppercase abbreviations.
680+
*
681+
* @throws Exception In case of error
682+
* @todo #897:30min Allow lambdas and generics to be places at end of line.
683+
* RegexpSingleline is too strict and not allow generics and lambdas
684+
* being placed at end of lines. Correct this behavior and uncomment test
685+
* below.
686+
*/
687+
@Ignore
688+
@Test
689+
public void checkLambdaAndGenericsAtEndOfLine() throws Exception {
690+
this.runValidation("ValidLambdaAndGenericsAtEndOfLine.java", true);
691+
}
692+
677693
/**
678694
* CheckstyleValidator can reject non diamond operator usage.
679695
* @throws Exception If error
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* Hello.
3+
*/
4+
package foo;
5+
6+
/**
7+
* Simple.
8+
* @since 1.0
9+
*/
10+
public final class ValidLambda {
11+
12+
/**
13+
* Final.
14+
*/
15+
private final int zero = 0;
16+
17+
/**
18+
* Main method.
19+
*/
20+
public void main() {
21+
final Proc proc = () ->
22+
this.zero;
23+
final Func func = var ->
24+
var * 2;
25+
final BiFunc bifunc = (param, par) ->
26+
param * par;
27+
final List<Integer>
28+
list = new ArrayList<>();
29+
}
30+
}

1 commit comments

Comments
 (1)

0pdd commented on Jan 24, 2019

@0pdd
Collaborator

Puzzle 897-e70cf262 discovered in qulice-checkstyle/src/test/java/com/qulice/checkstyle/CheckstyleValidatorTest.java and submitted as #1005. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

Please sign in to comment.