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

Support jdk 11 #521

Merged
merged 31 commits into from
Jun 23, 2022
Merged

Support jdk 11 #521

merged 31 commits into from
Jun 23, 2022

Conversation

gaosaroma
Copy link
Collaborator

@gaosaroma gaosaroma commented Jun 8, 2022

Motivation:

To support jdk11

Modification:

  • To fix issue 427 and 495: add Classloaderutils.getURLs to avoid casting AppClassloader to URLClassloader, and modifdy all casting in BizClassLoader, PluginClassLoader, SofaArkBootstrap.
  • To fix issue 492: add CompoundEnumeration and change references in AbstractClasspathClassLoader and AbstractClassLoaderHook.
  • To package sofa-ark with jdk11: bump maven-plugin-plugin to 3.6.1, asm to 8.0
  • To test sofa-ark with jdk11: add argline for maven-surefire and bump jacoco to 0.8.4
  • To keep classloader consistent with annotation in TestNG: modify ArkTestNGInvokedMethodListener.beforeInvocation
  • To keep LinkedProperties's action consistent in jdk11 and jdk8: add LinkedProperties.putAll
  • To support jdk11 with javadoc: bump maven-javadoc-plugin from 2.9.1 to 3.2.0, revise nonstandard flag and specify source files encoding as UTF-8.
  • To fix bug of mvn test:
    • No Ark Container Jar File Found: revise version of dependencies in DirectoryContainerArchive#AKR_CONTAINER_JAR
    • @ConditionalOnAvailableEndpoint of springboot-v2.5.6 not exposing endpoint causes SpringBoot2IntrospectBizEndpointOnArkEnabledTest#testIntrospectBizEndpoint failed: add management.endpoints.web.exposure.include=* property as configuration.
  • To integrate jacoco and mock test:
    • replace jmockit-v1.35 with mockito v3.6.0 to mock static method for compatible with jdk8 and jdk11
    • make consistent ChildClass's @After action with ParentClass avoiding of crash
    • fix bugs during replacement.

Result:

Fixes #436 , #427 , #492 , #495 .

@codecov
Copy link

codecov bot commented Jun 13, 2022

Codecov Report

Merging #521 (b8788c2) into master (177220e) will increase coverage by 1.43%.
The diff coverage is 61.38%.

@@             Coverage Diff              @@
##             master     #521      +/-   ##
============================================
+ Coverage     58.25%   59.69%   +1.43%     
- Complexity      636      679      +43     
============================================
  Files           153      154       +1     
  Lines          5733     5858     +125     
  Branches        809      845      +36     
============================================
+ Hits           3340     3497     +157     
+ Misses         2090     2037      -53     
- Partials        303      324      +21     
Impacted Files Coverage Δ
...pay/sofa/ark/loader/DirectoryContainerArchive.java 0.00% <0.00%> (ø)
...m/alipay/sofa/ark/loader/jar/JarURLConnection.java 36.70% <0.00%> (ø)
...lipay/sofa/ark/container/test/TestClassLoader.java 87.80% <ø> (ø)
...va/com/alipay/sofa/ark/spi/constant/Constants.java 0.00% <ø> (ø)
...om/alipay/sofa/ark/spi/event/AbstractArkEvent.java 46.15% <ø> (ø)
...pay/sofa/ark/spi/event/AfterFinishDeployEvent.java 100.00% <ø> (ø)
...ay/sofa/ark/spi/event/AfterFinishStartupEvent.java 100.00% <ø> (ø)
...y/sofa/ark/spi/event/biz/AfterBizStartupEvent.java 100.00% <ø> (ø)
...ipay/sofa/ark/spi/event/biz/AfterBizStopEvent.java 100.00% <ø> (ø)
...ay/sofa/ark/spi/event/biz/AfterBizSwitchEvent.java 100.00% <ø> (ø)
... and 57 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b146b82...b8788c2. Read the comment docs.

Copy link
Collaborator

@yuanyuancin yuanyuancin left a comment

Choose a reason for hiding this comment

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

LGFM

@sofastack-bot sofastack-bot bot added size/XL and removed size/L labels Jun 15, 2022
@gaosaroma gaosaroma linked an issue Jun 16, 2022 that may be closed by this pull request
This was linked to issues Jun 16, 2022
@gaosaroma gaosaroma force-pushed the support-jdk-11 branch 2 times, most recently from c113031 to 7e15697 Compare June 16, 2022 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants