Skip to content

NPE in StdDateFormat hashCode and equals #1130

@kazuki43zoo

Description

@kazuki43zoo

Occur NullPointerException in hashCode() and equals(Object) method.
Please implements these methods correctly.

Thanks.

Test Cases

@Test
public void testHashCode() {
    StdDateFormat.instance.hashCode();
}

@Test
public void testEquals() {
    StdDateFormat.instance.equals(new StdDateFormat());
}

Stack Traces

java.lang.NullPointerException
    at java.text.DateFormat.hashCode(DateFormat.java:739)
        ...
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
java.lang.NullPointerException
    at java.text.DateFormat.equals(DateFormat.java:751)
        ...
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions