HashMap的get()方法的NullPointerException @author:Jingdai @date:2020.12.07 今天写代码发现一个 bug,HashMap的 get() 方法一直报空指针异常,现记录一下。 看下面代码。 private HashMap<Integer, Integer> cache; private LinkedList<Integer> keyList; private int capacity; public