Author: alexparvulescu Date: Tue Oct 6 15:17:28 2015 New Revision: 1707071
URL: http://svn.apache.org/viewvc?rev=1707071&view=rev Log: OAK-3484 Oak Explorer: add property type to reference output Modified: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/explorer/NodeStoreTree.java Modified: jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/explorer/NodeStoreTree.java URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/explorer/NodeStoreTree.java?rev=1707071&r1=1707070&r2=1707071&view=diff ============================================================================== --- jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/explorer/NodeStoreTree.java (original) +++ jackrabbit/oak/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/explorer/NodeStoreTree.java Tue Oct 6 15:17:28 2015 @@ -435,8 +435,7 @@ public class NodeStoreTree extends JPane private static Set<UUID> getReferencedUUIDs(FileStore store) { Set<UUID> ids = newHashSet(); for (SegmentId id : store.getTracker().getReferencedSegmentIds()) { - ids.add(new UUID(id.getMostSignificantBits(), id - .getLeastSignificantBits())); + ids.add(id.asUUID()); } return ids; } @@ -483,23 +482,20 @@ public class NodeStoreTree extends JPane if (ps instanceof SegmentPropertyState) { SegmentPropertyState sps = (SegmentPropertyState) ps; RecordId recordId = sps.getRecordId(); - SegmentId sid = recordId.getSegmentId(); - UUID id = new UUID(sid.getMostSignificantBits(), - sid.getLeastSignificantBits()); + UUID id = recordId.getSegmentId().asUUID(); if (uuids.contains(id)) { - localPaths.add(path + "@" + ps + " [SegmentPropertyState@" - + recordId + "]"); + localPaths.add(path + ps + " [SegmentPropertyState<" + + ps.getType() + ">@" + recordId + "]"); } if (ps.getType().tag() == PropertyType.BINARY) { for (int i = 0; i < ps.count(); i++) { Blob b = ps.getValue(Type.BINARY, i); for (SegmentId sbid : SegmentBlob.getBulkSegmentIds(b)) { - UUID bid = new UUID(sbid.getMostSignificantBits(), - sbid.getLeastSignificantBits()); + UUID bid = sbid.asUUID(); if (!bid.equals(id) && uuids.contains(bid)) { - localPaths.add(path + "@" + ps - + " [SegmentPropertyState@" + recordId - + "]"); + localPaths.add(path + ps + + " [SegmentPropertyState<" + + ps.getType() + ">@" + recordId + "]"); } } } @@ -508,16 +504,12 @@ public class NodeStoreTree extends JPane } RecordId stateId = state.getRecordId(); - SegmentId segmentId = stateId.getSegmentId(); - if (uuids.contains(new UUID(segmentId.getMostSignificantBits(), - segmentId.getLeastSignificantBits()))) { + if (uuids.contains(stateId.getSegmentId().asUUID())) { localPaths.add(path + " [SegmentNodeState@" + stateId + "]"); } RecordId templateId = SegmentNodeStateHelper.getTemplateId(state); - SegmentId template = templateId.getSegmentId(); - if (uuids.contains(new UUID(template.getMostSignificantBits(), template - .getLeastSignificantBits()))) { + if (uuids.contains(templateId.getSegmentId().asUUID())) { localPaths.add(path + "[Template@" + templateId + "]"); } paths.addAll(localPaths);