[forge-issues] [JBoss JIRA] (FORGE-424) JavaParser does not understand wildcard imports like "javax.persistence.*"

Lincoln Baxter III (JIRA) jira-events at lists.jboss.org
Fri Apr 27 10:44:19 EDT 2012


     [ https://issues.jboss.org/browse/FORGE-424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lincoln Baxter III updated FORGE-424:
-------------------------------------

    Fix Version/s: 1.0.5.Final
                       (was: 1.0.4.Final)

    
> JavaParser does not understand wildcard imports like "javax.persistence.*"
> --------------------------------------------------------------------------
>
>                 Key: FORGE-424
>                 URL: https://issues.jboss.org/browse/FORGE-424
>             Project: Forge
>          Issue Type: Bug
>          Components: Parsers / File Manipulation
>    Affects Versions: 1.0.0.Beta5
>            Reporter: Lincoln Baxter III
>             Fix For: 1.0.5.Final
>
>
> The JavaParser Annotation.getQualifiedName() will return "Column" instead of "javax.persistence.Column" for the following example class scenario. It should be able to understand the wildcard, given the proper metadata:
> {code}package demo.entities;
> import javax.persistence.*;
> @Entity 
> public class Contact implements java.io.Serializable {
> 	@Id
> 	private @GeneratedValue(strategy = GenerationType.AUTO)
> 	@Column(name = "id", updatable = false, nullable = false)
> 	Long id = null;
> 	@Version
> 	private @Column(name = "version")
> 	int version = 0;
> 	public Long getId() {
> 		return this.id;
> 	}
> 	public void setId(final Long id) {
> 		this.id = id;
> 	}
> 	public int getVersion() {
> 		return this.version;
> 	}
> 	public void setVersion(final int version) {
> 		this.version = version;
> 	}
> 	@Override
> 	public boolean equals(Object that) {
> 		if (this == that) {
> 			return true;
> 		}
> 		if (that == null) {
> 			return false;
> 		}
> 		if (getClass() != that.getClass()) {
> 			return false;
> 		}
> 		if (id != null) {
> 			return id.equals(((Contact) that).id);
> 		}
> 		return super.equals(that);
> 	}
> 	@Override
> 	public int hashCode() {
> 		if (id != null) {
> 			return id.hashCode();
> 		}
> 		return super.hashCode();
> 	}
> 	private String name;
> 	public String getName() {
> 		return this.name;
> 	}
> 	public void setName(final String name) {
> 		this.name = name;
> 	}
> 	public String toString() {
> 		return "" + name;
> 	}
> }{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the forge-issues mailing list