File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -213,7 +213,8 @@ public String update() throws ApplicationException, IOException {
213213 public String update (String meetingCode , String sessionId ) throws ApplicationException , IOException {
214214 String error = "{ \" error\" : \" expired\" }" ;
215215 if (this .meetings .containsKey (meetingCode )) {
216- if (sessions .get (meetingCode ) != null && sessions .get (meetingCode ).contains (sessionId )) {
216+ List <String > list ;
217+ if ((list = sessions .get (meetingCode )) != null && list .contains (sessionId )) {
217218 return this .update (sessionId );
218219 }
219220 error = "{ \" error\" : \" session-timeout\" }" ;
@@ -330,7 +331,7 @@ public void sessionDestroyed(HttpSessionEvent arg0) {
330331
331332 Queue <Builder > messages ;
332333 List <String > session_ids ;
333- synchronized (this .meetings ) {
334+ synchronized (this .meetings ) {
334335 if ((session_ids = this .sessions .get (meetingCode )) != null ) {
335336 session_ids .remove (arg0 .getSession ().getId ());
336337 }
Original file line number Diff line number Diff line change @@ -125,19 +125,19 @@ public void run() {
125125 * @throws IOException
126126 */
127127 public final String update (final String sessionId ) throws ApplicationException , IOException {
128- Builder message = null ;
128+ Builder message ;
129129 Queue <Builder > messages ;
130130 synchronized (this .list ) {
131131 messages = this .list .get (sessionId );
132- while (messages != null && (message = messages .poll ()) == null ) {
132+ while ((message = messages .poll ()) == null ) {
133133 try {
134134 this .list .wait (TIMEOUT );
135135 } catch (InterruptedException e ) {
136136 throw new ApplicationException (e .getMessage (), e );
137137 }
138138 }
139139
140- return message != null ? message .toString () : "" ;
140+ return message .toString ();
141141 }
142142 }
143143
You can’t perform that action at this time.
0 commit comments