mirror of
https://gitee.com/jmix/cuba.git
synced 2024-11-30 18:27:56 +08:00
Merged from release_3_1
Dates in urls describing file descriptors are passed in long instead of formatted strings [from revision 10711] #PL-1898
This commit is contained in:
parent
01f0e278c1
commit
767f450e59
@ -93,7 +93,7 @@ public class FileDescriptor extends StandardEntity {
|
||||
return new StrBuilder()
|
||||
.append(id).append(",")
|
||||
.append(extension).append(",")
|
||||
.append(new SimpleDateFormat(DATE_FMT).format(createDate))
|
||||
.append(createDate.getTime())
|
||||
.toString();
|
||||
}
|
||||
|
||||
@ -104,11 +104,7 @@ public class FileDescriptor extends StandardEntity {
|
||||
FileDescriptor fd = new FileDescriptor();
|
||||
fd.setId(UUID.fromString(parts[0]));
|
||||
fd.setExtension(parts[1]);
|
||||
try {
|
||||
fd.setCreateDate(new SimpleDateFormat(DATE_FMT).parse(parts[2]));
|
||||
} catch (ParseException e) {
|
||||
throw new IllegalArgumentException("Invalid FileDescriptor format", e);
|
||||
}
|
||||
fd.setCreateDate(new Date(Long.parseLong(parts[2])));
|
||||
return fd;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user