Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NullableDate #360

Merged
merged 1 commit into from
Jan 13, 2023
Merged

Fix NullableDate #360

merged 1 commit into from
Jan 13, 2023

Conversation

Katsute
Copy link
Member

@Katsute Katsute commented Jan 13, 2023

Prerequisites

Issues must meet the following criteria:

  • No similar pull request exists.
  • Code follows the general code style of this project.
  • No sensitive information is exposed.
  • Relevant comments have been added.

GitHub Copilot Disclaimer

The use of GitHub Copilot is strictly prohibited on this repository.

  • This pull does not use GitHub Copilot.

Changes Made

List any changes made and/or other relevant issues.

  • Fix parsing failures on incomplete dates

WF-3907690947

@Katsute Katsute self-assigned this Jan 13, 2023
@Katsute

This comment has been minimized.

@ghost

This comment has been minimized.

private final Integer year = requireNonNull(() -> Integer.valueOf(parts[0]));
private final Integer month = requireNonNull(() -> Integer.valueOf(parts[1]));
private final Integer day = requireNonNull(() -> Integer.valueOf(parts[2]));
private final Integer year = requireNonNull(() -> parts.length < 1 ? null : Integer.valueOf(parts[0]));

Check notice

Code scanning / CodeQL

Missing catch of NumberFormatException

Potential uncaught 'java.lang.NumberFormatException'.
private final Integer month = requireNonNull(() -> Integer.valueOf(parts[1]));
private final Integer day = requireNonNull(() -> Integer.valueOf(parts[2]));
private final Integer year = requireNonNull(() -> parts.length < 1 ? null : Integer.valueOf(parts[0]));
private final Integer month = requireNonNull(() -> parts.length < 2 ? null : Integer.valueOf(parts[1]));

Check notice

Code scanning / CodeQL

Missing catch of NumberFormatException

Potential uncaught 'java.lang.NumberFormatException'.
private final Integer day = requireNonNull(() -> Integer.valueOf(parts[2]));
private final Integer year = requireNonNull(() -> parts.length < 1 ? null : Integer.valueOf(parts[0]));
private final Integer month = requireNonNull(() -> parts.length < 2 ? null : Integer.valueOf(parts[1]));
private final Integer day = requireNonNull(() -> parts.length < 3 ? null : Integer.valueOf(parts[2]));

Check notice

Code scanning / CodeQL

Missing catch of NumberFormatException

Potential uncaught 'java.lang.NumberFormatException'.
@Katsute

This comment has been minimized.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Katsute I have approved this pull request

@Katsute Katsute merged commit bf3dcd6 into main Jan 13, 2023
@Katsute Katsute deleted the fix-nullable-date@7856fe6 branch January 13, 2023 02:15
@ghost ghost locked and limited conversation to collaborators Jan 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant