Ticket #38727

JSON.decodeを実施後、ConcurrentModificationException となった

Open Date: 2018-11-05 10:07 Last Update: 2018-11-05 10:07

Reporter:
Owner:
(None)
Type:
Status:
Open
Component:
(None)
MileStone:
(None)
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
None
File:
None

Details

利用ライブラリ:jsonic-1.3.0.jar

<一時解析> decode実施の過程で、JSON.Context()を生成している。 JSONReader jreader = new JSONReader(new JSON.Context(), (InputSource)is, false, true);

JSON.Context()の生成処理中に"net.arnx.jsonic.Messages.(locale).properties"ファイルをClassLoadして読み取ろうとしている。 このプロパティファイルはエラー文字列が定義されており、国毎に定義できるらしい。 現在はMessages.properties と Messages_ja.properties のみが存在しSource Codeと同じパスに格納されている。

this.cache = new LocalCache("net.arnx.jsonic.Messages", this.locale, this.timeZone); この処理中、読み取ったファイルをHashMapからイテレータしている時にConcurrentModificationException となっている。 頻度は極めて稀。

<スタックトレース> 10-31 00:50:19.458 1921 2577 E AndroidRuntime: FATAL EXCEPTION: Thread-218 10-31 00:50:19.458 1921 2577 E AndroidRuntime: Process: jp.co.ricoh.isdk.browser, PID: 1921 10-31 00:50:19.458 1921 2577 E AndroidRuntime: java.util.ConcurrentModificationException 10-31 00:50:19.458 1921 2577 E AndroidRuntime: at java.util.HashMap$HashIterator.nextEntry(HashMap.java:787)

10-31 00:50:19.458 1921 2577 E AndroidRuntime: at java.util.HashMap$KeyIterator.next(HashMap.java:814) 10-31 00:50:19.458 1921 2577 E AndroidRuntime: at java.util.jar.JarVerifier.readCertificates(JarVerifier.java:266) 10-31 00:50:19.458 1921 2577 E AndroidRuntime: at java.util.jar.JarFile.getInputStream(JarFile.java:380) 10-31 00:50:19.458 1921 2577 E AndroidRuntime: at libcore.net.url.JarURLConnectionImpl.getInputStream(JarURLConnectionImpl.java:222) 10-31 00:50:19.458 1921 2577 E AndroidRuntime: at java.net.URL.openStream(URL.java:470) 10-31 00:50:19.458 1921 2577 E AndroidRuntime: at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:444) 10-31 00:50:19.458 1921 2577 E AndroidRuntime: at java.util.ResourceBundle.handleGetBundle(ResourceBundle.java:516) 10-31 00:50:19.458 1921 2577 E AndroidRuntime: at java.util.ResourceBundle.handleGetBundle(ResourceBundle.java:542) 10-31 00:50:19.458 1921 2577 E AndroidRuntime: at java.util.ResourceBundle.getBundle(ResourceBundle.java:228) 10-31 00:50:19.458 1921 2577 E AndroidRuntime: at java.util.ResourceBundle.getBundle(ResourceBundle.java:159) 10-31 00:50:19.458 1921 2577 E AndroidRuntime: at net.arnx.jsonic.util.LocalCache.<init>(LocalCache.java:29) 10-31 00:50:19.458 1921 2577 E AndroidRuntime: at net.arnx.jsonic.JSON$Context.<init>(JSON.java:1189) 10-31 00:50:19.458 1921 2577 E AndroidRuntime: at net.arnx.jsonic.JSON.parse(JSON.java:900) 10-31 00:50:19.458 1921 2577 E AndroidRuntime: at net.arnx.jsonic.JSON.parse(JSON.java:882) 10-31 00:50:19.458 1921 2577 E AndroidRuntime: at net.arnx.jsonic.JSON.decode(JSON.java:466) 10-31 00:50:19.458 1921 2577 E AndroidRuntime: at jp.co.ricoh.isdk.browser.http.SmartSdkConnector.getSmartSdkInfo(SmartSdkConnector.java:638) 10-31 00:50:19.458 1921 2577 E AndroidRuntime: at jp.co.ricoh.isdk.browser.SmartSdkBrowserService$GetSmartSdkInfoThread.getSmartSdkInfo(SmartSdkBrowserService.java:7759)

10-31 00:50:19.458 1921 2577 E AndroidRuntime: at jp.co.ricoh.isdk.browser.SmartSdkBrowserService$GetSmartSdkInfoThread.run(SmartSdkBrowserService.java:7745) 10-31 00:50:19.459 1514 1514 I MB:Reciever: onReceive action:com.android.launcher 10-31 00:50:19.460 1501 1501 I ErDisplay:SystemWindowDisplayService: receiveIntent Action=com.android.launcher 10-31 00:50:19.460 1501 1501 I ErDisplay:SystemWindowDisplayService: actionHome: null reason: null destination:null 10-31 00:50:19.468 668 803 I am_crash: 1921,0,jp.co.ricoh.isdk.browser,952680007,java.util.ConcurrentModificationException,NULL,HashMap.java,787

Ticket History (1/1 Histories)

2018-11-05 10:07 Updated by: p000g18340
  • New Ticket "JSON.decodeを実施後、ConcurrentModificationException となった" created

Attachment File List

No attachments

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login