If the guideline said Guideline 5-1 / INPUT-1: Validate inputs
what is the purpose of
private boolean validate(BalanceSheeData bsd){ //check validity and return true false accordingly }
is not validate before of use ?
public void process(BalanceSheeData bsd){
if(validate(bsd)) { doSomething(bsd.clone()); }
}
About Question enthuware.ocpjp.v11.2.3411 :
Moderator: admin
-
- Posts: 10
- Joined: Fri Nov 18, 2016 5:48 pm
- Contact:
-
- Site Admin
- Posts: 10061
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v11.2.3411 :
Sorry, I did not understand your question.
The correct option (option 1) is talking about cloning the object before validation. So, you clone the input object, and use that clone for validation and further use.
The correct option (option 1) is talking about cloning the object before validation. So, you clone the input object, and use that clone for validation and further use.
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: No registered users and 101 guests