Skip to content

Commit 4000bc4

Browse files
committed
Update the tinystruct framework version to be 1.5.5.
1 parent 568a040 commit 4000bc4

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

bin/dispatcher

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env sh
22
ROOT="$(pwd)"
3-
VERSION="1.5.4"
3+
VERSION="1.5.5"
44
cd "$(dirname "$0")" || exit
55
cd "../"
66
# Navigate to the root directory

bin/dispatcher.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ set "JAVA_CMD=%JAVA_HOME%\bin\java.exe"
3333

3434
@REM Consolidate classpath entries, initialize ROOT and VERSION
3535
set "ROOT=%~dp0..\"
36-
set "VERSION=1.5.4"
36+
set "VERSION=1.5.5"
3737
set "classpath=%ROOT%target\classes;%ROOT%lib\tinystruct-%VERSION%-jar-with-dependencies.jar;%ROOT%lib\tinystruct-%VERSION%.jar;%ROOT%lib\*;%ROOT%WEB-INF\lib\*;%ROOT%WEB-INF\classes;%USERPROFILE%\.m2\repository\org\tinystruct\tinystruct\%VERSION%\tinystruct-%VERSION%-jar-with-dependencies.jar;%USERPROFILE%\.m2\repository\org\tinystruct\tinystruct\%VERSION%\tinystruct-%VERSION%.jar"
3838

3939
@REM Run Java application

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<dependency>
1919
<groupId>org.tinystruct</groupId>
2020
<artifactId>tinystruct</artifactId>
21-
<version>1.5.4</version>
21+
<version>1.5.5</version>
2222
</dependency>
2323
<!-- https://mvnrepository.com/artifact/org.apache.groovy/groovy -->
2424
<dependency>

src/main/java/custom/application/v1/smalltalk.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -78,18 +78,18 @@ public smalltalk index(Request request, Response response) {
7878
dispatcher.dispatch(new SessionCreated(String.valueOf(meetingCode)));
7979
}
8080

81-
List<String> session_ids;
81+
Set<String> session_ids;
8282
final String sessionId = request.getSession().getId();
8383
if (this.groups.get(meetingCode) == null) {
8484
this.groups.put(meetingCode.toString(), new ArrayBlockingQueue<Builder>(DEFAULT_MESSAGE_POOL_SIZE));
8585
}
8686

8787
// If the current user is not in the list of the sessions, we create a default session list for the meeting generated.
8888
if ((session_ids = this.sessions.get(meetingCode)) == null) {
89-
this.sessions.put(meetingCode.toString(), session_ids = new ArrayList<String>());
89+
this.sessions.put(meetingCode.toString(), session_ids = new HashSet<>());
9090
}
9191

92-
if (!session_ids.contains(sessionId)) session_ids.add(sessionId);
92+
session_ids.add(sessionId);
9393

9494
if (!this.list.containsKey(sessionId)) {
9595
this.list.put(sessionId, new ArrayDeque<Builder>());
@@ -666,7 +666,7 @@ public String update(String meetingCode, String sessionId, Request request, Resp
666666
if (request.getSession().getId().equalsIgnoreCase(sessionId)) {
667667
String error = "{ \"error\": \"expired\" }";
668668
if (this.groups.containsKey(meetingCode)) {
669-
List<String> list;
669+
Set<String> list;
670670
if ((list = sessions.get(meetingCode)) != null && list.contains(sessionId)) {
671671
return this.take(sessionId);
672672
}
@@ -826,7 +826,7 @@ public void onSessionEvent(SessionEvent arg0) {
826826
this.save(meetingCode, builder);
827827

828828
Queue<Builder> messages;
829-
List<String> session_ids;
829+
Set<String> session_ids;
830830
if ((session_ids = this.sessions.get(meetingCode)) != null) {
831831
session_ids.remove(arg0.getSession().getId());
832832
}

0 commit comments

Comments
 (0)