Wrong text + example not working #1214

OPEN
Submitted 7 months ago

On section 1.3, the first paragraph has an extra text in the beginning that seem to be a leftover from a previous phrasing:

Add other part called In this exercise you implement user input help

Plus, the code example provided on section 1.3 is not working correctly out of the box. It fires runtime errors as soon as I type a '\' on the combo (I’m trying to type "C:\"). I could not find a way to fix it because I could not understand what’s supposed to happen. This example is confusing, a screenshot would help.

Comments

  7 months ago

Thanks for the report. I added a screenshot. What exception do you see?

  7 months ago

Sorry, I should’ve included the message right away. Here it is:

Internal Error

Reason: java.util.regex.PatternSyntaxException: Unexpected internal error near index 1

\

I managed to make it work. I had to change two things:

On the method endsWithSeparator, I changed its check to:

return lastIndex == inputPath.length() - 1;

On the method filter paths, I changed the split to

String[] directoriesInPath = path.toString().split( File.separator + File.separator );

As I’m running on Windows, those things behave differently.

Thanks for screenshot, it helped me understand what I needed to do.

Please login to write a comment.