File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
src/env/infrastructure/digitaltwins Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -37,14 +37,18 @@ public class DigitalTwinManager implements MedicalTechnologyRepository {
37
37
38
38
private final DigitalTwinsClient dtClient ;
39
39
40
- /**
41
- * Default constructor.
42
- */
43
- public DigitalTwinManager () {
40
+ static {
41
+ // Checks on existence of environmental variable
44
42
Objects .requireNonNull (System .getenv (DT_APP_ID_VARIABLE ), "Azure client app id required" );
45
43
Objects .requireNonNull (System .getenv (DT_TENANT_VARIABLE ), "Azure tenant id required" );
46
44
Objects .requireNonNull (System .getenv (DT_APP_SECRET_VARIABLE ), "Azure client secret id required" );
47
45
Objects .requireNonNull (System .getenv (DT_ENDPOINT_VARIABLE ), "Azure dt endpoint required" );
46
+ }
47
+
48
+ /**
49
+ * Default constructor.
50
+ */
51
+ public DigitalTwinManager () {
48
52
this .dtClient = new DigitalTwinsClientBuilder ()
49
53
.credential (new DefaultAzureCredentialBuilder ().build ())
50
54
.endpoint (System .getenv (DT_ENDPOINT_VARIABLE ))
You can’t perform that action at this time.
0 commit comments