This is an automated email from the ASF dual-hosted git repository.

solomax pushed a commit to branch 4.0.x
in repository https://gitbox.apache.org/repos/asf/openmeetings.git


The following commit(s) were added to refs/heads/4.0.x by this push:
     new 3b39899  [OPENMEETINGS-1836] some NPEs are fixed
3b39899 is described below

commit 3b398996ee6595f8ee6d00a9ac6e0c4777f5200f
Author: Maxim Solodovnik <solomax...@gmail.com>
AuthorDate: Wed Mar 7 16:04:21 2018 +0700

    [OPENMEETINGS-1836] some NPEs are fixed
---
 .../java/org/apache/openmeetings/web/room/sidebar/SelfIconsPanel.html | 1 +
 .../java/org/apache/openmeetings/web/room/sidebar/icon/KickIcon.java  | 4 +++-
 .../org/apache/openmeetings/web/room/sidebar/icon/RefreshIcon.java    | 2 +-
 .../org/apache/openmeetings/web/room/sidebar/icon/UserSpeaksIcon.java | 4 +++-
 .../openmeetings/web/room/sidebar/icon/right/ModeratorRightIcon.java  | 2 +-
 .../openmeetings/web/room/sidebar/icon/right/PresenterRightIcon.java  | 2 +-
 .../openmeetings/web/room/sidebar/icon/right/WhiteboardRightIcon.java | 4 ++--
 openmeetings-web/src/main/webapp/css/room.css                         | 1 -
 8 files changed, 12 insertions(+), 8 deletions(-)

diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/SelfIconsPanel.html
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/SelfIconsPanel.html
index ad8f2d5..d050375 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/SelfIconsPanel.html
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/SelfIconsPanel.html
@@ -30,5 +30,6 @@
        <span wicket:id="right-remote-control"></span>
        <span wicket:id="right-exclsv"></span>
        <span wicket:id="right-moder"></span>
+       <div class="clear"></div>
 </wicket:panel>
 </html>
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/KickIcon.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/KickIcon.java
index 7e4069d..55c7a86 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/KickIcon.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/KickIcon.java
@@ -20,6 +20,7 @@ package org.apache.openmeetings.web.room.sidebar.icon;
 
 import static org.apache.openmeetings.web.room.sidebar.RoomSidebar.FUNC_ACTION;
 
+import org.apache.openmeetings.db.entity.basic.Client;
 import org.apache.openmeetings.db.entity.room.Room.Right;
 import org.apache.openmeetings.web.room.RoomPanel.Action;
 
@@ -43,7 +44,8 @@ public class KickIcon extends ClientIcon {
 
        @Override
        protected String getScript() {
-               return String.format("%s('%s', '%s');", FUNC_ACTION, 
Action.kick.name(), getClient().getUid());
+               Client c = getClient();
+               return c == null ? "" : String.format("%s('%s', '%s');", 
FUNC_ACTION, Action.kick.name(), c.getUid());
        }
 
        @Override
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/RefreshIcon.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/RefreshIcon.java
index 13a4b06..66de901 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/RefreshIcon.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/RefreshIcon.java
@@ -46,7 +46,7 @@ public class RefreshIcon extends ClientIcon {
        @Override
        protected boolean isClickable() {
                final Client c = getClient();
-               return c.hasActivity(Activity.broadcastA) || 
c.hasActivity(Activity.broadcastV);
+               return c != null && (c.hasActivity(Activity.broadcastA) || 
c.hasActivity(Activity.broadcastV));
        }
 
        @Override
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/UserSpeaksIcon.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/UserSpeaksIcon.java
index 52cdd92..e186c2a 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/UserSpeaksIcon.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/UserSpeaksIcon.java
@@ -18,6 +18,7 @@
  */
 package org.apache.openmeetings.web.room.sidebar.icon;
 
+import org.apache.openmeetings.db.entity.basic.Client;
 import org.apache.openmeetings.db.entity.basic.Client.Activity;
 import org.apache.openmeetings.db.entity.room.Room;
 
@@ -30,7 +31,8 @@ public class UserSpeaksIcon extends ClientIcon {
        }
 
        private boolean isActive() {
-               return getClient().hasActivity(Activity.broadcastA) && 
roomHasRight(Room.Right.exclusive);
+               Client c = getClient();
+               return c != null && (c.hasActivity(Activity.broadcastA) && 
roomHasRight(Room.Right.exclusive));
        }
 
        @Override
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/right/ModeratorRightIcon.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/right/ModeratorRightIcon.java
index 11b76d9..267e74c 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/right/ModeratorRightIcon.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/right/ModeratorRightIcon.java
@@ -31,7 +31,7 @@ public class ModeratorRightIcon extends RoomRightIcon {
        @Override
        protected String getTitle() {
                String title;
-               if (getClient().hasRight(right)) {
+               if (hasRight()) {
                        title = isSelf() ? "688" : "675";
                } else {
                        title = isSelf() ? "81" : "676";
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/right/PresenterRightIcon.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/right/PresenterRightIcon.java
index 93cd307..b4f0392 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/right/PresenterRightIcon.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/right/PresenterRightIcon.java
@@ -33,7 +33,7 @@ public class PresenterRightIcon extends RoomRightIcon {
        @Override
        protected String getTitle() {
                String title;
-               if (hasRight(right)) {
+               if (hasRight()) {
                        title = isSelf() ? "right.presenter.allowed.self" : 
"right.presenter.remove";
                } else {
                        title = isSelf() ? "right.presenter.request.self" : 
"right.presenter.request";
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/right/WhiteboardRightIcon.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/right/WhiteboardRightIcon.java
index 4049c47..1a3cdc1 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/right/WhiteboardRightIcon.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/right/WhiteboardRightIcon.java
@@ -34,7 +34,7 @@ public class WhiteboardRightIcon extends RoomRightIcon {
        @Override
        protected String getTitle() {
                String title;
-               if (getClient().hasRight(right)) {
+               if (hasRight()) {
                        title = isSelf() ? "689" : "612";
                } else {
                        title = isSelf() ? "686" : "694";
@@ -45,7 +45,7 @@ public class WhiteboardRightIcon extends RoomRightIcon {
        @Override
        protected boolean hasRight() {
                final Client c = getClient();
-               return c.hasRight(Right.presenter) || c.hasRight(right);
+               return c != null && (c.hasRight(Right.presenter) || 
c.hasRight(right));
        }
 
        @Override
diff --git a/openmeetings-web/src/main/webapp/css/room.css 
b/openmeetings-web/src/main/webapp/css/room.css
index 3663f0f..d485193 100644
--- a/openmeetings-web/src/main/webapp/css/room.css
+++ b/openmeetings-web/src/main/webapp/css/room.css
@@ -106,7 +106,6 @@
        padding: 0;
 }
 .room.sidebar .user.header {
-       height: 45px;
        padding-left: 5px;
 }
 .room.sidebar .user.header .ui-icon {

-- 
To stop receiving notification emails like this one, please contact
solo...@apache.org.

Reply via email to