Skip to main content
aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2022-03-10Bug 578952 - Add LoongArch64 SupportI20220311-1800I20220310-1800fyaling1-0/+1
Change-Id: Ib0e98cbdbb56a69bd1ec5f697e506a9f01db8d69 Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/191183 Tested-by: Equinox Bot <equinox-bot@eclipse.org> Reviewed-by: Alexander Kurtakov <akurtako@redhat.com>
2022-03-09Bug 578949 - Class loading at shutdown fails with NullPointerExceptionI20220309-1800Thomas Watson1-2/+7
Change-Id: I55d9570b9ae8ee06087eec50184b997d551835e8 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/191204
2022-02-15Bug 578772 - Lambda in MultiplexingFactory causes NPE one Hotspot JavaY20220315-0600Y20220314-1250Y20220314-0600Y20220313-0600Y20220312-0600Y20220311-0600Y20220310-0600Y20220309-0600Y20220308-0730Y20220308-0600Y20220307-0600Y20220306-0600Y20220305-0600Y20220304-0750Y20220304-0600Y20220303-0600Y20220302-0600Y20220301-0600Y20220228-0600Y20220227-0600Y20220226-0600Y20220225-0600Y20220224-0600Y20220223-0600Y20220222-1350Y20220221-0600Y20220220-0600Y20220219-0600Y20220218-0600Y20220217-0600Y20220216-0600S4_23_0_RC2aS4_23_0_RC2S4_23_0_RC1S4_23_0_M3I20220308-0310I20220302-1800I20220302-0600I20220301-1800I20220301-0600I20220228-1800I20220228-0600I20220227-1800I20220227-0600I20220226-1800I20220226-0600I20220225-1800I20220223-1800I20220223-0600I20220222-1800I20220222-1350I20220221-1800I20220221-0600I20220220-1800I20220220-0600I20220219-1800I20220219-0600I20220218-1800I20220216-1800I20220216-0600I20220215-1800R4_23_maintenanceThomas Watson1-1/+6
version 8 Change-Id: Ib1f09ef2d1622d605cfc3cacd4d084579da03276 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/190839
2022-02-11Bug 578701 - Lambdas in core framework classes lead to performanceY20220215-0600Y20220214-0600Y20220213-0900Y20220212-0800I20220215-0600I20220214-1800I20220214-0600I20220213-1800I20220213-0600I20220212-2040I20220212-1800I20220212-0800I20220212-0600I20220212-0140I20220211-1800Jared Anderson15-212/+503
degradation Change-Id: I7fc9d468abea7963b83dd4dfa37f5374e2f8b429 Signed-off-by: Jared Anderson <jhanders@us.ibm.com> Signed-off-by: Thomas Watson <tjwatson@us.ibm.com> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/190725 Tested-by: Equinox Bot <equinox-bot@eclipse.org>
2022-02-10Bug 577574 - Enable adaption of EquinoxBundle to its location fileY20220211-0800I20220210-1800Hannes Wellmann1-0/+4
Change-Id: I55887d3233af7638100b8066f4964cc3ba0cca88 Signed-off-by: Hannes Wellmann <wellmann.hannes1@gmx.net> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/188490 Tested-by: Equinox Bot <equinox-bot@eclipse.org> Reviewed-by: Thomas Watson <tjwatson@us.ibm.com>
2022-01-12Bug 578189 - Calls to Bundle.getEntry can break out of a directoryY20220128-0600Y20220127-0600Y20220126-0600Y20220125-0600Y20220124-0600Y20220123-0600Y20220122-0600Y20220121-0600Y20220120-0600Y20220119-0600Y20220118-0600Y20220117-0600Y20220116-0600Y20220115-0600Y20220114-0600Y20220113-0900Y20220113-0600I20220127-1800I20220126-1800I20220126-0520I20220125-1800I20220125-0320I20220124-0510I20220123-1800I20220122-1800I20220121-1800I20220120-1800I20220120-0720I20220120-0220I20220119-1800I20220119-1440I20220119-1320I20220119-0540I20220118-1800I20220117-1800I20220116-1800I20220115-1800I20220114-1800I20220113-1800I20220112-1800Thomas Watson1-10/+22
bundle content Change-Id: Ib025f235f015d0a0d2e625101974dd693d765669 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/189554
2021-12-07Bug 577497 - Support version-specific entries in dev-classPath fileY20220110-0600Y20220109-0600Y20220108-0600Y20220107-0600Y20220106-0600Y20220105-0600Y20220104-0600Y20220103-0600Y20220102-0600Y20220101-0600Y20211231-0600Y20211230-0600Y20211229-0600Y20211228-0600Y20211227-0600Y20211224-0600Y20211223-0600Y20211222-1030Y20211222-0840Y20211222-0830Y20211222-0600Y20211221-0600Y20211220-0600Y20211219-0600Y20211218-0600Y20211217-0600Y20211216-0600Y20211215-1140Y20211215-0600Y20211214-0600Y20211213-0600Y20211212-0600Y20211211-0600Y20211210-0600Y20211210-0210S4_23_0_M1I20220110-0550I20220110-0310I20220109-1800I20220108-1800I20220107-1800I20220106-0000I20220105-1800I20220105-0600I20220104-1800I20220104-0940I20220104-0600I20220103-1800I20220103-0600I20220102-1800I20220102-0600I20220101-1800I20220101-1140I20220101-0600I20211231-1800I20211230-1800I20211229-1800I20211228-1800I20211227-1800I20211226-1800I20211225-1800I20211224-1800I20211223-1800I20211222-1800I20211221-1800I20211221-0620I20211220-1820I20211219-1800I20211218-1800I20211218-0200I20211218-0140I20211217-1800I20211216-1800I20211215-1800I20211214-1800I20211213-1800I20211213-0440I20211212-1800I20211211-1800I20211210-1800I20211210-1050I20211210-0600I20211209-1800I20211208-1800I20211207-1800Hannes Wellmann3-50/+27
Change-Id: Ic1ce5b73b0e044315a15f300c50db90842413787 Signed-off-by: Hannes Wellmann <wellmann.hannes1@gmx.net> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/188210 Tested-by: Equinox Bot <equinox-bot@eclipse.org>
2021-11-30Bug 577432 - Speed up and simplify file processing in StorageI20211206-1800I20211205-1800I20211204-1800I20211204-0500I20211203-1800I20211203-1010I20211202-0900I20211202-0440I20211201-1950I20211201-1800I20211130-1800Hannes Wellmann2-145/+86
Change-Id: I69dc7e2ebcda363fddcde7da56f183a637e83459 Signed-off-by: Hannes Wellmann <wellmann.hannes1@gmx.net> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/188090 Tested-by: Equinox Bot <equinox-bot@eclipse.org>
2021-11-04Bug 577010 - [loader] avoid ClassNotFoundExceptionsS4_22_0_M3I20211116-0000I20211115-0600I20211114-1800I20211114-0600I20211113-1800I20211113-0600I20211112-2030I20211111-0910I20211110-1800I20211110-0750I20211110-0600I20211109-1800I20211109-0840I20211109-0720I20211108-1800I20211108-0620I20211107-1800I20211107-0600I20211106-1800I20211106-0600I20211105-1800I20211104-1800Thomas Watson7-77/+84
Instead of throwing ClassNotFoundException a null value should be returned when delegating. This avoid unnecessarily generating an exception in the normal flow of the code. An exception should only be generated when required by the APIs we are implementing in OSGi (Bundle.loadClass) or the JVM (ClassLoader.loadClass). There is a special case where a ClassNotFoundException is thrown when a class load triggers a lazy activation and the bundle fails to start with a BundleException. But generally null can be used for "normal" class not founds when delegating. Change-Id: Ic8add2176ee5e80a79212629950b63724f9f28e8 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com> Signed-off-by: Jörg Kubitz <jkubitz-eclipse@gmx.de> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/187105 Tested-by: Equinox Bot <equinox-bot@eclipse.org>
2021-11-02Bug 575932 - cache existence of parent directoriesI20211103-1800I20211103-0020I20211102-1800I20211102-1020Thomas Watson1-1/+21
For dependent and registered buddy policy it is possible that a large number of dependent and/or registered bundles can be queried for classes for a single hosting class loader. This results in many bundle files getting searched. For DirBundleFile this can be expensive because it involves checking for the existence of each file. This solution caches if the parent path of the entry lookup exists. The idea is that in most cases where an entry lookup doesn't exists the parent directory also doesn't exists. We cache a smaller number of existence checks and can do a faster lookup if files in an non-existing parent exist or not. Change-Id: Ibc4b48800335288bb0d2a770786c612c5d5eb6dc Signed-off-by: Thomas Watson <tjwatson@us.ibm.com> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/186979 Tested-by: Equinox Bot <equinox-bot@eclipse.org>
2021-10-22Bug 576644 - Implement BundleReference for BundleURLConnectionI20211101-1800I20211031-1800I20211030-1800I20211029-1800I20211028-1800I20211027-1800I20211026-1800I20211025-1800I20211024-1800I20211023-1800I20211022-1800Hannes Wellmann2-6/+23
Change-Id: I2a4580625fb8c95a398c55c68a10b13243616953 Signed-off-by: Hannes Wellmann <wellmann.hannes1@gmx.net> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/186525 Tested-by: Equinox Bot <equinox-bot@eclipse.org> Reviewed-by: Thomas Watson <tjwatson@us.ibm.com>
2021-10-22Bug 576643 - Clean up and unify Bundle resource classesHannes Wellmann4-110/+105
Change-Id: I25cd5a9b67cf601bdaf09f69ec33420bf15264f5 Signed-off-by: Hannes Wellmann <wellmann.hannes1@gmx.net> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/186524 Tested-by: Equinox Bot <equinox-bot@eclipse.org> Reviewed-by: Thomas Watson <tjwatson@us.ibm.com>
2021-10-19Bug 576636 - Fix issues with added dynamic imports and multi-threadThomas Watson5-9/+41
resolution If one thread is calling org.eclipse.osgi.internal.loader.BundleLoader.addDynamicImportPackage(ManifestElement[]) while other threads are trying to perform a resolution, dynamic or otherwise then there is a timing issue that could prevent dynamic resolution to the packages added with BundleLoader.addDynamicImportPackage. The BundleLoader.addDynamicImportPackage gets used by WovenClassImpl to allow weavers to add dynamic imports while they are weaving a class. The issue is the ModuleWiring.requirements field may get overwritten by a resolve operation in another thread doing a resolver operation after BundleLoader.addDynamicImportPackage has been called. This is because a resolve operation happens on a snapshot of the wirings while holding a read lock. Then the resolve operation happens with no locks because it is done on copies of the live objects. During this window, before the resolution delta is applied, another thead could call BundleLoader.addDynamicImportPackage which modifies the ModuleWiring.requirements field. Finally the resolution thread finds a resolution result and attempts to apply it to the current wirings. At this point it checks the timestamps of the moduledatabase and finds it is safe to apply the results. These results may end up replacing the ModuleWiring.requirements of a wiring with stale data (effectively removing the dynamically added imports. The result is that a dynamic import resolution will then fail later. The fix is to have the org.eclipse.osgi.container.ModuleWiring.addDynamicImports(ModuleRevisionBuilder) method update the ModuleDatabase timestamp such that any in progress resolution operations can detect they are using stale data and cause them to retry with another current snapshot. Change-Id: I97aa78193d49d27088edb66189b2daccd29e8b06 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/186513 Tested-by: Equinox Bot <equinox-bot@eclipse.org>
2021-09-20Bug 576000 - Avoid keeping entry content in memory while verifyingI20210921-1800I20210920-1800Thomas Watson1-12/+189
content The use of byte[] to store the complete content of an entry for a directory must be avoided otherwise the risk of running out of memory is high for really large resources. Change-Id: Ib8b44b41143fc6c64967d07d0674f5ccdc19b588 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/185526 Tested-by: Equinox Bot <equinox-bot@eclipse.org>
2021-09-08Bug 575815 - Improve message about service object not instance of toI20210919-1800I20210919-0120I20210918-1800I20210917-1800I20210917-0000I20210916-2150I20210916-1800I20210915-1800I20210915-0700I20210915-0510I20210915-0150I20210914-1800I20210913-2050I20210911-1800I20210910-1800I20210909-1800I20210908-1800Thomas Watson1-2/+10
include the object classname Change-Id: I9295dd17ab1a47f1785f3abbcb3f49c8db6424c0 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/185120 Tested-by: Equinox Bot <equinox-bot@eclipse.org>
2021-09-08Bug 575698 - Simplify creation of EnumerationsHannes Wellmann11-104/+46
Change-Id: Iee43928d4fa726008267411ab8ff733bf4e0bad6 Signed-off-by: Hannes Wellmann <wellmann.hannes1@gmx.net> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/184747 Tested-by: Equinox Bot <equinox-bot@eclipse.org> Reviewed-by: Thomas Watson <tjwatson@us.ibm.com>
2021-09-07Bug 575580 - Return a copy-on-first-write List in InternalUtils.asCopy()I20210907-1800Hannes Wellmann1-1/+66
Change-Id: Ie1e4f915bdf12b0a46d1567938b382eb5077b639 Signed-off-by: Hannes Wellmann <wellmann.hannes1@gmx.net> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/184339 Tested-by: Equinox Bot <equinox-bot@eclipse.org> Reviewed-by: Thomas Watson <tjwatson@us.ibm.com>
2021-09-07Bug 575579 - Unify InternalUtils.asList...() methods into oneHannes Wellmann5-124/+22
Change-Id: I3d8f95a7d4e489590fece89c8ece453838bed36c Signed-off-by: Hannes Wellmann <wellmann.hannes1@gmx.net> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/184338 Tested-by: Equinox Bot <equinox-bot@eclipse.org> Reviewed-by: Thomas Watson <tjwatson@us.ibm.com>
2021-08-23Bug 575576 - BundleWiring and Wiring lists must be snapshot/mutableY20210826-0800Y20210824-0940Y20210824-0840S4_21_0_RC1I20210827-1800I20210825-1800I20210825-0600I20210824-1800I20210824-0600I20210823-1800Thomas Watson6-88/+109
Change-Id: I8e5626478ec54812e3267adb70edb3c07a63d9cc Signed-off-by: Thomas Watson <tjwatson@us.ibm.com> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/184329 Reviewed-by: BJ Hargrave <hargrave@us.ibm.com>
2021-08-04Bug 573456 - [performance] Avoid File.getCanonicalPathY20210810-0820Y20210810-0500Y20210805-0800Y20210804-1030I20210811-1800I20210810-1800I20210809-1800I20210808-1800I20210807-1800I20210806-1800I20210805-1800I20210804-1800I20210804-0930Joerg Kubitz2-10/+54
File.getCanonicalPath is much slower then URI.normalize under windows Also avoid normalization if no ".." is involved. Change-Id: I641a64d48f8acb9cf793c948d08c51ace45aec50 Signed-off-by: Joerg Kubitz <jkubitz-eclipse@gmx.de> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/180404 Tested-by: Equinox Bot <equinox-bot@eclipse.org> Reviewed-by: Thomas Watson <tjwatson@us.ibm.com>
2021-08-02Bug 574872 - [Clean-up] Simplify lambdas & use method-references (5)Hannes Wellmann9-56/+56
Use Sonar-Lint Eclipse plug-in to find remaining locations where lambdas can be simplified. Change-Id: Ie6dc3c9f3c5e488ab04c6de3262edf6ec5391e43 Signed-off-by: Hannes Wellmann <wellmann.hannes1@gmx.net> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/183107 Tested-by: Equinox Bot <equinox-bot@eclipse.org> Reviewed-by: Thomas Watson <tjwatson@us.ibm.com>
2021-07-29Bug 575015 - [Clean-up] Use Comparator.comparing()Hannes Wellmann3-3/+5
Clean up using the JDT clean-up: - Use Comparator.comparing() Change-Id: I70bcd308b90d6e63a4ba94d69d788acb318443d0 Signed-off-by: Hannes Wellmann <wellmann.hannes1@gmx.net> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/183388 Tested-by: Equinox Bot <equinox-bot@eclipse.org> Reviewed-by: Lars Vogel <Lars.Vogel@vogella.com>
2021-07-26Bug 574872 - [Clean-up] Simplify lambdas & use method references (4)Hannes Wellmann8-14/+11
Clean up using the JDT clean-up: - Simplify lambda expression and method reference syntax Change-Id: Iddccb9377d4996244cf991f2f9c36f2bd0e56a71 Signed-off-by: Hannes Wellmann <wellmann.hannes1@gmx.net> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/183304 Tested-by: Equinox Bot <equinox-bot@eclipse.org> Reviewed-by: Lars Vogel <Lars.Vogel@vogella.com>
2021-07-26Bug 574872 - [Clean-up] Use lambda where possible, corrected (3)Hannes Wellmann1-0/+1
Clean up using the JDT clean-up: - Convert functional interface instances: Use lambda where possible After the clean up was applied the code had compile errors that had to be corrected manually. Change-Id: Icca0ddc7a7d38b7fd08568b2e797ccf100a3ddac Signed-off-by: Hannes Wellmann <wellmann.hannes1@gmx.net> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/183302 Tested-by: Equinox Bot <equinox-bot@eclipse.org> Reviewed-by: Lars Vogel <Lars.Vogel@vogella.com>
2021-07-23Bug 574872 - [Clean-up] Use lambda where possible (1)I20210725-1800I20210724-1800I20210723-1800Hannes Wellmann26-579/+256
Clean up using the JDT clean-up: - Convert functional interface instances: Use lambda where possible Change-Id: I61d6fc75a675a0cda192bd97121c7598f5524f53 Signed-off-by: Hannes Wellmann <wellmann.hannes1@gmx.net> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/183300 Tested-by: Equinox Bot <equinox-bot@eclipse.org> Reviewed-by: Lars Vogel <Lars.Vogel@vogella.com>
2021-07-23Bug 574850 - [Clean-up] Remove generic type arguments where possible (2)Hannes Wellmann30-109/+146
Use the regex "\.\<.*\(" to finds locations in java files where generic type arguments are specified in method calls. And use Sonar-Lint Eclipse plug-in to find remaining locations where the diamond operator can be used. Change-Id: I8d751b2fa833439d217909efc97096ec093793be Signed-off-by: Hannes Wellmann <wellmann.hannes1@gmx.net> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/183106 Reviewed-by: Lars Vogel <Lars.Vogel@vogella.com> Tested-by: Equinox Bot <equinox-bot@eclipse.org>
2021-07-13Bug 574807 - force FrameworkUtil to clinit before we registerY20210715-1150Y20210715-1000Y20210715-0820Y20210713-0800I20210716-1800I20210716-0020I20210715-2200I20210715-1800I20210714-1800I20210713-1800Thomas Watson1-0/+5
Forcing FrameworkUtil to clinit before we register our factory with the multiplex factory allows it to successfully clinit before we have any chance of using it as part of our factory implementation. Change-Id: Ia1c3d9e54b1b9cf143b40121ef2f53fd0e012fe8 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/183002 Tested-by: Equinox Bot <equinox-bot@eclipse.org>
2021-07-12Bug 573026 - Apply NamespaceList to ModuleRevision and its builderHannes Wellmann8-136/+251
Change-Id: Ic3752324c8b166fbf06fdb76c3e3dd98b4e4a345 Signed-off-by: Hannes Wellmann <wellmann.hannes1@gmx.net> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/180178 Tested-by: Equinox Bot <equinox-bot@eclipse.org> Reviewed-by: Thomas Watson <tjwatson@us.ibm.com>
2021-07-12Bug 574729 - avoid calling System::setSecurityManager with nullThomas Watson1-1/+3
Change-Id: I22b97871a6348c76ee48a380bf48670dd81aa9b4 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/182992 Tested-by: Equinox Bot <equinox-bot@eclipse.org>
2021-07-01Bug 573025 - Introduce and apply builder for NamespaceListY20210708-0800Y20210706-1050Y20210706-0800S4_21_0_M1I20210712-0340I20210712-0240I20210711-1800I20210710-1800I20210710-0000I20210709-0030I20210707-1800I20210707-0600I20210706-1800I20210706-0600I20210705-1800I20210705-0600I20210704-1800I20210704-0600I20210703-1800I20210703-0600I20210702-1800I20210701-1800Hannes Wellmann5-369/+472
To simplify and speed up the build of NamespaceLists a Builder is added, which acts like a modifiable Collection and can efficiently be build into a NamsepaceList or modified. The new builder is applied where suitable. Change-Id: I5269cb34512d0470df9c47849727929720d74cd3 Signed-off-by: Hannes Wellmann <wellmann.hannes1@gmx.net> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/180177 Tested-by: Equinox Bot <equinox-bot@eclipse.org> Reviewed-by: Thomas Watson <tjwatson@us.ibm.com>
2021-06-16Bug 574236 - Use Lookup.defineHiddenClass to avoid illegal accessI20210616-1800Thomas Watson1-7/+34
Unsafe.defineAnonymousClass got removed in Java 17 and Lookup.defineHiddenClass got added in Java 16. Change-Id: Iac75637458ba46ceb04a1cf7a5b61993bc981ca5 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/182046 Tested-by: Equinox Bot <equinox-bot@eclipse.org>
2021-05-25Bug 573731 - tolerate "allow" "disallow" and "default" security managerI20210526-0600I20210525-1800Thomas Watson1-26/+45
Change-Id: I78d201dfda11c00f536831f78a5ec5662798da01 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/180950 Reviewed-by: BJ Hargrave <hargrave@us.ibm.com> Tested-by: Equinox Bot <equinox-bot@eclipse.org>
2021-05-04Bug 572034 - Use Java JAR APIs for SignedContent implementationS4_20_0_M3I20210524-0600I20210523-1800I20210523-0600I20210522-1800I20210522-0600I20210521-1800I20210521-0150I20210521-0110I20210519-1800I20210519-0600I20210518-1800I20210518-0850I20210518-0600I20210518-0200I20210517-1800I20210517-0600I20210516-1800I20210516-0600I20210515-1800I20210515-0600I20210514-1800I20210513-1800I20210512-2250I20210512-1800I20210511-1800I20210511-0740I20210511-0330I20210511-0200I20210510-1800I20210509-1800I20210508-1800I20210507-1800I20210506-1800I20210505-1800I20210505-0510I20210505-0100I20210504-1800Thomas Watson25-2751/+614
The SignedContent implementation has had its own implementation to handle parsing of RSA/DSA/SF files related to JAR signing. As new algorithms are added to Java this code has to keep up and understand the new stuff. This commit removes the home grown implementation for reading JAR signers and instead uses the built int JarFile and JarInputStream implementations of Java. This has some limitations 1) It is not easy to determine the SignerInfo message digest algorithm. The built in JAR APIs do not expose this detail. As such the method SignerInfo.getMessageDigestAlgorthm now always returns "unknown" and the method has been deprecated 2) Supporting runtime verification of signed bundles that are installed as directory (exploded) bundles is no longer available. Doing so will not perform well as we need to create a JarInputStream to do the verification over the complete directory structure and that cannot happen lazily as entries are read from the bundle. JAR'ed bundles now just use JarFile under the covers to do runtime verification if configured. ZipFile is still used if no runtime verification is configured (the default). This is to avoid always parsing the manifest on restarts. 3) On demand verification of a SignedContentEntry is not possible. With the Java JAR APIs you cannot even tell if a JAR entry is signed until the complete entry itself is read and verified up front. Now a SignedContentEntry is either signed and its content has been validated up front or it is not signed or it is signed but invalid (corrupted). When invalid the SignedContentEntry.verify() will throw an InvalidContentException, but in this case the entry will still be unsigned because the JAR APIs will not give us the entry certificates in this case to indicate the entry is signed. 4) Old deprecated message digest algorithms that may have been used to sign JARs may no longer be supported by the JAR APIs. In this case the JAR will simply be reported as not signed by SignedContent API. This fact forced me to have to re-sign many of the test JARs. Change-Id: I66279a333c22f852948415bddeda355535413106 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/180074
2021-04-21Bug 572799 - Add arm64 alias to aarch64 processorI20210426-2110I20210426-1800I20210425-1800I20210424-1800I20210423-1800I20210423-0350I20210423-0140I20210422-1800I20210421-1800Thomas Watson1-0/+1
This change only effects what gets used for Bundle-NativeCode matching and the setting of the org.osgi.framework.processor property value. Other changes are needed to handle the equinox specific values for osgi.arch Change-Id: Iddb02ce34f9569e5712b3eca956556e68578d8d9 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/179607
2021-04-19Bug 572605 - Improve performance for name space wiring lookupI20210420-1800I20210420-0500I20210420-0240Thomas Watson7-84/+330
NamespaceList is introduced to index a flat list of elements which have name spaces. The NamespaceList assumes the element list is ordered such that all elements with the same name space are order in one continuous sequence. Sublists of the original flat list are used to populate a map indexed by the namespace. NamespaceList is immutable. Any updates require a copy of the full list to be made and modified and then a new NamespaceList to be created. Additional fixes are included to properly update the requirements and capabilities for a host wiring when fragments are dynamically attached. Change-Id: Iff2856fca7aaf5ab9fd1efe08b8778408860a146 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com> Signed-off-by: Hannes Wellmann <wellmann.hannes1@gmx.net> Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.framework/+/178989
2021-04-12[dogfooding] Use Java method instead of system property cleanupLars Vogel3-3/+3
Applied use Java method instead of system property 'FILE_ENCODING,PATH_SEPARATOR,FILE_SEPARATOR,LINE_SEPARATOR,BOOLEAN_PROPERTY' Change-Id: I09cccb13cfe57a1de12174ffd4526e0300515a40 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
2021-04-09[dogfooding] Try with resources applied to org.eclipse.osgiLars Vogel3-16/+4
Applied JDT try with resource cleanup to PDE, this cleanup creates shorter code Change-Id: I3bde6441b9117109cadd0c84c283074ffb5252a4 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
2021-03-16Bug 571990 - Fix NPE in GlobalPolicyI20210321-1800I20210321-0340I20210320-1800I20210320-0650I20210319-1800I20210319-0030I20210318-2320I20210318-2100I20210317-1850I20210317-1320I20210317-0910I20210317-0650I20210317-0330I20210316-1800Thomas Watson1-2/+2
Must use Optional.orElse instead of Optional.orElseGet to return null. The orElseGet expects a function and the function must not be null. Change-Id: Id45654e6b97ce629dcdcdf16919f79f682050d81 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
2021-02-26Bug 571531 - Cap evaluation cache at 10000Y20210316-1310Y20210316-0510Y20210315-1000Y20210314-1000Y20210313-1000Y20210312-2250Y20210312-1250Y20210312-1000Y20210311-1000Y20210310-1000Y20210309-1000Y20210307-1000Y20210306-1000Y20210305-1000Y20210304-1000Y20210303-1000Y20210301-1000Y20210228-1000Y20210227-1000S4_19_0_RC2R4_19I20210303-1800I20210303-0600I20210302-1800I20210302-0930I20210302-0720I20210302-0600I20210301-1800I20210301-0600I20210228-1800I20210228-0600I20210227-1800I20210227-0600I20210226-2140I20210226-1800Thomas Watson1-0/+3
Because permission instances can be infinite the evaluationCache can grow unbounded leading to a memory leak. This is a quick fix to cap the cache at 10000. A better approach may be to use some weak reference cache in the future, but for now we need to stop the uncontrolled leak. A test is added that does 10 million different file permission checks. On my system this grinds to a halt after about 8 million checks. With the cap at 10000 the 10 million permission checks happen <15 seconds. Change-Id: I6e18d4d6fcab274bb2f56c69a6e0893f8e474418 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
2021-02-02Bug 570858 - filter framework module from system package calculationThomas Watson1-0/+8
Change-Id: Id9d6cf3aa536f884270705f683a1b163e22332b1 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
2021-02-02Bug 570757 - Throw specific exception type if config area cannot be readY20210202-1200Simeon Andreev1-2/+2
This change uses a more specific runtime exception (IllegalStateException), if EquinoxContainer fails to initialize its storage due to any Exception. Also the exception message is changed to be more specific. Previously a RuntimeException would be thrown on IOException or BundleException, during storage initialization. This is unfortunately not enough to cover all cases of corrupted/broken config area, as e.g. a buffer with invalid size will result in an IllegalArgumentException. The new exception type and message can be used to more easily identify OSGI container initialization problems. Change-Id: I1e6d0910550f1527b0affada0de897acbb1b8026 Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
2021-01-22Bug 570425 - Avoid using SecureRandom for framework UUIDY20210129-1200Y20210127-0710Y20210126-1200Y20210123-0110I20210201-1800I20210131-1800I20210130-1800I20210129-1800I20210128-1800I20210127-1800I20210126-1800I20210125-1800I20210124-1800I20210123-1800I20210123-0020Thomas Watson3-11/+60
Change-Id: Ia549b309b3470b2167e25c89a0af59e3ce4f9228 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
2021-01-15Bug 570394 - Remove usage of deprecated PackageAdmin/StartLevel servicesThomas Watson8-205/+181
Change-Id: Ie6ed4f11fe82f0b69117c0144bbfe7149fed112b Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
2020-10-30Bug 567964 - Use Files.isReadable before falling back to File IOY20201201-1200Y20201127-1200Y20201124-1200Y20201120-1200Y20201117-1200Y20201113-1200Y20201111-0210Y20201110-1200Y20201109-1200Y20201109-0220Y20201108-1200Y20201107-1200Y20201106-1200Y20201105-1200Y20201104-1200Y20201103-1200Y20201102-1200Y20201101-1200Y20201031-1200S4_18_0_RC2S4_18_0_RC1S4_18_0_M3R4_18I20210122-0800I20210122-0630I20210122-0420I20201202-1800I20201202-0600I20201201-1800I20201201-0600I20201130-1800I20201130-0600I20201129-1800I20201129-0600I20201128-1800I20201128-0600I20201128-0300I20201127-1800I20201127-1010I20201127-0630I20201125-1800I20201125-0600I20201124-1800I20201124-0600I20201123-1800I20201123-0600I20201122-1800I20201122-0600I20201121-1800I20201121-0600I20201120-1800I20201120-0320I20201119-0730I20201118-1800I20201118-0600I20201117-1800I20201117-0600I20201116-1800I20201116-0600I20201115-1800I20201115-0600I20201114-1800I20201114-0740I20201114-0600I20201113-1800I20201112-1800I20201111-1800I20201110-1800I20201109-1800I20201108-1800I20201107-1800I20201107-0750I20201106-1800I20201106-0710I20201105-1800I20201105-0230I20201104-1800I20201103-1800I20201103-0030I20201102-1910I20201101-1800I20201031-1800I20201030-1800R4_18_maintenanceThomas Watson1-20/+25
Some environments it is more costly to do the file open/close operation than simply calling Files.isReadable. First try Files.isReadable for the golden path, if that fails then fallback to the previous behavior Change-Id: I7aaf92c4d3d1a599343034078ebb214a8da7a305 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
2020-10-30Bug 567964 - Add debug trace for open/close operationsThomas Watson3-0/+21
Change-Id: Iaedc19d937a069e40cef242d40b4ac0b746848c0 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
2020-10-24Nullcheck of value previously dereferencedY20201030-1200Y20201029-1200Y20201028-1200Y20201027-1200Y20201026-1200I20201029-1800I20201028-1800I20201028-0800I20201028-0610I20201028-0130I20201028-0020I20201027-2350I20201027-1800I20201026-1850Carsten Hammer1-4/+7
Change-Id: Ibba82884426e7e35df0c49d301ab1cea016a5f56 Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
2020-10-22The code contains a conditional test performed twiceY20201025-1200Y20201024-1200Y20201023-1200I20201026-0840I20201026-0650I20201025-1800I20201025-0040I20201024-1800I20201023-1800I20201023-0250Carsten Hammer1-1/+1
Change the typo to test both INCLUDE and EXCLUDE Change-Id: I29fd936ed748144ad2377ba38c2ecc4e7adafaba Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
2020-09-04Bug 566618 - Avoid creating domain during wiring invalidationThomas Watson2-2/+6
There are scenarios where creating a domain will fail, for example if the bundle file has been deleted. There is no need to create a domain in the case of invalidating a wiring because we are just trying to clear the permission cache of the existing domain when invalidating a wiring. Change-Id: Icb5d2118a267d08192f3ead21991d1955d36d34f Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
2020-08-10Bug 565949 - Use Long.valueOf and Double.valueOf where possibleY20200810-1200I20200810-1800Thomas Watson9-27/+40
Change-Id: I9553166260b836f09f7b53b7bd4bcdbd09574810 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
2020-08-05Bug 565723 - Allow connect bundles to export java.* packagesY20200809-1200Y20200808-1200Y20200807-1200Y20200806-1200Y20200805-1200I20200809-1800I20200808-1800I20200808-0230I20200807-1800I20200806-1800I20200805-1800Thomas Watson4-18/+35
Change-Id: I0e8e2a2084056757e4b17e5f9bd5eaaeb2c2e89b Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>

Back to the top