Fix typo that results in a null pointer

The old implementation uses a bitwise comparison 
that will validate both statements and will result
in a null pointer. The fix will do a
 logic comparison that will return if the first 
statement is null
This commit is contained in:
Jesse Kerkhoven 2019-06-20 22:54:58 +02:00
parent 21a66363d4
commit dbd0fe8da3
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ public class WaitForChargingStatusRes extends ClientState {
* a MeteringReceiptRequest. If no TLS is used, a MeteringReceiptRequest may not be sent because
* a signature cannot be applied without private key of the contract certificate.
*/
if (chargingStatusRes.isReceiptRequired() != null & chargingStatusRes.isReceiptRequired() && getCommSessionContext().isTlsConnection()) {
if (chargingStatusRes.isReceiptRequired() != null && chargingStatusRes.isReceiptRequired() && getCommSessionContext().isTlsConnection()) {
MeteringReceiptReqType meteringReceiptReq = new MeteringReceiptReqType();
/*
* Experience from the test symposium in San Diego (April 2016):