this.reference = ref;\r
this.displayName = displayName;\r
this.date = internalGetDate(refObject);\r
- this.name = (ref != null) ? ref.getName() : displayName;\r
+ this.name = ref != null ? ref.getName() : displayName;\r
this.type = internalGetReferencedObjectType(refObject);\r
- this.objectId = internalGetObjectId(reference);\r
+ this.objectId = ref != null ? ref.getObjectId() : ObjectId.zeroId();\r
this.id = this.objectId.getName();\r
this.referencedObjectId = internalGetReferencedObjectId(refObject);\r
this.referencedId = this.referencedObjectId.getName();\r
return person;\r
}\r
\r
- private ObjectId internalGetObjectId(Ref reference) {\r
- return reference.getObjectId();\r
- }\r
-\r
public ObjectId getObjectId() {\r
if (objectId == null) {\r
objectId = ObjectId.fromString(id);\r
if (referencedObject instanceof RevTag) {\r
return !getReferencedObjectId().equals(getObjectId());\r
}\r
- return reference.getPeeledObjectId() != null;\r
+ return reference != null && reference.getPeeledObjectId() != null;\r
}\r
\r
public boolean isAnnotatedTag() {\r