Skip to content

Instantly share code, notes, and snippets.

@NonLogicalDev
Created June 20, 2017 08:47
Show Gist options
  • Select an option

  • Save NonLogicalDev/be70e300d4af218053e0691f4376c530 to your computer and use it in GitHub Desktop.

Select an option

Save NonLogicalDev/be70e300d4af218053e0691f4376c530 to your computer and use it in GitHub Desktop.
// Correct Indentation
if(
!inputdata.containskey("id")
&& !(
inputdata.containskey("action_id")
|| inputdata.containskey("active_alert_id")
|| inputdata.containskey("action_type")
|| inputdata.containskey("data")
)
) {
throw new illegalargumentexception("field is missing");
}
// Indentation After Pasting
if(
!inputData.containsKey("id")
&& !(
inputData.containsKey("action_id")
|| inputData.containsKey("active_alert_id")
|| inputData.containsKey("action_type")
|| inputData.containsKey("data")
)
) {
throw new IllegalArgumentException("Field is missing");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment