package com.alibaba.json.bvt.bug;

import com.alibaba.fastjson.JSONObject;
import junit.framework.TestCase;

import com.alibaba.fastjson.JSON;

import java.util.Map;

public class Bug_for_Exception extends TestCase {
	public void test_exception() throws Exception {
		RuntimeException ex = new RuntimeException("e1");
		String text = JSON.toJSONString(ex);
		System.out.println(text);


		Object obj = JSON.parse(text);
		assertEquals(JSONObject.class, obj.getClass());

		Throwable throwable = JSON.parseObject(text, Throwable.class);
		assertEquals(RuntimeException.class, throwable.getClass());

		Object obj2 = JSON.parse(text);
//		assertEquals(JSONObject.class, obj2.getClass());
	}
}

@@ -259,16 +259,18 @@
 ption %7B%0A
+//
 %09%09Runtim
@@ -313,16 +313,18 @@
 (%22e1%22);%0A
+//
 %09%09String
@@ -354,16 +354,18 @@
 ng(ex);%0A
+//
 %09%09System
@@ -384,18 +384,24 @@
 (text);%0A
-%0A%0A
+//%0A//%0A//
 %09%09Object
@@ -425,16 +425,18 @@
 (text);%0A
+//
 %09%09assert
@@ -477,17 +477,21 @@
 ass());%0A
-%0A
+//%0A//
 %09%09Throwa
@@ -547,16 +547,18 @@
 class);%0A
+//
 %09%09assert
@@ -611,17 +611,21 @@
 ass());%0A
-%0A
+//%0A//
 %09%09Object

fix build error