From ee3605428ece3600ebf941622c6e7419fdd40588 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Mon, 12 Sep 2022 22:27:03 -0400 Subject: [PATCH] minor cleanup --- app/src/main/java/app/grapheneos/pdfviewer/Utils.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/app/grapheneos/pdfviewer/Utils.java b/app/src/main/java/app/grapheneos/pdfviewer/Utils.java index 0e7ae24..01ff166 100644 --- a/app/src/main/java/app/grapheneos/pdfviewer/Utils.java +++ b/app/src/main/java/app/grapheneos/pdfviewer/Utils.java @@ -39,14 +39,13 @@ public class Utils { final Calendar calendar = Calendar.getInstance(); final int currentYear = calendar.get(Calendar.YEAR); - int year; // Year is required String field = date.substring(position += 2, 6); if (!TextUtils.isDigitsOnly(field)) { throw new ParseException("Invalid year", position); } - year = Integer.parseInt(field); + int year = Integer.parseInt(field); if (year > currentYear) { year = currentYear; }