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

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


The following commit(s) were added to refs/heads/master by this push:
     new ebc46c0  [OPENMEETINGS-2298] checkstyle should be happy
ebc46c0 is described below

commit ebc46c012bb5c40f3a5452c1257a5c390e3c297f
Author: Maxim Solodovnik <[email protected]>
AuthorDate: Mon Apr 27 17:06:05 2020 +0700

    [OPENMEETINGS-2298] checkstyle should be happy
---
 .../apache/openmeetings/core/remote/KStream.java   |  6 ++--
 .../openmeetings/core/remote/KurentoHandler.java   |  2 +-
 .../openmeetings/core/remote/StreamProcessor.java  |  2 +-
 .../web/admin/connection/ConnectionsPanel.java     | 42 +++++++++++-----------
 .../admin/connection/dto/ConnectionListItem.java   | 26 ++++++--------
 .../connection/dto/ConnectionListKStreamItem.java  | 28 +++++++++------
 6 files changed, 53 insertions(+), 53 deletions(-)

diff --git 
a/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/KStream.java
 
b/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/KStream.java
index 230f5df..397d25f 100644
--- 
a/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/KStream.java
+++ 
b/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/KStream.java
@@ -30,8 +30,8 @@ import static 
org.apache.openmeetings.core.remote.KurentoHandler.newKurentoMsg;
 import static org.apache.openmeetings.util.OmFileHelper.getRecUri;
 import static org.apache.openmeetings.util.OmFileHelper.getRecordingChunk;
 
-import java.util.Map.Entry;
 import java.util.Date;
+import java.util.Map.Entry;
 import java.util.Optional;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.ConcurrentHashMap;
