headwirecom / themeclean-flex

Super fast, Super clean, Peregrine Theme
https://www.peregrine-cms.com
Apache License 2.0
3 stars 21 forks source link

Fix NPE for peregrine-cms/614 #170

Closed reggie7 closed 3 years ago

reggie7 commented 3 years ago

Fixed NPE found under peregrine-cms/614: resource.adaptTo(ValueMap.class) => resource.getValueMap().

The NPE does not show always, whenever / is represented as a SyntheticResource resource.adaptTo(ValueMap.class) is null while resource.getValueMap() is not.

Testing: Create a Test tenant and open http://localhost:8080/content/test/pages/articles.html - you should not see any logs for that NPE anymore. Though it might not have been present before if ResourceResolver represented / with a non-synthetic resource.