diff --git a/maven-project/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java b/maven-project/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java index c89ba601c4..7cc1f85b20 100644 --- a/maven-project/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java +++ b/maven-project/src/main/java/org/apache/maven/profiles/DefaultProfileManager.java @@ -249,7 +249,7 @@ public class DefaultProfileManager List p; try { - p = ModelMarshaller.marshallXmlToModelProperties(new ByteArrayInputStream(writer.getBuffer().toString().getBytes()), + p = ModelMarshaller.marshallXmlToModelProperties(new ByteArrayInputStream(writer.toString().getBytes( "UTF-8" )), ProjectUri.Profiles.xUri, PomTransformer.URIS); } catch (IOException e) { throw new ProfileActivationException(e.getMessage());