Skip to content

Compilation warnings #1379

@simonff

Description

@simonff

Versions impacted by the bug

No response

What went wrong?

netcdf/cdm/core/src/main/java/ucar/ma2/Index.java:22: warning: [ClassInitializationDeadlock] Possible class initialization deadlock: Index0D is a subclass of the containing class Index
public static final Index0D scalarIndexImmutable = new Index0D(); // immutable, so can be shared
^


netcdf/cdm/core/src/main/java/ucar/ma2/StructureData.java:73: warning: [ClassInitializationDeadlock] Possible class initialization deadlock: StructureDataW is a subclass of the containing class StructureData
public static final StructureData EMPTY = new StructureDataW(StructureMembers.builder().setName("empty").build());
^


netcdf/cdm/radial/src/main/java/ucar/nc2/iosp/nids/Nidsheader.java:654: warning: [ComparisonOutOfRange] shorts may have a value in the range -32768 to 32767; therefore, this comparison to 0x8000 will always evaluate to true
if (Divlen_divider != 0x8000) {
^


netcdf/cdm/core/src/main/java/ucar/ma2/StructureMembers.java:363: error: [EqualsWrongThing] Suspicious comparison between getFullName() and getName()
return getFullName().equals(other.getName()) && Objects.equals(getDescription(), other.getDescription())
^

Relevant stack trace

No response

Relevant log messages

No response

If you have an example file that you can share, please attach it to this issue.

If so, may we include it in our test datasets to help ensure the bug does not return once fixed?
Note: the test datasets are publicly accessible without restriction.

Yes

Code of Conduct

  • I agree to follow the UCAR/Unidata Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions