< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/code/Preview.java

Print this page
rev 56806 : 8232684: Make switch expressions final
Reviewed-by: TBD

*** 163,176 **** * Is given feature a preview feature? * @param feature the feature to be tested. * @return true, if given feature is a preview feature. */ public boolean isPreview(Feature feature) { ! if (feature == Feature.SWITCH_EXPRESSION || ! feature == Feature.SWITCH_MULTIPLE_CASE_LABELS || ! feature == Feature.SWITCH_RULE || ! feature == Feature.TEXT_BLOCKS) return true; //Note: this is a backdoor which allows to optionally treat all features as 'preview' (for testing). //When real preview features will be added, this method can be implemented to return 'true' //for those selected features, and 'false' for all the others. return forcePreview; --- 163,173 ---- * Is given feature a preview feature? * @param feature the feature to be tested. * @return true, if given feature is a preview feature. */ public boolean isPreview(Feature feature) { ! if (feature == Feature.TEXT_BLOCKS) return true; //Note: this is a backdoor which allows to optionally treat all features as 'preview' (for testing). //When real preview features will be added, this method can be implemented to return 'true' //for those selected features, and 'false' for all the others. return forcePreview;
< prev index next >