Skip to content

Commit 818c6b4

Browse files
Address reviewed comments
1 parent aa32e63 commit 818c6b4

File tree

1 file changed

+4
-8
lines changed
  • org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/parser/pom

1 file changed

+4
-8
lines changed

org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/parser/pom/PomParser.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,9 @@ public static UpdateResponse updateProperty(String projectUri, UpdatePropertyReq
100100
}
101101
}
102102
}
103-
String value;
104-
if (propertiesElement != null) {
105-
value = elementToString(propertiesElement);
106-
} else {
107-
value = elementInString.toString();
108-
}
109-
if (value == null) {
103+
String value =
104+
(propertiesElement != null) ? elementToString(propertiesElement) : elementInString.toString();
105+
if (StringUtils.isEmpty(value)) {
110106
return null;
111107
}
112108
// Add the new content inside the <properties> section
@@ -349,7 +345,7 @@ private static List<String> readPom(String projectUri) {
349345
}
350346
}
351347

352-
public static Range getPropertiesRange(List<String> pomContent) {
348+
private static Range getPropertiesRange(List<String> pomContent) {
353349
if (pomContent == null || pomContent.isEmpty()) {
354350
return null;
355351
}

0 commit comments

Comments
 (0)