From 2d5441826e30199813ff91ef2f27489967279a60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sim=C3=A3o=20Teixeira?= <46305234+srfteixeira@users.noreply.github.com> Date: Thu, 23 May 2024 11:11:57 +0200 Subject: [PATCH] Fix case sensitive extensions in ZipIRIMapper Fix case sensitive extensions in ZipIRIMapper Fixes #1140 --- .../java/org/semanticweb/owlapi/util/ZipIRIMapper.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/src/main/java/org/semanticweb/owlapi/util/ZipIRIMapper.java b/api/src/main/java/org/semanticweb/owlapi/util/ZipIRIMapper.java index 6f7871b5e7..70b5350291 100644 --- a/api/src/main/java/org/semanticweb/owlapi/util/ZipIRIMapper.java +++ b/api/src/main/java/org/semanticweb/owlapi/util/ZipIRIMapper.java @@ -209,21 +209,21 @@ protected void parseIfExtensionSupported(ZipFile file, ZipEntry e, String baseIR } IRI physicalIRI = IRI.create(baseIRI + name); String extension = name.substring(lastIndexOf); - if (".obo".equals(extension)) { + if (".obo".equalsIgnoreCase(extension)) { oboFileMap.put(name, physicalIRI); } else { try (InputStream in = file.getInputStream(e)) { - if (".ofn".equals(extension)) { + if (".ofn".equalsIgnoreCase(extension)) { IRI logical = parseFSSFile(in); if (logical != null) { ontologyIRI2PhysicalURIMap.put(logical, physicalIRI); } - } else if (".omn".equals(extension)) { + } else if (".omn".equalsIgnoreCase(extension)) { IRI logical = parseManchesterSyntaxFile(in); if (logical != null) { ontologyIRI2PhysicalURIMap.put(logical, physicalIRI); } - } else if (fileExtensions.contains(extension)) { + } else if (fileExtensions.contains(extension.toLowerCase())) { IRI logical = parseFile(in); if (logical != null) { ontologyIRI2PhysicalURIMap.put(logical, physicalIRI);