Commit e58bdb3b0c70dc13fad1acb1bf9e062dd4e331ac

Authored by 潘钊
1 parent 0b4dd034

update...

src/main/java/com/bsth/client/GpsBeforeBuffer.java
... ... @@ -40,13 +40,18 @@ public class GpsBeforeBuffer implements CommandLineRunner{
40 40 public static List<GpsEntity> pollAll(){
41 41 List<GpsEntity> rs = new ArrayList<>(300);
42 42 GpsEntity gps;
43   - while (true){
  43 + int size = linkedList.size();
  44 + for(int j = 0; j < size; j++){
  45 + gps = linkedList.poll();
  46 + rs.add(gps);
  47 + }
  48 + /*while (true){
44 49 gps = linkedList.poll();
45 50 if(gps == null){
46 51 break;
47 52 }
48 53 rs.add(gps);
49   - }
  54 + }*/
50 55  
51 56 log.info("poll size: " + rs.size());
52 57 return rs;
... ...