Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

making WebStructurePicture_p less vulnerable to faulty host input parameter (like host1,,host3) by continue host loop on exception

reger9312fbe56376
diff --git a/htroot/WebStructurePicture_p.java b/htroot/WebStructurePicture_p.java
index b1d922901..ff548544c 100644
--- a/htroot/WebStructurePicture_p.java
+++ b/htroot/WebStructurePicture_p.java
@@ -117,7 +117,11 @@ public class WebStructurePicture_p {
for (int i = 0; i < hostlist.length; i++) {
String host = hostlist[i];
String hash = null;
- try {hash = ASCII.String((new DigestURL("http://" + host)).hash(), 6, 6);} catch (final MalformedURLException e) {ConcurrentLog.logException(e);}
+ try {
+ hash = ASCII.String((new DigestURL("http://" + host)).hash(), 6, 6);
+ } catch (final MalformedURLException e) {
+ continue;
+ }
Map.Entry<String, String> centernode = new AbstractMap.SimpleEntry<String, String>(hash, host);
double angle = 2.0d * i * Math.PI / hostlist.length;
if (hostlist.length == 3) angle -= Math.PI / 2;