From 77d8c3cddaf44f65d25a066473c2f41a27b591bf Mon Sep 17 00:00:00 2001 From: Hylston Barbosa Date: Mon, 21 Aug 2023 21:36:25 -0300 Subject: [PATCH] getNote fix --- .../main/java/com/box/l10n/mojito/okapi/TextUnitUtils.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/src/main/java/com/box/l10n/mojito/okapi/TextUnitUtils.java b/common/src/main/java/com/box/l10n/mojito/okapi/TextUnitUtils.java index a128c8e560..3cb6d94010 100644 --- a/common/src/main/java/com/box/l10n/mojito/okapi/TextUnitUtils.java +++ b/common/src/main/java/com/box/l10n/mojito/okapi/TextUnitUtils.java @@ -31,9 +31,9 @@ public String getNote(ITextUnit textUnit) { if (textUnit != null) { NoteAnnotation noteAnnotation = textUnit.getAnnotation(NoteAnnotation.class); - - if (noteAnnotation == null) { - note = Objects.toString(textUnit.getProperty(NoteAnnotation.LOC_NOTE), null); + Property noteProp = textUnit.getProperty(NoteAnnotation.LOC_NOTE); + if (noteAnnotation == null || noteProp != null) { + note = Objects.toString(noteProp, null); } else { note = noteAnnotation.getNote(0).getNoteText(); }