This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git
The following commit(s) were added to refs/heads/main by this push:
new f8e793a Fix compilation issue
f8e793a is described below
commit f8e793a07f07d0b3a55586b2635c25115c290a1a
Author: Mark Thomas <[email protected]>
AuthorDate: Mon Apr 17 20:29:43 2023 +0100
Fix compilation issue
StringBuffer is fine here. It is a local variable.
---
src/main/java/org/apache/tomcat/jakartaee/ManifestConverter.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/apache/tomcat/jakartaee/ManifestConverter.java
b/src/main/java/org/apache/tomcat/jakartaee/ManifestConverter.java
index f3516ab..63aef73 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/ManifestConverter.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/ManifestConverter.java
@@ -130,7 +130,7 @@ public class ManifestConverter implements Converter {
// Update package names in values
for (Entry<Object,Object> entry : attributes.entrySet()) {
String newValue = profile.convert((String) entry.getValue());
- newValue = replaceVersion(newValue);
+ newValue = replaceVersion(newValue);
// Object comparison is deliberate
if (newValue != entry.getValue()) {
entry.setValue(newValue);
@@ -139,15 +139,15 @@ public class ManifestConverter implements Converter {
}
return converted;
}
-
+
private String replaceVersion(String entryValue) {
if (entryValue.contains("jakarta.servlet")) {
- StringBuilder builder = new StringBuilder();
+ StringBuffer builder = new StringBuffer();
Matcher matcher =
Pattern.compile("jakarta.servlet([^,]*);version=\"(.*?)\"").matcher(entryValue);
while (matcher.find()) {
matcher.appendReplacement(builder,
"jakarta.servlet$1;version=\"[5.0.0,7.0.0)\"");
}
- matcher.appendTail(builder);
+ matcher.appendTail(builder);
return builder.toString();
}
return entryValue;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]