Skip to content

Commit 9626cb3

Browse files
committed
Make pattern field as static final
Signed-off-by: Pasam Soujanya <psoujany@in.ibm.com>
1 parent 782fb6a commit 9626cb3

File tree

1 file changed

+2
-2
lines changed
  • src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html

1 file changed

+2
-2
lines changed

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Table.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ public class Table<T> extends Content {
9292
private HtmlStyle gridStyle;
9393
private final List<Content> bodyRows;
9494
private HtmlId id;
95+
private static String regex = "<(?:a|area|button|input|object|select|textarea)\\b";
96+
private static final Pattern pattern = Pattern.compile(regex);
9597

9698
/**
9799
* A record containing the data for a table tab.
@@ -328,8 +330,6 @@ public void addRow(T item, List<Content> contents) {
328330
}
329331
}
330332
int colIndex = 0;
331-
String regex = "<(?:a|area|button|input|object|select|textarea)\\b";
332-
Pattern pattern = Pattern.compile(regex);
333333
for (Content c : contents) {
334334
HtmlStyle cellStyle = columnStyles.get(colIndex);
335335
// Always add content to make sure the cell isn't dropped

0 commit comments

Comments
 (0)