Skip to content

Commit 65dacc1

Browse files
committed
Using UTF-8, instead of default
1 parent 7fe4aa0 commit 65dacc1

File tree

2 files changed

+52
-4
lines changed

2 files changed

+52
-4
lines changed

CHANGELOG.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,61 @@
44
Changelog of Violation comments to bitbucket server lib.
55

66
## Unreleased
7+
### No issue
8+
9+
**Using UTF-8, instead of default**
10+
11+
12+
[79a5a8b0869c4d7](https://github.com/tomasbjerre/violation-comments-to-bitbucket-server-lib/commit/79a5a8b0869c4d7) Tomas Bjerre *2017-12-24 22:03:10*
13+
14+
15+
## 1.40
16+
### No issue
17+
18+
**Bumping version to fix faulty release**
19+
20+
21+
[86b16b4d20add98](https://github.com/tomasbjerre/violation-comments-to-bitbucket-server-lib/commit/86b16b4d20add98) Tomas Bjerre *2017-12-22 18:57:11*
22+
23+
24+
## 1.39
25+
### No issue
26+
27+
**DocFX parsing JSON with Gson, not ScriptEngine**
28+
29+
30+
[19e05ef49d841ac](https://github.com/tomasbjerre/violation-comments-to-bitbucket-server-lib/commit/19e05ef49d841ac) Tomas Bjerre *2017-12-22 12:41:07*
31+
32+
33+
## 1.38
34+
### No issue
35+
36+
**Bumping version to fix faulty release**
37+
38+
39+
[123de6203f53c75](https://github.com/tomasbjerre/violation-comments-to-bitbucket-server-lib/commit/123de6203f53c75) Tomas Bjerre *2017-12-21 14:50:11*
40+
41+
**DocFX**
42+
43+
44+
[cd0e98f14598b8d](https://github.com/tomasbjerre/violation-comments-to-bitbucket-server-lib/commit/cd0e98f14598b8d) Tomas Bjerre *2017-12-21 14:46:08*
45+
46+
47+
## 1.36
748
### Jira JENKINS-48648
849

950
**Using UTF-8 in Bitbucket client**
1051

1152

12-
[34c3dfeaa82a055](https://github.com/tomasbjerre/violation-comments-to-bitbucket-server-lib/commit/34c3dfeaa82a055) Tomas Bjerre *2017-12-20 20:16:59*
53+
[3fd97cc3246284b](https://github.com/tomasbjerre/violation-comments-to-bitbucket-server-lib/commit/3fd97cc3246284b) Tomas Bjerre *2017-12-20 20:27:37*
54+
55+
56+
### No issue
57+
58+
**Bumping version to fix faulty release**
59+
60+
61+
[9c515cbc86028a4](https://github.com/tomasbjerre/violation-comments-to-bitbucket-server-lib/commit/9c515cbc86028a4) Tomas Bjerre *2017-12-20 20:28:23*
1362

1463

1564
## 1.34

src/main/java/se/bjurr/violations/comments/bitbucketserver/lib/client/BitbucketServerInvoker.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ public String invokeUrl(
3636
CookieHandler.setDefault(new CookieManager(null, CookiePolicy.ACCEPT_ALL));
3737
conn = (HttpURLConnection) new URL(url).openConnection();
3838
final String userAndPass = bitbucketServerUser + ":" + bitbucketServerPassword;
39-
final String authString =
40-
new String(DatatypeConverter.printBase64Binary(userAndPass.getBytes()));
39+
final String authString = DatatypeConverter.printBase64Binary(userAndPass.getBytes("UTF-8"));
4140
conn.setRequestProperty("Authorization", "Basic " + authString);
4241
conn.setRequestMethod(method.name());
4342
final String charset = "UTF-8";
@@ -58,7 +57,7 @@ public String invokeUrl(
5857
}
5958
final String json = stringBuilder.toString();
6059
return json;
61-
} catch (final Exception e) {
60+
} catch (final Throwable e) {
6261
throw new RuntimeException("Error calling:\n" + url + "\n" + method + "\n" + postContent, e);
6362
} finally {
6463
try {

0 commit comments

Comments
 (0)