Skip to content
Permalink
Browse files
8260619: Add final modifier to several DataFlavor static fields
Reviewed-by: azvegint, kizune
  • Loading branch information
mrserb committed Mar 24, 2021
1 parent cfc9aa3 commit 37f494cafad95a36ec368b48bbebf5bc54c8cbe8
Showing 1 changed file with 6 additions and 6 deletions.
@@ -185,10 +185,10 @@ private static DataFlavor createConstant(String mt, String prn) {
/*
* private initializer
*/
private static DataFlavor initHtmlDataFlavor(String htmlFlavorType) {
private static DataFlavor initHtml(String htmlFlavorType) {
try {
return new DataFlavor ("text/html; class=java.lang.String;document=" +
htmlFlavorType + ";charset=Unicode");
return new DataFlavor("text/html; class=java.lang.String;document="
+ htmlFlavorType + ";charset=Unicode");
} catch (Exception e) {
return null;
}
@@ -292,7 +292,7 @@ private static DataFlavor initHtmlDataFlavor(String htmlFlavorType) {
*
* @since 1.8
*/
public static DataFlavor selectionHtmlFlavor = initHtmlDataFlavor("selection");
public static final DataFlavor selectionHtmlFlavor = initHtml("selection");

/**
* Represents a piece of an HTML markup. If possible, the markup received
@@ -306,7 +306,7 @@ private static DataFlavor initHtmlDataFlavor(String htmlFlavorType) {
*
* @since 1.8
*/
public static DataFlavor fragmentHtmlFlavor = initHtmlDataFlavor("fragment");
public static final DataFlavor fragmentHtmlFlavor = initHtml("fragment");

/**
* Represents a piece of an HTML markup. If possible, the markup received
@@ -320,7 +320,7 @@ private static DataFlavor initHtmlDataFlavor(String htmlFlavorType) {
*
* @since 1.8
*/
public static DataFlavor allHtmlFlavor = initHtmlDataFlavor("all");
public static final DataFlavor allHtmlFlavor = initHtml("all");

/**
* Constructs a new {@code DataFlavor}. This constructor is provided only

0 comments on commit 37f494c

Please sign in to comment.