diff options
author | Parménides GV <parmegv@sdf.org> | 2015-03-24 19:07:43 +0100 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2015-03-24 19:07:43 +0100 |
commit | b87f082fe0e9c05cf45c56b510a2c4000133b572 (patch) | |
tree | 76a035cef8dc08b159eb19399fc0a823143d6742 /app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java | |
parent | 9bb172e96cfd741e528e692118ee32fc609c6da8 (diff) |
Indent everything with IntelliJ
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java b/app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java index 8b1bc793..0b9c5832 100644 --- a/app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java +++ b/app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java @@ -17,7 +17,9 @@ package se.leap.bitmaskclient.eip; import org.json.*; + import java.util.*; + import se.leap.bitmaskclient.*; public class VpnConfigGenerator { @@ -50,7 +52,7 @@ public class VpnConfigGenerator { String common_options = ""; try { Iterator keys = general_configuration.keys(); - while ( keys.hasNext() ){ + while (keys.hasNext()) { String key = keys.next().toString(); common_options += key + " "; @@ -83,11 +85,11 @@ public class VpnConfigGenerator { String ip_address = gateway.getString(ip_address_keyword); JSONObject capabilities = gateway.getJSONObject(capabilities_keyword); JSONArray ports = capabilities.getJSONArray(ports_keyword); - for (int i=0; i<ports.length(); i++) { + for (int i = 0; i < ports.length(); i++) { String port_specific_remotes = ""; int port = ports.getInt(i); JSONArray protocols = capabilities.getJSONArray(protocol_keyword); - for ( int j=0; j<protocols.length(); j++ ) { + for (int j = 0; j < protocols.length(); j++) { String protocol = protocols.optString(j); String new_remote = remote_keyword + " " + ip_address + " " + port + " " + protocol + new_line; @@ -129,7 +131,7 @@ public class VpnConfigGenerator { + "</cert>"; return ca + new_line + key + new_line + openvpn_cert; - } catch(JSONException e) { + } catch (JSONException e) { e.printStackTrace(); return ""; } |