aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/traccar/web
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-10-18 14:32:51 -0700
committerGitHub <noreply@github.com>2020-10-18 14:32:51 -0700
commit0d5dd20257ab5a4c77ff628b67e6d54931d8ae16 (patch)
tree9c5be8d286ef0f2244329d60385e9e8f1fef6fbd /src/test/java/org/traccar/web
parenta9f5599a1ae18279339a7ff17058d40b9ed4fab4 (diff)
parent3ad889413e4b13d2dd6a2aa6454964dd9427fb28 (diff)
downloadtrackermap-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.java9
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);