cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1179586 - in /cxf/branches/2.4.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java tools/wadlto/jaxrs/src/test/resources/wadl/bookstore.xml
Date Thu, 06 Oct 2011 11:52:41 GMT
Author: sergeyb
Date: Thu Oct  6 11:52:41 2011
New Revision: 1179586

URL: http://svn.apache.org/viewvc?rev=1179586&view=rev
Log:
Merged revisions 1179584 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1179584 | sergeyb | 2011-10-06 12:50:21 +0100 (Thu, 06 Oct 2011) | 1 line
  
  [CXF-3797] Checking for duplicate element references when looking for representations with
links
........

Modified:
    cxf/branches/2.4.x-fixes/   (props changed)
    cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java
    cxf/branches/2.4.x-fixes/tools/wadlto/jaxrs/src/test/resources/wadl/bookstore.xml

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Oct  6 11:52:41 2011
@@ -1 +1 @@
-/cxf/trunk:1179271
+/cxf/trunk:1179271,1179584

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java?rev=1179586&r1=1179585&r2=1179586&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java
Thu Oct  6 11:52:41 2011
@@ -622,11 +622,13 @@ public class SourceGenerator {
     }
 
     private List<Element> getXmlReps(List<Element> repElements) {
+        Set<String> values = new HashSet<String>(repElements.size());
         List<Element> xmlReps = new ArrayList<Element>();
         for (Element el : repElements) {
             String value = el.getAttribute("element");
-            if (value.length() > 0 && value.contains(":")) {
+            if (value.length() > 0 && value.contains(":") && !values.contains(value))
{
                 xmlReps.add(el);
+                values.add(value);
             }
         }
         if (xmlReps.isEmpty()) {

Modified: cxf/branches/2.4.x-fixes/tools/wadlto/jaxrs/src/test/resources/wadl/bookstore.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/tools/wadlto/jaxrs/src/test/resources/wadl/bookstore.xml?rev=1179586&r1=1179585&r2=1179586&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/tools/wadlto/jaxrs/src/test/resources/wadl/bookstore.xml (original)
+++ cxf/branches/2.4.x-fixes/tools/wadlto/jaxrs/src/test/resources/wadl/bookstore.xml Thu
Oct  6 11:52:41 2011
@@ -103,7 +103,7 @@
        <representation mediaType="application/xml" element="prefix1:theBook2">
         <doc>InputBook</doc>
        </representation>
-       <representation mediaType="application/json">
+       <representation mediaType="application/json" element="prefix1:theBook2">
         <doc>InputBook</doc>
        </representation>
       </request>



Mime
View raw message