mirror of
https://github.com/google/nomulus
synced 2026-08-19 21:56:17 +00:00
Prefer re2 over java.util.regex
Java's stock regex implementation doesn't guarantee linear time complexity which makes it a security liability. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=121159875
This commit is contained in:
@@ -20,5 +20,6 @@ java_library(
|
||||
"//java/com/google/common/io",
|
||||
"//third_party/java/joda_time",
|
||||
"//third_party/java/jsr305_annotations",
|
||||
"//third_party/java/re2j",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -18,8 +18,9 @@ import static com.google.common.base.Throwables.propagateIfInstanceOf;
|
||||
import static com.google.common.base.Verify.verify;
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
|
||||
import com.google.re2j.Pattern;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import javax.annotation.concurrent.NotThreadSafe;
|
||||
import javax.xml.bind.JAXBContext;
|
||||
|
||||
Reference in New Issue
Block a user