Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-342

File.separator used in a regular expression

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 4.0.0.Final
    • 4.0.0.CR4
    • None
    • None
    • Low

      In class org.infinispan.util.ClassFinder , method toClassName(String fileName) is using File.separator in a regular expression; on Windows this is going to be given the value "\" which is an escape character in a regular expression.
      (found by findbugs, apparently nobody here is testing on Windows)
      Findbugs suggest to replace it with

      File.separatorChar=='
      ' ? "\\\\" : File.separator

              manik_jira Manik Surtani (Inactive)
              sgrinove Sanne Grinovero (Inactive)
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: