felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r1807717 - /felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java
Date Fri, 08 Sep 2017 11:45:35 GMT
Author: gnodet
Date: Fri Sep  8 11:45:35 2017
New Revision: 1807717

URL: http://svn.apache.org/viewvc?rev=1807717&view=rev
Log:
[FELIX-4416] Also use the encoding when writing configurations

Modified:
    felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java

Modified: felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java
URL: http://svn.apache.org/viewvc/felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java?rev=1807717&r1=1807716&r2=1807717&view=diff
==============================================================================
--- felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java
(original)
+++ felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java
Fri Sep  8 11:45:35 2017
@@ -161,7 +161,10 @@ public class ConfigInstaller implements
                     {
                         props.remove(key);
                     }
-                    props.save( file );
+                    try (Writer fw = new OutputStreamWriter(new FileOutputStream(file), encoding()))
+                    {
+                        props.save( fw );
+                    }
                     // we're just writing out what's already loaded into ConfigAdmin, so
                     // update file checksum since lastModified gets updated when writing
                     fileInstall.updateChecksum(file);



Mime
View raw message