You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@jena.apache.org by "afs (via GitHub)" <gi...@apache.org> on 2024/03/14 12:54:25 UTC
[PR] GH-2169: Remove compiler warnings around graph copy code [jena]
afs opened a new pull request, #2333:
URL: https://github.com/apache/jena/pull/2333
Clean the codebase of compiler warnings, mainly about unnecessary casts.
This follows on from PR #2316 that improves in-memory graph copy performance.
----
By submitting this pull request, I acknowledge that I am making a contribution to the Apache Software Foundation under the terms and conditions of the [Contributor's Agreement](https://www.apache.org/licenses/contributor-agreements.html).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org
Re: [PR] GH-2169: Remove compiler warnings around graph copy code [jena]
Posted by "afs (via GitHub)" <gi...@apache.org>.
afs commented on code in PR #2333:
URL: https://github.com/apache/jena/pull/2333#discussion_r1524848614
##########
jena-arq/src/test/java/org/apache/jena/system/GTest.java:
##########
@@ -34,8 +35,6 @@ public void copy() {
{
var graphImplementingCopyable = new GraphMem2Fast();
- assertTrue(graphImplementingCopyable instanceof Copyable<?>);
Review Comment:
`graphImplementingCopyable` is already a `Copyable` and can't be null.
##########
jena-core/src/main/java/org/apache/jena/mem2/collection/FastHashBase.java:
##########
@@ -94,7 +94,7 @@ protected FastHashBase() {
*
* @param baseToCopy
*/
- protected <T extends FastHashBase> FastHashBase(final T baseToCopy) {
+ protected <T extends FastHashBase<?>> FastHashBase(final T baseToCopy) {
Review Comment:
Generic, not bare class, keeps Eclipse happy.
##########
jena-core/src/test/java/org/apache/jena/mem2/GraphMem2Test.java:
##########
@@ -177,10 +177,10 @@ public void testCopy() {
when(mockStore.copy()).thenReturn(mockStoreCopy);
- var sut = new GraphMem2(mockStore);
- var copy = sut.copy();
+ GraphMem2 sut = new GraphMem2(mockStore);
+ GraphMem2 copy = sut.copy();
- assertTrue(copy instanceof GraphMem2);
+ assertNotNull(copy);
Review Comment:
`copy` is a GraphMem2 so the `instanceof` is false only if `copy` is null.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org
Re: [PR] GH-2169: Remove compiler warnings around graph copy code [jena]
Posted by "afs (via GitHub)" <gi...@apache.org>.
afs commented on PR #2333:
URL: https://github.com/apache/jena/pull/2333#issuecomment-1997420508
@arne-bdt - I can't add you as a reviewer - this may be because your github account isn't in the ASF organisation.
This PR removes some warnings there were showing up in the codebase.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org
Re: [PR] GH-2169: Remove compiler warnings around graph copy code [jena]
Posted by "afs (via GitHub)" <gi...@apache.org>.
afs merged PR #2333:
URL: https://github.com/apache/jena/pull/2333
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org