Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.util.Collection not recognized as collection #42

Closed
mwinkels opened this issue Jul 13, 2012 · 3 comments
Closed

java.util.Collection not recognized as collection #42

mwinkels opened this issue Jul 13, 2012 · 3 comments
Labels
Milestone

Comments

@mwinkels
Copy link

A bean with a property of type java.util.Collection is not recognized as a collection.

@mwinkels
Copy link
Author

This is a patch for this issue:

From 81cb708d2af5164c7faf4c55d7e4fae81f7a7d68 Mon Sep 17 00:00:00 2001
From: Maarten Winkels maarten.winkels@ing.nl
Date: Fri, 13 Jul 2012 14:49:10 +0200
Subject: [PATCH] Fix for issue #42: recognize java.util.Collection as
Collection.


.../main/java/com/lunatech/doclets/jax/Utils.java | 2 ++
.../doclets/jax/jaxb/testcase/ClassExample.java | 11 +++++++++++
2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/doclets/src/main/java/com/lunatech/doclets/jax/Utils.java b/doclets/src/main/java/com/lunatech/doclets/jax/Utils.java
index 7ba58ab..61f38a8 100644
--- a/doclets/src/main/java/com/lunatech/doclets/jax/Utils.java
+++ b/doclets/src/main/java/com/lunatech/doclets/jax/Utils.java
@@ -232,6 +232,8 @@ public class Utils {
ClassDoc doc = type.asClassDoc();
if (doc == null)
return null;

  • if (doc.qualifiedTypeName().equals(typeName))
  •  return type;
    
    if (doc.isInterface())
    return findSuperTypeFromInterface(doc, typeName);
    if (doc.isClass() && !doc.isEnum() && !doc.isError() && !doc.isException())
    diff --git a/doclets/src/test/java/com/lunatech/doclets/jax/jaxb/testcase/ClassExample.java b/doclets/src/test/java/com/lunatech/doclets/jax/jaxb/testcase/ClassExample.java
    index 7e656f0..4d6f63d 100644
    --- a/doclets/src/test/java/com/lunatech/doclets/jax/jaxb/testcase/ClassExample.java
    +++ b/doclets/src/test/java/com/lunatech/doclets/jax/jaxb/testcase/ClassExample.java
    @@ -1,5 +1,6 @@
    package com.lunatech.doclets.jax.jaxb.testcase;

+import java.util.Collection;
import java.util.Date;
import java.util.List;

@@ -78,4 +79,14 @@ public class ClassExample {
this.integerList = integerList;
}

  • @xmlelement
  • private Collection stringCollection;
  • public Collection getStringCollection() {
  • return stringCollection;
  • }
  • public void setStringCollection(Collection stringCollection) {
  • this.stringCollection = stringCollection;
  • }
    }
    --
    1.7.8.msysgit.0

@FroMage
Copy link
Owner

FroMage commented Jul 24, 2012

Thanks. Could you do a pull request for this please?

FroMage added a commit that referenced this issue Jul 24, 2012
Changes for issue #42 and issue #43
@FroMage
Copy link
Owner

FroMage commented Jul 24, 2012

Sorry you already did, thanks a lot :)

@FroMage FroMage closed this as completed Jul 24, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants