private BugzillaConnector bzConnector = new BugzillaConnector();
@Override
public String resolve(String bugIdentifier) {
int bugId = Integer.valueOf(bugIdentifier);
GetBug getBug = new GetBug(bugId);
try {
bzConnector.executeMethod(getBug);
} catch (Exception e) {
bzConnector = new BugzillaConnector();
try {
bzConnector.connectTo("https://bugzilla.redhat.com");
} catch (ConnectionException e2) {
e2.printStackTrace();
return "Failed to access BZ " + bugId + ": " + e2.getMessage();
}
try {
bzConnector.executeMethod(getBug);
} catch (BugzillaException e1) {
//e1.printStackTrace();
Throwable cause = e1.getCause();
String details = (cause instanceof XmlRpcException) ? cause.getMessage() : e1.getMessage();
return "Failed to access BZ " + bugId + ": " + details;
}
}
Bug bug = getBug.getBug();
if (bug != null) {
String product = bug.getProduct();
if (product.equals("RHQ Project")) {
product = "RHQ";
} else if (product.equals("JBoss Operations Network")) {