You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When unpacking source code using maven-dependency-plugin the action fails for some libraries. The issue happens when there are files containing entries with last modified time before initial value of unix time (1970-01-01T00:00). When such time is turned into unix time it gets negative value and later on when the value is passed to File.setLastModified() the method throws IllegalArgumentException("Negative time"). The issue happens for library version 4.10.0 AbstractUnArchiver class at line 328. Exemplary library containing such entries is /net/minidev/json-smart/2.5.1/json-smart-2.5.1-sources.jar.
Possible fix might be:
longtime = entryDate.getTime();
if (time < 0) {
getLogger().warn("File {} contains entry {} with negative last modified time {}" +
" Replacing it with 0.", srcF.getPath(), entryName, time);
time = 0;
}
targetFileName.setLastModified(time);
The text was updated successfully, but these errors were encountered:
When unpacking source code using maven-dependency-plugin the action fails for some libraries. The issue happens when there are files containing entries with last modified time before initial value of unix time (1970-01-01T00:00). When such time is turned into unix time it gets negative value and later on when the value is passed to File.setLastModified() the method throws IllegalArgumentException("Negative time"). The issue happens for library version 4.10.0 AbstractUnArchiver class at line 328. Exemplary library containing such entries is /net/minidev/json-smart/2.5.1/json-smart-2.5.1-sources.jar.
Possible fix might be:
The text was updated successfully, but these errors were encountered: