Skip to content

Commit

Permalink
Merge branch 'release/5.5.2' into develop
Browse files Browse the repository at this point in the history
# Conflicts:
#	current/core/pom.xml
#	current/pom.xml
#	current/ui.apps/pom.xml
  • Loading branch information
zohebhaider committed Jan 5, 2020
2 parents 8de83f1 + c5504f2 commit a7ff577
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 33 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,4 @@ cs_commons-dev/
/out/

/current/prepareRelease.sh
/.metadata/
9 changes: 2 additions & 7 deletions current/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
<!--
Adobe AEM Brightcove Connector
Copyright (C) 2018 Coresecure Inc.
Authors:
Alessandro Bonfatti
Yan Kisen
Pablo Kropilnicki
Copyright (C) 2019 3|SHARE Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -51,7 +46,7 @@
<parent>
<groupId>com.coresecure.brightcove.cq5</groupId>
<artifactId>brightcove_connector</artifactId>
<version>5.5.2-SNAPSHOT</version>
<version>5.5.3-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>brightcove-services</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,9 @@ public static JSONObject executeFullGet(String targetURL, String urlParameters,
LOGGER.debug("executeFullGet: " + targetURL);
URL url;
URLConnection connection = null;

InputStream is = null;
ByteArrayOutputStream response = null;

JSONObject exGetResponse = new JSONObject();
try {
// Create connection
Expand All @@ -420,7 +422,7 @@ public static JSONObject executeFullGet(String targetURL, String urlParameters,
connection = getSSLConnection(url, targetURL, HttpURLConnection.class);
} else {
connection = getSSLConnection(url, targetURL, HttpsURLConnection.class);

}
connection.setRequestProperty(Constants.CONTENT_TYPE_HEADER,
com.adobe.granite.rest.Constants.CT_WWW_FORM_URLENCODED);
Expand All @@ -436,27 +438,39 @@ public static JSONObject executeFullGet(String targetURL, String urlParameters,
connection.setDoOutput(true);
connection.connect();
// Get Response
InputStream is = connection.getInputStream();

ByteArrayOutputStream response = new ByteArrayOutputStream();

is = connection.getInputStream();
response = new ByteArrayOutputStream();
byte[] buffer = new byte[4096];
int n;

while ((n = is.read(buffer)) != -1) {
response.write(buffer, 0, n);
}
LOGGER.trace("response committed!");

exGetResponse.put(Constants.RESPONSE, new String(response.toByteArray(), "UTF-8"));
exGetResponse.put(Constants.BINARY, response.toByteArray());
exGetResponse.put(Constants.MIME_TYPE, connection.getContentType());
} catch (Exception e) {
LOGGER.error(Constants.ERROR_LOG_TMPL, e);
} finally {

if (connection != null) {
connection = null;
if (null != is) {
try {
is.close();
} catch (IOException e) {
LOGGER.error(Constants.ERROR_LOG_TMPL,e);
}
}
if (null != response) {
try {
response.flush();
response.close();
} catch (IOException e) {

LOGGER.error(Constants.ERROR_LOG_TMPL, e);
}
}
}
return exGetResponse;
Expand Down
9 changes: 2 additions & 7 deletions current/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
<!--
Adobe AEM Brightcove Connector
Copyright (C) 2018 Coresecure Inc.
Authors:
Alessandro Bonfatti
Yan Kisen
Pablo Kropilnicki
Copyright (C) 2019 3|SHARE Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -50,7 +45,7 @@
<groupId>com.coresecure.brightcove.cq5</groupId>
<artifactId>brightcove_connector</artifactId>
<packaging>pom</packaging>
<version>5.5.2-SNAPSHOT</version>
<version>5.5.3-SNAPSHOT</version>
<description>
Parent Maven POM for the 'Adobe CQ5 Brightcove Connector API' project.
</description>
Expand Down
11 changes: 3 additions & 8 deletions current/ui.apps/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
<!--
Adobe AEM Brightcove Connector
Copyright (C) 2018 Coresecure Inc.
Authors:
Alessandro Bonfatti
Yan Kisen
Pablo Kropilnicki
Copyright (C) 2019 3|SHARE Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -54,7 +49,7 @@
<parent>
<groupId>com.coresecure.brightcove.cq5</groupId>
<artifactId>brightcove_connector</artifactId>
<version>5.5.2-SNAPSHOT</version>
<version>5.5.3-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down Expand Up @@ -232,7 +227,7 @@
<dependency>
<groupId>com.coresecure.brightcove.cq5</groupId>
<artifactId>brightcove-services</artifactId>
<version>5.5.2-SNAPSHOT</version>
<version>5.5.3-SNAPSHOT</version>
</dependency>

<dependency>
Expand Down

0 comments on commit a7ff577

Please sign in to comment.