Skip to content

Commit

Permalink
Adding check for frozen nodes to avoid trying to update read-only ver…
Browse files Browse the repository at this point in the history
…sion/etc. nodes
  • Loading branch information
escowles committed Aug 12, 2014
1 parent e2ed144 commit c1e7b0c
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -172,7 +172,7 @@ public Date getLastModifiedDate() throws RepositoryException {
final Date lastModifiedDate = new Date(node.getProperty(JCR_LASTMODIFIED).getDate().getTimeInMillis());

// make sure that lastModifiedDate isn't before createdDate
if ( createdDate != null && lastModifiedDate.before(createdDate) ) {
if ( !isFrozen.apply(node) && createdDate != null && lastModifiedDate.before(createdDate) ) {
final Calendar cal = Calendar.getInstance();
cal.setTime(createdDate);
node.setProperty(JCR_LASTMODIFIED, cal);
Expand Down

0 comments on commit c1e7b0c

Please sign in to comment.