zstan commented on code in PR #13382:
URL: https://github.com/apache/ignite/pull/13382#discussion_r3758396870
##########
modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java:
##########
@@ -2558,12 +2566,72 @@ public static boolean mkdirs(File dir) {
public static URL resolveSpringUrl(String springCfgPath) throws
IgniteCheckedException {
A.notNull(springCfgPath, "springCfgPath");
+ String prop =
IgniteSystemProperties.IGNITE_ALLOW_REMOTE_SPRING_CFG_URL;
+
URL url;
try {
url = new URL(springCfgPath);
+
+ URL cfgUrl = url;
+
+ String scheme = cfgUrl.getProtocol().toLowerCase(Locale.ROOT);
+
+ // Unwrap jar:<nested_url>!/path (potentially nested) to avoid
bypassing remote-scheme checks.
+ while ("jar".equals(scheme)) {
+ String file = cfgUrl.getFile();
+
+ int sep = file.indexOf("!/");
+
+ if (sep <= 0)
+ break;
+
+ try {
+ cfgUrl = new URL(file.substring(0, sep));
+ scheme = cfgUrl.getProtocol().toLowerCase(Locale.ROOT);
+ }
+ catch (MalformedURLException ignored) {
+ break;
+ }
+ }
Review Comment:
I wonder - why do we need such a code ? I comment it and all tests are
passed.
Also plz merge master branch !
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]