Commit 44091652f101a3ca43bfb2c0c6d6c65a686cbb28
1 parent
1350f044
update...
Showing
1 changed file
with
3 additions
and
3 deletions
src/main/java/com/bsth/data/gpsdata/thread/GpsDataLoaderThread.java
| @@ -99,7 +99,7 @@ public class GpsDataLoaderThread extends Thread { | @@ -99,7 +99,7 @@ public class GpsDataLoaderThread extends Thread { | ||
| 99 | if (null != entity) { | 99 | if (null != entity) { |
| 100 | BufferedReader br = new BufferedReader(new InputStreamReader(entity.getContent())); | 100 | BufferedReader br = new BufferedReader(new InputStreamReader(entity.getContent())); |
| 101 | StringBuilder stringBuffer = new StringBuilder(); | 101 | StringBuilder stringBuffer = new StringBuilder(); |
| 102 | - String str = ""; | 102 | + String str; |
| 103 | while ((str = br.readLine()) != null) | 103 | while ((str = br.readLine()) != null) |
| 104 | stringBuffer.append(str); | 104 | stringBuffer.append(str); |
| 105 | 105 | ||
| @@ -177,7 +177,7 @@ public class GpsDataLoaderThread extends Thread { | @@ -177,7 +177,7 @@ public class GpsDataLoaderThread extends Thread { | ||
| 177 | * 从客户端内存获取GPS数据 | 177 | * 从客户端内存获取GPS数据 |
| 178 | */ | 178 | */ |
| 179 | public void load() throws Exception { | 179 | public void load() throws Exception { |
| 180 | - List<GpsEntity> list = null; | 180 | + List<GpsEntity> list; |
| 181 | CloseableHttpClient httpClient = null; | 181 | CloseableHttpClient httpClient = null; |
| 182 | CloseableHttpResponse response = null; | 182 | CloseableHttpResponse response = null; |
| 183 | 183 | ||
| @@ -197,7 +197,7 @@ public class GpsDataLoaderThread extends Thread { | @@ -197,7 +197,7 @@ public class GpsDataLoaderThread extends Thread { | ||
| 197 | if (null != entity) { | 197 | if (null != entity) { |
| 198 | BufferedReader br = new BufferedReader(new InputStreamReader(entity.getContent())); | 198 | BufferedReader br = new BufferedReader(new InputStreamReader(entity.getContent())); |
| 199 | StringBuilder stringBuffer = new StringBuilder(); | 199 | StringBuilder stringBuffer = new StringBuilder(); |
| 200 | - String str = ""; | 200 | + String str; |
| 201 | while ((str = br.readLine()) != null) | 201 | while ((str = br.readLine()) != null) |
| 202 | stringBuffer.append(str); | 202 | stringBuffer.append(str); |
| 203 | 203 |