Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 18 files changed
  • 0 commit comments
  • 1 contributor
Commits on Dec 13, 2011
@koles koles Fixed MissingFormatArgumentException on some GDC API errors
The CL tool was failing on error messages with multiple "%s"
placeholders.
f01a04a
@koles koles 1.2.47 c0495be
View
2  backend/pom.xml
@@ -28,7 +28,7 @@
<parent>
<groupId>com.gooddata.cl</groupId>
<artifactId>gooddata-cl</artifactId>
- <version>1.2.46</version>
+ <version>1.2.47</version>
</parent>
<artifactId>gooddata-cl-backend</artifactId>
View
4 backend/src/main/java/com/gooddata/integration/rest/GdcRESTApiWrapper.java
@@ -1470,7 +1470,7 @@ protected String getProjectId(String uri) throws GdcRestApiException {
return (String[]) uris.toArray(new String[]{""});
} catch (HttpMethodException ex) {
l.debug("MAQL execution: ", ex);
- throw new GdcRestApiException("MAQL execution: ", ex);
+ throw new GdcRestApiException("MAQL execution: " + ex.getMessage(), ex);
} finally {
maqlPost.releaseConnection();
}
@@ -2934,7 +2934,7 @@ private static DeleteMethod createDeleteMethod(String path) {
request.setRequestHeader("Content-Type", "application/json; charset=utf-8");
request.setRequestHeader("Accept", "application/json");
request.setRequestHeader("Accept-Charset", "utf-u");
- request.setRequestHeader("User-Agent", "GoodData CL/1.2.46");
+ request.setRequestHeader("User-Agent", "GoodData CL/1.2.47");
return request;
}
View
2  cli-distro/pom.xml
@@ -29,7 +29,7 @@
<parent>
<groupId>com.gooddata.cl</groupId>
<artifactId>gooddata-cl</artifactId>
- <version>1.2.46</version>
+ <version>1.2.47</version>
</parent>
<artifactId>gooddata-cli</artifactId>
View
2  cli/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>com.gooddata.cl</groupId>
<artifactId>gooddata-cl</artifactId>
- <version>1.2.46</version>
+ <version>1.2.47</version>
</parent>
<artifactId>gooddata-cl-cli</artifactId>
View
2  cli/src/main/java/com/gooddata/processor/GdcDI.java
@@ -320,7 +320,7 @@ protected CliParams parse(CommandLine ln, Properties defaults) throws InvalidArg
if (cp.containsKey(CLI_PARAM_VERSION[0])) {
- l.info("GoodData CL version 1.2.46" +
+ l.info("GoodData CL version 1.2.47" +
((BUILD_NUMBER.length() > 0) ? ", build " + BUILD_NUMBER : "."));
System.exit(0);
View
2  common/pom.xml
@@ -29,7 +29,7 @@
<parent>
<groupId>com.gooddata.cl</groupId>
<artifactId>gooddata-cl</artifactId>
- <version>1.2.46</version>
+ <version>1.2.47</version>
</parent>
<artifactId>gooddata-cl-common</artifactId>
View
23 common/src/main/java/com/gooddata/exception/HttpMethodException.java
@@ -28,11 +28,12 @@
package com.gooddata.exception;
+import java.util.Formatter;
+
import net.sf.json.JSONException;
import net.sf.json.JSONObject;
-import org.apache.commons.httpclient.HttpMethod;
-import java.util.Formatter;
+import org.apache.commons.httpclient.HttpMethod;
/**
* @author jiri.zaloudek
@@ -72,8 +73,7 @@ public String getMessage() {
/* Error structure sometimes lacks the tag... */
if (error.has("error"))
error = error.getJSONObject("error");
- msg = new Formatter().format(error.getString("message"),
- error.getJSONArray("parameters")).toString();
+ msg = formatErrorMessage(error);
} catch (JSONException jsone) {
/* Do not worry about the non-standard or broken
* error JSON. The msg is already meaningful enough.*/
@@ -83,6 +83,21 @@ public String getMessage() {
}
/**
+ * Returns formatted error message if the message contains parameters
+ * placeholder (%s)
+ *
+ * @param error
+ * @return
+ */
+ private static String formatErrorMessage(JSONObject error) {
+ final String orig = error.getString("message");
+ if (!orig.contains("%s")) {
+ return orig;
+ }
+ return new Formatter().format(orig, error.getJSONArray("parameters").toArray()).toString();
+ }
+
+ /**
* Returns the request id for <code>HttpMethodException</code> that was constructed
* from a response to HTTP method call.
*/
View
2  connector/pom.xml
@@ -28,7 +28,7 @@
<parent>
<groupId>com.gooddata.cl</groupId>
<artifactId>gooddata-cl</artifactId>
- <version>1.2.46</version>
+ <version>1.2.47</version>
</parent>
<artifactId>gooddata-cl-connector</artifactId>
View
2  connector/src/main/java/com/gooddata/chargify/ChargifyWrapper.java
@@ -241,7 +241,7 @@ private static DeleteMethod createDeleteMethod(String path) {
private static <T extends HttpMethod> T configureHttpMethod(T request) {
request.setRequestHeader("Content-Type", "text/xml");
request.setRequestHeader("Accept", "text/xml");
- request.setRequestHeader("User-Agent", "GoodData CL/1.2.46");
+ request.setRequestHeader("User-Agent", "GoodData CL/1.2.47");
return request;
}
View
2  gooddata-snaplogic/pom.xml
@@ -29,7 +29,7 @@
<parent>
<groupId>com.gooddata.cl</groupId>
<artifactId>gooddata-cl</artifactId>
- <version>1.2.46</version>
+ <version>1.2.47</version>
</parent>
<artifactId>gooddata-cl-snaplogic</artifactId>
View
2  notification-distro/pom.xml
@@ -29,7 +29,7 @@
<parent>
<groupId>com.gooddata.cl</groupId>
<artifactId>gooddata-cl</artifactId>
- <version>1.2.46</version>
+ <version>1.2.47</version>
</parent>
<artifactId>gooddata-alert</artifactId>
View
2  notification/pom.xml
@@ -29,7 +29,7 @@
<parent>
<groupId>com.gooddata.cl</groupId>
<artifactId>gooddata-cl</artifactId>
- <version>1.2.46</version>
+ <version>1.2.47</version>
</parent>
<artifactId>gooddata-notification</artifactId>
View
2  notification/src/main/java/com/gooddata/processor/GdcNotification.java
@@ -371,7 +371,7 @@ else if (defaults.getProperty(name) != null) {
}
if (cp.containsKey(CLI_PARAM_VERSION[0])) {
- l.info("GoodData Notification Tool version 1.2.46" +
+ l.info("GoodData Notification Tool version 1.2.47" +
((BUILD_NUMBER.length() > 0) ? ", build " + BUILD_NUMBER : "."));
System.exit(0);
View
2  pom.xml
@@ -28,7 +28,7 @@
<groupId>com.gooddata.cl</groupId>
<artifactId>gooddata-cl</artifactId>
- <version>1.2.46</version>
+ <version>1.2.47</version>
<name>gooddata-cl</name>
<description>GoodData CL command line tool and Java API framework.</description>
<url>http://developer.gooddata.com</url>
View
2  sfdc/pom.xml
@@ -29,7 +29,7 @@
<parent>
<groupId>com.gooddata.cl</groupId>
<artifactId>gooddata-cl</artifactId>
- <version>1.2.46</version>
+ <version>1.2.47</version>
</parent>
<artifactId>gooddata-sfdc-lib</artifactId>
View
2  snap-distro/pom.xml
@@ -29,7 +29,7 @@
<parent>
<groupId>com.gooddata.cl</groupId>
<artifactId>gooddata-cl</artifactId>
- <version>1.2.46</version>
+ <version>1.2.47</version>
</parent>
<artifactId>gooddata-cl-snap</artifactId>
View
2  snaplogic/pom.xml
@@ -29,7 +29,7 @@
<parent>
<groupId>com.gooddata.cl</groupId>
<artifactId>gooddata-cl</artifactId>
- <version>1.2.46</version>
+ <version>1.2.47</version>
</parent>
<artifactId>gooddata-cl-snaplogic-lib</artifactId>
View
2  web/pom.xml
@@ -29,7 +29,7 @@
<parent>
<groupId>com.gooddata.cl</groupId>
<artifactId>gooddata-cl</artifactId>
- <version>1.2.46</version>
+ <version>1.2.47</version>
</parent>
<artifactId>gooddata-cl-web</artifactId>

No commit comments for this range

Something went wrong with that request. Please try again.