Skip to content

Commit 3d67cec

Browse files
Synex-whujjboy
authored andcommitted
Upgrade jetty version (#17)
1 parent c075817 commit 3d67cec

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
<jraft.version>1.2.4</jraft.version>
7979
<metrics.version>4.0.2</metrics.version>
8080
<commons-io.version>2.4</commons-io.version>
81-
<jetty.version>9.4.12.v20180830</jetty.version>
81+
<jetty.version>[9.4.17.v20190418,)</jetty.version>
8282
<main.user.dir>${user.dir}</main.user.dir>
8383
<argLine>-Dnetwork_interface_denylist=docker0</argLine>
8484
</properties>

server/server/session/src/main/java/com/alipay/sofa/registry/server/session/resource/SessionDigestResource.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import java.util.ArrayList;
3838
import java.util.Collection;
3939
import java.util.HashMap;
40+
import java.util.HashSet;
4041
import java.util.List;
4142
import java.util.Map;
4243

@@ -146,18 +147,17 @@ public Map<String, Object> getPushSwitch() {
146147
@Path("getDataInfoIdList")
147148
@Produces(MediaType.APPLICATION_JSON)
148149
public Collection<String> getDataInfoIdList() {
149-
Collection<String> ret = new ArrayList<>();
150+
Collection<String> ret = new HashSet<>();
150151
ret.addAll(sessionInterests.getInterestDataInfoIds());
151152
ret.addAll(sessionDataStore.getStoreDataInfoIds());
152-
return sessionInterests.getInterestDataInfoIds();
153+
return ret;
153154
}
154155

155156
@GET
156157
@Path("checkSumDataInfoIdList")
157158
@Produces(MediaType.APPLICATION_JSON)
158159
public int checkSumDataInfoIdList() {
159-
return sessionInterests.getInterestDataInfoIds().hashCode()
160-
+ sessionDataStore.getStoreDataInfoIds().hashCode();
160+
return getDataInfoIdList().hashCode();
161161
}
162162

163163
private void fillServerList(String type,

test/src/test/java/com/alipay/sofa/registry/test/resource/session/SessionDigestResourceTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,6 @@ public void testGetDataInfoIdList() {
183183
public void testCheckSumDataInfoIdList() {
184184
int result = sessionChannel.getWebTarget().path("digest/checkSumDataInfoIdList")
185185
.request(APPLICATION_JSON).get(int.class);
186-
assertTrue(result > 0);
186+
assertTrue(result != 0);
187187
}
188188
}

0 commit comments

Comments
 (0)