Skip to content

Commit

Permalink
Grails Plugin GSP: Fixes StackOverflowError, because DefaultGroovyPag…
Browse files Browse the repository at this point in the history
…eLocator‘s precompiledGspMap was not properly initialized

* related commit c921b03
  • Loading branch information
rainboyan committed Jul 13, 2023
1 parent 0f58263 commit 7db7592
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,11 @@ public CachingGrailsConventionGroovyPageLocator groovyPageLocator(ObjectProvider
defaultViews = resourceLoader.getResource("classpath:gsp/views.properties");
}
if (defaultViews.exists()) {
PropertiesFactoryBean pfb = new PropertiesFactoryBean();
pfb.setIgnoreResourceNotFound(true);
pfb.setLocation(defaultViews);
try {
PropertiesFactoryBean pfb = new PropertiesFactoryBean();
pfb.setIgnoreResourceNotFound(true);
pfb.setLocation(defaultViews);
pfb.afterPropertiesSet();
Map<String, String> precompiledGspMap = new HashMap<>();
CollectionUtils.mergePropertiesIntoMap(pfb.getObject(), precompiledGspMap);
groovyPageLocator.setPrecompiledGspMap(precompiledGspMap);
Expand Down

0 comments on commit 7db7592

Please sign in to comment.