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).
This commit is contained in:
Éamonn McManus 2022-10-24 17:47:38 -07:00 committed by GitHub
parent 7bca5c4061
commit 4705518e12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;