72
72
import java .nio .file .Files ;
73
73
import java .nio .file .Path ;
74
74
import java .nio .file .Paths ;
75
- import java .text .DateFormat ;
76
- import java .time .format .DateTimeFormatter ;
77
75
import java .util .*;
78
76
import java .util .List ;
79
77
import java .util .concurrent .*;
83
81
import java .util .stream .Collectors ;
84
82
85
83
import static java .nio .charset .StandardCharsets .UTF_8 ;
86
- import static java . time . ZoneOffset . UTC ;
84
+ import static org . exist . client . InteractiveClient . DATE_TIME_FORMATTER ;
87
85
import static org .exist .util .FileUtils .humanSize ;
88
86
89
87
/**
@@ -1262,8 +1260,6 @@ private void setPermAction(final ActionEvent ev) throws PermissionDeniedExceptio
1262
1260
ModeDisplay mode = null ;
1263
1261
SimpleACLPermissionAider acl = null ;
1264
1262
1265
- final DateFormat dateTimeFormat = DateFormat .getDateTimeInstance ();
1266
-
1267
1263
final List <ResourceDescriptor > selected = new ArrayList <>();
1268
1264
1269
1265
boolean firstPerm = true ;
@@ -1283,7 +1279,7 @@ private void setPermAction(final ActionEvent ev) throws PermissionDeniedExceptio
1283
1279
1284
1280
if (selectedRow .isCollection ()) {
1285
1281
final Collection coll = collection .getChildCollection (thisName .toString ());
1286
- thisCreated = dateTimeFormat .format (coll .getCreationTime ());
1282
+ thisCreated = DATE_TIME_FORMATTER .format (coll .getCreationTime ());
1287
1283
thisModified = NON_APPLICABLE ;
1288
1284
thisMimeType = COLLECTION_MIME_TYPE ;
1289
1285
thisMessageDigestType = NON_APPLICABLE ;
@@ -1292,8 +1288,8 @@ private void setPermAction(final ActionEvent ev) throws PermissionDeniedExceptio
1292
1288
thisPerm = service .getPermissions (coll );
1293
1289
} else {
1294
1290
final Resource res = collection .getResource (thisName .toString ());
1295
- thisCreated = dateTimeFormat .format (res .getCreationTime ());
1296
- thisModified = dateTimeFormat .format (res .getLastModificationTime ());
1291
+ thisCreated = DATE_TIME_FORMATTER .format (res .getCreationTime ());
1292
+ thisModified = DATE_TIME_FORMATTER .format (res .getLastModificationTime ());
1297
1293
thisMimeType = ((EXistResource ) res ).getMimeType ();
1298
1294
if (res instanceof EXistBinaryResource ) {
1299
1295
final MessageDigest messageDigest = ((EXistBinaryResource ) res ).getContentDigest (DigestType .BLAKE_256 );
@@ -1596,8 +1592,6 @@ static class ResourceTableModel extends AbstractTableModel {
1596
1592
1597
1593
private List <ResourceDescriptor > rows = null ;
1598
1594
1599
- private DateTimeFormatter dateFormat = DateTimeFormatter .ofPattern ("yyyy-MM-dd HH:mm:ss" ).withZone (UTC );
1600
-
1601
1595
public void setData (final List <ResourceDescriptor > rows ) {
1602
1596
rows .sort (new ResourceComparator ());
1603
1597
this .rows = rows ;
@@ -1651,7 +1645,7 @@ public Object getValueAt(final int rowIndex, final int columnIndex) {
1651
1645
case 0 :
1652
1646
return row .getName ().toString ();
1653
1647
case 1 :
1654
- return dateFormat .format (row .getInstant ());
1648
+ return DATE_TIME_FORMATTER .format (row .getInstant ());
1655
1649
case 2 :
1656
1650
return row .getOwner ();
1657
1651
case 3 :
0 commit comments