This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

what is retBoolean  RSS feed

 
Ed Jalbert
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was wondering what retBoolean really is, forgive me if it is obvious I was breaking it down to return true or false.

I use an integration application based on JAVA and want to do the following
psudo code

retBoolean=true
if a value a equals(somevalue)
then
do nothing continue to process
else
log ("value not correct")
return retBoolean

My thoughts are that as it goes down the code if the value is not the value listed then by returning retBoolean the data is not processed.

I had been using a throw to throw a new exception but because these exceptions write to a error file I really do not want to use the throw but thought about using a logger statement instead of the throw and the retBoolean to reset for the next message coming in.

Thanks,
Ed
 
Shaan Shar
Ranch Hand
Posts: 1249
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ed Jalbert:
I was wondering what retBoolean really is, forgive me if it is obvious I was breaking it down to return true or false.

I use an integration application based on JAVA and want to do the following
psudo code

retBoolean=true
if a value a equals(somevalue)
then
do nothing continue to process
else
log ("value not correct")
return retBoolean

My thoughts are that as it goes down the code if the value is not the value listed then by returning retBoolean the data is not processed.

I had been using a throw to throw a new exception but because these exceptions write to a error file I really do not want to use the throw but thought about using a logger statement instead of the throw and the retBoolean to reset for the next message coming in.

Thanks,
Ed


Welcome Ed Jalbert,

I welcome you in Ranch Family. Well your questions doen't sounds to me properly, could you please let us know what Exacatly do you want, what sort of help are you looking for.

Thanks.
 
Ed Jalbert
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, sorry for any confusion.

I will see if I can clarify. I am taking in a string and need to do validation on the string if the string meets certain criteria then I want to continue the next validation steps if it does not I want to skip the message and start on validation on the next message. I was told to do this to create a variable retBoolean and set it to true and to do a return of retBoolean if the string did not meet the criteria.

example
{
boolean retBoolean = true;
try
{
{
if (getName.getFirstName().equals("ED"))
{
;//met the criteria goes on to next validation
}
else
{//here I want to break out an get the next message I use to throw an exception
return retBoolean;
}
}
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!