You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by so...@apache.org on 2016/08/27 17:59:03 UTC
svn commit: r1758060 - in /openmeetings/application:
branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/
trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/
Author: solomax
Date: Sat Aug 27 17:59:03 2016
New Revision: 1758060
URL: http://svn.apache.org/viewvc?rev=1758060&view=rev
Log:
[OPENMEETINGS-1460] code clean-up
Modified:
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Client.java
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Client.java
Modified: openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java?rev=1758060&r1=1758059&r2=1758060&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java Sat Aug 27 17:59:03 2016
@@ -313,12 +313,6 @@ public class Application extends Authent
return c;
}
- public static void removeUserFromRoom(long roomId, int pageId) {
- Client c = new Client(WebSession.get().getId(), pageId, WebSession.getUserId());
- c.setRoomId(roomId);
- removeUserFromRoom(c);
- }
-
public static Client removeUserFromRoom(Client c) {
log.debug("Removing online room client: {}, room: {}", c.getUid(), c.getRoomId());
if (c.getRoomId() != null) {
Modified: openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Client.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Client.java?rev=1758060&r1=1758059&r2=1758060&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Client.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Client.java Sat Aug 27 17:59:03 2016
@@ -134,33 +134,29 @@ public class Client implements IDataProv
public int hashCode() {
final int prime = 31;
int result = 1;
- result = prime * result + pageId;
- result = prime * result + ((sessionId == null) ? 0 : sessionId.hashCode());
result = prime * result + ((uid == null) ? 0 : uid.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
- if (this == obj)
+ if (this == obj) {
return true;
- if (obj == null)
+ }
+ if (obj == null) {
return false;
- if (getClass() != obj.getClass())
+ }
+ if (!(obj instanceof Client)) {
return false;
+ }
Client other = (Client) obj;
- if (pageId != other.pageId)
- return false;
- if (sessionId == null) {
- if (other.sessionId != null)
- return false;
- } else if (!sessionId.equals(other.sessionId))
- return false;
if (uid == null) {
- if (other.uid != null)
+ if (other.uid != null) {
return false;
- } else if (!uid.equals(other.uid))
+ }
+ } else if (!uid.equals(other.uid)) {
return false;
+ }
return true;
}
Modified: openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java
URL: http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java?rev=1758060&r1=1758059&r2=1758060&view=diff
==============================================================================
--- openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java (original)
+++ openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java Sat Aug 27 17:59:03 2016
@@ -313,12 +313,6 @@ public class Application extends Authent
return c;
}
- public static void removeUserFromRoom(long roomId, int pageId) {
- Client c = new Client(WebSession.get().getId(), pageId, WebSession.getUserId());
- c.setRoomId(roomId);
- removeUserFromRoom(c);
- }
-
public static Client removeUserFromRoom(Client c) {
log.debug("Removing online room client: {}, room: {}", c.getUid(), c.getRoomId());
if (c.getRoomId() != null) {
Modified: openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Client.java
URL: http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Client.java?rev=1758060&r1=1758059&r2=1758060&view=diff
==============================================================================
--- openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Client.java (original)
+++ openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Client.java Sat Aug 27 17:59:03 2016
@@ -134,33 +134,29 @@ public class Client implements IDataProv
public int hashCode() {
final int prime = 31;
int result = 1;
- result = prime * result + pageId;
- result = prime * result + ((sessionId == null) ? 0 : sessionId.hashCode());
result = prime * result + ((uid == null) ? 0 : uid.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
- if (this == obj)
+ if (this == obj) {
return true;
- if (obj == null)
+ }
+ if (obj == null) {
return false;
- if (getClass() != obj.getClass())
+ }
+ if (!(obj instanceof Client)) {
return false;
+ }
Client other = (Client) obj;
- if (pageId != other.pageId)
- return false;
- if (sessionId == null) {
- if (other.sessionId != null)
- return false;
- } else if (!sessionId.equals(other.sessionId))
- return false;
if (uid == null) {
- if (other.uid != null)
+ if (other.uid != null) {
return false;
- } else if (!uid.equals(other.uid))
+ }
+ } else if (!uid.equals(other.uid)) {
return false;
+ }
return true;
}