# HG changeset patch # User Jan Lahoda # Date 1304014420 -7200 # Node ID d9b17eac98709f9a34fcf49636f5fe20b2c2cf2d # Parent 157bf9a34fa1e5e304a48cd2f198787ef2191466 Preventing various exception in the RemoteIndices dialog diff -r 157bf9a34fa1 -r d9b17eac9870 api/src/org/netbeans/modules/jackpot30/impl/indexing/options/CustomizeRemoteIndex.java --- a/api/src/org/netbeans/modules/jackpot30/impl/indexing/options/CustomizeRemoteIndex.java Thu Apr 28 20:13:40 2011 +0200 +++ b/api/src/org/netbeans/modules/jackpot30/impl/indexing/options/CustomizeRemoteIndex.java Thu Apr 28 20:13:40 2011 +0200 @@ -364,6 +364,10 @@ checkingIndexURLError.set(ex.getLocalizedMessage()); } catch (MalformedURLException ex) { checkingIndexURLError.set(ex.getLocalizedMessage()); + } catch (ThreadDeath td) { + throw td; + } catch (Throwable t) {//#6541019 + checkingIndexURLError.set("Invalid URL"); } checkingIndexURL.set(false); @@ -374,7 +378,7 @@ public void run() { updateErrors(); - if (subindicesFinal == null) return; + if (subindicesFinal == null || subindicesFinal.isEmpty()) return; DefaultComboBoxModel model = (DefaultComboBoxModel) subIndex.getModel(); String selected = (String) model.getSelectedItem(); @@ -427,7 +431,8 @@ String indexInfoText = WebUtilities.requestStringResponse(url.toURI().resolve("info?path=" + WebUtilities.escapeForQuery(subIndex))); info = IndexInfo.empty(); - Pojson.update(info, indexInfoText); + if (indexInfoText != null) + Pojson.update(info, indexInfoText); } catch (URISyntaxException ex) { Logger.getLogger(CustomizeRemoteIndex.class.getName()).log(Level.FINE, null, ex); } catch (MalformedURLException ex) {