Closed Vynce closed 5 years ago
Thanks for taking a look! Those are both good points and I've removed the Java 7 change and added the Comments
class back in this commit.
I can't find any use of the Comments
class in gerrit-events or gerrit-trigger, but I suppose there may be other users of it. Let me know if you'd like me to replace its List<LineComment>
with Set<LineComment>
, similar to ReviewInput
, or mark it as deprecated or anything -- either way it doesn't have any impact on my use case.
@rsandell, ping :smile:
@rsandell, could you please take another look at this change when you get a chance?
Sorry for the delay, have a lot of other things on my plate atm.
Thanks! No worries :smile:
Exact duplicate
LineComment
s don't make sense, so add anequals()
method to theLineComment
class that compares the line number and message and changeCommentedFile
to store a Set of uniqueLineComments
instead of a List. A newCommentedFile(String fileName)
constructor can be used to create an emptyCommentedFile
object which can then be populated using theaddLineComment()
method.I also removed the unused
Comments
class and updated the minimum Java version to 7 to use theObjects.equals()
method. I can reworkLineComment.equals()
if maintaining Java 6 support really is necessary.