You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ro...@apache.org on 2013/07/12 10:55:04 UTC
svn commit: r1502481 -
/lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/CorePropertiesLocator.java
Author: romseygeek
Date: Fri Jul 12 08:55:04 2013
New Revision: 1502481
URL: http://svn.apache.org/r1502481
Log:
SOLR-4914: Use Properties.store(OutputStream, String) for back compatibility
Modified:
lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/CorePropertiesLocator.java
Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/CorePropertiesLocator.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/CorePropertiesLocator.java?rev=1502481&r1=1502480&r2=1502481&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/CorePropertiesLocator.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/CorePropertiesLocator.java Fri Jul 12 08:55:04 2013
@@ -17,7 +17,6 @@ package org.apache.solr.core;
* limitations under the License.
*/
-import com.google.common.base.Charsets;
import com.google.common.collect.Lists;
import org.apache.solr.common.SolrException;
import org.apache.solr.util.IOUtils;
@@ -29,8 +28,6 @@ import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
import java.util.Date;
import java.util.List;
import java.util.Properties;
@@ -79,9 +76,7 @@ public class CorePropertiesLocator imple
OutputStream os = null;
try {
os = new FileOutputStream(propfile);
- Writer writer = new OutputStreamWriter(os, Charsets.UTF_8);
- p.store(writer, "Written by CorePropertiesLocator on " + new Date());
- writer.close();
+ p.store(os, "Written by CorePropertiesLocator on " + new Date());
}
catch (IOException e) {
logger.error("Couldn't persist core properties to {}: {}", propfile.getAbsolutePath(), e);