Menu

#1234 Unused private methods still giving false positives in 5.1.3 snapshot

PMD-5.1.3
closed
None
PMD
3-Major
Bug
2014-08-31
2014-08-09
No

I have confirmed many of the issues have been fixed based on the latest snapshot, but there are still some outstanding.

One Example that still exists:

public List<IListObject> getBliCodeByFiscalYear(int fiscalYear) {

        List<IListObject> records = bliCodeCache.get(fiscalYear);
        if (records == null) {
            logger.info("No BLI Code records cached for year : " + fiscalYear + ". Caching now.");
            records = this.selectBLICodeByFiscalYear(fiscalYear);
            bliCodeCache.put(fiscalYear, records);
        }
        if (records == null) {
            logger.error("Could not load BLI Code DATA.  No records retrieved.");
        }
        return records;
    }

    /**
     * Get a list of All BLI Code for given fiscal year.  
     * @param fy the selected FY
     * @return an List of BLI Codes
     */
    private List<IListObject> selectBLICodeByFiscalYear(int fy) {

        List<IListObject> result = new ArrayList<IListObject>();
        try {
            result = spiStripFieldService.getBliCodeList(fy);
        } catch (ServiceException se) {
                logger.error("Error getting BLI Code DATA: " + se.getMessage(), se);
        }
        return result;
    }

Related

Issues: #1156

Discussion

  • Andreas Dangel

    Andreas Dangel - 2014-08-10

    Thanks for the report.
    Will be fixed with the next release.

     
  • Andreas Dangel

    Andreas Dangel - 2014-08-10
    • status: open --> closed
    • assigned_to: Andreas Dangel
    • Milestone: New Tickets --> PMD-next
     

Log in to post a comment.