Skip to content

Commit

Permalink
Polishing.
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-simons committed Feb 5, 2020
1 parent ded0164 commit 5d6d679
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class Neo4jConfiguration {
* If the driver should use encrypted traffic.
*/
@ConfigItem(defaultValue = "false")
public boolean encrypted = false;
public boolean encrypted;

/**
* Configure trust settings for encrypted traffic.
Expand Down Expand Up @@ -72,7 +72,7 @@ static class Authentication {
* Set this to true to disable authentication.
*/
@ConfigItem(defaultValue = "false")
public boolean disabled = false;
public boolean disabled;
}

@ConfigGroup
Expand All @@ -91,7 +91,7 @@ public enum Strategy {
* Configures which trust strategy to apply when using encrypted traffic.
*/
@ConfigItem(defaultValue = "TRUST_SYSTEM_CA_SIGNED_CERTIFICATES")
public Strategy strategy = Strategy.TRUST_SYSTEM_CA_SIGNED_CERTIFICATES;
public Strategy strategy;

/**
* The file of the certificate to use.
Expand All @@ -103,12 +103,13 @@ public enum Strategy {
* If hostname verification is used.
*/
@ConfigItem(defaultValue = "false")
public boolean hostnameVerificationEnabled = false;
public boolean hostnameVerificationEnabled;

Config.TrustStrategy toInternalRepresentation() {

Config.TrustStrategy internalRepresentation;
switch (this.strategy) {
Strategy nonNullStrategy = strategy == null ? Strategy.TRUST_SYSTEM_CA_SIGNED_CERTIFICATES : strategy;
switch (nonNullStrategy) {
case TRUST_ALL_CERTIFICATES:
internalRepresentation = Config.TrustStrategy.trustAllCertificates();
break;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.quarkus.neo4j.runtime;

import static java.util.concurrent.TimeUnit.*;
import static java.util.concurrent.TimeUnit.MILLISECONDS;

import java.util.logging.Level;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package io.quarkus.neo4j.runtime;

import static org.junit.jupiter.api.Assertions.*;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.io.IOException;
import java.nio.file.Files;
Expand Down

0 comments on commit 5d6d679

Please sign in to comment.