mirror of
https://github.com/apple/pkl.git
synced 2026-01-12 06:40:42 +01:00
[PR #344] [MERGED] Eliminate unnecessary use of GregorianCalendar #514
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/apple/pkl/pull/344
Author: @odenix
Created: 3/20/2024
Status: ✅ Merged
Merged: 3/21/2024
Merged by: @bioball
Base:
main← Head:calendar📝 Commits (1)
fbfc3d1Eliminate unnecessary use of GregorianCalendar📊 Changes
1 file changed (+8 additions, -7 deletions)
View changed files
📝
pkl-core/src/main/java/org/pkl/core/project/ProjectPackager.java(+8 -7)📄 Description
It's unnecessary to load and instantiate an expensive Calendar class to compute this constant.
jshell> new GregorianCalendar(1980, Calendar.FEBRUARY, 1, 0, 0, 0).getTimeInMillis();
$1 ==> 318240000000
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.