Pearl1594 commented on a change in pull request #4904:
URL: https://github.com/apache/cloudstack/pull/4904#discussion_r618074990
##########
File path:
api/src/main/java/org/apache/cloudstack/api/command/user/vpn/UpdateVpnCustomerGatewayCmd.java
##########
@@ -140,6 +146,14 @@ public Boolean getDpd() {
public Boolean getEncap() { return encap; }
+ public boolean getSplitConnections() {
Review comment:
Update of VPN gateway results in an NPE if splitconnection isn't passed,
as the return type is `boolean` (primitive). We can either change this to
`Boolean` or do the null check here.
```
2021-04-22 04:23:54,483 DEBUG [c.c.a.ApiServlet]
(qtp1233705144-17:ctx-f384e62b ctx-1b68af67) (logid:5c3e9c53) ===END===
172.16.250.2 -- GET
id=10c9ef13-e7ab-4c40-8c8c-becd750f990a&name=vt2-right-gw1&gateway=10.0.52.84&cidrlist=10.2.0.0%2F24&ipsecpsk=password&ikepolicy=aes128-sha1%3Bmodp1536&ikelifetime=86400&ikeversion=ike&esppolicy=aes128-sha1&esplifetime=3600&command=updateVpnCustomerGateway&response=json
2021-04-22 04:23:54,492 ERROR [c.c.a.ApiAsyncJobDispatcher]
(API-Job-Executor-20:ctx-39e2f033 job-78) (logid:f3cdea9e) Unexpected exception
while executing
org.apache.cloudstack.api.command.user.vpn.UpdateVpnCustomerGatewayCmd
java.lang.NullPointerException
at
org.apache.cloudstack.api.command.user.vpn.UpdateVpnCustomerGatewayCmd.getSplitConnections(UpdateVpnCustomerGatewayCmd.java:150)
at
com.cloud.network.vpn.Site2SiteVpnManagerImpl.updateCustomerGateway(Site2SiteVpnManagerImpl.java:482)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]