java hashmap空指针异常
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了java hashmap空指针异常相关的知识,希望对你有一定的参考价值。
Map<Adgroup, Creative> ads = new HashMap<Adgroup, Creative>();
ads = AppointSomeApi.pullBaiduAd(adRequestParam, adResponse);
try
if(!ads.isEmpty())
。。。。。
上面具体的方法和变量都不用管,因为它是在最后if语句的地方报错了。。。这是什么啊?
-------------------------------------------------------------------------
[16:08:10,131] ERROR
java.lang.NullPointerException
at com.renren.ad.optimus.core.handler.BdRequestSelectHandler.handle(BdRequestSelectHandler.java:77)
at com.renren.ad.optimus.core.handler.AdSelectFilterHandler.handle(AdSelectFilterHandler.java:46)
at com.renren.ad.optimus.core.handler.AdSelectPipeline.fire(AdSelectPipeline.java:73)
at com.renren.ad.optimus.core.service.AdMobFeedadCoreServiceI.getFeedAds(AdMobFeedadCoreServiceI.java:92)
at com.renren.ad.optimus.core.ice.service._AdMobFeedadMatchManagerDisp.___getFeedAds(_AdMobFeedadMatchManagerDisp.java:94)
at com.renren.ad.optimus.core.ice.service._AdMobFeedadMatchManagerDisp.__dispatch(_AdMobFeedadMatchManagerDisp.java:137)
at IceInternal.Incoming.invoke(Incoming.java:159)
at Ice.ConnectionI.invokeAll(ConnectionI.java:2037)
at Ice.ConnectionI.message(ConnectionI.java:972)
at IceInternal.ThreadPool.run(ThreadPool.java:577)
at IceInternal.ThreadPool.access$100(ThreadPool.java:12)
at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:971)
以上是关于java hashmap空指针异常的主要内容,如果未能解决你的问题,请参考以下文章