Fix locale usage

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld
2018-12-11 03:47:32 +01:00
parent b514717076
commit dc2463a0ab
12 changed files with 35 additions and 49 deletions
@@ -24,7 +24,6 @@ import com.wireguard.config.ParseException;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Locale;
import java.util.Objects;
public class ConfigNamingDialogFragment extends DialogFragment {
@@ -69,8 +68,7 @@ public class ConfigNamingDialogFragment extends DialogFragment {
try {
config = Config.parse(new ByteArrayInputStream(getArguments().getString(KEY_CONFIG_TEXT).getBytes(StandardCharsets.UTF_8)));
} catch (final IOException | ParseException exception) {
throw new RuntimeException(String.format(Locale.getDefault(),
getResources().getString(R.string.invalid_config_error), getClass().getSimpleName()), exception);
throw new RuntimeException(getResources().getString(R.string.invalid_config_error, getClass().getSimpleName()), exception);
}
}