@@ -814,8 +814,8 @@ public boolean matches(Property property) {
814
814
*/
815
815
static class PropertyMatch {
816
816
817
- private final @ Nullable Pattern namePatternRegex ;
818
- private final @ Nullable String typeName ;
817
+ private final @ Nullable Pattern namePatternRegex ;
818
+ private final @ Nullable String typeName ;
819
819
820
820
/**
821
821
* Creates a new {@link PropertyMatch} for the given name pattern and type name. At least one of the parameters
@@ -826,10 +826,10 @@ static class PropertyMatch {
826
826
*/
827
827
public PropertyMatch (@ Nullable String namePattern , @ Nullable String typeName ) {
828
828
829
- Assert .isTrue (!(( namePattern == null ) && ( typeName == null )) , "Either name pattern or type name must be given" );
829
+ Assert .isTrue (namePattern != null || typeName != null , "Either name pattern or type name must be given" );
830
830
831
- this .namePatternRegex = namePattern == null ? null : Pattern .compile (namePattern );
832
- this .typeName = typeName ;
831
+ this .namePatternRegex = namePattern == null ? null : Pattern .compile (namePattern );
832
+ this .typeName = typeName ;
833
833
}
834
834
835
835
/**
@@ -864,11 +864,11 @@ public boolean matches(String name, Class<?> type) {
864
864
Assert .notNull (name , "Name must not be null" );
865
865
Assert .notNull (type , "Type must not be null" );
866
866
867
- if (namePatternRegex != null && !namePatternRegex .matcher (name ).matches ()) {
868
- return false ;
869
- }
867
+ if (namePatternRegex != null && !namePatternRegex .matcher (name ).matches ()) {
868
+ return false ;
869
+ }
870
870
871
- if (( typeName != null ) && !type .getName ().equals (typeName )) {
871
+ if (typeName != null && !type .getName ().equals (typeName )) {
872
872
return false ;
873
873
}
874
874
@@ -909,7 +909,9 @@ public boolean matches(Property property) {
909
909
910
910
return super .matches (property );
911
911
}
912
+
912
913
}
914
+
913
915
}
914
916
915
917
}
0 commit comments