Repository: incubator-ignite Updated Branches: refs/heads/ignite-456 a9d5f0064 -> 7bfca461a
# ignite-899: java read 5 Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/7bfca461 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/7bfca461 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/7bfca461 Branch: refs/heads/ignite-456 Commit: 7bfca461a09566d469943b741d8b7af5bb8081d9 Parents: a9d5f00 Author: null <null> Authored: Wed May 27 21:05:17 2015 +0300 Committer: null <null> Committed: Wed May 27 21:05:17 2015 +0300 ---------------------------------------------------------------------- dev-tools/src/main/groovy/jiraslurp.groovy | 35 +++++++------------------ 1 file changed, 9 insertions(+), 26 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7bfca461/dev-tools/src/main/groovy/jiraslurp.groovy ---------------------------------------------------------------------- diff --git a/dev-tools/src/main/groovy/jiraslurp.groovy b/dev-tools/src/main/groovy/jiraslurp.groovy index 9118f02..5bbedf7 100644 --- a/dev-tools/src/main/groovy/jiraslurp.groovy +++ b/dev-tools/src/main/groovy/jiraslurp.groovy @@ -307,32 +307,15 @@ def applyPatch = { jira, attachementURL -> println "Getting patch content." -// def attachmentUrl = new URL("$ATTACHMENT_URL/$attachementURL/") -// -// HttpURLConnection conn = (HttpURLConnection)attachmentUrl.openConnection(); -// conn.setRequestProperty("Content-Disposition", "inline; filename*=utf-8''ignite-37.patch;"); -// conn.setRequestProperty("Content-Type", "text/x-patch;charset=utf-8"); -// conn.setRequestProperty("X-Content-Type-Options", "nosniff"); -// conn.connect(); -// -// // Read response. -// BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream())); -// -// String text = ""; -// String line; -// -// while ((line = br.readLine()) != null) -// text += line -// -// br.close(); -// -// println "Patch content: $text" - - def response = sendGetRequest("$ATTACHMENT_URL/$attachementURL/", JIRA_USER, JIRA_PWD) - - println "Patch content: $response" - - patchFile << response + def attachmentUrl = new URL("$ATTACHMENT_URL/$attachementURL/") + + HttpURLConnection conn = (HttpURLConnection)attachmentUrl.openConnection(); + conn.setRequestProperty("Content-Disposition", "inline; filename*=utf-8''ignite-37.patch;"); + conn.setRequestProperty("Content-Type", "text/x-patch;charset=utf-8"); + conn.setRequestProperty("X-Content-Type-Options", "nosniff"); + conn.connect(); + + patchFile << conn.getInputStream() println "Got patch content."