{"action":"closed","issue":{"url":"https://api.github.com/repos/alibaba/fastjson/issues/276","repository_url":"https://api.github.com/repos/alibaba/fastjson","labels_url":"https://api.github.com/repos/alibaba/fastjson/issues/276/labels{/name}","comments_url":"https://api.github.com/repos/alibaba/fastjson/issues/276/comments","events_url":"https://api.github.com/repos/alibaba/fastjson/issues/276/events","html_url":"https://github.com/alibaba/fastjson/issues/276","id":54314118,"number":276,"title":"fast 1.1.41 java.lang.ArrayIndexOutOfBoundsException: 160 仍现","user":{"login":"leanjiang","id":3284486,"avatar_url":"https://avatars.githubusercontent.com/u/3284486?v=3","gravatar_id":"","url":"https://api.github.com/users/leanjiang","html_url":"https://github.com/leanjiang","followers_url":"https://api.github.com/users/leanjiang/followers","following_url":"https://api.github.com/users/leanjiang/following{/other_user}","gists_url":"https://api.github.com/users/leanjiang/gists{/gist_id}","starred_url":"https://api.github.com/users/leanjiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leanjiang/subscriptions","organizations_url":"https://api.github.com/users/leanjiang/orgs","repos_url":"https://api.github.com/users/leanjiang/repos","events_url":"https://api.github.com/users/leanjiang/events{/privacy}","received_events_url":"https://api.github.com/users/leanjiang/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/alibaba/fastjson/milestones/8","html_url":"https://github.com/alibaba/fastjson/milestones/1.2.10","labels_url":"https://api.github.com/repos/alibaba/fastjson/milestones/8/labels","id":1699372,"number":8,"title":"1.2.10","description":null,"creator":{"login":"wenshao","id":1166785,"avatar_url":"https://avatars.githubusercontent.com/u/1166785?v=3","gravatar_id":"","url":"https://api.github.com/users/wenshao","html_url":"https://github.com/wenshao","followers_url":"https://api.github.com/users/wenshao/followers","following_url":"https://api.github.com/users/wenshao/following{/other_user}","gists_url":"https://api.github.com/users/wenshao/gists{/gist_id}","starred_url":"https://api.github.com/users/wenshao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wenshao/subscriptions","organizations_url":"https://api.github.com/users/wenshao/orgs","repos_url":"https://api.github.com/users/wenshao/repos","events_url":"https://api.github.com/users/wenshao/events{/privacy}","received_events_url":"https://api.github.com/users/wenshao/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":2,"state":"open","created_at":"2016-04-12T03:26:30Z","updated_at":"2016-04-16T08:58:24Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-01-14T11:56:10Z","updated_at":"2016-04-16T08:58:24Z","closed_at":"2016-04-16T08:58:23Z","body":"程序里面如下：\r\n```\r\n        OutputStream out = outputMessage.getBody();\r\n        OutputStreamWriter osw = new OutputStreamWriter(out, DEFAULT_CHARSET);\r\n        JSON.writeJSONStringTo(o, osw, serializerFeature);\r\n```\r\nlog如下：\r\n```\r\njava.lang.ArrayIndexOutOfBoundsException: 160\r\n\tat com.alibaba.fastjson.serializer.SerializeWriter.writeStringWithDoubleQuote(SerializeWriter.java:665)\r\n\tat com.alibaba.fastjson.serializer.SerializeWriter.writeFieldValueStringWithDoubleQuote(SerializeWriter.java:1214)\r\n\tat com.alibaba.fastjson.serializer.SerializeWriter.writeFieldValue(SerializeWriter.java:1182)\r\n\tat Serializer_4.write1(Unknown Source)\r\n\tat Serializer_4.write(Unknown Source)\r\n\tat com.alibaba.fastjson.serializer.JSONSerializer.writeWithFieldName(JSONSerializer.java:398)\r\n\tat com.alibaba.fastjson.serializer.JSONSerializer.writeWithFieldName(JSONSerializer.java:376)\r\n\tat Serializer_3.write1(Unknown Source)\r\n\tat Serializer_3.write(Unknown Source)\r\n\tat com.alibaba.fastjson.serializer.JSONSerializer.writeWithFieldName(JSONSerializer.java:398)\r\n\tat Serializer_1.write1(Unknown Source)\r\n\tat Serializer_1.write(Unknown Source)\r\n\tat com.alibaba.fastjson.serializer.JSONSerializer.write(JSONSerializer.java:369)\r\n\tat com.alibaba.fastjson.JSON.writeJSONStringTo(JSON.java:580)\r\n\tat com.xuebax.utils.MappingFastJsonHttpMessageConverter.writeInternal(MappingFastJsonHttpMessageConverter.java:73)\r\n```\r\n\r\n但是使用\r\n```\r\n        String jsonString = JSON.toJSONString(o, serializerFeature);\r\n        OutputStream out = outputMessage.getBody();\r\n        out.write(jsonString.getBytes(DEFAULT_CHARSET));\r\n        out.flush();\r\n```\r\n是没有问题的。温少，您看看是否是使用Stream的方式没有一并修改？"}}