Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace 2 deprecated methods in tests #1265

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
package org.eclipse.milo.opcua.sdk.server.api.config;

import java.io.IOException;
import java.nio.file.Files;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;

import com.google.common.io.Files;
import org.eclipse.milo.opcua.sdk.server.identity.AnonymousIdentityValidator;
import org.eclipse.milo.opcua.stack.core.security.DefaultCertificateManager;
import org.eclipse.milo.opcua.stack.core.security.DefaultTrustListManager;
Expand All @@ -29,7 +29,7 @@ public class OpcUaServerConfigTest {

@Test
public void testCopy() throws IOException {
DefaultTrustListManager trustListManager = new DefaultTrustListManager(Files.createTempDir());
DefaultTrustListManager trustListManager = new DefaultTrustListManager(Files.createTempDirectory("OpcUaServerConfigTest.testCopy").toFile());

ScheduledExecutorService scheduledExecutorService = Executors.newSingleThreadScheduledExecutor();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public void testScanSettingsJson() {
" \"LocationType\": 0\n" +
"}";

JsonObject scanSettings = new JsonParser().parse(json).getAsJsonObject();
JsonObject scanSettings = JsonParser.parseString(json).getAsJsonObject();

OpcUaBinaryDataTypeCodec<Object> codec = getCodec("ScanSettings");

Expand Down