Repository: incubator-ignite Updated Branches: refs/heads/ignite-456 02f8e4cbc -> a9d5f0064
# ignite-899: java read 3 Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/a9d5f006 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/a9d5f006 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/a9d5f006 Branch: refs/heads/ignite-456 Commit: a9d5f0064e74caec5e7dcfda0b1d96eb54fcc969 Parents: 02f8e4c Author: null <null> Authored: Wed May 27 20:49:46 2015 +0300 Committer: null <null> Committed: Wed May 27 20:49:46 2015 +0300 ---------------------------------------------------------------------- dev-tools/src/main/groovy/jiraslurp.groovy | 48 +++++++++++++------------ 1 file changed, 26 insertions(+), 22 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a9d5f006/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 6149a0d..9118f02 100644 --- a/dev-tools/src/main/groovy/jiraslurp.groovy +++ b/dev-tools/src/main/groovy/jiraslurp.groovy @@ -307,28 +307,32 @@ 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" - - patchFile << text +// 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 println "Got patch content."