This page provides the details and the solution for the issue of false violations that are flagged for the Quality Rule "Avoid Unused Imports" on the dashboard.

Refer to the below screenshot for more clarity about the issue:

Observed in CAST AIP
Observed on RDBMS
Step by Step Scenario

Below is the step-by-step scenario leading to the problem:

  1. Ran analysis and snapshot.
  2. Searched for avoid unused import in dashboard.

  3. False indications for “Avoid Unused Imports” metric.

Impact of the Problem

The impact of the problem on the dashboard is: The dashboard will show wrong violations for the QR.


To fix the problem, proceed as follows:

There are two solutions to fix the problem. It is mentioned below:

1. RowSorterListner is supported since JDK 1.6 - Use JDK Version 1.6 for analysis and the violations for RowSorterListner will not come up on the dashboard. Since it is supported starting from JDK 1.6, all the version that are older than 1.6 (<1.6) will throw violations on the dashboard. 

2. InetAddress - In the source code there is no class/java file that contains "element.getAddress().toUpperCase()" (Element class) so the analyser stops evaluating the expression, hence the imported class is unused.
There is nothing to be fixed in the product. The issue needs to be resolved by adding the missing source code / environment profile.

Impact of the solution on the dashboard is: The violations will not be visible since a supported version of SDK will be used for analysis.

 Ticket # 6573
Related Pages