Skip to content
This repository has been archived by the owner on Oct 12, 2021. It is now read-only.

Bug 393073 - NPE in the hasNext method #5

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

berezovskyi
Copy link
Contributor

Current status is that the empty nextPage property:

<oslc:nextPage rdf:resource="" />

Causes Jena to deserialise a full triple statement with a non-empty
Object:

subject = "http://example.com/provider/query?oslc.where=ex%3Aproduct%3D%22Product%20A%2"
predicate = "http://open-services.net/ns/core#nextPage"
object = "http://example.com/provider/query"

Current status is that the empty nextPage property:

<oslc:nextPage rdf:resource="" />

Causes Jena to deserialise a full triple statement with a non-empty
Object:

subject = "http://example.com/provider/query?oslc.where=ex%3Aproduct%3D%22Product%20A%2"
predicate = "http://open-services.net/ns/core#nextPage"
object = "http://example.com/provider/query"

Change-Id: I8c1088ebc7101165834fe0a0a4a870e600020812
Signed-off-by: Andrew Berezovskyi <[email protected]>
@eclipsewebmaster
Copy link

Issue tracker reference:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=393073

@berezovskyi
Copy link
Contributor Author

@jamsden I will let you handle this client PR

@berezovskyi
Copy link
Contributor Author

If you need my help, I can try updating the PR.

Copy link

@jamsden jamsden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can see, this looks ok. Have the test been run and demonstrated correct results?

@berezovskyi berezovskyi assigned berezovskyi and unassigned jamsden Feb 15, 2019
@berezovskyi
Copy link
Contributor Author

Change-Id: I29204f5a77074f1c547eb350427435adba9bdcd1
@berezovskyi berezovskyi changed the title Bug 393073 [WIP] - NPE in the hasNext method Bug 393073 - NPE in the hasNext method Feb 15, 2019
Change-Id: I614efb392be24a435aad8ec1ab3743ba3bc10ed9
Signed-off-by: Andrew Berezovskyi <[email protected]>
@berezovskyi
Copy link
Contributor Author

berezovskyi commented Feb 16, 2019 via email

Change-Id: I95f6fb002de836f091483dcc7f5a6f6d99623e40
Signed-off-by: Andrew Berezovskyi <[email protected]>
@berezovskyi
Copy link
Contributor Author

Strange! Now the test that used to pass a year ago does not pass...

<oslc:nextPage rdf:resource="" />

This gets recognised as a triple ?s oslc:nextPage ?s (object does not have the query param though)!

Hmm... according to https://www.w3.org/TR/rdf-syntax-grammar/#section-baseURIs

An empty same document reference "" resolves against the URI part of the base URI

Change-Id: I019092e760ae6a8337fb16b3b9e117810f0e3139
Signed-off-by: Andrew Berezovskyi <[email protected]>
@berezovskyi
Copy link
Contributor Author

@jamsden I think d2026d9#diff-5776f1d67363c3a733d3c944bd2f24f3R146 fix is even better to protect against NPEs. Ready for review/merge.

}

private OslcQueryResult(OslcQueryResult prev) {
this.query = new OslcQuery(prev);
this.query = prev.query;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to check for possible regression

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants