Skip to content

Commit

Permalink
Cleanup TODOs and add comment to changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
tneale-gt committed Oct 27, 2021
1 parent 7b5d01c commit f6c198a
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 19 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# 1.10.5

* Added various symbolic expression attributes.
* Updated Java API

# 1.10.4

Expand Down
2 changes: 0 additions & 2 deletions java/com/grammatech/gtirb/ByteBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
*
*/

/* TODO Must be able to retrieve address, unless byte interval has no address */

package com.grammatech.gtirb;

import com.grammatech.gtirb.proto.ByteIntervalOuterClass;
Expand Down
9 changes: 0 additions & 9 deletions java/com/grammatech/gtirb/ByteInterval.java
Original file line number Diff line number Diff line change
Expand Up @@ -764,16 +764,7 @@ public ByteIntervalOuterClass.ByteInterval.Builder toProtobuf() {
symbolicExpression.getOffset(),
protoSymbolicExpression.build());
}

// // Get bytes as byte array then convert to ByteString
// // !TODO Storing bytes as ArrayList<Byte> is very inefficient,
// // find out why this is being done this way and fix it
// byte[] contents = new byte[this.bytes.size()];
// for (int i = 0; i < this.bytes.size(); i++) {
// contents[i] = this.bytes.get(i).byteValue();
// }
protoByteInterval.setContents(ByteString.copyFrom(this.bytes));

return protoByteInterval;
}
}
2 changes: 1 addition & 1 deletion java/com/grammatech/gtirb/CodeBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class CodeBlock extends ByteBlock {
*/
public CodeBlock(ByteIntervalOuterClass.Block protoBlock,
ByteInterval byteInterval) {
// TODO Could verify that this protoBlock IS code
// Could verify that this protoBlock is really Code.
super(protoBlock, byteInterval);
CodeBlockOuterClass.CodeBlock protoCodeBlock = protoBlock.getCode();
this.uuid = Util.byteStringToUuid(protoCodeBlock.getUuid());
Expand Down
2 changes: 1 addition & 1 deletion java/com/grammatech/gtirb/DataBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class DataBlock extends ByteBlock {
*/
public DataBlock(ByteIntervalOuterClass.Block protoBlock,
ByteInterval byteInterval) {
// Could verify that his protoBlock is really Data.
// Could verify that this protoBlock is really Data.
super(protoBlock, byteInterval);
DataBlockOuterClass.DataBlock protoDataBlock = protoBlock.getData();
this.uuid = Util.byteStringToUuid(protoDataBlock.getUuid());
Expand Down
7 changes: 1 addition & 6 deletions java/com/grammatech/gtirb/Node.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,7 @@ public class Node {
/**
* Default constructor
*/
public Node() {
// TODO: Assign a new UUID here.
// (However, so far I am only working with objects that have already
// been created,
// so would only have to be replaced with the correct UUID.)
}
public Node() {}

/**
* Find a node using its UUID.
Expand Down

0 comments on commit f6c198a

Please sign in to comment.