Skip to content

Commit ea2115a

Browse files
committed
feat: address review comments
Signed-off-by: duttarnab <arnab.bdutta@gmail.com>
1 parent 86027ee commit ea2115a

1 file changed

Lines changed: 1 addition & 30 deletions

File tree

jans-cedarling/bindings/cedarling-java/docs/sample_cedarling_update_token.java

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -27,36 +27,7 @@ public class UpdateTokenCedarling implements UpdateTokenType {
2727

2828

2929
public boolean init(Map < String, SimpleCustomProperty > configurationAttributes) {
30-
log.info("UpdateTokenCedarling initialized!!!");
31-
// Check if bootstrap JSON file path is configured
32-
if (!configurationAttributes.containsKey("BOOTSTRAP_JSON_PATH")) {
33-
log.error("Initialization. Property BOOTSTRAP_JSON_PATH is not specified.");
34-
return false;
35-
}
36-
log.info("Initialize Cedarling...");
37-
38-
// Get bootstrap file path
39-
String bootstrapFilePath = configurationAttributes.get("BOOTSTRAP_JSON_PATH").getValue2();
40-
41-
String bootstrapJson = null;
42-
try {
43-
// Read bootstrap JSON from file
44-
bootstrapJson = readFile(bootstrapFilePath);
45-
// Initialize Cedarling adapter
46-
cedarlingAdapter = new CedarlingAdapter();
47-
cedarlingAdapter.loadFromJson(bootstrapJson);
48-
} catch (CedarlingException e) {
49-
log.error("Unable to initialize Cedarling: {}", e.getMessage(), e);
50-
cedarlingAdapter = null;
51-
return false;
52-
} catch (Exception e) {
53-
log.error("Unable to initialize Cedarling: {}", e.getMessage(), e);
54-
cedarlingAdapter = null;
55-
return false;
56-
}
57-
log.info("Cedarling Initialization successful...");
58-
59-
return true;
30+
return init(null, configurationAttributes);
6031
}
6132

6233
public boolean init(CustomScript customScript, Map < String, SimpleCustomProperty > configurationAttributes) {

0 commit comments

Comments
 (0)