File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed
main/java/io/github/thibaultmeyer/cuid
test/java/io/github/thibaultmeyer/cuid Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,9 @@ public static boolean isValid(final String cuidAsString) {
119119 && (cuidAsString .length () == CUIDv1 .LENGTH_STANDARD && cuidAsString .startsWith (CUIDv1 .START_CHARACTER ) // Version 1
120120 || (!cuidAsString .isEmpty ())) // Version 2
121121 && cuidAsString .chars ()
122- .filter (c -> !((c >= '0' && c <= '9' ) || (c >= 'A' && c <= 'Z' ) || (c >= 'a' && c <= 'z' ))).findAny ().isEmpty ();
122+ .filter (c -> !((c >= '0' && c <= '9' ) || (c >= 'A' && c <= 'Z' ) || (c >= 'a' && c <= 'z' )))
123+ .findAny ()
124+ .isEmpty ();
123125 }
124126
125127 /**
Original file line number Diff line number Diff line change 11package io .github .thibaultmeyer .cuid ;
22
3+ import org .junit .jupiter .api .Assertions ;
34import org .junit .jupiter .api .MethodOrderer ;
45import org .junit .jupiter .api .Test ;
56import org .junit .jupiter .api .TestMethodOrder ;
@@ -30,6 +31,7 @@ void histogramCUIDv1() {
3031 final Map <Integer , Integer > frequencies = histogram .histogram (20 );
3132
3233 // Assert
34+ Assertions .assertNotNull (frequencies );
3335 System .out .println ("CUID v1: " + frequencies );
3436 }
3537
@@ -48,6 +50,7 @@ void histogramCUIDv2() {
4850 final Map <Integer , Integer > frequencies = histogram .histogram (20 );
4951
5052 // Assert
53+ Assertions .assertNotNull (frequencies );
5154 System .out .println ("CUID v2: " + frequencies );
5255 }
5356
Original file line number Diff line number Diff line change 1414final class PerformanceTest {
1515
1616 @ BeforeAll
17- public static void beforeAll () {
17+ static void beforeAll () {
1818
1919 System .gc ();
2020 }
You can’t perform that action at this time.
0 commit comments