阅读背景:

Bug: Return value of putIfAbsent is ignored, but list is reused

来源:互联网 

这个错误是findbugs插件找出来的问题.

代码首先是这样的  

 public static List<InvoiceDTO> getKeyInvoiceOpeningResList(
            String key) {
        List<InvoiceDTO>  list = invoiceOpeningListMap.get(key);
        if (list == null) {
            list = new ArrayList<InvoiceDTO>();
            invoiceOpeningListMap.put(key, list);
        }
        return list;
    } public s



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: