File tree Expand file tree Collapse file tree 4 files changed +24
-4
lines changed
spring-pulsar/src/main/java/org/springframework/pulsar Expand file tree Collapse file tree 4 files changed +24
-4
lines changed Original file line number Diff line number Diff line change 2020import java .util .Collections ;
2121import java .util .LinkedHashMap ;
2222import java .util .List ;
23+ import java .util .Locale ;
2324import java .util .Map ;
2425import java .util .Optional ;
2526import java .util .stream .Stream ;
@@ -314,7 +315,7 @@ private Optional<Exception> safeInvoke(Runnable invocation) {
314315 }
315316
316317 private String functionDesc (PulsarFunctionOperations <?> function ) {
317- return "'%s' %s" .formatted (function .name (), function .type ().toString ().toLowerCase ());
318+ return "'%s' %s" .formatted (function .name (), function .type ().toString ().toLowerCase (Locale . ROOT ));
318319 }
319320
320321 /**
Original file line number Diff line number Diff line change 1616
1717package org .springframework .pulsar .support .header ;
1818
19+ import java .util .Locale ;
1920import java .util .Set ;
2021
2122import org .springframework .core .log .LogAccessor ;
@@ -92,13 +93,13 @@ public static PatternMatch fromPatternString(String pattern) {
9293
9394 public PatternMatch (String pattern , boolean negate ) {
9495 Assert .notNull (pattern , "Pattern must not be null" );
95- this .pattern = pattern .toLowerCase ();
96+ this .pattern = pattern .toLowerCase (Locale . ROOT );
9697 this .negate = negate ;
9798 }
9899
99100 @ Override
100101 public boolean matchHeader (String headerName ) {
101- if (!PatternMatchUtils .simpleMatch (this .pattern , headerName .toLowerCase ())) {
102+ if (!PatternMatchUtils .simpleMatch (this .pattern , headerName .toLowerCase (Locale . ROOT ))) {
102103 return false ;
103104 }
104105 LOGGER .debug (() -> "headerName=[%s] WILL %s be mapped, matched pattern=%s" .formatted (headerName ,
Original file line number Diff line number Diff line change 88 <suppress files =" DefaultSchemaResolverTests" checks =" MethodParamPad" />
99 <suppress files =" PulsarFunctionAdministrationIntegrationTests" checks =" Regexp" />
1010 <suppress files =" Proto" checks =" .*" />
11+ <suppress files =" .*Tests" checks =" HideUtilityClassConstructor" />
12+ <suppress files =" .*Tests" checks =" RegexpSinglelineJava" id =" toLowerCaseWithoutLocale" />
13+ <suppress files =" .*Tests" checks =" RegexpSinglelineJava" id =" toUpperCaseWithoutLocale" />
1114 <suppress files =" ReactiveSpringPulsarBootApp" checks =" HideUtilityClassConstructor" />
12- <suppress files =" SamplePulsarApplicationTests" checks =" HideUtilityClassConstructor" />
1315 <suppress files =" [\\/]spring-pulsar-docs[\\/]" checks =" JavadocPackage|JavadocType|JavadocVariable|SpringDeprecatedCheck" />
1416 <suppress files =" [\\/]spring-pulsar-docs[\\/]" checks =" SpringJavadoc" message =" \@since" />
1517 <suppress files =" [\\/]spring-pulsar-docs[\\/].*jooq" checks =" AvoidStaticImport" />
Original file line number Diff line number Diff line change 169169 value =" Please use AssertJ imports." />
170170 <property name =" ignoreComments" value =" true" />
171171 </module >
172+ <module name =" com.puppycrawl.tools.checkstyle.checks.regexp.RegexpSinglelineJavaCheck" >
173+ <property name =" id" value =" toLowerCaseWithoutLocale" />
174+ <property name =" format" value =" \.toLowerCase\(\)" />
175+ <property name =" maximum" value =" 0" />
176+ <property name =" message"
177+ value =" String.toLowerCase() should be String.toLowerCase(Locale.ROOT)" />
178+ <property name =" ignoreComments" value =" true" />
179+ </module >
180+ <module name =" com.puppycrawl.tools.checkstyle.checks.regexp.RegexpSinglelineJavaCheck" >
181+ <property name =" id" value =" toUpperCaseWithoutLocale" />
182+ <property name =" format" value =" \.toUpperCase\(\)" />
183+ <property name =" maximum" value =" 0" />
184+ <property name =" message"
185+ value =" String.toUpperCase() should be String.toUpperCase(Locale.ROOT)" />
186+ <property name =" ignoreComments" value =" true" />
187+ </module >
172188 <module name =" Regexp" >
173189 <property name =" format" value =" [ \t]+$" />
174190 <property name =" illegalPattern" value =" true" />
You can’t perform that action at this time.
0 commit comments