Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/main/java/com/basho/riak/pbc/RiakObject.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/**
* This file is part of riak-java-pb-client
* This file is part of riak-java-pb-client
*
* Copyright (c) 2010 by Trifork
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
Expand Down Expand Up @@ -56,7 +56,7 @@ public class RiakObject {
this.charset = str(content.getCharset());
this.contentEncoding = str(content.getContentEncoding());
this.vtag = str(content.getVtag());
this.links = content.getLinksCount() == 0
this.links = content.getLinksCount() == 0
? Collections.synchronizedList(new ArrayList<RiakLink>())
: Collections.synchronizedList(RiakLink.decode(content.getLinksList()));

Expand Down Expand Up @@ -133,7 +133,7 @@ public ByteString getValue(){
}

RpbContent buildContent() {
Builder b =
Builder b =
RpbContent.newBuilder()
.setValue(value);

Expand Down Expand Up @@ -196,5 +196,9 @@ public void addLink(String tag, String bucket, String key) {
public void addLink(ByteString tag, ByteString bucket, ByteString key) {
links.add(new RiakLink(bucket, key, tag));
}

public List<RiakLink> getLinks() {
return links != null ? Collections.unmodifiableList(links) : Collections.EMPTY_LIST;
}

}