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 org.snmp4j.transport.DefaultUdpTransportMapping;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by insanity on 17. 4. 10.
|
* Created by insanity on 17. 4. 10.
|
||||||
|
@ -149,9 +146,12 @@ public class SNMPCrawler extends Crawler {
|
||||||
|
|
||||||
OFResultSet rs = OFResultSet.newInstance(item);
|
OFResultSet rs = OFResultSet.newInstance(item);
|
||||||
|
|
||||||
List<String> row = new ArrayList<>();
|
List<String> row = new ArrayList<>(Arrays.asList(new String[map.size()]));
|
||||||
for (String key : map.keySet()) {
|
|
||||||
row.add(map.get(key));
|
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);
|
rs.addRow(row);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user