mirror of
https://github.com/octoleo/plantuml.git
synced 2025-01-03 15:17:23 +00:00
rolling back code incompatible with Java 8
This commit is contained in:
parent
5e446d88ee
commit
b676a6e62f
@ -468,7 +468,7 @@ public class StringUtils {
|
|||||||
public static String manageUnicodeNotationUplus(String s) {
|
public static String manageUnicodeNotationUplus(String s) {
|
||||||
final Pattern pattern = Pattern.compile("\\<U\\+([0-9a-fA-F]{4,5})\\>");
|
final Pattern pattern = Pattern.compile("\\<U\\+([0-9a-fA-F]{4,5})\\>");
|
||||||
final Matcher matcher = pattern.matcher(s);
|
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()) {
|
while (matcher.find()) {
|
||||||
final String num = matcher.group(1);
|
final String num = matcher.group(1);
|
||||||
final int value = Integer.parseInt(num, 16);
|
final int value = Integer.parseInt(num, 16);
|
||||||
@ -482,7 +482,7 @@ public class StringUtils {
|
|||||||
public static String manageAmpDiese(String s) {
|
public static String manageAmpDiese(String s) {
|
||||||
final Pattern pattern = Pattern.compile("\\&#([0-9]+);");
|
final Pattern pattern = Pattern.compile("\\&#([0-9]+);");
|
||||||
final Matcher matcher = pattern.matcher(s);
|
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()) {
|
while (matcher.find()) {
|
||||||
final String num = matcher.group(1);
|
final String num = matcher.group(1);
|
||||||
final char c = (char) Integer.parseInt(num);
|
final char c = (char) Integer.parseInt(num);
|
||||||
|
@ -92,7 +92,7 @@ public class ComponentTextArrow extends AbstractComponentText implements ArrowCo
|
|||||||
if (fileFormat == FileFormat.UTXT) {
|
if (fileFormat == FileFormat.UTXT) {
|
||||||
final Pattern pattern = Pattern.compile("\\<b\\>([0-9]+)\\</b\\>");
|
final Pattern pattern = Pattern.compile("\\<b\\>([0-9]+)\\</b\\>");
|
||||||
final Matcher matcher = pattern.matcher(s);
|
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()) {
|
while (matcher.find()) {
|
||||||
final String num = matcher.group(1);
|
final String num = matcher.group(1);
|
||||||
final String replace = StringUtils.toInternalBoldNumber(num);
|
final String replace = StringUtils.toInternalBoldNumber(num);
|
||||||
|
@ -62,7 +62,7 @@ public class PreprocessorUtils {
|
|||||||
final Pattern p = Pattern.compile("%(\\w+)%");
|
final Pattern p = Pattern.compile("%(\\w+)%");
|
||||||
|
|
||||||
final Matcher m = p.matcher(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()) {
|
while (m.find()) {
|
||||||
final String var = m.group(1);
|
final String var = m.group(1);
|
||||||
final String value = getenv(var);
|
final String value = getenv(var);
|
||||||
|
@ -940,7 +940,7 @@ public class SvgGraphics {
|
|||||||
private String formatTitle(String title) {
|
private String formatTitle(String title) {
|
||||||
final Pattern p = Pattern.compile("\\<U\\+([0-9A-Fa-f]+)\\>");
|
final Pattern p = Pattern.compile("\\<U\\+([0-9A-Fa-f]+)\\>");
|
||||||
final Matcher m = p.matcher(title);
|
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()) {
|
while (m.find()) {
|
||||||
final String num = m.group(1);
|
final String num = m.group(1);
|
||||||
final char c = (char) Integer.parseInt(num, 16);
|
final char c = (char) Integer.parseInt(num, 16);
|
||||||
|
@ -80,7 +80,7 @@ public class Cypher {
|
|||||||
public synchronized String cypher(String s) {
|
public synchronized String cypher(String s) {
|
||||||
|
|
||||||
final Matcher m = p.matcher(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()) {
|
while (m.find()) {
|
||||||
final String word = m.group(0);
|
final String word = m.group(0);
|
||||||
m.appendReplacement(sb, changeWord(word));
|
m.appendReplacement(sb, changeWord(word));
|
||||||
|
Loading…
Reference in New Issue
Block a user