Uploaded image for project: 'Migration Toolkit for Applications'
  1. Migration Toolkit for Applications
  2. MTA-5634

Rule local-storage-00001 File system - Java IO is reporting false positives

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Normal Normal
    • MTA 8.0.0
    • MTA 8.0.0, MTA 7.3.1
    • None
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • False
    • None

      Description of problem:

      The `local-storage-00001`rule is defined as follow:

      - category: mandatory
        customVariables: []
        description: File system - Java IO
        effort: 1
        labels:
        - konveyor.io/target=cloud-readiness
        - konveyor.io/source
        - storage
        ruleID: local-storage-00001
        when:
          or:
          - java.referenced:
              location: CONSTRUCTOR_CALL
              pattern: java.io.(FileWriter|FileReader|PrintStream|File|PrintWriter|RandomAccessFile)*
          - java.referenced:
              location: CONSTRUCTOR_CALL
              pattern: java.util.zip.ZipFile*
          - java.referenced:
              location: METHOD_CALL
              pattern: java.io.File.createTempFile
          - java.referenced:
              location: METHOD_CALL
              pattern: java.nio.file.Paths.get* 

      However it is reporting incidents in lines that do not match the condition like this line in the bookstore app:

      pw.println(mapper.writeValueAsString(Book.getRandomBook())); 

      Version-Release number of selected component (if applicable): 8.0.0 and 7.3.1

      How reproducible: Always 

      Steps to Reproduce:
      1. Create an application using the following repo and analyze it with source + deps selecting the Linux, Quarkus and Containerization targets.

      https://github.com/ibraginsky/book-server
      2. Wait for the analysis to finish

      Actual results:

      There are incidents that do not match the rule conditions. 

      Expected results:

      All the incidents must match the rule conditions

      Additional info:

      Attached you can find a report from the u/s main and another from d/s 7.3.1-20

        1. analysis-report-app-bookserver source + deps.tar
          2.75 MB
          Alejandro Brugarolas
        2. analysis-report-app-source + deps book.tar
          2.75 MB
          Alejandro Brugarolas

              jleflete@redhat.com Juanma Leflet Estrada
              rh-ee-abrugaro Alejandro Brugarolas
              Alejandro Brugarolas Alejandro Brugarolas
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: