Uploaded image for project: 'WINDUPRULE - Red Hat Application Migration Toolkit rules'
  1. WINDUPRULE - Red Hat Application Migration Toolkit rules
  2. WINDUPRULE-608

AND operator without AS and FROM gives false positives

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • None
    • None

      Having a rule like this , the one that includes the AND will give false positives for an application that complies with first condition , doesnt with second BUT another of the analised applications complies with the second condition :

      <rule id="springboot-00003">
                  <when>
                      <or>
                        <filecontent pattern="{*}APPAAA{*}" filename="{*}.txt"/>
                        <filecontent pattern="{*}APPBBB{*}" filename="{*}.txt"/>
                      </or>
                  </when>
                  <perform>
                      <hint title="APPAAA OR APPBBB FOUND">
                          <message>APPAAA OR APPBBB FOUND</message>
                      </hint>
                  </perform>
              </rule>
              <rule id="springboot-00004">
                  <when>
                      <and>
                          <filecontent pattern="{*}APPAAA{*}" filename="{*}.txt"/>
                          <filecontent pattern="{*}APPCCC{*}" filename="{*}.txt"/>
                      </and>
                  </when>
                  <perform>
                      <hint title="APPAAA AND APPCCC FOUND">
                          <message>APPAAA AND APPCCC FOUND</message>
                      </hint>
                  </perform>
              </rule> 

       

      Attached the 3 applications containing very simple text files and the result will be :

      • appA has both incidents
      • appB has none
      • appC has both incidents

      There are 3 rules using the wrong approach ( old ones )

      • weblogic-catchall
      • hibernate51-53
      • Maven-artemis-jms-client

        1. appA.zip
          0.3 kB
        2. appB.zip
          0.3 kB
        3. appC.zip
          0.3 kB

            Unassigned Unassigned
            jvilalop@redhat.com Jonathan Vila Lopez (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: