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 various CS errors in the salesforce component - work in progress
Date Sun, 30 Jun 2013 15:47:25 GMT
Updated Branches:
  refs/heads/master 9d5892e6d -> 5d5a43f6c


fixed the various CS errors in the salesforce component - 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/5d5a43f6
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/5d5a43f6
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/5d5a43f6

Branch: refs/heads/master
Commit: 5d5a43f6c53c9ccdf0864e16c8edcc60f0ffae1c
Parents: 9d5892e
Author: cmueller <cmueller@apache.org>
Authored: Sun Jun 30 17:47:16 2013 +0200
Committer: cmueller <cmueller@apache.org>
Committed: Sun Jun 30 17:47:16 2013 +0200

----------------------------------------------------------------------
 .../salesforce/api/JodaTimeConverter.java       | 10 ++--
 .../salesforce/api/PicklistEnumConverter.java   | 12 ++--
 .../salesforce/api/dto/bulk/package-info.java   |  4 +-
 .../internal/client/AbstractClientBase.java     |  4 +-
 .../internal/client/DefaultBulkApiClient.java   | 59 ++++++--------------
 .../internal/client/DefaultRestClient.java      | 27 ++++-----
 .../client/SalesforceSecurityListener.java      |  4 +-
 .../salesforce/internal/dto/PushTopic.java      | 49 ++++++++--------
 .../processor/AbstractRestProcessor.java        | 11 ++--
 .../internal/processor/BulkApiProcessor.java    |  2 +-
 .../internal/streaming/SubscriptionHelper.java  |  5 +-
 11 files changed, 80 insertions(+), 107 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/5d5a43f6/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/JodaTimeConverter.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/JodaTimeConverter.java
b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/JodaTimeConverter.java
index 6ac0de1..009f697 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/JodaTimeConverter.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/JodaTimeConverter.java
@@ -18,17 +18,17 @@ package org.apache.camel.component.salesforce.api;
 
 import java.lang.reflect.Constructor;
 
-import org.joda.time.DateTime;
-import org.joda.time.DateTimeZone;
-import org.joda.time.format.DateTimeFormatter;
-import org.joda.time.format.ISODateTimeFormat;
-
 import com.thoughtworks.xstream.converters.Converter;
 import com.thoughtworks.xstream.converters.MarshallingContext;
 import com.thoughtworks.xstream.converters.UnmarshallingContext;
 import com.thoughtworks.xstream.io.HierarchicalStreamReader;
 import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
 
+import org.joda.time.DateTime;
+import org.joda.time.DateTimeZone;
+import org.joda.time.format.DateTimeFormatter;
+import org.joda.time.format.ISODateTimeFormat;
+
 public class JodaTimeConverter implements Converter {
 
     private final DateTimeFormatter formatter = ISODateTimeFormat.dateTime();

http://git-wip-us.apache.org/repos/asf/camel/blob/5d5a43f6/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/PicklistEnumConverter.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/PicklistEnumConverter.java
b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/PicklistEnumConverter.java
index cd50de5..775f5bd 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/PicklistEnumConverter.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/PicklistEnumConverter.java
@@ -37,8 +37,7 @@ public class PicklistEnumConverter implements Converter {
         } catch (Exception e) {
             throw new IllegalArgumentException(
                     String.format("Exception writing pick list value %s of type %s: %s",
-                            o, o.getClass().getName(), e.getMessage()),
-                    e);
+                            o, o.getClass().getName(), e.getMessage()), e);
         }
     }
 
@@ -53,13 +52,11 @@ public class PicklistEnumConverter implements Converter {
         } catch (SecurityException e) {
             throw new IllegalArgumentException(
                     String.format("Security Exception reading pick list value %s of type
%s: %s",
-                            value, context.getRequiredType().getName(), e.getMessage()),
-                    e);
+                            value, context.getRequiredType().getName(), e.getMessage()),
e);
         } catch (Exception e) {
             throw new IllegalArgumentException(
                     String.format("Exception reading pick list value %s of type %s: %s",
-                            value, context.getRequiredType().getName(), e.getMessage()),
-                    e);
+                            value, context.getRequiredType().getName(), e.getMessage()),
e);
         }
     }
 
