Skip to content

Commit 0a83c37

Browse files
author
Jeff Bornemann
committed
Misc. refactoring
1 parent ce00b27 commit 0a83c37

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/main/groovy/com/twcable/grabbit/client/batch/steps/jcrnodes/JcrNodesReader.groovy

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package com.twcable.grabbit.client.batch.steps.jcrnodes
1818

1919
import com.twcable.grabbit.client.batch.ClientBatchJobContext
2020
import com.twcable.grabbit.proto.NodeProtos
21+
import com.twcable.grabbit.proto.NodeProtos.Node as ProtoNode
2122
import groovy.transform.CompileStatic
2223
import groovy.util.logging.Slf4j
2324
import org.springframework.batch.item.ItemReader
@@ -32,11 +33,11 @@ import org.springframework.batch.item.UnexpectedInputException
3233
@Slf4j
3334
@CompileStatic
3435
@SuppressWarnings("GrMethodMayBeStatic")
35-
class JcrNodesReader implements ItemReader<NodeProtos.Node> {
36+
class JcrNodesReader implements ItemReader<ProtoNode> {
3637

3738
@Override
3839
NodeProtos.Node read() throws Exception, UnexpectedInputException, ParseException, NonTransientResourceException {
39-
NodeProtos.Node nodeProto = NodeProtos.Node.parseDelimitedFrom(theInputStream())
40+
ProtoNode nodeProto = ProtoNode.parseDelimitedFrom(theInputStream())
4041
if (!nodeProto) {
4142
log.info "Received all data from Server"
4243
return null

src/main/groovy/com/twcable/grabbit/jcr/JCRNodeDecorator.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ class JcrNodeDecorator {
146146
if (hasProperty(JCR_LASTMODIFIED)) {
147147
return getProperty(JCR_LASTMODIFIED).date.time
148148
}
149-
else if (hasProperty(CQ_LAST_MODIFIED)) {
149+
else if (hasProperty("cq:lastModified")) {
150150
return getProperty(CQ_LAST_MODIFIED).date.time
151151
}
152152
else if (hasProperty(JCR_CREATED)) {

0 commit comments

Comments
 (0)