mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-06 00:00:47 -04:00
android: Catch exception if numbers are too large for Integer
This commit is contained in:
parent
a046f929ce
commit
6294f28bd3
@ -623,7 +623,14 @@ public class VpnProfileDetailActivity extends AppCompatActivity
|
||||
private Integer getInteger(EditText view)
|
||||
{
|
||||
String value = view.getText().toString().trim();
|
||||
return value.isEmpty() ? null : Integer.valueOf(value);
|
||||
try
|
||||
{
|
||||
return value.isEmpty() ? null : Integer.valueOf(value);
|
||||
}
|
||||
catch (NumberFormatException e)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private class SelectUserCertOnClickListener implements OnClickListener, KeyChainAliasCallback
|
||||
|
Loading…
x
Reference in New Issue
Block a user