-
CSR
-
Resolution: Approved
-
P3
-
None
-
source, binary, behavioral
-
low
-
An application which modifies these fields will need to be updated but since these fields are not expected fo be modified and there Is no obvious reason an application would be doing this, it seems very unlikely any applications will be affected.
-
Java API
-
SE
Summary
Mark several public static fields in java.awt.datatransfer.DataFlavor as final.
Problem
Several constants added to the java.awt.datatransfer.DataFlavor class in JDK8 were not marked as final as are other similar constants in this class.
Solution
Add the final keyword to each constant.
Specification
src/java.datatransfer/share/classes/java/awt/datatransfer/DataFlavor.java
*
* @since 1.8
*/
- public static DataFlavor selectionHtmlFlavor = initHtmlDataFlavor("selection");
+ public static final DataFlavor selectionHtmlFlavor = initHtml("selection");
*
* @since 1.8
*/
- public static DataFlavor fragmentHtmlFlavor = initHtmlDataFlavor("fragment");
+ public static final DataFlavor fragmentHtmlFlavor = initHtml("fragment");
*
* @since 1.8
*/
- public static DataFlavor allHtmlFlavor = initHtmlDataFlavor("all");
+ public static final DataFlavor allHtmlFlavor = initHtml("all");
- csr of
-
JDK-8260619 Add final modifier to several DataFlavor static fields
-
- Resolved
-