[jira] [Commented] (GEOMETRY-63) Review "SonarQube" report

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[jira] [Commented] (GEOMETRY-63) Review "SonarQube" report

ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/GEOMETRY-63?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16987054#comment-16987054 ]

Matt Juntunen commented on GEOMETRY-63:

Several of the "critical" code smells are related to my use of generic wildcard return types in the core interfaces. For example, {{SubHyperplane}} contains the following method:
List<? extends ConvexSubHyperplane<P>> toConvex();
I did this to allow implementation classes to return a list of actual implementation types instead of just {{ConvexSubHyperplane}}. For example,  {{ConvexSubPlane}} overrides this method with
public List<ConvexSubPlane> toConvex(){ ... }
which allows callers immediate access to the convex implementation type without casting. However, I'm not sure how to achieve the same effect without the code smell. Any ideas?

> Review "SonarQube" report
> -------------------------
>                 Key: GEOMETRY-63
>                 URL: https://issues.apache.org/jira/browse/GEOMETRY-63
>             Project: Apache Commons Geometry
>          Issue Type: Task
>            Reporter: Gilles Sadowski
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
> https://sonarcloud.io/dashboard?id=commons-geometry

This message was sent by Atlassian Jira