Skip to content

Commit a44201f

Browse files
broaden gson range, bundle new gson and guava (#837)
Fixes #836 Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com> Co-authored-by: Jonah Graham <jonah@kichwacoders.com>
1 parent 96a366a commit a44201f

File tree

4 files changed

+19
-17
lines changed

4 files changed

+19
-17
lines changed

gradle/versions.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ version = '0.23.1'
1515
ext.versions = [
1616
'xtend_lib': '2.32.0',
1717
'guava': '[32.1.2,34)',
18-
'gson': '[2.9.1,2.11)',
18+
'gson': '[2.9.1,3.0)',
19+
1920
'websocket_jakarta': '2.0.0',
2021
'websocket': '1.0',
2122
'junit': '4.13.2',

org.eclipse.lsp4j.jsonrpc/src/test/java/org/eclipse/lsp4j/jsonrpc/test/IntegrationTest.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -692,9 +692,9 @@ public void testMalformedJson1() throws Exception {
692692
Launcher<MyClient> serverSideLauncher = Launcher.createLauncher(server, MyClient.class, in, out);
693693
serverSideLauncher.startListening().get(TIMEOUT, TimeUnit.MILLISECONDS);
694694

695-
Assert.assertEquals("Content-Length: 214" + CRLF + CRLF
695+
Assert.assertEquals("Content-Length: 294" + CRLF + CRLF
696696
+ "{\"jsonrpc\":\"2.0\",\"id\":\"1\",\"error\":{\"code\":-32700,\"message\":\"Message could not be parsed.\","
697-
+ "\"data\":{\"message\":\"com.google.gson.stream.MalformedJsonException: Expected value at line 4 column 22 path $.params.value\"}}}"
697+
+ "\"data\":{\"message\":\"com.google.gson.stream.MalformedJsonException: Expected value at line 4 column 22 path $.params.value\\nSee https://github.com/google/gson/blob/main/Troubleshooting.md#malformed-json\"}}}"
698698
+ "Content-Length: 51" + CRLF + CRLF
699699
+ "{\"jsonrpc\":\"2.0\",\"id\":\"2\",\"result\":{\"value\":\"bar\"}}",
700700
out.toString());
@@ -726,7 +726,8 @@ public void testMalformedJson2() throws Exception {
726726
Launcher<MyClient> serverSideLauncher = Launcher.createLauncher(server, MyClient.class, in, out);
727727
serverSideLauncher.startListening().get(TIMEOUT, TimeUnit.MILLISECONDS);
728728

729-
logMessages.await(Level.SEVERE, "com.google.gson.stream.MalformedJsonException: Expected value at line 2 column 22 path $.params.value");
729+
logMessages.await(Level.SEVERE, "com.google.gson.stream.MalformedJsonException: Expected value at line 2 column 22 path $.params.value\n"
730+
+ "See https://github.com/google/gson/blob/main/Troubleshooting.md#malformed-json");
730731
Assert.assertEquals("Content-Length: 51" + CRLF + CRLF
731732
+ "{\"jsonrpc\":\"2.0\",\"id\":\"2\",\"result\":{\"value\":\"bar\"}}",
732733
out.toString());
@@ -756,9 +757,9 @@ public void testMalformedJson3() throws Exception {
756757
Launcher<MyClient> serverSideLauncher = Launcher.createLauncher(server, MyClient.class, in, out);
757758
serverSideLauncher.startListening().get(TIMEOUT, TimeUnit.MILLISECONDS);
758759

759-
Assert.assertEquals("Content-Length: 165" + CRLF + CRLF
760+
Assert.assertEquals("Content-Length: 245" + CRLF + CRLF
760761
+ "{\"jsonrpc\":\"2.0\",\"id\":\"1\",\"error\":{\"code\":-32700,\"message\":\"Message could not be parsed.\","
761-
+ "\"data\":{\"message\":\"Unterminated object at line 5 column 2 path $.params\"}}}"
762+
+ "\"data\":{\"message\":\"Unterminated object at line 5 column 2 path $.params\\nSee https://github.com/google/gson/blob/main/Troubleshooting.md#malformed-json\"}}}"
762763
+ "Content-Length: 51" + CRLF + CRLF
763764
+ "{\"jsonrpc\":\"2.0\",\"id\":\"2\",\"result\":{\"value\":\"bar\"}}",
764765
out.toString());
@@ -785,9 +786,9 @@ public void testMalformedJson4() throws Exception {
785786
Launcher<MyClient> serverSideLauncher = Launcher.createLauncher(server, MyClient.class, in, out);
786787
serverSideLauncher.startListening().get(TIMEOUT, TimeUnit.MILLISECONDS);
787788

788-
Assert.assertEquals("Content-Length: 195" + CRLF + CRLF
789+
Assert.assertEquals("Content-Length: 292" + CRLF + CRLF
789790
+ "{\"jsonrpc\":\"2.0\",\"id\":\"1\",\"error\":{\"code\":-32700,\"message\":\"Message could not be parsed.\","
790-
+ "\"data\":{\"message\":\"Use JsonReader.setLenient(true) to accept malformed JSON at line 5 column 3 path $\"}}}"
791+
+ "\"data\":{\"message\":\"Use JsonReader.setStrictness(Strictness.LENIENT) to accept malformed JSON at line 5 column 3 path $\\nSee https://github.com/google/gson/blob/main/Troubleshooting.md#malformed-json\"}}}"
791792
+ "Content-Length: 51" + CRLF + CRLF
792793
+ "{\"jsonrpc\":\"2.0\",\"id\":\"2\",\"result\":{\"value\":\"bar\"}}",
793794
out.toString());

releng/p2/category.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
<feature id="org.eclipse.lsp4j.sdk" version="0.23.1.qualifier">
44
<category name="lsp4j"/>
55
</feature>
6-
<bundle id="com.google.gson" version="2.10.1.qualifier"/>
7-
<bundle id="com.google.gson.source" version="2.10.1.qualifier"/>
8-
<bundle id="com.google.guava" version="33.0.0.qualifier"/>
9-
<bundle id="com.google.guava.source" version="33.0.0.qualifier"/>
6+
<bundle id="com.google.gson" version="2.11.0.qualifier"/>
7+
<bundle id="com.google.gson.source" version="2.11.0.qualifier"/>
8+
<bundle id="com.google.guava" version="33.2.0.qualifier"/>
9+
<bundle id="com.google.guava.source" version="33.2.0.qualifier"/>
1010
<bundle id="jakarta.websocket-api" version="0.0.0"/>
1111
<bundle id="jakarta.websocket-api.source" version="0.0.0"/>
1212
<bundle id="jakarta.websocket-client-api" version="0.0.0"/>

releng/releng-target/lsp4j.target.target

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
<target name="org.eclipse.xtext.helios.target" sequenceNumber="0">
44
<locations>
55
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="false" type="InstallableUnit">
6-
<repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/2024-03"/>
7-
<unit id="com.google.gson" version="2.10.1"/>
8-
<unit id="com.google.gson.source" version="2.10.1"/>
9-
<unit id="com.google.guava" version="33.0.0.jre"/>
10-
<unit id="com.google.guava.source" version="33.0.0.jre"/>
6+
<repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/2024-06"/>
7+
<unit id="com.google.gson" version="2.11.0"/>
8+
<unit id="com.google.gson.source" version="2.11.0"/>
9+
<unit id="com.google.guava" version="33.2.0.jre"/>
10+
<unit id="com.google.guava.source" version="33.2.0.jre"/>
1111
<unit id="jakarta.websocket-api" version="0.0.0"/>
1212
<unit id="jakarta.websocket-api.source" version="0.0.0"/>
1313
<unit id="jakarta.websocket-client-api" version="0.0.0"/>

0 commit comments

Comments
 (0)