1. Analysis of warning messages: 20031 Warnings

    1. In general, no drawbacks to fixing, with exception of serialVersionId

    2. Benefit is reduced code size and improve correctness, maintainability

    3. We can explicitly ignore issues in code using @supress or in the IDE.

    4. Dead Code: 45 instances

      1. Code that cannot be executed due to the structure of the code around it.

        1. Dead Code: ins

        2. Unreachable Catch block

        3. Low risk to leave

        4. Might be unintentional.

        5. Might be due to commenting out a feature

        6. Recommendation: quick sweep to identiy and that have comments

        7. Deliberate analysis to see if there are coding errors embedded

      2. Null pointer access: 2 instances

        1. Code looks erroneous

        2. should be fixed

      3. Assignment has no effect : 1 instance

        1. Can be safely removed

        2. Looks like it is simply to keep from having an empty if block, and keep the logic positive.

        3. Recommendation: Should be inspected to confirm that there is no logic error and then removed.

      4. Deprecated: 1805

        1. Usually a case where a small number of libraries are in heavy usage

        2. Need to replace deprecated libraries with newer versions

        3. We are using import sun.io API. This should be replace with nio API calls.

        4. We use many APIs (example class com.netscape.management.client.util.Help) that have either been deprecated or have deprecated methods that we call.

        5. Recommendation: We should either replace these calls, or un-deprecate the classes/methods and support them.

      5. Unused code:

        1. Local variable never read: 1015

        2. Unused local or private member:691instances

        3. Unused import: 5565 instances

        4. Trivial to clean up in eclipse

        5. Will simplify maintainability

        6. Recommendation: cleaned up

      6. Related but unreported issue: * imports

        1. Makes it difficult to find origianal types of imports

        2. can mask import conflicts

        3. Trivial to clean up in eclipse

        4. Recommendation: make explicit

      7. Serial class with out serialVersionId:834 instances

        1. http://www.javablogging.com/what-is-serialversionuid/

        2. Blindly adding this will cause errors only for long term persisted (written to file) Java objects. Typically, Serialization is not used for that ,but for RPCs (short term persistance). However, it will trigger an exception if a client talks to a server and only one of them have specified it.

        3. Recomendation: Surpress using Attribute for now. If any of these APIs change, Add in serialVersionId and remove surpressing attribute, then maintain the ID moving forward.

      8. Generics

        1. Unchecked Generic Type Operation

        2. Raw Types in collections: 4174 instances

        3. newer Java feature.

        4. Better to be type safe.

        5. Won't break ABI to fix

        6. Will require identifying collected types

        7. Easy to fix in eclipse, but not trivial

        8. Recommendation: quick sweep to get easy fixes, Then suppress so other warnings don't get lost.

      9. Non-static access to Static member

        1. Stylistic issue

        2. can be safely ignored

        3. Recommendation: clean up in the course of other work.

        4. Pki-java-tools

          1. There are a series of shell scripts in /usr/bin that call Java code in the java-tools jar file. They need: better names, descriptions of what they do, man pages, and so forth, or they need to be removed from the distro:

            1. AtoB , AuditVerify , BtoA , CMCEnroll , CMCRequest ,CMCResponse ,CMCRevoke , CRMFPopClient , DRMTool , ExtJoiner , GenExtKeyUsage , GenIssuerAltNameExt , GenSubjectAltNameExt , HttpClient , OCSPClient , PKCS10Client , PKCS1Export, PrettyPrintCert , PrettyPrintCrl , TokenInfo

            2. Direct use of Servlets instead of a framework. Doesn't have to be/ would not recommend struts, but we can probably reduce code significantly

            3. Use of hungarian notation for member variables in violation of Java coding standard, Fedora Coding standard, and good taste

            4. Need a complete set of formatting rules, and then apply to all files, so we ca automatically clean up the format. Recommend going with Java Standard

            5. Many constants constantly redefined, such as ONE for BigNumber(1) and SUCCESS=1

            6. ArraySet should be replaced with standard collection?