camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmuel...@apache.org
Subject git commit: fixed the CS errors - work in progress
Date Sun, 30 Jun 2013 16:19:40 GMT
Updated Branches:
  refs/heads/master 2cca8951d -> e15d5f837


fixed the CS errors - work in progress


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e15d5f83
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e15d5f83
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e15d5f83

Branch: refs/heads/master
Commit: e15d5f8373ee79cfd8e3fbf612ff7fc36f4cb34d
Parents: 2cca895
Author: cmueller <cmueller@apache.org>
Authored: Sun Jun 30 18:19:31 2013 +0200
Committer: cmueller <cmueller@apache.org>
Committed: Sun Jun 30 18:19:31 2013 +0200

----------------------------------------------------------------------
 .../salesforce/api/SalesforceException.java     | 50 ++++++++++----------
 1 file changed, 25 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/e15d5f83/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/SalesforceException.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/SalesforceException.java
b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/SalesforceException.java
index 03a0e0d..4005ec4 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/SalesforceException.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/SalesforceException.java
@@ -16,7 +16,6 @@
  */
 package org.apache.camel.component.salesforce.api;
 
-import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
@@ -27,48 +26,49 @@ public class SalesforceException extends CamelException {
 
     private static final long serialVersionUID = 1L;
 
-    private List<RestError> errors;
-    private int statusCode;
+    private final List<RestError> errors;
+    private final int statusCode;
 
-    public SalesforceException(List<RestError> errors, int statusCode) {
-        this(toErrorMessage(errors, statusCode), statusCode);
+    public SalesforceException(Throwable cause) {
+        this(null, 0, null, cause);
+    }
 
-        this.errors = errors;
+    public SalesforceException(String message, Throwable cause) {
+        this(null, 0, message, cause);
     }
 
     public SalesforceException(String message, int statusCode) {
-        super(message);
+        this(null, statusCode, message, null);
+    }
 
-        this.statusCode = statusCode;
+    public SalesforceException(String message, int statusCode, Throwable cause) {
+        this(null, statusCode, message, cause);
     }
 
-    public SalesforceException(String message, Throwable cause) {
-        super(message, cause);
+    public SalesforceException(List<RestError> errors, int statusCode) {
+        this(errors, statusCode, null, null);
     }
 
-    public SalesforceException(Throwable cause) {
-        super(cause);
+    public SalesforceException(List<RestError> errors, int statusCode, Throwable cause)
{
+        this(errors, statusCode, null, cause);
     }
 
-    public List<RestError> getErrors() {
-        return Collections.unmodifiableList(errors);
+    public SalesforceException(List<RestError> errors, int statusCode, String message)
{
+        this(errors, statusCode, message, null);
     }
 
-    public void setErrors(List<RestError> errors) {
-        if (this.errors != null) {
-            this.errors.clear();
-        } else {
-            this.errors = new ArrayList<RestError>();
-        }
-        this.errors.addAll(errors);
+    public SalesforceException(List<RestError> errors, int statusCode, String message,
Throwable cause) {
+        super(toErrorMessage(errors, statusCode), cause);
+        this.errors = errors;
+        this.statusCode = statusCode;
     }
 
-    public int getStatusCode() {
-        return statusCode;
+    public List<RestError> getErrors() {
+        return Collections.unmodifiableList(errors);
     }
 
-    public void setStatusCode(int statusCode) {
-        this.statusCode = statusCode;
+    public int getStatusCode() {
+        return statusCode;
     }
 
     @Override


Mime
View raw message