@@ -75,18 +75,20 @@ public Map<String, PeerStatusJsonV2> getPeersStatus() {
7575 Function <ResultSet , Void > function = rs -> {
7676 try {
7777 String key = rs .getString (1 );
78- log .debug ("Checking key " + key );
7978 String value = rs .getString (2 );
80- PeerStatusJsonV2 peerStatus = gson .fromJson (value , PeerStatusJsonV2 .class );
81- peerStatus .status (PeerStatusString .valueOf (rs .getString ("status" )));
82- updateNodesWithPeer (peerStatus );
83- $ .put (key , peerStatus );
79+ try {
80+ PeerStatusJsonV2 peerStatus = gson .fromJson (value , PeerStatusJsonV2 .class );
81+ peerStatus .status (PeerStatusString .valueOf (rs .getString ("status" )));
82+ updateNodesWithPeer (peerStatus );
83+ $ .put (key , peerStatus );
84+ } catch (JsonSyntaxException e ) {
85+ log .error ("Got json exception while trying to parse line of key " + key + ", will skip this node" ,
86+ e );
87+ return null ;
88+ }
8489 return null ;
8590 } catch (SQLException e ) {
8691 throw ExceptionUtils .asUnchecked (e );
87- } catch (JsonSyntaxException e ) {
88- log .error ("Got json exception while trying to parse line, will skip this node" , e );
89- return null ;
9092 }
9193 };
9294 dbUtils .executeQueryCompressed ("select * from " + TABLE_NAME , function );
0 commit comments