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

OKAPI-1191: NumberFormatException in timerId halts Okapi #1359

Merged
merged 9 commits into from
Sep 14, 2024

Conversation

julianladisch
Copy link
Contributor

https://folio-org.atlassian.net/browse/OKAPI-1191

Avoid NumberFormatException in timerId.

Approach:

Find _ from the end (not from the beginning) because the tenantId may contain _.

Wrap parsing into try-catch to gracefully handle all parse errors.

Move the timerId code into TenantProductSeq class.

Use product_seq only in module descriptor and in APIs; use tenant_product_seq in all other places.

Rename timerId variable to tenantProductSeq or productSeq.

https://folio-org.atlassian.net/browse/OKAPI-1191

Avoid NumberFormatException in timerId.

Approach:

Find `_` from the end (not from the beginning) because the tenantId may contain `_`.

Wrap parsing into try-catch to gracefully handle all parse errors.

Move the timerId code into TenantProductSeq class.

Use product_seq only in module descriptor and in APIs; use tenant_product_seq in all other places.

Rename timerId variable to tenantProductSeq or productSeq.
@julianladisch julianladisch force-pushed the OKAPI-1191-timer-NumberFormatException branch from 10e802c to 281a123 Compare August 31, 2024 17:31
Copy link
Contributor

@steveellis steveellis left a comment

Choose a reason for hiding this comment

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

Nice hardening of okapi timer ids!

Copy link

sonarcloud bot commented Sep 14, 2024

@julianladisch julianladisch merged commit 5d3dedc into master Sep 14, 2024
5 checks passed
@julianladisch julianladisch deleted the OKAPI-1191-timer-NumberFormatException branch September 14, 2024 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants