Index: adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/Subscriptions.java |
=================================================================== |
--- a/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/Subscriptions.java |
+++ b/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/engine/Subscriptions.java |
@@ -22,16 +22,17 @@ import java.io.File; |
import java.io.FileOutputStream; |
import java.io.IOException; |
import java.io.OutputStreamWriter; |
import java.nio.charset.StandardCharsets; |
import java.util.ArrayList; |
import java.util.HashMap; |
import java.util.HashSet; |
import java.util.List; |
+import java.util.Locale; |
import java.util.Map; |
import org.adblockplus.sbrowser.contentblocker.engine.Subscription.Type; |
import android.util.Log; |
/** |
* This class holds all listed subscriptions and manages the subscription |
@@ -64,17 +65,17 @@ final class Subscriptions |
{ |
return this.wasUnitialized; |
} |
public File createAndWriteFile() throws IOException |
{ |
for (;;) |
{ |
- final File file = new File(this.cacheFolder, String.format("tmp-%d.txt", |
+ final File file = new File(this.cacheFolder, String.format(Locale.ENGLISH, "tmp-%d.txt", |
anton
2017/06/02 07:39:56
what's a purpose of setting locale explicitly?
diegocarloslima
2017/06/02 21:03:42
Mainly because it produces a Lint warning: Implici
|
(int) (Math.random() * 1e8))); |
if (!file.exists()) |
{ |
Log.d(TAG, "Writing filters to " + file); |
this.writeFile(file); |
return file; |
} |
} |