Skip to content

Commit b2a4a7d

Browse files
asimshankartensorflower-gardener
authored andcommitted
Java: Avoid some compiler and deprecation warnings
Change: 149554731
1 parent b599278 commit b2a4a7d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tensorflow/java/src/main/native/exception_jni.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ limitations under the License.
2222
extern "C" {
2323
#endif
2424

25-
class TF_Status;
25+
struct TF_Status;
2626

2727
extern const char kIllegalArgumentException[];
2828
extern const char kIllegalStateException[];

tensorflow/java/src/test/java/org/tensorflow/SessionTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
package org.tensorflow;
1717

18+
import static org.junit.Assert.assertArrayEquals;
1819
import static org.junit.Assert.assertEquals;
1920
import static org.junit.Assert.assertTrue;
2021
import static org.junit.Assert.fail;
@@ -39,7 +40,7 @@ public void run() {
3940
new AutoCloseableList<Tensor>(s.runner().feed("X", x).fetch("Y").run())) {
4041
assertEquals(1, outputs.size());
4142
final int[][] expected = {{31}};
42-
assertEquals(expected, outputs.get(0).copyTo(new int[1][1]));
43+
assertArrayEquals(expected, outputs.get(0).copyTo(new int[1][1]));
4344
}
4445
}
4546
}
@@ -60,7 +61,7 @@ public void runWithMetadata() {
6061
AutoCloseableList<Tensor> outputs = new AutoCloseableList<Tensor>(result.outputs);
6162
assertEquals(1, outputs.size());
6263
final int[][] expected = {{31}};
63-
assertEquals(expected, outputs.get(0).copyTo(new int[1][1]));
64+
assertArrayEquals(expected, outputs.get(0).copyTo(new int[1][1]));
6465
// Sanity check on metadatar
6566
// See comments in fullTraceRunOptions() for an explanation about
6667
// why this check is really silly. Ideally, this would be:

0 commit comments

Comments
 (0)