Skip to content

Commit a3c44b3

Browse files
committed
gson2: change CloudRuntimeException to JsonParseException
1 parent ddcf380 commit a3c44b3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

core/src/main/java/com/cloud/agent/transport/ArrayTypeAdaptor.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@
3535
import com.google.gson.JsonSerializationContext;
3636
import com.google.gson.JsonSerializer;
3737

38-
import com.cloud.utils.exception.CloudRuntimeException;
39-
4038
public class ArrayTypeAdaptor<T> implements JsonDeserializer<T[]>, JsonSerializer<T[]> {
4139

4240
protected Gson _gson = null;
@@ -85,7 +83,7 @@ public T[] deserialize(JsonElement json, Type typeOfT, JsonDeserializationContex
8583
T[] ts = (T[])Array.newInstance(type, cmds.size());
8684
return cmds.toArray(ts);
8785
} catch (ClassNotFoundException e) {
88-
throw new CloudRuntimeException("can't find " + typeOfT.getTypeName());
86+
throw new JsonParseException("can't find " + typeOfT.getTypeName());
8987
}
9088
}
9189
}

0 commit comments

Comments
 (0)