I'm stuck with a error I repedeatly got in Eclipse. I think that this error shouldnt exist. Given ist the following nested loop:
String conditionlogic;
if(matcher.find())
{
do
conditionogic += matcher.group();
while(matcher.find());
}
else
conditionogic = null;
The error is
The local variable conditionlogic may not have been initialized.
It is my understanding, that since do-while will be executed at least once conditionlogic is actually initialized with one or more values of matcher.group() or else null. How can I fix this?