how to I pass HashMap<String, String>.class
in Gson builder for supperss "unchecked warning"?
HashMap<String, String> manifest =
Gson().fromJson(stringBuilder.toString(), HashMap.class);
用@SuppressWarnings("unchecked")
标记您的方法
Please add @SuppressWarnings("unchecked")
above your Hashmap reference. This will only ignore the next statement to it instead of whole method.
@SuppressWarnings("unchecked")
HashMap<String, String> manifest =
Gson().fromJson(stringBuilder.toString(), HashMap.class);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.