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 #8111

Merged
merged 4 commits into from
Apr 21, 2020

Conversation

denis-anisimov
Copy link
Contributor

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

Was not tested in 2.2 because OSGi is completely broken (#8109).

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

Copy link
Contributor Author

@denis-anisimov denis-anisimov left a comment

Choose a reason for hiding this comment

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

Reviewable status: 2 unresolved discussions, 0 of 1 LGTMs obtained (waiting on @denis-anisimov)

a discussion (no related file):
This is not the whole story.
2.2 doesn't support OSGi for many various reasons


caalador
caalador previously approved these changes Apr 21, 2020
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.

Reviewed 1 of 1 files at r1.
Dismissed @vaadin-bot from a discussion.
Reviewable status: 1 unresolved discussion, 0 of 1 LGTMs obtained (waiting on @denis-anisimov)

a discussion (no related file):

Previously, denis-anisimov (Denis) wrote…

This is not the whole story.
2.2 doesn't support OSGi for many various reasons

Seems like using

        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient-osgi</artifactId>
            <version>4.5.12</version>
        </dependency>

Poses no problems for the downloader and can be used as is.


Copy link
Contributor Author

@denis-anisimov denis-anisimov left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 unresolved discussion, 0 of 1 LGTMs obtained (waiting on @caalador)

a discussion (no related file):

Previously, caalador wrote…

Seems like using

        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient-osgi</artifactId>
            <version>4.5.12</version>
        </dependency>

Poses no problems for the downloader and can be used as is.

Unfortunately it's not enough.


Copy link
Contributor Author

@denis-anisimov denis-anisimov left a comment

Choose a reason for hiding this comment

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

ready for review

Reviewable status: all discussions resolved, 0 of 1 LGTMs obtained

@vaadin-bot
Copy link
Collaborator

SonarQube analysis reported 6 issues

  • CRITICAL 2 critical
  • MAJOR 4 major

Watch the comments in this conversation to review them.

5 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 pom.xml#L20: Make this line start at column 9. rule
  4. MAJOR OSGiAccess.java#L271: Add a private constructor to hide the implicit public one. rule
  5. MAJOR OSGiAccess.java#L297: Catch Exception instead of Throwable. rule

@caalador caalador added this to Iteration Reviews in OLD Vaadin Flow ongoing work (Vaadin 10+) via automation Apr 21, 2020
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 5 of 5 files at r2.
Reviewable status: :shipit: complete! all discussions resolved, 1 of 1 LGTMs obtained

@caalador caalador merged commit 56a5af9 into 2.2 Apr 21, 2020
OLD Vaadin Flow ongoing work (Vaadin 10+) automation moved this from Iteration Reviews to Done - pending release Apr 21, 2020
@caalador caalador deleted the 8105-fix-osgi-initializers branch April 21, 2020 09:15
@mshabarov mshabarov added this to the 2.2.0.beta2 milestone Apr 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
OLD Vaadin Flow ongoing work (Vaadin ...
  
Done - pending release
Development

Successfully merging this pull request may close these issues.

None yet

4 participants