@@ -67,8 +64,7 @@ public class PicklistEnumConverter implements Converter {
     @SuppressWarnings("unchecked")
     public boolean canConvert(Class aClass) {
         try {
-            return Enum.class.isAssignableFrom(aClass) &&
-                    aClass.getMethod(FACTORY_METHOD, String.class) != null;
+            return Enum.class.isAssignableFrom(aClass) && aClass.getMethod(FACTORY_METHOD,
String.class) != null;
         } catch (NoSuchMethodException e) {
             return false;
         }

http://git-wip-us.apache.org/repos/asf/camel/blob/5d5a43f6/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/package-info.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/package-info.java
b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/package-info.java
index 4eccf4d..74ef1c7 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/package-info.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/bulk/package-info.java
@@ -14,4 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.force.com/2009/06/asyncapi/dataload",
elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) package org.apache.camel.component.salesforce.api.dto.bulk;
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.force.com/2009/06/asyncapi/dataload",
+    elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package org.apache.camel.component.salesforce.api.dto.bulk;

http://git-wip-us.apache.org/repos/asf/camel/blob/5d5a43f6/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/AbstractClientBase.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/AbstractClientBase.java
b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/AbstractClientBase.java
index 1c058b9..4379fcc 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/AbstractClientBase.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/AbstractClientBase.java
@@ -36,11 +36,11 @@ import org.slf4j.LoggerFactory;
 
 public abstract class AbstractClientBase implements SalesforceSession.SalesforceSessionListener,
Service {
 
-    protected final Logger LOG = LoggerFactory.getLogger(getClass());
-
     protected static final String APPLICATION_JSON_UTF8 = "application/json;charset=utf-8";
     protected static final String APPLICATION_XML_UTF8 = "application/xml;charset=utf-8";
 
+    protected final Logger log = LoggerFactory.getLogger(getClass());
+
     protected final HttpClient httpClient;
     protected final SalesforceSession session;
     protected final String version;

http://git-wip-us.apache.org/repos/asf/camel/blob/5d5a43f6/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultBulkApiClient.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultBulkApiClient.java
b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultBulkApiClient.java
index c56466a..a72aee7 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultBulkApiClient.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultBulkApiClient.java
@@ -50,13 +50,13 @@ import org.eclipse.jetty.util.StringUtil;
 public class DefaultBulkApiClient extends AbstractClientBase implements BulkApiClient {
 
     private static final String TOKEN_HEADER = "X-SFDC-Session";
+    private static final ContentType DEFAULT_ACCEPT_TYPE = ContentType.XML;
 
     private JAXBContext context;
-    private static final ContentType DEFAULT_ACCEPT_TYPE = ContentType.XML;
     private ObjectFactory objectFactory;
 
-    public DefaultBulkApiClient(String version,
-                                SalesforceSession session, HttpClient httpClient) throws
SalesforceException {
+    public DefaultBulkApiClient(String version, SalesforceSession session, HttpClient httpClient)
+        throws SalesforceException {
         super(version, session, httpClient);
 
         try {
@@ -71,7 +71,6 @@ public class DefaultBulkApiClient extends AbstractClientBase implements
BulkApiC
 
     @Override
     public void createJob(JobInfo request, final JobInfoResponseCallback callback) {
-
         // clear system fields if set
         sanitizeJobRequest(request);
 
@@ -124,7 +123,6 @@ public class DefaultBulkApiClient extends AbstractClientBase implements
BulkApiC
 
     @Override
     public void getJob(String jobId, final JobInfoResponseCallback callback) {
-
         final ContentExchange get = getContentExchange(HttpMethods.GET, jobUrl(jobId));
 
         // make the call and parse the result
@@ -140,7 +138,6 @@ public class DefaultBulkApiClient extends AbstractClientBase implements
BulkApiC
                 callback.onResponse(value, ex);
             }
         });
-
     }
 
     @Override
@@ -169,7 +166,6 @@ public class DefaultBulkApiClient extends AbstractClientBase implements
BulkApiC
                 callback.onResponse(value, ex);
             }
         });
-
     }
 
     @Override
