diff options
author | gjoranv <gv@oath.com> | 2018-04-27 16:59:06 +0200 |
---|---|---|
committer | gjoranv <gv@oath.com> | 2018-04-27 17:02:06 +0200 |
commit | e3e513265500f312749fe21e4749d56f16c2ebf7 (patch) | |
tree | b1579bf0d3fad7bd466f7b132e4549fb41f25a6a /vespalog/src/test/java | |
parent | d4b439db293bc08f6b7d323dec4d1b8698af93fc (diff) |
Allow building with Java 9.
- Must suppress deprecation warning for unit tests because
LogRecord.setInstant() is new for Java 9.
Diffstat (limited to 'vespalog/src/test/java')
3 files changed, 6 insertions, 0 deletions
diff --git a/vespalog/src/test/java/com/yahoo/log/LogSetupTestCase.java b/vespalog/src/test/java/com/yahoo/log/LogSetupTestCase.java index 70eb65b1463..d476b111e4f 100644 --- a/vespalog/src/test/java/com/yahoo/log/LogSetupTestCase.java +++ b/vespalog/src/test/java/com/yahoo/log/LogSetupTestCase.java @@ -20,6 +20,8 @@ import static org.hamcrest.CoreMatchers.is; * * @author Bjorn Borud */ +// TODO: Remove annotation and replace setMillis with setInstant when we don't support Java 8 anymore. +@SuppressWarnings("deprecation") public class LogSetupTestCase { // For testing zookeeper log records protected static LogRecord zookeeperLogRecord; diff --git a/vespalog/src/test/java/com/yahoo/log/VespaFormatterTestCase.java b/vespalog/src/test/java/com/yahoo/log/VespaFormatterTestCase.java index 5dac2e34786..9da71b2ad2e 100644 --- a/vespalog/src/test/java/com/yahoo/log/VespaFormatterTestCase.java +++ b/vespalog/src/test/java/com/yahoo/log/VespaFormatterTestCase.java @@ -14,6 +14,8 @@ import static org.hamcrest.CoreMatchers.is; /** * @author Bjorn Borud */ +// TODO: Remove annotation and replace setMillis with setInstant when we don't support Java 8 anymore. +@SuppressWarnings("deprecation") public class VespaFormatterTestCase { private String hostname; diff --git a/vespalog/src/test/java/com/yahoo/log/VespaLogHandlerTestCase.java b/vespalog/src/test/java/com/yahoo/log/VespaLogHandlerTestCase.java index 3e51d194a5e..5cbd130c05a 100644 --- a/vespalog/src/test/java/com/yahoo/log/VespaLogHandlerTestCase.java +++ b/vespalog/src/test/java/com/yahoo/log/VespaLogHandlerTestCase.java @@ -20,6 +20,8 @@ import static org.junit.Assert.*; /** * @author Bjorn Borud */ +// TODO: Remove annotation and replace setMillis with setInstant when we don't support Java 8 anymore. +@SuppressWarnings("deprecation") public class VespaLogHandlerTestCase { protected static String hostname; protected static String pid; |