mcgilman commented on code in PR #10893:
URL: https://github.com/apache/nifi/pull/10893#discussion_r2801205806
##########
nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/service/manager/connection-manager.service.ts:
##########
@@ -595,9 +595,9 @@ export class ConnectionManager implements OnDestroy {
*/
private isExpirationConfigured(connection: any): boolean {
if (connection.flowFileExpiration != null) {
- const match: string[] =
connection.flowFileExpiration.match(/^(\d+).*/);
+ const match: string[] =
connection.flowFileExpiration.match(/^(\d*\.?\d+).*/);
if (match !== null && match.length > 0) {
- if (parseInt(match[0], 10) > 0) {
+ if (parseFloat(match[0]) > 0) {
Review Comment:
```suggestion
if (parseFloat(match[1]) > 0) {
```
I believe we should be referencing the capture group intentionally instead
of relying on `parseFloat` implementation that would drop the ` secs` portion.
I understand this aspect isn't modified or new in this PR but would be good to
improve here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]