Netflix / Surus

Apache License 2.0
458 stars 106 forks source link

Update RAD.java to account for null isForceDiff #12

Open sumitraina opened 8 years ago

sumitraina commented 8 years ago

The constructor for the class RAD expects an optional argument for the class member isForceDiff which is a Boolean wrapper (line 46). If the argument is not passed in, the member stays null.

line 46: this.isForceDiff = Boolean.parseBoolean(parameters[3]);

This throws an NPE at line 181 where the code checks if (this.isForceDiff). line 181: } else if (this.isForceDiff) {

To overcome this, isForceDiff has to be passed at least as False.

Fix: The code should check for null at line 181 or make isForceDiff primitive for it to default to false.

Raised an issue at https://github.com/Netflix/Surus/issues/11