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

[FIX] XMLTemplateAnalyzer: Handle empty XML view/fragment #471

Merged
merged 3 commits into from
Jun 29, 2020

Conversation

matz3
Copy link
Member

@matz3 matz3 commented Jun 10, 2020

Fixes: https://github.com/SAP/ui5-builder/issues/281

Thank you for your contribution! 🙌

To get it merged faster, kindly review the checklist below:

Pull Request Checklist

@matz3 matz3 added the bug Something isn't working label Jun 10, 2020
@matz3 matz3 requested a review from RandomByte June 10, 2020 13:17
@coveralls
Copy link

coveralls commented Jun 10, 2020

Coverage Status

Coverage increased (+0.008%) to 91.44% when pulling 3adf1da on fix-XMLTemplateAnalyzer-empty-document into 302c0fb on master.

@@ -162,6 +162,13 @@ class XMLTemplateAnalyzer {
return;
}

if ( !result ) {
// Skip empty xml views/fragments
log.warn("Ignoring empty file " + info.name);
Copy link
Member

Choose a reason for hiding this comment

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

isn't an empty view/fragment invalid? XML does not know allow empty files, IMO.

Copy link
Member Author

Choose a reason for hiding this comment

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

Makes sense. I will change this to throw a proper error

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@matz3 matz3 requested a review from codeworrior June 24, 2020 10:24
@matz3 matz3 merged commit 7488d5f into master Jun 29, 2020
@matz3 matz3 deleted the fix-XMLTemplateAnalyzer-empty-document branch June 29, 2020 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exception thrown for empty views or fragments (without helpful feedback)
3 participants