Skip to content

Commit bd9fc28

Browse files
committed
Make getCopyrightYear in BuildInformation an int
1 parent 578bc00 commit bd9fc28

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/processor/java/org/truffleruby/processor/BuildInformationProcessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public class BuildInformationProcessor extends TruffleRubyProcessor {
4747
private String shortRevision;
4848
private String fullRevision;
4949
private String compileDate;
50-
private String copyrightYear;
50+
private int copyrightYear;
5151
private String kernelMajorVersion;
5252

5353
@Override
@@ -59,7 +59,7 @@ public synchronized void init(ProcessingEnvironment env) {
5959
fullRevision = runCommand("git rev-parse HEAD");
6060
shortRevision = fullRevision.substring(0, 8);
6161
compileDate = runCommand("git log -1 --date=short --pretty=format:%cd");
62-
copyrightYear = compileDate.split("\\-")[0];
62+
copyrightYear = Integer.parseInt(compileDate.split("\\-")[0]);
6363
kernelMajorVersion = findKernelMajorVersion();
6464
} catch (Throwable e) {
6565
throw new Error(e);

src/shared/java/org/truffleruby/shared/BuildInformation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public interface BuildInformation {
2020

2121
String getFullRevision();
2222

23-
String getCopyrightYear();
23+
int getCopyrightYear();
2424

2525
String getCompileDate();
2626

0 commit comments

Comments
 (0)