@@ -358,11 +358,11 @@ public class KStream extends AbstractStream {
        public String getUid() {
                return uid;
        }
-       
+
        public Date getConnectedSince() {
                return connectedSince;
        }
-       
+
        public KRoom getRoom() {
                return room;
        }
diff --git 
a/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/KurentoHandler.java
 
b/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/KurentoHandler.java
index de19e3b..ade553e 100644
--- 
a/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/KurentoHandler.java
+++ 
b/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/KurentoHandler.java
@@ -244,7 +244,7 @@ public class KurentoHandler {
                log.debug("Room {} found!", roomId);
                return room;
        }
-       
+
        public Collection<KRoom> getRooms() {
                return rooms.values();
        }
diff --git 
a/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/StreamProcessor.java
 
b/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/StreamProcessor.java
index 4a38f20..374d485 100644
--- 
a/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/StreamProcessor.java
+++ 
b/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/StreamProcessor.java
@@ -503,7 +503,7 @@ public class StreamProcessor implements IStreamProcessor {
        void addStream(KStream stream) {
                streamByUid.put(stream.getUid(), stream);
        }
-       
+
        public Collection<KStream> getStreams() {
                return streamByUid.values();
        }
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/connection/ConnectionsPanel.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/connection/ConnectionsPanel.java
index 74a7640..55d4f6f 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/connection/ConnectionsPanel.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/connection/ConnectionsPanel.java
@@ -58,9 +58,9 @@ import 
de.agilecoders.wicket.core.markup.html.bootstrap.button.BootstrapAjaxLink
 import de.agilecoders.wicket.core.markup.html.bootstrap.button.Buttons;
 
 public class ConnectionsPanel extends AdminBasePanel {
-       
+
        private static final Logger log = 
LoggerFactory.getLogger(ConnectionsPanel.class);
-       
+
        private static final long serialVersionUID = 1L;
        @SpringBean
        private ClientManager cm;
@@ -70,7 +70,7 @@ public class ConnectionsPanel extends AdminBasePanel {
        private StreamProcessor streamProcessor;
        @SpringBean
        private IUserManager userManager;
-       
+
        /**
         * This needs to combine two lists as we currently hold a reference to 
the KStream in two places:
         * <ul>
@@ -78,14 +78,14 @@ public class ConnectionsPanel extends AdminBasePanel {
         * <li>{@link KRoom#getParticipants()}</li>
         * </ul>
         * Both are singletons and hold a reference to a stream list and can 
get out of sync or leak.
-        * 
+        *
         * TODO: Investigate if we can have 1 source of truth.
         *
         * @return list of KStreams registered
         */
        public Collection<ConnectionListKStreamItem> getAllStreams() {
                Collection<ConnectionListKStreamItem> allStreams = new 
ArrayList<>();
-               
+
                allStreams.addAll(
                                streamProcessor.getStreams().stream()
                                        .map(stream -> new 
ConnectionListKStreamItem(
@@ -102,10 +102,10 @@ public class ConnectionsPanel extends AdminBasePanel {
                                                        ))
                                        .collect(Collectors.toList())
                                );
-               
+
                log.info("Retrieve all Streams, StreamProcessor has {} of 
streams", allStreams.size());
-               
-               // Add any streams from the KRoom that are not in the 
StreamProcessor 
+
+               // Add any streams from the KRoom that are not in the 
StreamProcessor
                scm.getRooms().forEach(
                        room -> {
                                log.info("Retrieve room {}, participants {}", 
room, room.getParticipants().size());
@@ -130,21 +130,21 @@ public class ConnectionsPanel extends AdminBasePanel {
                                );
                        }
                );
-               
+
                return allStreams;
        }
-       
+
        /**
         * Combine lists for Client and KStream
-        * 
+        *
         * @return
         */
        protected List<ConnectionListItem> getConnections() {
-               
+
                List<ConnectionListItem> connections = new ArrayList<>();
                List<Client> clients = cm.list();
                Collection<ConnectionListKStreamItem> streams = getAllStreams();
-               
+
                connections.addAll(
                                clients.stream()
                                        .map(client -> new 
ConnectionListItem(client, null))
@@ -183,7 +183,7 @@ public class ConnectionsPanel extends AdminBasePanel {
                        @Override
                        protected void populateItem(final 
Item<ConnectionListItem> item) {
                                ConnectionListItem connection = 
item.getModelObject();
-                               
+
                                if (connection.getStream() != null) {
                                        ConnectionListKStreamItem kStream = 
connection.getStream();
                                        item.add(new Label("type", 
kStream.getType()));
@@ -205,7 +205,7 @@ public class ConnectionsPanel extends AdminBasePanel {
                                                {
                                                        
setSize(Buttons.Size.Small);
                                                }
-       
+
                                                @Override
                                                public void 
onClick(AjaxRequestTarget target) {
                                                        
cm.invalidate(c.getUserId(), c.getSessionId());
@@ -213,19 +213,19 @@ public class ConnectionsPanel extends AdminBasePanel {
                                                }
                                        }.add(newOkCancelConfirm(this, 
getString("605"))));
                                }
-                               
+
                                item.add(new AjaxEventBehavior(EVT_CLICK) {
                                        private static final long 
serialVersionUID = 1L;
 
                                        @Override
                                        protected void 
onEvent(AjaxRequestTarget target) {
-                                               
+
                                                RepeatingView lines = new 
RepeatingView("line");
                                                ConnectionListItem connection = 
item.getModelObject();
-                                               
+
                                                Field[] ff;
                                                Object c;
-                                               
+
                                                if (connection.getStream() != 
null) {
                                                        ff = 
connection.getStream().getClass().getDeclaredFields();
                                                        c = 
connection.getStream();
@@ -236,7 +236,7 @@ public class ConnectionsPanel extends AdminBasePanel {
                                                        log.warn("Should be 
either Client or ConnectionListItem, modelObject {}", item.getModelObject());
                                                        return;
                                                }
-                                               
+
                                                for (Field f : ff) {
                                                        int mod = 
f.getModifiers();
                                                        if 
(Modifier.isStatic(mod) || Modifier.isTransient(mod)) {
@@ -258,7 +258,7 @@ public class ConnectionsPanel extends AdminBasePanel {
                                                
target.add(details.setVisible(true));
                                        }
                                });
-                               
+
                                item.add(AttributeModifier.append(ATTR_CLASS, 
ROW_CLASS));
                        }
                };
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/connection/dto/ConnectionListItem.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/connection/dto/ConnectionListItem.java
index 0868142..1820ce8 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/connection/dto/ConnectionListItem.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/connection/dto/ConnectionListItem.java
@@ -18,33 +18,27 @@
  */
 package org.apache.openmeetings.web.admin.connection.dto;
 
-import java.io.Serializable;
-
 import org.apache.openmeetings.db.entity.IDataProviderEntity;
 import org.apache.openmeetings.db.entity.basic.Client;
 
 /**
- * Wrapper object for the UI display as the list item might be a client (that 
+ * Wrapper object for the UI display as the list item might be a client (that
  * may have also has ConnectionListKStreamItem(KStream) referenced).<br>
  * Or<br>
  * A single ConnectionListKStreamItem(KStream).<br>
- * 
+ *
  * We want to see a total list of connections, a client represents a WebSocket 
and session.
  * A ConnectionListKStreamItem is a wrapper of KStream (which is a 
MediaStream).
- * 
+ *
  * @author sebawagner
  *
  */
-public class ConnectionListItem implements IDataProviderEntity, Serializable {
-       
-       /**
-        * 
-        */
+public class ConnectionListItem implements IDataProviderEntity {
        private static final long serialVersionUID = 1L;
-       
+
        private Client client;
        private ConnectionListKStreamItem stream;
-       
+
        public ConnectionListItem(Client client, ConnectionListKStreamItem 
stream) {
                super();
                this.client = client;
@@ -58,13 +52,13 @@ public class ConnectionListItem implements 
IDataProviderEntity, Serializable {
        }
        @Override
        public Long getId() {
-               if (client != null) return client.getId();
+               if (client != null) {
+                       return client.getId();
+               }
                return null;
        }
        @Override
        public void setId(Long id) {
-               // TODO Auto-generated method stub
-               
+               // no-op
        }
-
 }
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/connection/dto/ConnectionListKStreamItem.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/connection/dto/ConnectionListKStreamItem.java
index 2a777f3..d1ac5a9 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/connection/dto/ConnectionListKStreamItem.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/connection/dto/ConnectionListKStreamItem.java
@@ -25,23 +25,19 @@ import 
org.apache.openmeetings.db.entity.basic.Client.StreamType;
 import org.apache.openmeetings.db.entity.record.RecordingChunk.Type;
 
 /**
- * A KStream for the Wicket UI to display. This object can be serialized, 
otherwise 
+ * A KStream for the Wicket UI to display. This object can be serialized, 
otherwise
  * Wicket won't render it.
- * 
+ *
  * So It contains NO reference to Kurento client objects.
- * 
+ *
  * @author sebawagner
  *
  */
 public class ConnectionListKStreamItem implements Serializable {
-       
-       /**
-        * 
-        */
        private static final long serialVersionUID = 1L;
        /** StreamProcessor or KurentoHandler list */
-       private String source; 
-       
+       private String source;
+
        private String sid;
        private String uid;
        private Long roomId;
@@ -51,7 +47,7 @@ public class ConnectionListKStreamItem implements 
Serializable {
        private String recorder;
        private Long chunkId;
        private Type type;
-       
+
        public ConnectionListKStreamItem(String source, String sid, String uid, 
Long roomId, Date connectedSince,
                        StreamType streamType, String profile, String recorder, 
Long chunkId, Type type) {
                super();
@@ -66,38 +62,48 @@ public class ConnectionListKStreamItem implements 
Serializable {
                this.chunkId = chunkId;
                this.type = type;
        }
+
        public static long getSerialversionuid() {
                return serialVersionUID;
        }
+
        public String getSource() {
                return source;
        }
+
        public String getSid() {
                return sid;
        }
+
        public String getUid() {
                return uid;
        }
+
        public Long getRoomId() {
                return roomId;
        }
+
        public Date getConnectedSince() {
                return connectedSince;
        }
+
        public StreamType getStreamType() {
                return streamType;
        }
+
        public String getProfile() {
                return profile;
        }
+
        public String getRecorder() {
                return recorder;
        }
+
        public Long getChunkId() {
                return chunkId;
        }
+
        public Type getType() {
                return type;
        }
-       
 }

Reply via email to