aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/traccar/web/WebServerTest.java
diff options
context:
space:
mode:
authorkamaci <furkankamaci@gmail.com>2020-10-19 00:01:12 +0300
committerkamaci <furkankamaci@gmail.com>2020-10-19 00:01:12 +0300
commit3cd7831692b1725713e297372a0181e5ae614eb9 (patch)
tree46725cd3575e53ff9ff40b44236b34a323f804ac /src/test/java/org/traccar/web/WebServerTest.java
parent98c2e3da5ea0670360078a3f278ddef7d9e39953 (diff)
downloadtrackermap-server-3cd7831692b1725713e297372a0181e5ae614eb9.tar.gz
trackermap-server-3cd7831692b1725713e297372a0181e5ae614eb9.tar.bz2
trackermap-server-3cd7831692b1725713e297372a0181e5ae614eb9.zip
Anonymous types are replaced with lambda.
Diffstat (limited to 'src/test/java/org/traccar/web/WebServerTest.java')
-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);