Invalid DNS causing a "java.lang.NullPointerException"
Upon adding a invalid DNS via the API call addNeighbors, following error gets returned:
10/12 13:29:24.689 [XNIO-1 task-64] ERROR com.iota.iri.service.API - API Exception: java.lang.NullPointerException: null at com.iota.iri.network.Neighbor.
(Neighbor.java:46) ~[IRI.jar:na] at com.iota.iri.network.UDPNeighbor. (UDPNeighbor.java:20) ~[IRI.jar:na] at com.iota.iri.network.Node.removeNeighbor(Node.java:682) ~[IRI.jar:na] at com.iota.iri.service.API.removeNeighborsStatement(API.java:399) [IRI.jar:na] at com.iota.iri.service.API.process(API.java:349) [IRI.jar:na] at com.iota.iri.service.API.processRequest(API.java:158) [IRI.jar:na] at com.iota.iri.service.API.access$000(API.java:80) [IRI.jar:na] at com.iota.iri.service.API$1.handleRequest(API.java:146) [IRI.jar:na] at io.undertow.server.Connectors.executeRootHandler(Connectors.java:208) [IRI.jar:na] at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:809) [IRI.jar:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_121] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_121] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121]
Any neighbor in the List behind the invalid neighbor will not be added.
Submitted the following patch: https://github.com/iotaledger/iri/pull/322
Related to #239, we need to rethink the solution. Thank you for reporting this!