tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r1241442 - /tuscany/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java
Date Tue, 07 Feb 2012 12:27:39 GMT
Author: antelder
Date: Tue Feb  7 12:27:38 2012
New Revision: 1241442

URL: http://svn.apache.org/viewvc?rev=1241442&view=rev
Log:
TUSCANY-4001: Update JMS Binding to use the QName of the element in UnexpectedElement error
messages

Modified:
    tuscany/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java

Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java?rev=1241442&r1=1241441&r2=1241442&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/JMSBindingProcessor.java
Tue Feb  7 12:27:38 2012
@@ -353,7 +353,8 @@ public class JMSBindingProcessor extends
                                 }
 
                             } else {
-                                error(monitor, "UnexpectedElement", reader, extension.toString());
+                            	String t = (extension instanceof Extension) ? ((Extension)extension).getQName().toString()
: extension.toString();
+                                error(monitor, "UnexpectedElement", reader, t);
                             }
                         }
                     }
@@ -370,8 +371,9 @@ public class JMSBindingProcessor extends
                     if (x.equals(JMSBindingConstants.BINDING_JMS_QNAME)) {
                         endFound = true;
                     } else {
-                    	error(monitor, "UnexpectedElement: expected " + JMSBindingConstants.BINDING_JMS_QNAME
+ ", found " + x.toString(), 
-                    	      reader, x.toString());
+                    	String t = (x instanceof Extension) ? ((Extension)x).getQName().toString()
: x.toString();
+                    	error(monitor, "UnexpectedElement: expected " + JMSBindingConstants.BINDING_JMS_QNAME
+ ", found " + t, 
+                    	      reader, t);
                     }
             }
         }
@@ -697,7 +699,8 @@ public class JMSBindingProcessor extends
                                     error(context.getMonitor(), "ResponseWireformatAlreadyDefined",
reader, extension.toString());
                                 }
                             } else {
-                                error(context.getMonitor(), "UnexpectedElement", reader,
extension.toString());
+                            	String t = (extension instanceof Extension) ? ((Extension)extension).getQName().toString()
: extension.toString();
+                                error(context.getMonitor(), "UnexpectedElement", reader,
t);
                             }
                         }
                         reader.next();



Mime
View raw message