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

OslcCoreMissingSetMethodException due to a regression in LyoD #61

Closed
berezovskyi opened this issue Feb 12, 2019 · 8 comments

Comments

Projects
None yet
3 participants
@berezovskyi
Copy link
Member

commented Feb 12, 2019

Resolving #15, there is a regression that causes the following exception from JMH:

org.eclipse.lyo.oslc4j.core.exception.OslcCoreMissingSetMethodException: OSLC011: Missing corresponding set method for method getStep of class %Generated DS class%

@berezovskyi

This comment has been minimized.

Copy link
Member Author

commented Feb 12, 2019

I think the right thing to do here is to try rolling back the commit 137046a

However, there was some refactoring associated with it and we might want to preserve that.

In the meanwhile, we can check if eclipse/lyo.core#29 from @neormx can be extended to handle this case too.

Or we might consider breaking the signatures of the generated code in LyoD 4.0 and switch both "in" and "out" types to use a generic Set.

@berezovskyi

This comment has been minimized.

Copy link
Member Author

commented Feb 12, 2019

berezovskyi added a commit to EricssonResearch/scott-eu that referenced this issue Feb 12, 2019

HashSet workaround for LyoD regression
eclipse/lyo.designer#61
Signed-off-by: Andrew Berezovskyi <andriib@kth.se>
@berezovskyi

This comment has been minimized.

Copy link
Member Author

commented Feb 12, 2019

@jamsden I know you don't like to break things :) But I think we can actually go all in and replace HashSet with a Set both in getters and setters in LyoD 4.0

@jamsden

This comment has been minimized.

Copy link
Contributor

commented Feb 12, 2019

I suspect that is correct and preferred, but only in the interfaces. HashSet will still be needed in the implementations.

@berezovskyi

This comment has been minimized.

Copy link
Member Author

commented Feb 14, 2019

berezovskyi added a commit to EricssonResearch/scott-eu that referenced this issue Feb 18, 2019

HashSet workaround for LyoD regression
eclipse/lyo.designer#61
Signed-off-by: Andrew Berezovskyi <andriib@kth.se>

berezovskyi added a commit to EricssonResearch/scott-eu that referenced this issue Feb 18, 2019

HashSet workaround for LyoD regression
eclipse/lyo.designer#61
Signed-off-by: Andrew Berezovskyi <andriib@kth.se>

berezovskyi added a commit to EricssonResearch/scott-eu that referenced this issue Feb 18, 2019

HashSet workaround for LyoD regression
eclipse/lyo.designer#61
Signed-off-by: Andrew Berezovskyi <andriib@kth.se>
@jadelkhoury

This comment has been minimized.

Copy link
Contributor

commented Mar 15, 2019

@jamsden @berezovskyi Do we agree to go with the breaking change?

This issue is highlighted on https://forum.open-services.net/t/eclipse-lyo-2-4-error-when-posting-to-a-creation-factory/215/1

I can also reproduce it on any resource with a property of cardinality other than 1, upon unmarshalling. (marshelling does not seem to cause exceptions).

@berezovskyi

This comment has been minimized.

Copy link
Member Author

commented Mar 16, 2019

@jadelkhoury

This comment has been minimized.

Copy link
Contributor

commented Mar 16, 2019

Not sure if I did all that is required to connect the pull request #71 to this issue.

jadelkhoury added a commit that referenced this issue Mar 19, 2019

#61 OslcCoreMissingSetMethodException due to a regression in LyoD (#71)
* Resource properties of cardinality zero-or-one or zero-or-many are
declared as Set. They are constructed as HashSet.

* Only initialize instance attributes if they are zerorOrMore, or
oneOrMore. Do no longer initialize simply because they are of type
Link/resource.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.