Giter Site home page Giter Site logo

Comments (5)

lombokissues avatar lombokissues commented on July 17, 2024

👤 jacek99   🕗 Aug 31, 2009 at 13:40 UTC

What steps will reproduce the problem?

  1. Create a data POJO
  2. Add JAXB @ XmlElement or @ XmlAttribute annotations to the properties
  3. Start the app (in my case, a Spring web app)

What is the expected output? What do you see instead?

App should start up. Instead, JAXB throws an error since it sees duplicate
properties for XML binding, e.g.

Class has two properties of the same name "durationInMilis"
this problem is related to the following location:
at public long com.myApsResult.getDurationInMilis()

where ApsResult is:

@ Data @ XmlType(name="ApsResult",namespace=ApsConstants.APS5_NAMESPACE)
public class ApsResult {
@ XmlAttribute(name="code",required=true) private int code;
@ XmlAttribute(name="message",required=true) private String message = "";
@ XmlAttribute(name="transactionId",required=true) private String
transactionId;
@ XmlAttribute(name="durationInMilis",required=true) private long
durationInMilis = 0;

What version of the product are you using? On what operating system?

JDK 1.6, Linux.

Please provide any additional information below.

Workaround is to add the getter manually (i.e. in code) and annotate the
getter instead of the property. Would be great if Lombok did that
automatically...

from lombok.

lombokissues avatar lombokissues commented on July 17, 2024

👤 jacek99   🕗 Sep 01, 2009 at 13:33 UTC

I apologize, this is an invalid defect. Please close it. The POJO needed an extra
JAXB annotation to override its default behavior:

@ XmlAccessorType(XmlAccessType.FIELD)

and everything works perfectly after that with @ Data.

Good to reject defect as Invalid.

from lombok.

lombokissues avatar lombokissues commented on July 17, 2024

👤 reinierz   🕗 Sep 01, 2009 at 22:59 UTC

Marked as invalid as per the original reporter's request.

from lombok.

lombokissues avatar lombokissues commented on July 17, 2024

👤 reinierz   🕗 Oct 16, 2009 at 08:53 UTC

from lombok.

lombokissues avatar lombokissues commented on July 17, 2024

End of migration

from lombok.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.