Uploaded image for project: 'XBean'
  1. XBean
  2. XBEAN-337

jar path with exclamation signs(!) should be resolved correctly

Details

    Description

      The fragment of org.apache.xbean.finder.archive.JarArchive() constructor incorrectly resolves paths with exclamation signs:

                  if (jarPath.contains("!")) {
                      jarPath = jarPath.substring(0, jarPath.indexOf("!"));
                      u = new URL(jarPath);
                  }
                  jar = new JarFile(FileArchive.decode(u.getFile()));
      

      where
      E:/!IDE/Eclipse-JEE-2022-12-R/configuration/lib/javaagent-shaded.jar!/
      turns into E:/ and causes FileNotFound exception failure.

      Since exclamation sign(!) is a valid path character, jar file path should be cut by jarPath.lastIndexOf("!") or better(?) jarPath.toLowerCase().indexOf(".jar!") + 4

      Attachments

        Issue Links

          Activity

            No work has yet been logged on this issue.

            People

              Unassigned Unassigned
              powerbroker KDV
              Votes:
              0 Vote for this issue
              Watchers:
              Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: