if (result.iterator().hasNext()) {
return result.iterator().next().getCanonicalName();
}
} catch (IOException e) {
log.debug(MSG_ERR_CONNECT, e);
throw new MetricUnreachableException(MSG_ERR_CONNECT, e);
} catch (Exception e) {
log.debug(MSG_ERR_UNEXPECTED, e);
throw new PluginException(MSG_ERR_UNEXPECTED, e);
} finally {
// it's null-proof