Good evening, I'm currently working on my assignment and I have been looking for hours finding this error. I tried catching the NPE which didn't work either. What am I missing?
The method's purpose is to load all files in the folder "templates" which have the suffixes ".txt" as objects from the class CuttingTemplate. The name's from the read templates are then set to the direction of the read file, so when the file template123.txt is in the folder "templates" the CuttingTemplate's name is set to "templates/template123.txt"; All loaded CuttingTemplates then are saved in this list:
protected LinkedList<CuttingTemplate> templates = new LinkedList<CuttingTemplate>();
Exceptions are caught (except the NPE which I couldn't figure out).
So here is the method:
Here is the stack trace:
I hope you can help me.