From 3d0adc9f3811b1e08d68d68966c117a406709584 Mon Sep 17 00:00:00 2001 From: ChetanT-System Date: Tue, 30 Apr 2024 13:13:54 +0530 Subject: [PATCH 1/3] - CodeQL waring fix --- .../tractusx/sde/submodels/pti/PartTypeInformationV100.java | 2 +- .../org/eclipse/tractusx/sde/submodels/sp/SerialPartV300.java | 2 +- .../sde/submodels/slbab/SingleLevelBomAsBuiltV100.java | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/sde-submodules/part-type-information/src/main/java/org/eclipse/tractusx/sde/submodels/pti/PartTypeInformationV100.java b/modules/sde-submodules/part-type-information/src/main/java/org/eclipse/tractusx/sde/submodels/pti/PartTypeInformationV100.java index d7abc740d..02db7c585 100644 --- a/modules/sde-submodules/part-type-information/src/main/java/org/eclipse/tractusx/sde/submodels/pti/PartTypeInformationV100.java +++ b/modules/sde-submodules/part-type-information/src/main/java/org/eclipse/tractusx/sde/submodels/pti/PartTypeInformationV100.java @@ -38,7 +38,7 @@ public void init() { String resource = "part-type-information-v1.0.0.json"; // this is the path within the jar file - InputStream input = this.getClass().getResourceAsStream("/resources/" + resource); + InputStream input = PartTypeInformationV100.class.getResourceAsStream("/resources/" + resource); if (input == null) { // this is how we load file within editor (eg eclipse) input = this.getClass().getClassLoader().getResourceAsStream(resource); diff --git a/modules/sde-submodules/serial-part/src/main/java/org/eclipse/tractusx/sde/submodels/sp/SerialPartV300.java b/modules/sde-submodules/serial-part/src/main/java/org/eclipse/tractusx/sde/submodels/sp/SerialPartV300.java index bd4a06411..82aca96ff 100644 --- a/modules/sde-submodules/serial-part/src/main/java/org/eclipse/tractusx/sde/submodels/sp/SerialPartV300.java +++ b/modules/sde-submodules/serial-part/src/main/java/org/eclipse/tractusx/sde/submodels/sp/SerialPartV300.java @@ -38,7 +38,7 @@ public void init() { String resource = "serial-part-v3.0.0.json"; // this is the path within the jar file - InputStream input = this.getClass().getResourceAsStream("/resources/" + resource); + InputStream input = SerialPartV300.class.getResourceAsStream("/resources/" + resource); if (input == null) { // this is how we load file within editor (eg eclipse) input = this.getClass().getClassLoader().getResourceAsStream(resource); diff --git a/modules/sde-submodules/single-level-bom-as-built/src/main/java/org/eclipse/tractusx/sde/submodels/slbab/SingleLevelBomAsBuiltV100.java b/modules/sde-submodules/single-level-bom-as-built/src/main/java/org/eclipse/tractusx/sde/submodels/slbab/SingleLevelBomAsBuiltV100.java index f8689855b..99346a3ce 100644 --- a/modules/sde-submodules/single-level-bom-as-built/src/main/java/org/eclipse/tractusx/sde/submodels/slbab/SingleLevelBomAsBuiltV100.java +++ b/modules/sde-submodules/single-level-bom-as-built/src/main/java/org/eclipse/tractusx/sde/submodels/slbab/SingleLevelBomAsBuiltV100.java @@ -38,7 +38,8 @@ public void init() { String resource = "single-level-bom-as-built-v1.0.0.json"; // this is the path within the jar file - InputStream input = this.getClass().getResourceAsStream("/resources/" + resource); + //InputStream input = this.getClass().getResourceAsStream("/resources/" + resource); + InputStream input = SingleLevelBomAsBuiltV100.class.getResourceAsStream("/resources/" + resource); if (input == null) { // this is how we load file within editor (eg eclipse) input = this.getClass().getClassLoader().getResourceAsStream(resource); From 1abea977df430b108db850e7a5649e1726102b01 Mon Sep 17 00:00:00 2001 From: ChetanT-System Date: Tue, 30 Apr 2024 13:28:02 +0530 Subject: [PATCH 2/3] - codeQL warning fix --- .../tractusx/sde/submodels/slbab/SingleLevelBomAsBuiltV300.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/sde-submodules/single-level-bom-as-built/src/main/java/org/eclipse/tractusx/sde/submodels/slbab/SingleLevelBomAsBuiltV300.java b/modules/sde-submodules/single-level-bom-as-built/src/main/java/org/eclipse/tractusx/sde/submodels/slbab/SingleLevelBomAsBuiltV300.java index 0487a73a2..ec4c5dc62 100644 --- a/modules/sde-submodules/single-level-bom-as-built/src/main/java/org/eclipse/tractusx/sde/submodels/slbab/SingleLevelBomAsBuiltV300.java +++ b/modules/sde-submodules/single-level-bom-as-built/src/main/java/org/eclipse/tractusx/sde/submodels/slbab/SingleLevelBomAsBuiltV300.java @@ -37,7 +37,7 @@ public void init() { String resource = "single-level-bom-as-built-v3.0.0.json"; // this is the path within the jar file - InputStream input = this.getClass().getResourceAsStream("/resources/" + resource); + InputStream input = SingleLevelBomAsBuiltV300.class.getResourceAsStream("/resources/" + resource); if (input == null) { // this is how we load file within editor (eg eclipse) input = this.getClass().getClassLoader().getResourceAsStream(resource); From f2a4af9ed0283e8d0df4530bcde4dd115fd2b54b Mon Sep 17 00:00:00 2001 From: ChetanT-System Date: Tue, 30 Apr 2024 14:05:58 +0530 Subject: [PATCH 3/3] Merge remote-tracking branch 'origin/CX_R24.05_part_type_information' into CX_R24.05_batch_multi_version_support --- .../org/eclipse/tractusx/sde/submodels/batch/BatchV300.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/sde-submodules/batch/src/main/java/org/eclipse/tractusx/sde/submodels/batch/BatchV300.java b/modules/sde-submodules/batch/src/main/java/org/eclipse/tractusx/sde/submodels/batch/BatchV300.java index c29e6d459..4c8b78797 100644 --- a/modules/sde-submodules/batch/src/main/java/org/eclipse/tractusx/sde/submodels/batch/BatchV300.java +++ b/modules/sde-submodules/batch/src/main/java/org/eclipse/tractusx/sde/submodels/batch/BatchV300.java @@ -37,7 +37,7 @@ public void init() { String resource = "batch-v3.0.0.json"; // this is the path within the jar file - InputStream input = this.getClass().getResourceAsStream("/resources/" + resource); + InputStream input = BatchV300.class.getResourceAsStream("/resources/" + resource); if (input == null) { // this is how we load file within editor (eg eclipse) input = this.getClass().getClassLoader().getResourceAsStream(resource);