Commit 3ae18a558375532efcb7fcd374f58a1ad2d9105c
1 parent
9dd532eb
依据阿里代码规范,if后必须有大括号。添加导包语句
Showing
1 changed file
with
10 additions
and
3 deletions
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRESTfulUtils.java
| ... | ... | @@ -14,6 +14,7 @@ import java.net.ConnectException; |
| 14 | 14 | import java.util.HashMap; |
| 15 | 15 | import java.util.Map; |
| 16 | 16 | import java.util.Objects; |
| 17 | +import java.util.concurrent.TimeUnit; | |
| 17 | 18 | |
| 18 | 19 | @Component |
| 19 | 20 | public class ZLMRESTfulUtils { |
| ... | ... | @@ -138,9 +139,15 @@ public class ZLMRESTfulUtils { |
| 138 | 139 | |
| 139 | 140 | public JSONObject getMediaList(MediaServerItem mediaServerItem, String app, String stream, String schema, RequestCallback callback){ |
| 140 | 141 | Map<String, Object> param = new HashMap<>(); |
| 141 | - if (app != null) param.put("app",app); | |
| 142 | - if (stream != null) param.put("stream",stream); | |
| 143 | - if (schema != null) param.put("schema",schema); | |
| 142 | + if (app != null) { | |
| 143 | + param.put("app",app); | |
| 144 | + } | |
| 145 | + if (stream != null) { | |
| 146 | + param.put("stream",stream); | |
| 147 | + } | |
| 148 | + if (schema != null) { | |
| 149 | + param.put("schema",schema); | |
| 150 | + } | |
| 144 | 151 | param.put("vhost","__defaultVhost__"); |
| 145 | 152 | return sendPost(mediaServerItem, "getMediaList",param, callback); |
| 146 | 153 | } | ... | ... |