From b5bdb43520ad54248075d389b9df7b06e46fa3d7 Mon Sep 17 00:00:00 2001 From: Nilstrieb Date: Tue, 24 Nov 2020 11:03:55 +0100 Subject: [PATCH] fixed encapsulation bug by creating new one --- src/Regex.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Regex.java b/src/Regex.java index 70a6797..156279d 100644 --- a/src/Regex.java +++ b/src/Regex.java @@ -58,9 +58,9 @@ public abstract class Regex { */ public static final Pattern ARG_SPLIT_REGEX = Pattern.compile(" *(\\w+) *: *(\\w+)"); - public static final Pattern FIELD_FIND_REGEX_NO_ENCAPSULATION = Pattern.compile(" *(?[+\\-~#])* *(?\\w+) *: *(?[\\w<>]+)"); + public static final Pattern FIELD_FIND_REGEX_NO_ENCAPSULATION = Pattern.compile(" *(?[+\\-~#])? *(?\\w+) *: *(?[\\w<>]+)"); - public static final Pattern METHOD_FIND_REGEX_NO_ENCAPSULATION = Pattern.compile(" *(?[+\\-~#])* *(?\\w+) *\\( *(?(?: *\\w+ *: *[\\w<>]+ *,? *)*) *\\) *(?:: *(?[\\w<>]+))?"); + public static final Pattern METHOD_FIND_REGEX_NO_ENCAPSULATION = Pattern.compile(" *(?[+\\-~#])? *(?\\w+) *\\( *(?(?: *\\w+ *: *[\\w<>]+ *,? *)*) *\\) *(?:: *(?[\\w<>]+))?"); public static String getMethodPattern(boolean encapsulation){