Skip to content

Commit

Permalink
Java: Avoid some compiler and deprecation warnings
Browse files Browse the repository at this point in the history
Change: 149554731
  • Loading branch information
asimshankar authored and tensorflower-gardener committed Mar 8, 2017
1 parent b599278 commit b2a4a7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tensorflow/java/src/main/native/exception_jni.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ limitations under the License.
extern "C" {
#endif

class TF_Status;
struct TF_Status;

extern const char kIllegalArgumentException[];
extern const char kIllegalStateException[];
Expand Down
5 changes: 3 additions & 2 deletions tensorflow/java/src/test/java/org/tensorflow/SessionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

package org.tensorflow;

import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
Expand All @@ -39,7 +40,7 @@ public void run() {
new AutoCloseableList<Tensor>(s.runner().feed("X", x).fetch("Y").run())) {
assertEquals(1, outputs.size());
final int[][] expected = {{31}};
assertEquals(expected, outputs.get(0).copyTo(new int[1][1]));
assertArrayEquals(expected, outputs.get(0).copyTo(new int[1][1]));
}
}
}
Expand All @@ -60,7 +61,7 @@ public void runWithMetadata() {
AutoCloseableList<Tensor> outputs = new AutoCloseableList<Tensor>(result.outputs);
assertEquals(1, outputs.size());
final int[][] expected = {{31}};
assertEquals(expected, outputs.get(0).copyTo(new int[1][1]));
assertArrayEquals(expected, outputs.get(0).copyTo(new int[1][1]));
// Sanity check on metadatar
// See comments in fullTraceRunOptions() for an explanation about
// why this check is really silly. Ideally, this would be:
Expand Down

0 comments on commit b2a4a7d

Please sign in to comment.