From 2fe7134ac2bb2f4c10a6acf0164a4653393a5612 Mon Sep 17 00:00:00 2001 From: vv770d Date: Thu, 10 Feb 2022 21:48:20 +0000 Subject: [DCAEMOD/Runtime] Fix NFE error on BP generation Change-Id: I71bb73d482221731a0355f01670b4d45720af273 Signed-off-by: vv770d Issue-ID: DCAEGEN2-3028 Issue-ID: DCAEGEN2-3077 Signed-off-by: vv770d --- .../src/main/java/org/onap/dcae/runtime/core/FlowGraphParser.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mod/runtimeapi/runtime-core/src/main/java/org/onap/dcae/runtime/core/FlowGraphParser.java') diff --git a/mod/runtimeapi/runtime-core/src/main/java/org/onap/dcae/runtime/core/FlowGraphParser.java b/mod/runtimeapi/runtime-core/src/main/java/org/onap/dcae/runtime/core/FlowGraphParser.java index 7154cae..d564550 100644 --- a/mod/runtimeapi/runtime-core/src/main/java/org/onap/dcae/runtime/core/FlowGraphParser.java +++ b/mod/runtimeapi/runtime-core/src/main/java/org/onap/dcae/runtime/core/FlowGraphParser.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2019,2022 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,7 +50,8 @@ public class FlowGraphParser { } private static int createBlueprintVersion() { - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyMMddHHmm").withZone(ZoneId.of("UTC")); + // Removed year from the text to fix invalid integer issue (DCAEGEN2-3028) + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MMddHHmm").withZone(ZoneId.of("UTC")); Instant instant = Instant.now(); String timestamp = formatter.format(instant); return Integer.parseInt(timestamp); -- cgit 1.2.3-korg