mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 16:35:45 +01:00
fix potential bugs
This commit is contained in:
@@ -401,7 +401,8 @@ public class HgRepositoryHandler extends AbstractRepositoryHandler<HgConfig>
|
||||
{
|
||||
try
|
||||
{
|
||||
repository.setCreationDate(Util.parseDate(creationDateString));
|
||||
repository.setCreationDate(
|
||||
Util.parseDate(creationDateString).getTime());
|
||||
}
|
||||
catch (ParseException ex)
|
||||
{
|
||||
@@ -460,11 +461,12 @@ public class HgRepositoryHandler extends AbstractRepositoryHandler<HgConfig>
|
||||
|
||||
scmSection.setParameter("id", repository.getId());
|
||||
|
||||
Date creationDate = repository.getCreationDate();
|
||||
long creationDate = repository.getCreationDate();
|
||||
|
||||
if (creationDate != null)
|
||||
if (creationDate >= -1)
|
||||
{
|
||||
scmSection.setParameter("creationDate", Util.formatDate(creationDate));
|
||||
scmSection.setParameter("creationDate",
|
||||
Util.formatDate(new Date(creationDate)));
|
||||
}
|
||||
|
||||
INIConfiguration iniConfig = new INIConfiguration();
|
||||
|
||||
Reference in New Issue
Block a user