diff --git a/pom.xml b/pom.xml
index 7d99d13..1bc10b2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
org.springframework.boot
spring-boot-starter-parent
- 2.5.7
+ 3.0.4
com.uci
@@ -15,7 +15,7 @@
message-rosa
message-rosa for messages
- 11
+ 18
@@ -38,7 +38,9 @@
org.springframework.boot
- spring-boot-starter-validation
+ spring-boot-properties-migrator
+ 3.0.3
+ runtime
org.projectlombok
@@ -70,6 +72,12 @@
junit
test
+
+ junit
+ junit
+ 3.2.1
+ test
+
org.junit.jupiter
junit-jupiter-api
diff --git a/src/main/java/messagerosa/core/model/MessageMediaError.java b/src/main/java/messagerosa/core/model/MessageMediaError.java
index 0803329..2f80ec7 100644
--- a/src/main/java/messagerosa/core/model/MessageMediaError.java
+++ b/src/main/java/messagerosa/core/model/MessageMediaError.java
@@ -1,8 +1,8 @@
package messagerosa.core.model;
public enum MessageMediaError {
- PAYLOAD_TO_LARGE("payloadTooLarge"),
- EMPTY_RESPONSE("emptyResponse");
+ PAYLOAD_TO_LARGE("pay load Too Large"),
+ EMPTY_RESPONSE("empty Response");
private String name;
MessageMediaError(String name) {
diff --git a/src/main/java/messagerosa/utils/XMessageStylesParser.java b/src/main/java/messagerosa/utils/XMessageStylesParser.java
index 270325b..e007ee8 100644
--- a/src/main/java/messagerosa/utils/XMessageStylesParser.java
+++ b/src/main/java/messagerosa/utils/XMessageStylesParser.java
@@ -77,19 +77,32 @@ private static int seekEnd(CharSequence text, char needle, int start, int end) {
}
private static int seekHigherOrderEndWithoutNewBeginning(CharSequence text, char needle, int start, int end) {
+ int result = -1;
for (int i = start; i <= end; ++i) {
char c = text.charAt(i);
- if (c == needle && precededByWhiteSpace(text, i, start) && !followedByWhitespace(text, i, end)) {
- return -1; // new beginning
- } else if (c == needle && !Character.isWhitespace(text.charAt(i - 1)) && followedByWhitespace(text, i, end)) {
- return i;
- } else if (c == '\n') {
- return -1;
+
+ if (c == '\n') {
+ result = -1;
+ break;
+ }
+
+ boolean isNeedleChar = (c == needle);
+ boolean precededByWhitespace = precededByWhitespace(text, i, start);
+ boolean followedByWhitespace = followedByWhitespace(text, i, end);
+
+ if (isNeedleChar && precededByWhitespace && !followedByWhitespace) {
+ result = -1; // New beginning
+ break;
+ } else if (isNeedleChar && !Character.isWhitespace(text.charAt(i - 1)) && followedByWhitespace) {
+ result = i;
+ break;
}
}
- return -1;
+
+ return result;
}
+
private static int seekEndBlock(CharSequence text, char needle, int start, int end) {
for (int i = start; i <= end; ++i) {
char c = text.charAt(i);