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

Be aware of skinny war workaround in OSGi support #8110

Merged
merged 1 commit into from
Apr 21, 2020

Conversation

denis-anisimov
Copy link
Contributor

@denis-anisimov denis-anisimov commented Apr 20, 2020

This should have been fixed initially in 2.2 branch but 2.2 has no any OSGi support for different reason (see #8109). So it can't be tested there.

Fixes #8105


This change is Reviewable

// don't use onStartup method because a fake servlet context is
// passed here: no need to detect classloaders in OSGi case
((ClassLoaderAwareServletContainerInitializer) initializer).process(
filterClasses(handleTypes.orElse(null)),
getOsgiServletContext());
} catch (ServletException e) {
throw new RuntimeException(
Copy link
Collaborator

Choose a reason for hiding this comment

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

MAJOR Define and throw a dedicated exception instead of using a generic one. rule

@vaadin-bot
Copy link
Collaborator

SonarQube analysis reported 5 issues

  • CRITICAL 2 critical
  • MAJOR 3 major

Watch the comments in this conversation to review them.

4 extra issues

Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:

  1. CRITICAL OSGiAccess.java#L281: Either log or rethrow this exception. rule
  2. CRITICAL OSGiAccess.java#L297: Either log or rethrow this exception. rule
  3. MAJOR OSGiAccess.java#L271: Add a private constructor to hide the implicit public one. rule
  4. MAJOR OSGiAccess.java#L297: Catch Exception instead of Throwable. rule

Copy link
Contributor

@caalador caalador left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r1.
Dismissed @vaadin-bot from a discussion.
Reviewable status: :shipit: complete! all discussions resolved, 1 of 1 LGTMs obtained

@caalador caalador merged commit e76cc7c into 2.1 Apr 21, 2020
@caalador caalador deleted the 8105-fix-osgi-initializers-cherry-pick branch April 21, 2020 03:46
@denis-anisimov denis-anisimov added this to the 2.1.9 milestone Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants