From 600d4b5c7f4f409dfbc5071aae2fc912de62a782 Mon Sep 17 00:00:00 2001 From: axelberndt Date: Wed, 27 Nov 2024 15:47:19 +0100 Subject: [PATCH] v0.11.1 - Small fix in class `meico.mei.Mei2MusicXmlConverter` to address issue #30. --- history.md | 4 ++++ src/meico/Meico.java | 2 +- src/meico/mei/Mei2MusicXmlConverter.java | 3 +-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/history.md b/history.md index 58d07fbc..f0374b56 100644 --- a/history.md +++ b/history.md @@ -1,6 +1,10 @@ ### Version History +#### v0.11.1 +- Small fix in class `meico.mei.Mei2MusicXmlConverter` to address issue #30. + + #### v0.11.0 - Added file `/resources/minimal.mei` which is used by constructor `meico.mei.Mei.Mei()` to instantiate an empty Mei object. The object now contains an MEI with no meaningful content, but when writing it to a file it is valid now. Using this constructor will now require exception handling! diff --git a/src/meico/Meico.java b/src/meico/Meico.java index a0e429b8..829436db 100644 --- a/src/meico/Meico.java +++ b/src/meico/Meico.java @@ -5,7 +5,7 @@ * @author Axel Berndt */ public class Meico { - public static final String version = "0.11.0"; + public static final String version = "0.11.1"; public static void main(String[] args) { System.out.println("meico v" + Meico.version); diff --git a/src/meico/mei/Mei2MusicXmlConverter.java b/src/meico/mei/Mei2MusicXmlConverter.java index b8208ff4..df248559 100644 --- a/src/meico/mei/Mei2MusicXmlConverter.java +++ b/src/meico/mei/Mei2MusicXmlConverter.java @@ -1,6 +1,5 @@ package meico.mei; -import com.sun.xml.internal.ws.util.StringUtils; import meico.musicxml.MusicXml; import nu.xom.*; import org.audiveris.proxymusic.*; @@ -1386,7 +1385,7 @@ private void addToSource(Element e){ if(val == null || val.isEmpty()) {return;} val = this.sanitize(val.trim()); StringBuilder addressBuilder = new StringBuilder(); - addressBuilder.insert(0, StringUtils.capitalize(e.getLocalName()) + ":"); // Distributor and Address have very similar children + addressBuilder.insert(0, Character.toUpperCase(e.getLocalName().charAt(0)) + e.getLocalName().substring(1) + ":"); // Distributor and Address have very similar children addressBuilder.append(this.endLine); addressBuilder.append(val).append(this.endLine); this.sourceBuilder.append(addressBuilder);