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

desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git

commit fc71f8b6a39f234d98a3c84b814cdef069a12b0c
Author: Martin Desruisseaux <martin.desruisse...@geomatys.com>
AuthorDate: Tue Dec 12 19:29:31 2023 +0100

    Fix a NullPointerException when formatting in WKT an object using an 
identifier in an unknown namespace.
---
 .../main/org/apache/sis/metadata/internal/NameMeaning.java              | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/internal/NameMeaning.java
 
b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/internal/NameMeaning.java
index 81f2fd8c91..cb7d1dc83a 100644
--- 
a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/internal/NameMeaning.java
+++ 
b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/internal/NameMeaning.java
@@ -160,7 +160,7 @@ public final class NameMeaning extends Static {
              */
             final Citation c = Citations.fromName(key);
             codeSpace = Citations.toCodeSpace(c);
-            if (AUTHORITIES.get(codeSpace) == null) {
+            if (codeSpace == null || AUTHORITIES.get(codeSpace) == null) {
                 return null;            // Not an authority that we recognize 
for the OGC namespace.
             }
             version = getVersion(c);    // Unconditionally overwrite the 
user-specified version.

Reply via email to