Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-7577

Case sensitivity issue for filename on mac

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Scanner
    • Labels:
      None

      Description

      Scanner is supposed to cleanup user entries so that filenames have a correct case even if underlying filesystem is case unsensitive.

      For example let say source folder is c:\foo\SRC on a Windows OS.
      When user try to run analysis with sonar.sources=C:\foo\src it is expected to works, and the scanner will "resolve/normalize" path to have a proper case: c:\foo\SRC

      On MacOSX we have the same issue (filesystem is case insensitive by default) but unfortunately because of a bug in the JDK our way to resolve/normalize path is not working.

      Given one file /tmp/test

      System.out.println(Paths.get("/tmp/test").toRealPath(LinkOption.NOFOLLOW_LINKS).getFileName());
      System.out.println(Paths.get("/tmp/Test").toRealPath(LinkOption.NOFOLLOW_LINKS).getFileName());
      

      prints

      test
      Test
      

      This is because of https://bugs.openjdk.java.net/browse/JDK-8069337

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              julien.henry Julien Henry
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: