Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8204009 | 11.0.1 | Erik Gahlin | P4 | Resolved | Fixed | team |
If the condtion element for a jfc schema defaults to "true" or "false" for the true and false attrubute, it becomes impossible to create some multiple choice logic For example,
<condition name="compiler-phase-threshold" true="60 s">
<test name="compiler-level" operator="equal" value="normal"/>
</condition>
<condition name="compiler-phase-threshold" true="10 s">
<test name="compiler-level" operator="equal" value="detailed"/>
</condition>
<condition name="compiler-phase-threshold" true="0 s">
<test name="compiler-level" operator="equal" value="all"/>
</condition>
In this case, only when the condition evaluates to true should a modification of compiler-phase-threshold occur. It would be possible to set a default for "true", since it is always possible to negate an expression with <not>, but expressions can be kept simpler if we don't set defaults at all.
<condition name="compiler-phase-threshold" true="60 s">
<test name="compiler-level" operator="equal" value="normal"/>
</condition>
<condition name="compiler-phase-threshold" true="10 s">
<test name="compiler-level" operator="equal" value="detailed"/>
</condition>
<condition name="compiler-phase-threshold" true="0 s">
<test name="compiler-level" operator="equal" value="all"/>
</condition>
In this case, only when the condition evaluates to true should a modification of compiler-phase-threshold occur. It would be possible to set a default for "true", since it is always possible to negate an expression with <not>, but expressions can be kept simpler if we don't set defaults at all.
- backported by
-
JDK-8204009 JFC schema condition should not have defaults
- Resolved