Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-dev] About Y-Builds (was Re: 4.35 Y-Build: Y20250111-1000 - BUILD FAILED)

You're only looking at the trivial part, but you miss the tons of locations that query this data. With your proposal we would never be able to remove any preview checks of features that have long matured, and we would even need separate checks for repeated previews with changes between them.

am I missing anything?


I found JavaFeature.isPreview() has 2 consumers:
* ProblemReporter.validateJavaFeatureSupport(...)
* ProblemReporter.validateRestrictedKeywords(...)

both do take can access the compliance from `this.option.sourceLevel`.
So it would be possible to replace each call to `isPreview()` by some `isPreview(this.options.sourceLevel)` which would instead of directly returning true/false, would look like
```
enum JavaFeature {
   ...
   int lastPreviewVersion; // set to 0 if was never preview
   boolean isPreview(long compliance) {
      return compliance <= lastPreviewVersion
   }
```

--
Mickael Istria
Eclipse IDE developer, for Red Hat

Back to the top