Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed an error caused by performing an unchecked cast #1612

Merged
merged 2 commits into from Jul 21, 2017

Conversation

jfleschler
Copy link
Contributor

Fixed an error caused by explicitly casting a SiteMapGeneratorConfiguration to a CategorySiteMapGeneratorConfiguration

…ration to a CategorySiteMapGeneratorConfiguration
@@ -61,13 +61,14 @@ public boolean canHandleSiteMapConfiguration(SiteMapGeneratorConfiguration siteM
@Override
public void addSiteMapEntries(SiteMapGeneratorConfiguration smgc, SiteMapBuilder siteMapBuilder) {

CategorySiteMapGeneratorConfiguration categorySMGC = (CategorySiteMapGeneratorConfiguration) smgc;
if (smgc instanceof CategorySiteMapGeneratorConfiguration) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this to CategorySiteMapGeneratorConfiguration.class.isAssignableFrom(smgc.getClass())

@phillipuniverse phillipuniverse merged commit 124c21e into develop-5.2.x Jul 21, 2017
@phillipuniverse phillipuniverse deleted the sitemap-generator-cast branch July 21, 2017 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants