File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
web/src/main/java/org/springframework/security/web/util/matcher Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright 2002-2019 the original author or authors.
2+ * Copyright 2002-2024 the original author or authors.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
@@ -56,8 +56,9 @@ public IpAddressMatcher(String ipAddress) {
5656 this .nMaskBits = -1 ;
5757 }
5858 this .requiredAddress = parseAddress (ipAddress );
59- Assert .isTrue (this .requiredAddress .getAddress ().length * 8 >= this .nMaskBits ,
60- String .format ("IP address %s is too short for bitmask of length %d" , ipAddress , this .nMaskBits ));
59+ String finalIpAddress = ipAddress ;
60+ Assert .isTrue (this .requiredAddress .getAddress ().length * 8 >= this .nMaskBits , () -> String
61+ .format ("IP address %s is too short for bitmask of length %d" , finalIpAddress , this .nMaskBits ));
6162 }
6263
6364 @ Override
You can’t perform that action at this time.
0 commit comments