fix
metamap iter
This commit is contained in:
parent
eedd15e5fc
commit
21cf01b0c9
|
@ -14,10 +14,7 @@ import org.snmp4j.smi.Address;
|
|||
import org.snmp4j.transport.DefaultUdpTransportMapping;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Created by insanity on 17. 4. 10.
|
||||
|
@ -149,9 +146,12 @@ public class SNMPCrawler extends Crawler {
|
|||
|
||||
OFResultSet rs = OFResultSet.newInstance(item);
|
||||
|
||||
List<String> row = new ArrayList<>();
|
||||
for (String key : map.keySet()) {
|
||||
row.add(map.get(key));
|
||||
List<String> row = new ArrayList<>(Arrays.asList(new String[map.size()]));
|
||||
|
||||
Map<String, Integer> metaMap = rs.getMeta();
|
||||
|
||||
for (Map.Entry<String, Integer> info : metaMap.entrySet()) {
|
||||
row.set(info.getValue().intValue(), map.get(info.getKey()));
|
||||
}
|
||||
rs.addRow(row);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user