diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-10-18 14:32:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-18 14:32:51 -0700 |
commit | 0d5dd20257ab5a4c77ff628b67e6d54931d8ae16 (patch) | |
tree | 9c5be8d286ef0f2244329d60385e9e8f1fef6fbd /src/test/java/org/traccar/web | |
parent | a9f5599a1ae18279339a7ff17058d40b9ed4fab4 (diff) | |
parent | 3ad889413e4b13d2dd6a2aa6454964dd9427fb28 (diff) | |
download | trackermap-server-0d5dd20257ab5a4c77ff628b67e6d54931d8ae16.tar.gz trackermap-server-0d5dd20257ab5a4c77ff628b67e6d54931d8ae16.tar.bz2 trackermap-server-0d5dd20257ab5a4c77ff628b67e6d54931d8ae16.zip |
Merge pull request #4584 from kamaci/master
Anonymous types are replaced with lambda
Diffstat (limited to 'src/test/java/org/traccar/web')
-rw-r--r-- | src/test/java/org/traccar/web/WebServerTest.java | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/test/java/org/traccar/web/WebServerTest.java b/src/test/java/org/traccar/web/WebServerTest.java index 5a79fbac2..ba4124e44 100644 --- a/src/test/java/org/traccar/web/WebServerTest.java +++ b/src/test/java/org/traccar/web/WebServerTest.java @@ -6,8 +6,6 @@ import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import javax.sql.DataSource; -import java.lang.reflect.InvocationHandler; -import java.lang.reflect.Method; import java.lang.reflect.Proxy; public class WebServerTest { @@ -15,12 +13,7 @@ public class WebServerTest { @Test public void contextTest() throws NamingException { DataSource mockDataSource = (DataSource) Proxy.newProxyInstance(getClass().getClassLoader(), - new Class[] { DataSource.class }, new InvocationHandler() { - @Override - public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { - return null; - } - }); + new Class[]{DataSource.class}, (proxy, method, args) -> null); Context context = new InitialContext(); context.bind("java:/DefaultDS", mockDataSource); |