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

XML Parsing: Enum as Element Type #475

Closed
geri-m opened this issue Sep 23, 2018 · 0 comments
Closed

XML Parsing: Enum as Element Type #475

geri-m opened this issue Sep 23, 2018 · 0 comments
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@geri-m
Copy link
Contributor

geri-m commented Sep 23, 2018

In the current implementation, an enumeration is only support as XML-Attribut, but not as an Element. We should have enumerations also as elements.

Currently this kind of XMLs/PoJos can be parsed/serialized

<?xml version="1.0"?><any attributeEnum="ENUM_1" xmlns="http://www.w3.org/2005/Atom" />"
  public static class AnyTypeEnumAttributeOnly {
    @Key("@attributeEnum")
    public XmlEnumTest.AnyEnum attributeEnum;
  }`

These XMLs/PoJos causes an exception (no Standard constructor for primitiv type).

<?xml version="1.0"?><any xmlns="http://www.w3.org/2005/Atom"><elementEnum>ENUM_3</elementEnum></any>
  public static class AnyTypeEnumElementOnly {
    @Key
    public XmlEnumTest.AnyEnum elementEnum;
  }
geri-m added a commit to geri-m/google-http-java-client that referenced this issue Sep 23, 2018
geri-m added a commit to geri-m/google-http-java-client that referenced this issue Sep 23, 2018
@JustinBeckwith JustinBeckwith added the triage me I really want to be triaged. label Sep 24, 2018
@chingor13 chingor13 added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Sep 24, 2018
@JustinBeckwith JustinBeckwith removed the triage me I really want to be triaged. label Sep 24, 2018
chingor13 pushed a commit that referenced this issue Oct 9, 2018
* Allows enums as element types (#475)

* Remove Blank lines (#475)
This was referenced Oct 12, 2018
geri-m added a commit to geri-m/google-http-java-client that referenced this issue Oct 28, 2018
geri-m added a commit to geri-m/google-http-java-client that referenced this issue Nov 2, 2018
* issue-504:
  Change method of asserting enums (googleapis#504)
  Improve JavaDoc of Tests (googleapis#504)
  delete commented out code (googleapis#504)
  Use Guava for reading resource file (googleapis#504)
  Replace Heise feed with Custom feed, set encoding for reading file (googleapis#504)
  Try-with-resources Java6 Style (googleapis#504)
  Adding asserts in GenericXmlTests (googleapis#504)
  Cleanup documentation of tests (googleapis#504)
  Add more list tests (googleapis#504)
  Adding more Tests for XML parsing/mapping (googleapis#504)
  Fixes bug in googleapis#475, add relevant Tests (googleapis#504)
chingor13 pushed a commit that referenced this issue Nov 6, 2018
* Fixes bug in #475, add relevant Tests (#504)

* Adding more Tests for XML parsing/mapping (#504)

* Add more list tests (#504)

* Cleanup documentation of tests (#504)

* Adding asserts in GenericXmlTests (#504)

* Try-with-resources Java6 Style (#504)

* Replace Heise feed with Custom feed, set encoding for reading file (#504)

* Use Guava for reading resource file (#504)

* delete commented out code (#504)

* Improve JavaDoc of Tests (#504)

* Change method of asserting enums (#504)

* Minor fixes in JavaDoc (#504)

* Rename Test methods (#504)

* Fix Typo in JavaDoc (#504)

* Remove irrelevant annotation, clean up test case (#504)

* Fix incorrect/missing annotations, improve instanceof annotations (#504)
@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Apr 6, 2020
yoshi-automation added a commit that referenced this issue Apr 9, 2020
Source-Repo: googleapis/synthtool
Source-Sha: bd69a2aa7b70875f3c988e269706b22fefbef40e
Source-Link: googleapis/synthtool@bd69a2a
Author: Jeff Ching <[email protected]>
Date: Wed Apr 8 14:01:08 2020 -0700
Original-Commit-Message: build(java): fix retry_with_backoff when -e option set (#475)
chingor13 pushed a commit that referenced this issue Apr 14, 2020
* chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.15 (#466)

Source-Repo: googleapis/synthtool
Source-Sha: 928b2998ac5023e7c7e254ab935f9ef022455aad
Source-Link: googleapis/synthtool@928b299
Author: WhiteSource Renovate <[email protected]>
Date: Tue Apr 7 19:56:16 2020 +0200
Original-Commit-Message: chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.15 (#466)

Co-authored-by: Jeffrey Rennie <[email protected]>

* build(java): fix retry_with_backoff when -e option set (#475)

Source-Repo: googleapis/synthtool
Source-Sha: bd69a2aa7b70875f3c988e269706b22fefbef40e
Source-Link: googleapis/synthtool@bd69a2a
Author: Jeff Ching <[email protected]>
Date: Wed Apr 8 14:01:08 2020 -0700
Original-Commit-Message: build(java): fix retry_with_backoff when -e option set (#475)

* build(java): fix nightly integration test config to run integrations (#465)

Source-Repo: googleapis/synthtool
Source-Sha: c7e0e517d7f46f77bebd27da2e5afcaa6eee7e25
Source-Link: googleapis/synthtool@c7e0e51
Author: Jeff Ching <[email protected]>
Date: Wed Apr 8 14:06:04 2020 -0700
Original-Commit-Message: build(java): fix nightly integration test config to run integrations (#465)

This was only running the units.

Co-authored-by: Jeffrey Rennie <[email protected]>
clundin25 pushed a commit to clundin25/google-http-java-client that referenced this issue Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

4 participants