@@ -198,13 +194,11 @@ public class DefaultBulkApiClient extends AbstractClientBase implements
BulkApiC
                 callback.onResponse(value, ex);
             }
         });
-
     }
 
     @Override
-    public void createBatch(InputStream batchStream, String jobId, ContentType contentTypeEnum,
-                            final BatchInfoResponseCallback callback) {
-
+    public void createBatch(InputStream batchStream, String jobId, ContentType contentTypeEnum,

+        final BatchInfoResponseCallback callback) {
         final ContentExchange post = getContentExchange(HttpMethods.POST, batchUrl(jobId,
null));
         post.setRequestContentSource(batchStream);
         post.setRequestContentType(getContentType(contentTypeEnum) + ";charset=" + StringUtil.__UTF8);
@@ -222,13 +216,10 @@ public class DefaultBulkApiClient extends AbstractClientBase implements
BulkApiC
                 callback.onResponse(value, ex);
             }
         });
-
     }
 
     @Override
-    public void getBatch(String jobId, String batchId,
-                         final BatchInfoResponseCallback callback) {
-
+    public void getBatch(String jobId, String batchId, final BatchInfoResponseCallback callback)
{
         final ContentExchange get = getContentExchange(HttpMethods.GET, batchUrl(jobId, batchId));
 
         // make the call and parse the result
@@ -244,13 +235,10 @@ public class DefaultBulkApiClient extends AbstractClientBase implements
BulkApiC
                 callback.onResponse(value, ex);
             }
         });
-
     }
 
     @Override
-    public void getAllBatches(String jobId,
-                              final BatchInfoListResponseCallback callback) {
-
+    public void getAllBatches(String jobId, final BatchInfoListResponseCallback callback)
{
         final ContentExchange get = getContentExchange(HttpMethods.GET, batchUrl(jobId, null));
 
         // make the call and parse the result
@@ -266,13 +254,10 @@ public class DefaultBulkApiClient extends AbstractClientBase implements
BulkApiC
                 callback.onResponse(value != null ? value.getBatchInfo() : null, ex);
             }
         });
-
     }
 
     @Override
-    public void getRequest(String jobId, String batchId,
-                           final StreamResponseCallback callback) {
-
+    public void getRequest(String jobId, String batchId, final StreamResponseCallback callback)
{
         final ContentExchange get = getContentExchange(HttpMethods.GET, batchUrl(jobId, batchId));
 
         // make the call and parse the result
@@ -282,12 +267,10 @@ public class DefaultBulkApiClient extends AbstractClientBase implements
BulkApiC
                 callback.onResponse(response, ex);
             }
         });
-
     }
 
     @Override
-    public void getResults(String jobId, String batchId,
-                           final StreamResponseCallback callback) {
+    public void getResults(String jobId, String batchId, final StreamResponseCallback callback)
{
         final ContentExchange get = getContentExchange(HttpMethods.GET, batchResultUrl(jobId,
batchId, null));
 
         // make the call and return the result
@@ -301,8 +284,7 @@ public class DefaultBulkApiClient extends AbstractClientBase implements
BulkApiC
 
     @Override
     public void createBatchQuery(String jobId, String soqlQuery, ContentType jobContentType,
-                                 final BatchInfoResponseCallback callback) {
-
+        final BatchInfoResponseCallback callback) {
         final ContentExchange post = getContentExchange(HttpMethods.POST, batchUrl(jobId,
null));
         byte[] queryBytes = soqlQuery.getBytes(StringUtil.__UTF8_CHARSET);
         post.setRequestContent(new ByteArrayBuffer(queryBytes));
@@ -321,12 +303,10 @@ public class DefaultBulkApiClient extends AbstractClientBase implements
BulkApiC
                 callback.onResponse(value, ex);
             }
         });
-
     }
 
     @Override
-    public void getQueryResultIds(String jobId, String batchId,
-                                  final QueryResultIdsCallback callback) {
+    public void getQueryResultIds(String jobId, String batchId, final QueryResultIdsCallback
callback) {
         final ContentExchange get = getContentExchange(HttpMethods.GET, batchResultUrl(jobId,
batchId, null));
 
         // make the call and parse the result
@@ -339,16 +319,13 @@ public class DefaultBulkApiClient extends AbstractClientBase implements
BulkApiC
                 } catch (SalesforceException e) {
                     ex = e;
                 }
-                callback.onResponse(value != null ? Collections.unmodifiableList(value.getResult())
: null,
-                        ex);
+                callback.onResponse(value != null ? Collections.unmodifiableList(value.getResult())
: null, ex);
             }
         });
