ProviderException is not needed. 

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

Branch: refs/heads/master
Commit: fcd1a49ccf95ab49e2acbe9a46d5acd51b743a3f
Parents: cf97b6d
Author: oalles <oal...@neivi.es>
Authored: Tue Mar 22 13:01:45 2016 +0100
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Wed Mar 23 18:46:10 2016 +0100

----------------------------------------------------------------------
 .../component/cm/CMSenderOneMessageImpl.java    |  8 ++--
 .../cm/exceptions/ProviderException.java        | 41 --------------------
 2 files changed, 4 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/fcd1a49c/components/camel-cm/src/main/java/org/apache/camel/component/cm/CMSenderOneMessageImpl.java
----------------------------------------------------------------------
diff --git 
a/components/camel-cm/src/main/java/org/apache/camel/component/cm/CMSenderOneMessageImpl.java
 
b/components/camel-cm/src/main/java/org/apache/camel/component/cm/CMSenderOneMessageImpl.java
index e1d78c1..813ed42 100644
--- 
a/components/camel-cm/src/main/java/org/apache/camel/component/cm/CMSenderOneMessageImpl.java
+++ 
b/components/camel-cm/src/main/java/org/apache/camel/component/cm/CMSenderOneMessageImpl.java
@@ -40,8 +40,8 @@ import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Text;
 
+import org.apache.camel.component.cm.exceptions.CMDirectException;
 import org.apache.camel.component.cm.exceptions.MessagingException;
-import org.apache.camel.component.cm.exceptions.ProviderException;
 import org.apache.camel.component.cm.exceptions.XMLConstructionException;
 import org.apache.camel.component.cm.exceptions.cmresponse.CMResponseException;
 import 
org.apache.camel.component.cm.exceptions.cmresponse.InsufficientBalanceException;
@@ -195,12 +195,12 @@ public class CMSenderOneMessageImpl implements CMSender {
             LOG.debug("Response Code : {}", statusCode);
 
             if (statusCode == 400) {
-                throw new ProviderException("CM Component and CM API show some 
kind of inconsistency. "
+                throw new CMDirectException("CM Component and CM API show some 
kind of inconsistency. "
                                             + "CM is complaining about not 
using a post method for the request. And this component only uses POST 
requests. What happens?");
             }
 
             if (statusCode != 200) {
-                throw new ProviderException("CM Component and CM API show some 
kind of inconsistency. The component expects the status code to be 200 or 400. 
New api released? ");
+                throw new CMDirectException("CM Component and CM API show some 
kind of inconsistency. The component expects the status code to be 200 or 400. 
New api released? ");
             }
 
             // So we have 200 status code...
@@ -251,7 +251,7 @@ public class CMSenderOneMessageImpl implements CMSender {
             // Ok. Line is EMPTY - successfully submitted
             LOG.debug("Result of the request processing: Successfully 
submited");
         } catch (final IOException io) {
-            throw new ProviderException(io);
+            throw new CMDirectException(io);
         } catch (Throwable t) {
             if (!(t instanceof MessagingException)) {
                 // Chain it

http://git-wip-us.apache.org/repos/asf/camel/blob/fcd1a49c/components/camel-cm/src/main/java/org/apache/camel/component/cm/exceptions/ProviderException.java
----------------------------------------------------------------------
diff --git 
a/components/camel-cm/src/main/java/org/apache/camel/component/cm/exceptions/ProviderException.java
 
b/components/camel-cm/src/main/java/org/apache/camel/component/cm/exceptions/ProviderException.java
deleted file mode 100644
index e29ca4a..0000000
--- 
a/components/camel-cm/src/main/java/org/apache/camel/component/cm/exceptions/ProviderException.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.cm.exceptions;
-
-import org.apache.camel.component.cm.exceptions.cmresponse.CMResponseException;
-
-public class ProviderException extends CMResponseException {
-
-    public ProviderException() {
-    }
-
-    public ProviderException(final String message) {
-        super(message);
-    }
-
-    public ProviderException(final Throwable cause) {
-        super(cause);
-    }
-
-    public ProviderException(final String message, final Throwable cause) {
-        super(message, cause);
-    }
-
-    public ProviderException(final String message, final Throwable cause, 
final boolean enableSuppression, final boolean writableStackTrace) {
-        super(message, cause, enableSuppression, writableStackTrace);
-    }
-}

Reply via email to