Skip to content

Commit 0753e07

Browse files
author
Echo.Xu
committed
java8 泛型不能转为int long 基本类型问题
1 parent 397bf00 commit 0753e07

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,9 @@
44
.settings
55
.classpath
66
.DS_Store
7+
.idea
8+
.gradle
9+
out
10+
ws-http.java.iml
711
Thumbs.db
812

src/ws/http/test/TestCase.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ public class TestCase {
1717

1818
public static void main(String[] args) throws IOException {
1919
TestCase obj = new TestCase();
20-
// obj.testGet();
21-
// obj.testPost();
22-
obj.testJson();
20+
obj.testGet();
21+
obj.testPost();
22+
// obj.testJson();
2323

2424
}
2525

src/ws/http/tools/json/Query.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public static JsonValue find(JsonValue json, String path) {
2727
else if (token.isInt())
2828
{
2929
if ( !result.isArray() ) return JSON.NULL;
30-
int index = (int) token.getValue();
30+
int index = (Integer) token.getValue();
3131

3232
if (index < result.asArray().size())
3333
{

0 commit comments

Comments
 (0)