Commit 90c29240e06bebfb0f7825f1e9a3a790232ca54d
1 parent
c62c66ed
去除调试日志
Showing
1 changed file
with
3 additions
and
8 deletions
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRESTfulUtils.java
| ... | ... | @@ -134,18 +134,13 @@ public class ZLMRESTfulUtils { |
| 134 | 134 | } |
| 135 | 135 | File snapFile = new File(targetPath + "/" + fileName); |
| 136 | 136 | FileOutputStream outStream = new FileOutputStream(snapFile); |
| 137 | - ResponseBody responseBody = response.body(); | |
| 138 | - if (responseBody != null) { | |
| 139 | - outStream.write(responseBody.bytes()); | |
| 140 | - } | |
| 137 | + | |
| 138 | + outStream.write(Objects.requireNonNull(response.body()).bytes()); | |
| 141 | 139 | outStream.close(); |
| 142 | 140 | } else { |
| 143 | 141 | logger.error(String.format("[ %s ]请求失败: %s %s", url, response.code(), response.message())); |
| 144 | 142 | } |
| 145 | - ResponseBody responseBody = response.body(); | |
| 146 | - if (responseBody != null) { | |
| 147 | - responseBody.close(); | |
| 148 | - } | |
| 143 | + Objects.requireNonNull(response.body()).close(); | |
| 149 | 144 | } else { |
| 150 | 145 | logger.error(String.format("[ %s ]请求失败: %s %s", url, response.code(), response.message())); |
| 151 | 146 | } | ... | ... |