aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Damovsky <martin.damovsky@gmail.com>2017-02-18 19:45:05 +0100
committerGitHub <noreply@github.com>2017-02-18 19:45:05 +0100
commit4d68c41fa4c6de12a810bced69041f2824f73945 (patch)
treef58b37d20026ae0ab841e894a0be84e61f67cd2e /src
parent77d917dac2d5d52c8756b2e068da93d3af75713d (diff)
parentd79f5c0fdaf9a40970c83fb33916a17a060b198f (diff)
downloadbbprb-4d68c41fa4c6de12a810bced69041f2824f73945.tar.gz
Merge pull request #11 from elifarley/logging
Remove all "e.printStackTrace()" calls
Diffstat (limited to 'src')
-rw-r--r--src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketPullRequestsBuilder.java2
-rw-r--r--src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/bitbucket/ApiClient.java7
2 files changed, 0 insertions, 9 deletions
diff --git a/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketPullRequestsBuilder.java b/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketPullRequestsBuilder.java
index d337796..899edba 100644
--- a/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketPullRequestsBuilder.java
+++ b/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/BitbucketPullRequestsBuilder.java
@@ -69,10 +69,8 @@ public class BitbucketPullRequestsBuilder {
return new String(Hex.encodeHex(MD5.digest(this.project.getFullName().getBytes("UTF-8"))));
} catch (NoSuchAlgorithmException exc) {
logger.log(Level.WARNING, "Failed to produce hash", exc);
- exc.printStackTrace();
} catch (UnsupportedEncodingException exc) {
logger.log(Level.WARNING, "Failed to produce hash", exc);
- exc.printStackTrace();
}
return this.project.getFullName();
}
diff --git a/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/bitbucket/ApiClient.java b/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/bitbucket/ApiClient.java
index 759c696..0c87478 100644
--- a/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/bitbucket/ApiClient.java
+++ b/src/main/java/bitbucketpullrequestbuilder/bitbucketpullrequestbuilder/bitbucket/ApiClient.java
@@ -119,10 +119,8 @@ public class ApiClient {
return new String(Hex.encodeHex(SHA1.digest(computedKey.getBytes("UTF-8"))));
} catch(NoSuchAlgorithmException e) {
logger.log(Level.WARNING, "Failed to create hash provider", e);
- e.printStackTrace();
} catch (UnsupportedEncodingException e) {
logger.log(Level.WARNING, "Failed to create hash provider", e);
- e.printStackTrace();
}
}
return (computedKey.length() <= MAX_KEY_SIZE_BB_API) ? computedKey : computedKey.substring(0, MAX_KEY_SIZE_BB_API);
@@ -173,7 +171,6 @@ public class ApiClient {
new NameValuePair[]{}), Pullrequest.Participant.class);
} catch (IOException e) {
logger.log(Level.WARNING, "Invalid pull request approval response.", e);
- e.printStackTrace();
}
return null;
}
@@ -186,7 +183,6 @@ public class ApiClient {
return parse(post(v1("/pullrequests/" + pullRequestId + "/comments"), data), new TypeReference<Pullrequest.Comment>() {});
} catch(Exception e) {
logger.log(Level.WARNING, "Invalid pull request comment response.", e);
- e.printStackTrace();
}
return null;
}
@@ -203,7 +199,6 @@ public class ApiClient {
} while (url != null);
} catch (Exception e) {
logger.log(Level.WARNING, "invalid response.", e);
- e.printStackTrace();
}
return values;
}
@@ -255,10 +250,8 @@ public class ApiClient {
return req.getResponseBodyAsString();
} catch (HttpException e) {
logger.log(Level.WARNING, "Failed to send request.", e);
- e.printStackTrace();
} catch (IOException e) {
logger.log(Level.WARNING, "Failed to send request.", e);
- e.printStackTrace();
} finally {
req.releaseConnection();
}