Skip to content

Add feature flag to stop defaulting null datetime filter args to current time - #1067

Merged
boulter merged 5 commits into
masterfrom
null-date-time-feature
May 3, 2023
Merged

Add feature flag to stop defaulting null datetime filter args to current time#1067
boulter merged 5 commits into
masterfrom
null-date-time-feature

Conversation

@boulter

@boulterboulter commented May 2, 2023

Copy link
Copy Markdown
Contributor

This is like #1065, but uses the new feature flags instead of adding to JInjavaConfig.

#1066 should be merged first.

@boulterboulter changed the title add features flags to jinjava configAdd config to stop defaulting null datetime filter args to current timeMay 2, 2023
@boulter
boulter marked this pull request as draft May 2, 2023 22:29
@jasmith-hs
jasmith-hs changed the base branch from master to jboulter-add-features-flags-to-jinjava-configMay 3, 2023 13:06
.getActivationStrategy(FIXED_DATE_TIME_FILTER_NULL_ARG);

if (feat.isActive()) {
var = ((DateTimeFeatureActivationStrategy) feat).getActivateAt();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These are not safe casts

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

In general, true, but for this particular feature it will be.

@jasmith-hsjasmith-hsMay 3, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If the feature-flag is changed to FeatureStrategies.ACTIVE, this will blow up at runtime

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Yes. But for compatibility reasons, this has to return a valid date. So it's either a casting exception or some other exception.

Base automatically changed from jboulter-add-features-flags-to-jinjava-config to masterMay 3, 2023 13:22
@boulter
boulter marked this pull request as ready for review May 3, 2023 13:23
}

@Test
@Ignore

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

sometimes this is not faster when building.

@boulterboulter changed the title Add config to stop defaulting null datetime filter args to current timeAdd feature to stop defaulting null datetime filter args to current timeMay 3, 2023
@boulterboulter changed the title Add feature to stop defaulting null datetime filter args to current timeAdd feature flag to stop defaulting null datetime filter args to current timeMay 3, 2023
@boulter
boulter merged commit ddb9aba into masterMay 3, 2023
@boulter
boulter deleted the null-date-time-feature branch May 3, 2023 21:39
Sign up for freeto 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.

3 participants

@boulter@jasmith-hs@jboulter