From 4705518e12fe205b9c880b14fd15efa6aae4a5bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89amonn=20McManus?= Date: Mon, 24 Oct 2022 17:47:38 -0700 Subject: [PATCH] Revise the version regex in `GsonVersionDiagnosticsTest`. (#2228) Before we can release 2.10 we must support two-digit components. Additionally, there's no reason to require a patch number (2.10.0 rather than 2.10). --- .../com/google/gson/functional/GsonVersionDiagnosticsTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gson/src/test/java/com/google/gson/functional/GsonVersionDiagnosticsTest.java b/gson/src/test/java/com/google/gson/functional/GsonVersionDiagnosticsTest.java index aa6f4ccb..daa7aa48 100644 --- a/gson/src/test/java/com/google/gson/functional/GsonVersionDiagnosticsTest.java +++ b/gson/src/test/java/com/google/gson/functional/GsonVersionDiagnosticsTest.java @@ -35,7 +35,7 @@ import junit.framework.TestCase; * @author Inderjeet Singh */ public class GsonVersionDiagnosticsTest extends TestCase { - private static final Pattern GSON_VERSION_PATTERN = Pattern.compile("(\\(GSON \\d\\.\\d\\.\\d)(?:[-.][A-Z]+)?\\)$"); + private static final Pattern GSON_VERSION_PATTERN = Pattern.compile("(\\(GSON \\d\\.\\d+(\\.\\d)?)(?:[-.][A-Z]+)?\\)$"); private Gson gson;