This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ant-antlibs-cyclonedx.git


The following commit(s) were added to refs/heads/main by this push:
     new e9b0e88  fix locating of Antlib jar for tool information
e9b0e88 is described below

commit e9b0e88241cbab6fc5f384ef08a9d9272ac24093
Author: Stefan Bodewig <[email protected]>
AuthorDate: Sun Jun 7 07:50:06 2026 +0200

    fix locating of Antlib jar for tool information
    
    I've written too much C# lately, it seems
---
 changes.xml                                     | 4 ++++
 src/main/org/apache/ant/cyclonedx/ToolData.java | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/changes.xml b/changes.xml
index 6c49bc1..573cc4d 100644
--- a/changes.xml
+++ b/changes.xml
@@ -54,6 +54,10 @@
 
       This behavior can be suppressed by an attribute.
     </action>
+    <action type="fix">
+      metadata.tools.component of generated SBOMs now contains hashes
+      of ant-cyclonedx as has been intended originally.
+    </action>
   </release>
 
   <release version="0.1" date="2026-06-03" description="initial release">
diff --git a/src/main/org/apache/ant/cyclonedx/ToolData.java 
b/src/main/org/apache/ant/cyclonedx/ToolData.java
index e207e9b..f48abd2 100644
--- a/src/main/org/apache/ant/cyclonedx/ToolData.java
+++ b/src/main/org/apache/ant/cyclonedx/ToolData.java
@@ -121,7 +121,7 @@ class ToolData {
             return null;
         }
         URL location = antlibSource.getLocation();
-        if (location.getProtocol() == "file") {
+        if ("file".equals(location.getProtocol())) {
             return new File(location.getPath());
         }
         return null;

Reply via email to