codedance / silken

Silken wraps Google Closure Templates in a managed servlet environment simplifying push-MVC development.
25 stars 8 forks source link

Fix NullPointerException when retrieving resource paths #11

Closed jbwyme closed 11 years ago

jbwyme commented 11 years ago

Fixing NPE when retrieving resource paths in the case where your project doesn't contain a scanned path (e.g. /templates/shared, /WEB-INF/templates/shared, or some namespace you've created). Furthermore, it seems that the resolver scans both /WEB-INF/templates/{namespace} and /templates/{namespace}. If BOTH directories don't exist for your namespace, an NPE is thrown. Maybe a servlet api difference (considering I doubt you simply overlooked this)?

codedance commented 11 years ago

Yes. Overlooked. I think it may be prudent to put a log warning message if this configuration senario occurs. I'll merge this in put leave open and will consider.