@@ -98,10 +98,16 @@ private void filter(MonitoredArtifact artifact) {
9898 private @ NotNull MonitoredArtifact toMonitoredArtifact (TestResult testResult , @ NotNull RepoPath repoPath ) {
9999 Ignores ignores = Ignores .read (new RepositoryArtifactProperties (repoPath , repositories ));
100100 Instant lastModifiedDate = getLastModifiedDate (repoPath );
101+
102+ LOG .debug ("Retrieved last modified date of {} for {}" , lastModifiedDate , repoPath );
101103
102104 // Only apply lastModifiedDate to packages from remote repositories.
103- if (lastModifiedDateRemoteOnly () && !isRemoteRepository (repoPath )) {
104- lastModifiedDate = null ;
105+ if (lastModifiedDateRemoteOnly ()) {
106+ LOG .debug ("Last modified date applied to only remote repositories." );
107+ if (!isRemoteRepository (repoPath )) {
108+ LOG .debug ("Repository provided is not a remote repository, skipping last modified date check." );
109+ lastModifiedDate = null ;
110+ }
105111 }
106112 return new MonitoredArtifact (repoPath .toString (), testResult , ignores , lastModifiedDate );
107113 }
@@ -111,7 +117,10 @@ private Instant getLastModifiedDate(RepoPath repoPath) {
111117 ItemInfo itemInfo = repositories .getItemInfo (repoPath );
112118 if (itemInfo != null ) {
113119 Instant lastModified = Instant .ofEpochMilli (itemInfo .getLastModified ());
120+ LOG .debug ("Retrieved last modifed date of {}" , lastModified .toString ());
114121 return lastModified ;
122+ } else {
123+ LOG .debug ("Unable to retrieve ItemInfo for {}, could not retrieve last modified date" , repoPath );
115124 }
116125 } catch (Exception e ) {
117126 LOG .debug ("Could not retrieve last modified date for {}: {}" , repoPath , e );
0 commit comments