1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-06-07 02:40:52 +00:00

rolling back code incompatible with Java 8

This commit is contained in:
Larry Diamond 2021-11-30 17:22:26 -05:00
parent 5e446d88ee
commit b676a6e62f
5 changed files with 6 additions and 6 deletions

View File

@ -468,7 +468,7 @@ public class StringUtils {
public static String manageUnicodeNotationUplus(String s) {
final Pattern pattern = Pattern.compile("\\<U\\+([0-9a-fA-F]{4,5})\\>");
final Matcher matcher = pattern.matcher(s);
final StringBuilder result = new StringBuilder();
final StringBuffer result = new StringBuffer(); // Can't be switched to StringBuilder in order to support Java 8
while (matcher.find()) {
final String num = matcher.group(1);
final int value = Integer.parseInt(num, 16);
@ -482,7 +482,7 @@ public class StringUtils {
public static String manageAmpDiese(String s) {
final Pattern pattern = Pattern.compile("\\&#([0-9]+);");
final Matcher matcher = pattern.matcher(s);
final StringBuilder result = new StringBuilder();
final StringBuffer result = new StringBuffer(); // Can't be switched to StringBuilder in order to support Java 8
while (matcher.find()) {
final String num = matcher.group(1);
final char c = (char) Integer.parseInt(num);

View File

@ -92,7 +92,7 @@ public class ComponentTextArrow extends AbstractComponentText implements ArrowCo
if (fileFormat == FileFormat.UTXT) {
final Pattern pattern = Pattern.compile("\\<b\\>([0-9]+)\\</b\\>");
final Matcher matcher = pattern.matcher(s);
final StringBuilder result = new StringBuilder();
final StringBuffer result = new StringBuffer(); // Can't be switched to StringBuilder in order to support Java 8
while (matcher.find()) {
final String num = matcher.group(1);
final String replace = StringUtils.toInternalBoldNumber(num);

View File

@ -62,7 +62,7 @@ public class PreprocessorUtils {
final Pattern p = Pattern.compile("%(\\w+)%");
final Matcher m = p.matcher(s);
final StringBuilder sb = new StringBuilder();
final StringBuffer sb = new StringBuffer(); // Can't be switched to StringBuilder in order to support Java 8
while (m.find()) {
final String var = m.group(1);
final String value = getenv(var);

View File

@ -940,7 +940,7 @@ public class SvgGraphics {
private String formatTitle(String title) {
final Pattern p = Pattern.compile("\\<U\\+([0-9A-Fa-f]+)\\>");
final Matcher m = p.matcher(title);
final StringBuilder sb = new StringBuilder();
final StringBuffer sb = new StringBuffer(); // Can't be switched to StringBuilder in order to support Java 8
while (m.find()) {
final String num = m.group(1);
final char c = (char) Integer.parseInt(num, 16);

View File

@ -80,7 +80,7 @@ public class Cypher {
public synchronized String cypher(String s) {
final Matcher m = p.matcher(s);
final StringBuilder sb = new StringBuilder();
final StringBuffer sb = new StringBuffer(); // Can't be switched to StringBuilder in order to support Java 8
while (m.find()) {
final String word = m.group(0);
m.appendReplacement(sb, changeWord(word));