RFR: JDK-8306490: Fix raw type warnings in graphics

Nir Lisker nlisker at openjdk.org
Wed May 10 16:52:22 UTC 2023


On Tue, 18 Apr 2023 16:17:52 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:

> Focused only on raw type problems, and removing casts that were no longer needed because of the changes.

I started reviewing but there are too many files, which makes the GitHub interface unresponsive. Can you break it into 4 PRs of ~50 files chunks?

Many of these are not trivial changes - finding the correct type requires understanding what's going on in the code.

modules/javafx.graphics/src/main/java/com/sun/javafx/application/ParametersImpl.java line 1:

> 1: /*

Removing unused constructors (and their dependent methods) will require someone to look at why they aren't used.

modules/javafx.graphics/src/main/java/com/sun/javafx/css/BitSet.java line 238:

> 236:         }
> 237: 
> 238:         BitSet<?> other = (BitSet<?>) c;

Shouldn't it be `<? extends T>`?

modules/javafx.graphics/src/main/java/com/sun/javafx/css/ParsedValueImpl.java line 71:

> 69:             containsLookupsFlag = false;
> 70:         }
> 71:         else if(obj instanceof ParsedValueImpl<?, ?> value) {

Space after `if`s.

modules/javafx.graphics/src/main/java/com/sun/javafx/css/ParsedValueImpl.java line 431:

> 429:                 pvi.writeBinary(os, stringStore);
> 430:             } else {
> 431:                 final ParsedValueImpl<?, ?> impl = new ParsedValueImpl<>((Object) pv.getValue(), (StyleConverter<Object, Object>) pv.getConverter());

I'm getting a warning on the cast to `(StyleConverter<Object, Object>)`.

-------------

PR Review: https://git.openjdk.org/jfx/pull/1095#pullrequestreview-1419538322
PR Review Comment: https://git.openjdk.org/jfx/pull/1095#discussion_r1189190166
PR Review Comment: https://git.openjdk.org/jfx/pull/1095#discussion_r1189195406
PR Review Comment: https://git.openjdk.org/jfx/pull/1095#discussion_r1189196266
PR Review Comment: https://git.openjdk.org/jfx/pull/1095#discussion_r1190157435


More information about the openjfx-dev mailing list