Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

Commit

Permalink
GIRAPH-37. Compilation failures on type problem fixes (continued from
Browse files Browse the repository at this point in the history
previous commit).

git-svn-id: https://svn.apache.org/repos/asf/incubator/giraph/trunk@1336361 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
aching committed May 9, 2012
1 parent 72bea81 commit 27c3bfb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
Expand Up @@ -82,12 +82,12 @@ public void readFields(DataInput input) throws IOException {
int vertexIdMessagesSize = input.readInt();
vertexIdMessages = Maps.newHashMapWithExpectedSize(vertexIdMessagesSize);
for (int i = 0; i < vertexIdMessagesSize; ++i) {
I vertexId = BspUtils.createVertexIndex(conf);
I vertexId = BspUtils.<I>createVertexIndex(conf);
vertexId.readFields(input);
int messageCount = input.readInt();
List<M> messageList = Lists.newArrayListWithCapacity(messageCount);
for (int j = 0; j < messageCount; ++j) {
M message = BspUtils.createMessageValue(conf);
M message = BspUtils.<M>createMessageValue(conf);
message.readFields(input);
messageList.add(message);
}
Expand Down
Expand Up @@ -80,7 +80,7 @@ public void readFields(DataInput input) throws IOException {
int vertexIdMutationsSize = input.readInt();
vertexIdMutations = Maps.newHashMapWithExpectedSize(vertexIdMutationsSize);
for (int i = 0; i < vertexIdMutationsSize; ++i) {
I vertexId = BspUtils.createVertexIndex(conf);
I vertexId = BspUtils.<I>createVertexIndex(conf);
vertexId.readFields(input);
VertexMutations<I, V, E, M> vertexMutations =
new VertexMutations<I, V, E, M>();
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/org/apache/giraph/graph/Edge.java
Expand Up @@ -102,12 +102,11 @@ public String toString() {
", edgeValue = " + edgeValue + ")";
}

@SuppressWarnings("unchecked")
@Override
public void readFields(DataInput input) throws IOException {
destVertexId = (I) BspUtils.createVertexIndex(getConf());
destVertexId = BspUtils.<I>createVertexIndex(getConf());
destVertexId.readFields(input);
edgeValue = (E) BspUtils.createEdgeValue(getConf());
edgeValue = BspUtils.<E>createEdgeValue(getConf());
edgeValue.readFields(input);
}

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/apache/giraph/graph/VertexMutations.java
Expand Up @@ -92,15 +92,15 @@ public void readFields(DataInput input) throws IOException {
removedVertexCount = input.readInt();
int addedEdgeListSize = input.readInt();
for (int i = 0; i < addedEdgeListSize; ++i) {
I destVertex = BspUtils.createVertexIndex(conf);
I destVertex = BspUtils.<I>createVertexIndex(conf);
destVertex.readFields(input);
E edgeValue = BspUtils.createEdgeValue(conf);
E edgeValue = BspUtils.<E>createEdgeValue(conf);
edgeValue.readFields(input);
addedEdgeList.add(new Edge<I, E>(destVertex, edgeValue));
}
int removedEdgeListSize = input.readInt();
for (int i = 0; i < removedEdgeListSize; ++i) {
I removedEdge = BspUtils.createVertexIndex(conf);
I removedEdge = BspUtils.<I>createVertexIndex(conf);
removedEdge.readFields(input);
removedEdgeList.add(removedEdge);
}
Expand Down

0 comments on commit 27c3bfb

Please sign in to comment.