-
     }
 
     @Override
-    public void getQueryResult(String jobId, String batchId, String resultId,
-                               final StreamResponseCallback callback) {
+    public void getQueryResult(String jobId, String batchId, String resultId, final StreamResponseCallback
callback) {
         final ContentExchange get = getContentExchange(HttpMethods.GET, batchResultUrl(jobId,
batchId, resultId));
 
         // make the call and parse the result
@@ -358,7 +335,6 @@ public class DefaultBulkApiClient extends AbstractClientBase implements
BulkApiC
                 callback.onResponse(response, ex);
             }
         });
-
     }
 
     @Override
@@ -401,6 +377,9 @@ public class DefaultBulkApiClient extends AbstractClientBase implements
BulkApiC
         case ZIP_XML:
             result = type.toString().toLowerCase().replace('_', '/');
             break;
+
+        default:
+            break;
         }
 
         return result;
@@ -425,7 +404,7 @@ public class DefaultBulkApiClient extends AbstractClientBase implements
BulkApiC
     }
 
     private <T> T unmarshalResponse(InputStream response, ContentExchange request,
Class<T> resultClass)
-            throws SalesforceException {
+        throws SalesforceException {
         try {
             Unmarshaller unmarshaller = context.createUnmarshaller();
             JAXBElement<T> result = unmarshaller.unmarshal(new StreamSource(response),
resultClass);
@@ -443,8 +422,7 @@ public class DefaultBulkApiClient extends AbstractClientBase implements
BulkApiC
         }
     }
 
-    private void marshalRequest(Object input, ContentExchange request, String contentType)
-            throws SalesforceException {
+    private void marshalRequest(Object input, ContentExchange request, String contentType)
throws SalesforceException {
         try {
             Marshaller marshaller = context.createMarshaller();
             ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
@@ -487,5 +465,4 @@ public class DefaultBulkApiClient extends AbstractClientBase implements
BulkApiC
             return batchUrl(jobId, batchId) + "/result";
         }
     }
-
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/5d5a43f6/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultRestClient.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultRestClient.java
b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultRestClient.java
index b15d5cf..1edfed7 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultRestClient.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultRestClient.java
@@ -16,6 +16,12 @@
  */
 package org.apache.camel.component.salesforce.internal.client;
 
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.List;
+
 import com.thoughtworks.xstream.XStream;
 import org.apache.camel.component.salesforce.api.SalesforceException;
 import org.apache.camel.component.salesforce.api.dto.RestError;
@@ -31,24 +37,18 @@ import org.eclipse.jetty.http.HttpHeaders;
 import org.eclipse.jetty.http.HttpMethods;
 import org.eclipse.jetty.util.StringUtil;
 
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-import java.util.List;
-
 public class DefaultRestClient extends AbstractClientBase implements RestClient {
 
     private static final String SERVICES_DATA = "/services/data/";
     private static final String TOKEN_HEADER = "Authorization";
     private static final String TOKEN_PREFIX = "Bearer ";
 
+    protected PayloadFormat format;
     private ObjectMapper objectMapper;
     private XStream xStream;
-    protected PayloadFormat format;
 
-    public DefaultRestClient(HttpClient httpClient,
-                             String version, PayloadFormat format, SalesforceSession session)
throws SalesforceException {
+    public DefaultRestClient(HttpClient httpClient, String version, PayloadFormat format,
SalesforceSession session)
+        throws SalesforceException {
         super(version, session, httpClient);
 
         this.format = format;
@@ -76,8 +76,9 @@ public class DefaultRestClient extends AbstractClientBase implements RestClient
         try {
             if (PayloadFormat.JSON.equals(format)) {
                 List<RestError> restErrors = objectMapper.readValue(
-                        httpExchange.getResponseContent(), new TypeReference<List<RestError>>()
{
-                });
+                    httpExchange.getResponseContent(), new TypeReference<List<RestError>>()
{
+                    }
+                );
                 return new SalesforceException(restErrors, httpExchange.getResponseStatus());
             } else {
                 RestErrors errors = new RestErrors();
@@ -87,11 +88,11 @@ public class DefaultRestClient extends AbstractClientBase implements RestClient
         } catch (IOException e) {
             // log and ignore
             String msg = "Unexpected Error parsing " + format + " error response: " + e.getMessage();
-            LOG.warn(msg, e);
+            log.warn(msg, e);
         } catch (RuntimeException e) {
             // log and ignore
             String msg = "Unexpected Error parsing " + format + " error response: " + e.getMessage();
-            LOG.warn(msg, e);
+            log.warn(msg, e);
         }
 
         // just report HTTP status info

http://git-wip-us.apache.org/repos/asf/camel/blob/5d5a43f6/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/SalesforceSecurityListener.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/SalesforceSecurityListener.java
b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/SalesforceSecurityListener.java
index 93ebc43..552401c 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/SalesforceSecurityListener.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/SalesforceSecurityListener.java
@@ -54,9 +54,7 @@ public class SalesforceSecurityListener extends HttpEventListenerWrapper
{
 
     @Override
     public void onResponseStatus(Buffer version, int status, Buffer reason) throws IOException
{
-        if (status == HttpStatus.UNAUTHORIZED_401 &&
-                retries < destination.getHttpClient().maxRetries()) {
-
+        if (status == HttpStatus.UNAUTHORIZED_401 && retries < destination.getHttpClient().maxRetries())
{
             LOG.warn("Retrying on Salesforce authentication error [{}]: [{}]", status, reason);
             setDelegatingRequests(false);
             setDelegatingResponses(false);

http://git-wip-us.apache.org/repos/asf/camel/blob/5d5a43f6/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/dto/PushTopic.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/dto/PushTopic.java
b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/dto/PushTopic.java
index 6dc8490..7da5386 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/dto/PushTopic.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/dto/PushTopic.java
@@ -28,73 +28,72 @@ import org.codehaus.jackson.annotate.JsonProperty;
 @XStreamAlias("PushTopic")
 public class PushTopic extends AbstractSObjectBase {
 
-    private String Query;
-    private Double ApiVersion;
-    private Boolean IsActive;
+    private String query;
+    private Double apiVersion;
+    private Boolean isActive;
     @XStreamConverter(PicklistEnumConverter.class)
-    private NotifyForFieldsEnum NotifyForFields;
+    private NotifyForFieldsEnum notifyForFields;
     @XStreamConverter(PicklistEnumConverter.class)
-    private NotifyForOperationsEnum NotifyForOperations;
-    private String Description;
+    private NotifyForOperationsEnum notifyForOperations;
+    private String description;
 
     @JsonProperty("Query")
     public String getQuery() {
-        return this.Query;
+        return this.query;
     }
 
     @JsonProperty("Query")
-    public void setQuery(String Query) {
-        this.Query = Query;
+    public void setQuery(String query) {
+        this.query = query;
     }
 
     @JsonProperty("ApiVersion")
     public Double getApiVersion() {
-        return this.ApiVersion;
+        return this.apiVersion;
     }
 
     @JsonProperty("ApiVersion")
-    public void setApiVersion(Double ApiVersion) {
-        this.ApiVersion = ApiVersion;
+    public void setApiVersion(Double apiVersion) {
+        this.apiVersion = apiVersion;
     }
 
     @JsonProperty("IsActive")
     public Boolean getIsActive() {
-        return this.IsActive;
+        return this.isActive;
     }
 
     @JsonProperty("IsActive")
-    public void setIsActive(Boolean IsActive) {
-        this.IsActive = IsActive;
+    public void setIsActive(Boolean isActive) {
+        this.isActive = isActive;
     }
 
     @JsonProperty("NotifyForFields")
     public NotifyForFieldsEnum getNotifyForFields() {
-        return this.NotifyForFields;
+        return this.notifyForFields;
     }
 
     @JsonProperty("NotifyForFields")
-    public void setNotifyForFields(NotifyForFieldsEnum NotifyForFields) {
-        this.NotifyForFields = NotifyForFields;
+    public void setNotifyForFields(NotifyForFieldsEnum notifyForFields) {
+        this.notifyForFields = notifyForFields;
     }
 
     @JsonProperty("NotifyForOperations")
     public NotifyForOperationsEnum getNotifyForOperations() {
-        return this.NotifyForOperations;
+        return this.notifyForOperations;
     }
 
     @JsonProperty("NotifyForOperations")
-    public void setNotifyForOperations(NotifyForOperationsEnum NotifyForOperations) {
-        this.NotifyForOperations = NotifyForOperations;
+    public void setNotifyForOperations(NotifyForOperationsEnum notifyForOperations) {
+        this.notifyForOperations = notifyForOperations;
     }
 
     @JsonProperty("Description")
     public String getDescription() {
-        return this.Description;
+        return this.description;
     }
 
     @JsonProperty("Description")
-    public void setDescription(String Description) {
-        this.Description = Description;
+    public void setDescription(String description) {
+        this.description = description;
     }
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/5d5a43f6/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/processor/AbstractRestProcessor.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/processor/AbstractRestProcessor.java
b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/processor/AbstractRestProcessor.java
index 2764461..9869caf 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/processor/AbstractRestProcessor.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/processor/AbstractRestProcessor.java
@@ -16,6 +16,11 @@
  */
 package org.apache.camel.component.salesforce.internal.processor;
 
+import java.io.InputStream;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Map;
+
 import org.apache.camel.AsyncCallback;
 import org.apache.camel.Exchange;
 import org.apache.camel.component.salesforce.SalesforceEndpoint;
@@ -26,11 +31,6 @@ import org.apache.camel.component.salesforce.internal.client.DefaultRestClient;
 import org.apache.camel.component.salesforce.internal.client.RestClient;
 import org.apache.camel.util.ServiceHelper;
 
-import java.io.InputStream;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.Map;
-
 import static org.apache.camel.component.salesforce.SalesforceEndpointConfig.*;
 
 public abstract class AbstractRestProcessor extends AbstractSalesforceProcessor {
@@ -63,7 +63,6 @@ public abstract class AbstractRestProcessor extends AbstractSalesforceProcessor
 
     @Override
     public final boolean process(final Exchange exchange, final AsyncCallback callback) {
-
         // pre-process request message
         try {
             processRequest(exchange);

http://git-wip-us.apache.org/repos/asf/camel/blob/5d5a43f6/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/processor/BulkApiProcessor.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/processor/BulkApiProcessor.java
b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/processor/BulkApiProcessor.java
index 38ab6c6..979f531 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/processor/BulkApiProcessor.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/processor/BulkApiProcessor.java
@@ -56,8 +56,8 @@ public class BulkApiProcessor extends AbstractSalesforceProcessor {
 
     @Override
     public boolean process(final Exchange exchange, final AsyncCallback callback) {
-
         boolean done = false;
+
         try {
             switch (operationName) {
             case CREATE_JOB:

http://git-wip-us.apache.org/repos/asf/camel/blob/5d5a43f6/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/streaming/SubscriptionHelper.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/streaming/SubscriptionHelper.java
b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/streaming/SubscriptionHelper.java
index 40933a9..7c1aa71 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/streaming/SubscriptionHelper.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/streaming/SubscriptionHelper.java
@@ -22,6 +22,9 @@ import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CountDownLatch;
 
+import static java.util.concurrent.TimeUnit.MILLISECONDS;
+import static java.util.concurrent.TimeUnit.SECONDS;
+
 import org.apache.camel.CamelException;
 import org.apache.camel.Service;
 import org.apache.camel.component.salesforce.SalesforceComponent;
@@ -40,8 +43,6 @@ import org.eclipse.jetty.http.HttpSchemes;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import static java.util.concurrent.TimeUnit.MILLISECONDS;
-import static java.util.concurrent.TimeUnit.SECONDS;
 import static org.cometd.bayeux.Channel.META_CONNECT;
 import static org.cometd.bayeux.Channel.META_HANDSHAKE;
 import static org.cometd.bayeux.Channel.META_SUBSCRIBE;


Mime
View raw message