Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Hammer2019-05-08 15:17:38 -0400
committerThomas Watson2019-05-16 10:07:43 -0400
commit3b63527921acfe7c78cce6b84ab8e869ef17f230 (patch)
treed92a825232ce414f139b4ec862e628b1b57c35ca
parent06d5ba9879305c04d1d7e5076d67a38af2ef3a66 (diff)
downloadrt.equinox.framework-3b63527921acfe7c78cce6b84ab8e869ef17f230.tar.gz
rt.equinox.framework-3b63527921acfe7c78cce6b84ab8e869ef17f230.tar.xz
rt.equinox.framework-3b63527921acfe7c78cce6b84ab8e869ef17f230.zip
Change-Id: I4ef764e744192dc3564ad053e8984e891aadfe44 Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/pom.xml4
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/BundleConstraint.java1
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/GenericCapability.java2
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/GenericConstraint.java1
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverBundle.java4
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverConstraint.java1
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverExport.java2
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverImport.java2
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/VersionHashMap.java2
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/VersionSupplier.java1
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BaseDescriptionImpl.java3
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleDeltaImpl.java1
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleDescriptionImpl.java4
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleSpecificationImpl.java2
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ExportPackageDescriptionImpl.java3
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/GenericDescriptionImpl.java5
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/GenericSpecificationImpl.java5
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/HostSpecificationImpl.java4
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ImportPackageSpecificationImpl.java2
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/NativeCodeDescriptionImpl.java1
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/NativeCodeSpecificationImpl.java4
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ResolverErrorImpl.java1
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/UserState.java2
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/VersionConstraintImpl.java3
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/chain.test/chain/test/TestSingleChain.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/classloader.hooks.a/org/eclipse/osgi/tests/classloader/hooks/a/TestHookConfigurator.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/ext.extclasspath.a/ext/extclasspath/a/ExtClasspathExtTest.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/ext.framework.b/ext/framework/b/TestCondition.java3
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/fragment.test.attach.frag.a/fragment/test/attach/host/a/internal/test/TestPackageAccess.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/fragment.test.attach.frag.a/fragment/test/attach/host/a/internal/test/TestPackageAccess2.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/geturl/geturl/Activator.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/legacy.lazystart/legacy/lazystart/FalseExceptionLegacy1.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/legacy.lazystart/legacy/lazystart/FalseExceptionLegacy2.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/legacy.lazystart/legacy/lazystart/SimpleLegacy.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/legacy.lazystart/legacy/lazystart/TrueExceptionLegacy1.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/legacy.lazystart/legacy/lazystart/TrueExceptionLegacy2.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClass10.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClass11.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClass8.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClass9.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClassAdd10.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClassAdd11.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClassAdd8.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClassAdd9.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClassBase.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestService9.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestServiceBase.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClass10.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClass11.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClass8.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClass9.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClassAdd10.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClassAdd11.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClassAdd8.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClassAdd9.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClassBase.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClass10.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClass11.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClass8.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClass9.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClassAdd10.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClassAdd11.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClassAdd8.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClassAdd9.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClassBase.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/osgi.lazystart/osgi/lazystart/LazyExclude1.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/osgi.lazystart/osgi/lazystart/LazyExclude2.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/osgi.lazystart/osgi/lazystart/LazyInclude1.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/osgi.lazystart/osgi/lazystart/LazyInclude2.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/osgi.lazystart/osgi/lazystart/LazySimple.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/test.bug306181b/test/bug306181b/Component.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/test.link.a/test/link/a/params/AParam.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/bundles_src/thread.locktest/thread/locktest/Activator.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/equinox/log/test/LogReaderServiceTest.java2
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/appadmin/ApplicationAdminTest.java2
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/appadmin/ExitValueApp.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/BundleInstaller.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/DiscardBundleTests.java2
-rwxr-xr-xbundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/PersistedBundleTests.java2
-rwxr-xr-xbundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/SystemBundleTests.java2
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/dummys/DummyModuleDatabase.java4
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/filter/BundleContextFilterTests.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/filter/FilterTests.java4
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/filter/FrameworkUtilFilterTests.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/hooks/framework/BundleFileWrapperFactoryHookTests.java2
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/hooks/framework/ClassLoaderHookTests.java2
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/hooks/framework/ContextFinderTests.java2
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/hooks/framework/DevClassPathWithExtensionTests.java2
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/hooks/framework/StorageHookTests.java2
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/perf/BasePerformanceTest.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/resource/BasicTest.java3
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/security/OSGiAPICertificateTest.java2
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/security/SignedBundleTest.java1
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/securityadmin/SecurityAdminUnitTests.java9
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/securityadmin/SecurityManagerTests.java9
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/serviceregistry/ServiceHookTests.java2
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/serviceregistry/ServiceRegistryTests.java7
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/serviceregistry/ServiceTrackerTests.java3
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/services/resolver/StateResolverTest.java2
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java3
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/internal/adaptor/DefaultStartupMonitor.java2
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/internal/adaptor/EclipseAppLauncher.java2
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleRequirement.java1
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleRevisions.java1
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleWire.java1
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/framework/util/ArrayMap.java16
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/framework/util/FilePath.java1
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/framework/util/Headers.java17
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/framework/util/SecureAction.java25
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/cds/CDSBundleEntry.java7
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/cds/CDSBundleFile.java1
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/cds/CDSHookConfigurator.java1
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/cds/CDSHookImpls.java4
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/container/EquinoxReentrantLock.java1
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/container/LockSet.java1
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/debug/EclipseDebugTrace.java8
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/debug/FrameworkDebugOptions.java17
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/debug/FrameworkDebugTraceEntry.java1
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/BundleContextImpl.java34
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/ContextFinder.java6
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxBundle.java9
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxConfiguration.java9
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxEventPublisher.java5
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/FilterImpl.java9
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/OSGiFrameworkHooks.java9
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/SystemBundleActivator.java2
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/XMLParsingServiceFactory.java2
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/legacy/PackageAdminImpl.java21
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/hooks/DevClassLoadingHook.java3
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/BundleLoader.java4
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/EquinoxClassLoader.java4
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/ModuleClassLoader.java7
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/SystemBundleLoader.java6
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/buddy/DependentPolicy.java3
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/buddy/GlobalPolicy.java3
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/buddy/PolicyHandler.java1
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/buddy/RegisteredPolicy.java3
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/buddy/SystemPolicy.java4
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/sources/FilteredSourcePackage.java3
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/sources/MultiSourcePackage.java4
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/sources/NullPackageSource.java5
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/sources/SingleSourcePackage.java6
-rwxr-xr-xbundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/location/BasicLocation.java14
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EquinoxLogFactory.java9
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EquinoxLogWriter.java2
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EventAdminAdapter.java3
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EventAdminLogListener.java1
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogEntryImpl.java11
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogReaderServiceFactory.java6
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogReaderServiceImpl.java4
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogServiceFactory.java3
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogServiceImpl.java10
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/LogServiceManager.java32
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/LoggerImpl.java8
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/BundlePermissions.java5
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/EquinoxSecurityManager.java4
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/PermissionInfoCollection.java3
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/PermissionsHash.java3
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityAdmin.java74
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityRow.java9
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityRowSnapShot.java9
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityTable.java3
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityTableUpdate.java2
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/provisional/service/security/AuthorizationEngine.java1
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/service/security/KeyStoreTrustEngine.java8
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/FilteredServiceListener.java5
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceFactoryUse.java2
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceReferenceImpl.java9
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceRegistrationImpl.java5
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceRegistry.java20
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ShrinkableCollection.java17
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ShrinkableEntrySetValueCollection.java7
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ShrinkableValueCollectionMap.java19
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/BERProcessor.java1
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/DigestedInputStream.java6
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignedBundleFile.java14
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignedBundleHook.java5
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignedContentFile.java11
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignedContentImpl.java11
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignedStorageHook.java1
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignerInfoImpl.java6
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/ContentHandlerFactoryImpl.java3
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/ContentHandlerProxy.java5
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/MultiplexingContentHandler.java1
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/MultiplexingFactory.java1
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/MultiplexingURLStreamHandler.java10
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/NullURLStreamHandlerService.java9
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/URLStreamHandlerFactoryImpl.java3
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/URLStreamHandlerProxy.java15
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/URLStreamHandlerSetter.java2
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/weaving/WeavingHookConfigurator.java2
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/weaving/WovenClassImpl.java14
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/launch/Equinox.java14
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/launch/EquinoxFactory.java1
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/pluginconversion/PluginConversionException.java1
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/resolver/BundleDelta.java1
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/resolver/BundleDescription.java2
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/resolver/DisabledInfo.java2
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/resolver/GenericDescription.java2
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/resolver/NativeCodeDescription.java1
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/signedcontent/InvalidContentException.java2
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/BundleLocalizationImpl.java1
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/ManifestLocalization.java8
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java9
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/SystemBundleFile.java6
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/BundleEntry.java1
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/BundleFile.java1
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/DirBundleFile.java6
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/DirZipBundleEntry.java6
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/FileBundleEntry.java6
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/MRUBundleFileList.java1
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/NestedDirBundleFile.java8
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/ZipBundleEntry.java6
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/ZipBundleFile.java12
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/BundleResourceHandler.java8
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/BundleURLConnection.java7
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/BundleURLConverter.java2
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/bundleentry/Handler.java1
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/bundleresource/Handler.java1
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/reference/Handler.java2
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/reference/ReferenceInputStream.java1
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/reference/ReferenceURLConnection.java4
-rw-r--r--bundles/org.eclipse.osgi/supplement/src/org/eclipse/equinox/log/ExtendedLogEntry.java1
-rw-r--r--bundles/org.eclipse.osgi/supplement/src/org/eclipse/equinox/log/ExtendedLogService.java1
-rw-r--r--bundles/org.eclipse.osgi/supplement/src/org/eclipse/equinox/log/LogPermission.java5
-rw-r--r--bundles/org.eclipse.osgi/supplement/src/org/eclipse/equinox/log/LogPermissionCollection.java5
-rw-r--r--bundles/org.eclipse.osgi/supplement/src/org/eclipse/equinox/log/Logger.java1
-rw-r--r--bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/console/ConsoleSession.java2
-rw-r--r--bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/eventmgr/CopyOnWriteIdentityMap.java35
-rw-r--r--bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/eventmgr/EventManager.java2
-rw-r--r--bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/internal/reliablefile/ReliableFileInputStream.java9
-rw-r--r--bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/internal/reliablefile/ReliableFileOutputStream.java4
-rw-r--r--bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/location/Locker.java3
-rw-r--r--bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/location/Locker_JavaIo.java3
-rw-r--r--bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/location/Locker_JavaNio.java3
-rw-r--r--bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/storagemanager/ManagedOutputStream.java2
-rw-r--r--bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/ManifestElement.java1
-rw-r--r--bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/NLS.java3
239 files changed, 1084 insertions, 3 deletions
diff --git a/bundles/org.eclipse.osgi.compatibility.state/META-INF/MANIFEST.MF b/bundles/org.eclipse.osgi.compatibility.state/META-INF/MANIFEST.MF
index a01c7b832..0af9816b5 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.osgi.compatibility.state/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.osgi.compatibility.state
-Bundle-Version: 1.1.400.qualifier
+Bundle-Version: 1.1.500.qualifier
ExtensionBundle-Activator: org.eclipse.osgi.compatibility.state.Activator
Fragment-Host: org.eclipse.osgi;bundle-version="3.12.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
diff --git a/bundles/org.eclipse.osgi.compatibility.state/pom.xml b/bundles/org.eclipse.osgi.compatibility.state/pom.xml
index 5b99f4952..71014a698 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/pom.xml
+++ b/bundles/org.eclipse.osgi.compatibility.state/pom.xml
@@ -5,7 +5,7 @@
are made available under the terms of the Eclipse Distribution License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/org/documents/edl-v10.php
-
+
Contributors:
Igor Fedorenko - initial implementation
-->
@@ -19,6 +19,6 @@
</parent>
<groupId>org.eclipse.osgi</groupId>
<artifactId>org.eclipse.osgi.compatibility.state</artifactId>
- <version>1.1.400-SNAPSHOT</version>
+ <version>1.1.500-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/BundleConstraint.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/BundleConstraint.java
index be6c0e7b2..62bb1e928 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/BundleConstraint.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/BundleConstraint.java
@@ -23,6 +23,7 @@ public class BundleConstraint extends ResolverConstraint {
super(bundle, bundleConstraint);
}
+ @Override
boolean isOptional() {
if (constraint instanceof HostSpecification)
return false;
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/GenericCapability.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/GenericCapability.java
index b54956843..6e706dd72 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/GenericCapability.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/GenericCapability.java
@@ -33,6 +33,7 @@ public class GenericCapability extends VersionSupplier {
effective = effectiveDirective == null || Constants.EFFECTIVE_RESOLVE.equals(effectiveDirective) || (Constants.EFFECTIVE_ACTIVE.equals(effectiveDirective) && developmentMode);
}
+ @Override
public BundleDescription getBundleDescription() {
return getBaseDescription().getSupplier();
}
@@ -41,6 +42,7 @@ public class GenericCapability extends VersionSupplier {
return (GenericDescription) getBaseDescription();
}
+ @Override
public ResolverBundle getResolverBundle() {
return resolverBundle;
}
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/GenericConstraint.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/GenericConstraint.java
index 7b1622d97..a2992364c 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/GenericConstraint.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/GenericConstraint.java
@@ -30,6 +30,7 @@ public class GenericConstraint extends ResolverConstraint {
multiple = (constraint.getResolution() & GenericSpecification.RESOLUTION_MULTIPLE) != 0;
}
+ @Override
boolean isOptional() {
return (((GenericSpecification) constraint).getResolution() & GenericSpecification.RESOLUTION_OPTIONAL) != 0;
}
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverBundle.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverBundle.java
index c35ba9334..71ff90007 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverBundle.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverBundle.java
@@ -281,10 +281,12 @@ public class ResolverBundle extends VersionSupplier implements Comparable<Resolv
return null;
}
+ @Override
public BundleDescription getBundleDescription() {
return (BundleDescription) getBaseDescription();
}
+ @Override
public ResolverBundle getResolverBundle() {
return this;
}
@@ -299,6 +301,7 @@ public class ResolverBundle extends VersionSupplier implements Comparable<Resolv
return null;
}
+ @Override
public String toString() {
return "[" + getBundleDescription() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -671,6 +674,7 @@ public class ResolverBundle extends VersionSupplier implements Comparable<Resolv
* If the other BSN is null then -1 is returned
* otherwise String.compareTo is used
*/
+ @Override
public int compareTo(ResolverBundle o) {
String bsn = getName();
String otherBsn = o.getName();
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverConstraint.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverConstraint.java
index 33e0dc057..d08c79de5 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverConstraint.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverConstraint.java
@@ -64,6 +64,7 @@ public abstract class ResolverConstraint {
return constraint.getName();
}
+ @Override
public String toString() {
return constraint.toString();
}
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverExport.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverExport.java
index ea97279a9..c3210790d 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverExport.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverExport.java
@@ -32,6 +32,7 @@ public class ResolverExport extends VersionSupplier {
return (ExportPackageDescription) base;
}
+ @Override
public BundleDescription getBundleDescription() {
return getExportPackageDescription().getExporter();
}
@@ -40,6 +41,7 @@ public class ResolverExport extends VersionSupplier {
return resolverBundle;
}
+ @Override
ResolverBundle getResolverBundle() {
return getExporter();
}
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverImport.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverImport.java
index a824e6728..936373e79 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverImport.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverImport.java
@@ -27,6 +27,7 @@ public class ResolverImport extends ResolverConstraint {
super(bundle, ips);
}
+ @Override
boolean isOptional() {
return ImportPackageSpecification.RESOLUTION_OPTIONAL.equals(((ImportPackageSpecification) constraint).getDirective(Constants.RESOLUTION_DIRECTIVE));
}
@@ -35,6 +36,7 @@ public class ResolverImport extends ResolverConstraint {
return ImportPackageSpecification.RESOLUTION_DYNAMIC.equals(((ImportPackageSpecification) constraint).getDirective(Constants.RESOLUTION_DIRECTIVE));
}
+ @Override
public String getName() {
if (name != null)
return name; // return the required package set for a dynamic import
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/VersionHashMap.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/VersionHashMap.java
index 42334fb80..7e698e790 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/VersionHashMap.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/VersionHashMap.java
@@ -31,6 +31,7 @@ public class VersionHashMap<V extends VersionSupplier> extends MappedList<String
// assumes existing array is sorted
// finds the index where to insert the new value
+ @Override
protected int insertionIndex(List<V> existing, V value) {
int index = existing.size();
if (compare(existing.get(existing.size() - 1), value) > 0) {
@@ -91,6 +92,7 @@ public class VersionHashMap<V extends VersionSupplier> extends MappedList<String
// First the resolution status of the supplying bundle.
// Second is the supplier version.
// Third is the bundle id of the supplying bundle.
+ @Override
public int compare(V vs1, V vs2) {
// if the selection policy is set then use that
if (resolver.getSelectionPolicy() != null)
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/VersionSupplier.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/VersionSupplier.java
index f3fea956b..3460575ad 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/VersionSupplier.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/VersionSupplier.java
@@ -64,6 +64,7 @@ public abstract class VersionSupplier {
*/
abstract ResolverBundle getResolverBundle();
+ @Override
public String toString() {
return base.toString();
}
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BaseDescriptionImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BaseDescriptionImpl.java
index 83074a7ba..a1d3507e0 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BaseDescriptionImpl.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BaseDescriptionImpl.java
@@ -150,6 +150,7 @@ public abstract class BaseDescriptionImpl implements BaseDescription {
return Collections.unmodifiableMap(attrs);
}
+ @Override
public int hashCode() {
return System.identityHashCode(BaseDescriptionImpl.this);
}
@@ -158,6 +159,7 @@ public abstract class BaseDescriptionImpl implements BaseDescription {
return BaseDescriptionImpl.this;
}
+ @Override
public boolean equals(Object obj) {
if (this == obj)
return true;
@@ -166,6 +168,7 @@ public abstract class BaseDescriptionImpl implements BaseDescription {
return (((BaseCapability) obj).getBaseDescription() == BaseDescriptionImpl.this) && namespace.equals(((BaseCapability) obj).getNamespace());
}
+ @Override
public String toString() {
return getNamespace() + BaseDescriptionImpl.toString(getAttributes(), false) + BaseDescriptionImpl.toString(getDirectives(), true);
}
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleDeltaImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleDeltaImpl.java
index 995a94d7f..a0d1464e8 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleDeltaImpl.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleDeltaImpl.java
@@ -47,6 +47,7 @@ final class BundleDeltaImpl implements BundleDelta {
this.type = type;
}
+ @Override
public String toString() {
return bundleDescription.getSymbolicName() + '_' + bundleDescription.getVersion() + " (" + toTypeString(type) + ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleDescriptionImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleDescriptionImpl.java
index 614a68fbc..e23e41686 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleDescriptionImpl.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleDescriptionImpl.java
@@ -492,6 +492,7 @@ public final class BundleDescriptionImpl extends BaseDescriptionImpl implements
}
}
+ @Override
public String toString() {
if (getSymbolicName() == null)
return "[" + getBundleId() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
@@ -955,6 +956,7 @@ public final class BundleDescriptionImpl extends BaseDescriptionImpl implements
return null;
}
+ @Override
String getInternalNameSpace() {
return BundleRevision.BUNDLE_NAMESPACE;
}
@@ -1017,6 +1019,7 @@ public final class BundleDescriptionImpl extends BaseDescriptionImpl implements
return capability.equals(other.getCapability()) && requirement.equals(other.getRequirement()) && provider.equals(other.getProviderWiring()) && requirer.equals(other.getRequirerWiring());
}
+ @Override
public String toString() {
return getRequirement() + " -> " + getCapability(); //$NON-NLS-1$
}
@@ -1230,6 +1233,7 @@ public final class BundleDescriptionImpl extends BaseDescriptionImpl implements
return null;
}
+ @Override
public String toString() {
return BundleDescriptionImpl.this.toString();
}
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleSpecificationImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleSpecificationImpl.java
index 400eddfec..b22852037 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleSpecificationImpl.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/BundleSpecificationImpl.java
@@ -75,6 +75,7 @@ public class BundleSpecificationImpl extends VersionConstraintImpl implements Bu
}
}
+ @Override
public boolean isSatisfiedBy(BaseDescription supplier) {
if (!(supplier instanceof BundleDescriptionImpl))
return false;
@@ -115,6 +116,7 @@ public class BundleSpecificationImpl extends VersionConstraintImpl implements Bu
return true;
}
+ @Override
public String toString() {
return "Require-Bundle: " + getName() + "; bundle-version=\"" + getVersionRange() + "\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ExportPackageDescriptionImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ExportPackageDescriptionImpl.java
index dd264cf57..7bfccba1a 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ExportPackageDescriptionImpl.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ExportPackageDescriptionImpl.java
@@ -223,6 +223,7 @@ public class ExportPackageDescriptionImpl extends BaseDescriptionImpl implements
this.exporter = exporter;
}
+ @Override
public BaseDescription getFragmentDeclaration() {
return fragmentDeclaration;
}
@@ -231,10 +232,12 @@ public class ExportPackageDescriptionImpl extends BaseDescriptionImpl implements
this.fragmentDeclaration = fragmentDeclaration;
}
+ @Override
public String toString() {
return "Export-Package: " + getName() + "; version=\"" + getVersion() + "\""; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
}
+ @Override
String getInternalNameSpace() {
return BundleRevision.PACKAGE_NAMESPACE;
}
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/GenericDescriptionImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/GenericDescriptionImpl.java
index aaa1b1136..6c97a19ff 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/GenericDescriptionImpl.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/GenericDescriptionImpl.java
@@ -74,6 +74,7 @@ public class GenericDescriptionImpl extends BaseDescriptionImpl implements Gener
this.supplier = supplier;
}
+ @Override
public String toString() {
StringBuffer sb = new StringBuffer();
sb.append(Constants.PROVIDE_CAPABILITY).append(": ").append(getType()); //$NON-NLS-1$
@@ -85,6 +86,7 @@ public class GenericDescriptionImpl extends BaseDescriptionImpl implements Gener
/**
* @deprecated
*/
+ @Override
public String getName() {
synchronized (this.monitor) {
Object name = attributes != null ? attributes.get(getType()) : null;
@@ -106,6 +108,7 @@ public class GenericDescriptionImpl extends BaseDescriptionImpl implements Gener
/**
* @deprecated
*/
+ @Override
public Version getVersion() {
Object version = attributes != null ? attributes.get(Constants.VERSION_ATTRIBUTE) : null;
return version instanceof Version ? (Version) version : super.getVersion();
@@ -134,10 +137,12 @@ public class GenericDescriptionImpl extends BaseDescriptionImpl implements Gener
}
}
+ @Override
String getInternalNameSpace() {
return getType();
}
+ @Override
public BaseDescription getFragmentDeclaration() {
return fragmentDeclaration;
}
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/GenericSpecificationImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/GenericSpecificationImpl.java
index 468cfb9fc..1fa60bf68 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/GenericSpecificationImpl.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/GenericSpecificationImpl.java
@@ -55,6 +55,7 @@ public class GenericSpecificationImpl extends VersionConstraintImpl implements G
}
}
+ @Override
public boolean isSatisfiedBy(BaseDescription supplier) {
if (!(supplier instanceof GenericDescription))
return false;
@@ -70,6 +71,7 @@ public class GenericSpecificationImpl extends VersionConstraintImpl implements G
return true;
}
+ @Override
public String toString() {
StringBuffer sb = new StringBuffer();
sb.append(Constants.REQUIRE_CAPABILITY).append(": ").append(getType()); //$NON-NLS-1$
@@ -99,6 +101,7 @@ public class GenericSpecificationImpl extends VersionConstraintImpl implements G
}
}
+ @Override
public boolean isResolved() {
synchronized (this.monitor) {
return suppliers != null && suppliers.length > 0;
@@ -111,12 +114,14 @@ public class GenericSpecificationImpl extends VersionConstraintImpl implements G
}
}
+ @Override
public BaseDescription getSupplier() {
synchronized (this.monitor) {
return suppliers == null || suppliers.length == 0 ? null : suppliers[0];
}
}
+ @Override
protected void setSupplier(BaseDescription supplier) {
synchronized (this.monitor) {
if (supplier == null) {
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/HostSpecificationImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/HostSpecificationImpl.java
index 43a49b47e..a39d021d0 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/HostSpecificationImpl.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/HostSpecificationImpl.java
@@ -53,6 +53,7 @@ public class HostSpecificationImpl extends VersionConstraintImpl implements Host
}
}
+ @Override
public boolean isSatisfiedBy(BaseDescription supplier) {
if (!(supplier instanceof BundleDescriptionImpl))
return false;
@@ -99,6 +100,7 @@ public class HostSpecificationImpl extends VersionConstraintImpl implements Host
return true;
}
+ @Override
public boolean isResolved() {
synchronized (this.monitor) {
return hosts != null && hosts.length > 0;
@@ -114,10 +116,12 @@ public class HostSpecificationImpl extends VersionConstraintImpl implements Host
}
}
+ @Override
public String toString() {
return "Fragment-Host: " + getName() + "; bundle-version=\"" + getVersionRange() + "\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
+ @Override
public BaseDescription getSupplier() {
synchronized (this.monitor) {
if (hosts == null || hosts.length == 0)
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ImportPackageSpecificationImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ImportPackageSpecificationImpl.java
index a5651c183..adce58611 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ImportPackageSpecificationImpl.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ImportPackageSpecificationImpl.java
@@ -98,6 +98,7 @@ public class ImportPackageSpecificationImpl extends VersionConstraintImpl implem
}
}
+ @Override
public boolean isSatisfiedBy(BaseDescription supplier) {
return isSatisfiedBy(supplier, true);
}
@@ -212,6 +213,7 @@ public class ImportPackageSpecificationImpl extends VersionConstraintImpl implem
}
}
+ @Override
public String toString() {
return "Import-Package: " + getName() + "; version=\"" + getVersionRange() + "\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/NativeCodeDescriptionImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/NativeCodeDescriptionImpl.java
index b81649d39..dbc32a8a5 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/NativeCodeDescriptionImpl.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/NativeCodeDescriptionImpl.java
@@ -113,6 +113,7 @@ public class NativeCodeDescriptionImpl extends BaseDescriptionImpl implements Na
return highest;
}
+ @Override
public String toString() {
StringBuffer sb = new StringBuffer();
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/NativeCodeSpecificationImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/NativeCodeSpecificationImpl.java
index 31a061020..4408640dd 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/NativeCodeSpecificationImpl.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/NativeCodeSpecificationImpl.java
@@ -53,6 +53,7 @@ public class NativeCodeSpecificationImpl extends VersionConstraintImpl implement
}
@SuppressWarnings("unchecked")
+ @Override
public boolean isSatisfiedBy(BaseDescription supplier) {
if (!(supplier instanceof NativeCodeDescription))
return false;
@@ -171,6 +172,7 @@ public class NativeCodeSpecificationImpl extends VersionConstraintImpl implement
return true;
}
+ @Override
public String toString() {
StringBuffer sb = new StringBuffer();
NativeCodeDescription[] suppliers = getPossibleSuppliers();
@@ -183,10 +185,12 @@ public class NativeCodeSpecificationImpl extends VersionConstraintImpl implement
return sb.toString();
}
+ @Override
protected Map<String, String> getInternalDirectives() {
return Collections.<String, String> emptyMap();
}
+ @Override
protected Map<String, Object> getInteralAttributes() {
return Collections.<String, Object> emptyMap();
}
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ResolverErrorImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ResolverErrorImpl.java
index 4d77ac41f..3839cea0a 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ResolverErrorImpl.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/ResolverErrorImpl.java
@@ -46,6 +46,7 @@ public final class ResolverErrorImpl implements ResolverError {
return unsatisfied;
}
+ @Override
public String toString() {
switch (getType()) {
case ResolverError.EXPORT_PACKAGE_PERMISSION :
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/UserState.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/UserState.java
index fe03e185c..3ea2d5030 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/UserState.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/UserState.java
@@ -25,6 +25,7 @@ public class UserState extends StateImpl {
// TODO this is not an accurate way to record updates
private final Set<String> updated = Collections.synchronizedSet(new HashSet<String>());
+ @Override
public boolean removeBundle(BundleDescription description) {
if (description.getLocation() != null)
updated.remove(description.getLocation());
@@ -33,6 +34,7 @@ public class UserState extends StateImpl {
return true;
}
+ @Override
public boolean updateBundle(BundleDescription newDescription) {
if (!super.updateBundle(newDescription))
return false;
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/VersionConstraintImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/VersionConstraintImpl.java
index 09bd4fac1..9f53f941c 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/VersionConstraintImpl.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/VersionConstraintImpl.java
@@ -154,6 +154,7 @@ abstract class VersionConstraintImpl implements VersionConstraint {
return isSatisfiedBy(((BaseCapability) capability).getBaseDescription());
}
+ @Override
public int hashCode() {
return System.identityHashCode(VersionConstraintImpl.this);
}
@@ -162,6 +163,7 @@ abstract class VersionConstraintImpl implements VersionConstraint {
return VersionConstraintImpl.this;
}
+ @Override
public boolean equals(Object obj) {
if (this == obj)
return true;
@@ -170,6 +172,7 @@ abstract class VersionConstraintImpl implements VersionConstraint {
return ((BundleRequirementImpl) obj).getVersionConstraint() == VersionConstraintImpl.this;
}
+ @Override
public String toString() {
return getNamespace() + BaseDescriptionImpl.toString(getAttributes(), false) + BaseDescriptionImpl.toString(getDirectives(), true);
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/chain.test/chain/test/TestSingleChain.java b/bundles/org.eclipse.osgi.tests/bundles_src/chain.test/chain/test/TestSingleChain.java
index 16a2de27b..18d43e813 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/chain.test/chain/test/TestSingleChain.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/chain.test/chain/test/TestSingleChain.java
@@ -18,6 +18,7 @@ import org.eclipse.osgi.tests.bundles.ITestRunner;
public class TestSingleChain implements ITestRunner {
+ @Override
public Object testIt() throws Exception {
return new AChain();
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/classloader.hooks.a/org/eclipse/osgi/tests/classloader/hooks/a/TestHookConfigurator.java b/bundles/org.eclipse.osgi.tests/bundles_src/classloader.hooks.a/org/eclipse/osgi/tests/classloader/hooks/a/TestHookConfigurator.java
index 0daec7d29..2a499db21 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/classloader.hooks.a/org/eclipse/osgi/tests/classloader/hooks/a/TestHookConfigurator.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/classloader.hooks.a/org/eclipse/osgi/tests/classloader/hooks/a/TestHookConfigurator.java
@@ -32,6 +32,7 @@ public class TestHookConfigurator implements HookConfigurator {
private static final String PREVENT_RESOURCE_LOAD_PRE = "classloader.hooks.a.fail.resource.load.pre";
private static final String PREVENT_RESOURCE_LOAD_POST = "classloader.hooks.a.fail.resource.load.post";
final ThreadLocal<Boolean> doingRecursionLoad = new ThreadLocal<Boolean>() {
+ @Override
protected Boolean initialValue() {
return false;
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/ext.extclasspath.a/ext/extclasspath/a/ExtClasspathExtTest.java b/bundles/org.eclipse.osgi.tests/bundles_src/ext.extclasspath.a/ext/extclasspath/a/ExtClasspathExtTest.java
index 94389445c..fb06e20e9 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/ext.extclasspath.a/ext/extclasspath/a/ExtClasspathExtTest.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/ext.extclasspath.a/ext/extclasspath/a/ExtClasspathExtTest.java
@@ -14,6 +14,7 @@
package ext.extclasspath.a;
public class ExtClasspathExtTest {
+ @Override
public String toString() {
return "success";
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/ext.framework.b/ext/framework/b/TestCondition.java b/bundles/org.eclipse.osgi.tests/bundles_src/ext.framework.b/ext/framework/b/TestCondition.java
index 23f48af65..24f202b38 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/ext.framework.b/ext/framework/b/TestCondition.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/ext.framework.b/ext/framework/b/TestCondition.java
@@ -99,10 +99,12 @@ public class TestCondition implements Condition {
return true;
}
+ @Override
public int hashCode() {
return id.hashCode();
}
+ @Override
public boolean equals(Object o) {
if (!(o instanceof TestCondition))
return false;
@@ -126,6 +128,7 @@ public class TestCondition implements Condition {
return bundle;
}
+ @Override
public String toString() {
return id + '-' + postponed + '-' + mutable + '-' + satisfied;
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/fragment.test.attach.frag.a/fragment/test/attach/host/a/internal/test/TestPackageAccess.java b/bundles/org.eclipse.osgi.tests/bundles_src/fragment.test.attach.frag.a/fragment/test/attach/host/a/internal/test/TestPackageAccess.java
index e3bb18344..e86e38d89 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/fragment.test.attach.frag.a/fragment/test/attach/host/a/internal/test/TestPackageAccess.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/fragment.test.attach.frag.a/fragment/test/attach/host/a/internal/test/TestPackageAccess.java
@@ -17,6 +17,7 @@ import org.eclipse.osgi.tests.bundles.ITestRunner;
public class TestPackageAccess implements ITestRunner{
+ @Override
public Object testIt() throws Exception {
new PackageAccessTest().packageLevelAccess(TestPackageAccess.class.getName());
return null;
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/fragment.test.attach.frag.a/fragment/test/attach/host/a/internal/test/TestPackageAccess2.java b/bundles/org.eclipse.osgi.tests/bundles_src/fragment.test.attach.frag.a/fragment/test/attach/host/a/internal/test/TestPackageAccess2.java
index 6f33e6560..dfced0c54 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/fragment.test.attach.frag.a/fragment/test/attach/host/a/internal/test/TestPackageAccess2.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/fragment.test.attach.frag.a/fragment/test/attach/host/a/internal/test/TestPackageAccess2.java
@@ -17,6 +17,7 @@ import org.eclipse.osgi.tests.bundles.ITestRunner;
public class TestPackageAccess2 implements ITestRunner {
+ @Override
public Object testIt() throws Exception {
new PackageAccessTest2().packageLevelAccess(TestPackageAccess2.class.getName());
return null;
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/geturl/geturl/Activator.java b/bundles/org.eclipse.osgi.tests/bundles_src/geturl/geturl/Activator.java
index 15dd68965..faff555b8 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/geturl/geturl/Activator.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/geturl/geturl/Activator.java
@@ -30,6 +30,7 @@ public class Activator implements BundleActivator {
props.put("test.url", url);
context.registerService(PrivilegedAction.class, new PrivilegedAction() {
+ @Override
public Object run() {
try {
throw new RuntimeException("Expected to fail to create: " + new URL(urlSpec));
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/legacy.lazystart/legacy/lazystart/FalseExceptionLegacy1.java b/bundles/org.eclipse.osgi.tests/bundles_src/legacy.lazystart/legacy/lazystart/FalseExceptionLegacy1.java
index c19d9535c..d1232e1e2 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/legacy.lazystart/legacy/lazystart/FalseExceptionLegacy1.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/legacy.lazystart/legacy/lazystart/FalseExceptionLegacy1.java
@@ -19,6 +19,7 @@ import org.eclipse.osgi.tests.bundles.ITestRunner;
public class FalseExceptionLegacy1 implements ITestRunner {
+ @Override
public Object testIt() throws Exception {
new CAExcluded();
return new CBExcluded();
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/legacy.lazystart/legacy/lazystart/FalseExceptionLegacy2.java b/bundles/org.eclipse.osgi.tests/bundles_src/legacy.lazystart/legacy/lazystart/FalseExceptionLegacy2.java
index 8a34887d2..8ecc38fc5 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/legacy.lazystart/legacy/lazystart/FalseExceptionLegacy2.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/legacy.lazystart/legacy/lazystart/FalseExceptionLegacy2.java
@@ -17,6 +17,7 @@ import org.eclipse.osgi.tests.bundles.ITestRunner;
import legacy.lazystart.c.CTest;
public class FalseExceptionLegacy2 implements ITestRunner {
+ @Override
public Object testIt() throws Exception {
return new CTest();
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/legacy.lazystart/legacy/lazystart/SimpleLegacy.java b/bundles/org.eclipse.osgi.tests/bundles_src/legacy.lazystart/legacy/lazystart/SimpleLegacy.java
index 8cee35555..e51a808e1 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/legacy.lazystart/legacy/lazystart/SimpleLegacy.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/legacy.lazystart/legacy/lazystart/SimpleLegacy.java
@@ -18,6 +18,7 @@ import legacy.lazystart.a.ATest;
public class SimpleLegacy implements ITestRunner {
+ @Override
public Object testIt() throws Exception {
return new ATest();
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/legacy.lazystart/legacy/lazystart/TrueExceptionLegacy1.java b/bundles/org.eclipse.osgi.tests/bundles_src/legacy.lazystart/legacy/lazystart/TrueExceptionLegacy1.java
index 1d9fcb9a6..b58be2f63 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/legacy.lazystart/legacy/lazystart/TrueExceptionLegacy1.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/legacy.lazystart/legacy/lazystart/TrueExceptionLegacy1.java
@@ -18,6 +18,7 @@ import legacy.lazystart.b.excluded.a.BAExcluded;
import legacy.lazystart.b.excluded.b.BBExcluded;
public class TrueExceptionLegacy1 implements ITestRunner {
+ @Override
public Object testIt() throws Exception {
new BAExcluded();
return new BBExcluded();
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/legacy.lazystart/legacy/lazystart/TrueExceptionLegacy2.java b/bundles/org.eclipse.osgi.tests/bundles_src/legacy.lazystart/legacy/lazystart/TrueExceptionLegacy2.java
index dbb544b8b..7828885fa 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/legacy.lazystart/legacy/lazystart/TrueExceptionLegacy2.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/legacy.lazystart/legacy/lazystart/TrueExceptionLegacy2.java
@@ -18,6 +18,7 @@ import legacy.lazystart.b.BTest;
public class TrueExceptionLegacy2 implements ITestRunner {
+ @Override
public Object testIt() throws Exception {
return new BTest();
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClass10.java b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClass10.java
index ac902b4ab..e7df1dd3e 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClass10.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClass10.java
@@ -14,6 +14,7 @@
package multi.release.test;
public class TestClass10 {
+ @Override
public String toString() {
return "BASEXX";
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClass11.java b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClass11.java
index 22ec85302..68db75f83 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClass11.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClass11.java
@@ -14,6 +14,7 @@
package multi.release.test;
public class TestClass11 {
+ @Override
public String toString() {
return "BASEXX";
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClass8.java b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClass8.java
index 6a4e1a3e9..a8d50c527 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClass8.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClass8.java
@@ -14,6 +14,7 @@
package multi.release.test;
public class TestClass8 {
+ @Override
public String toString() {
return "BASEXX";
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClass9.java b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClass9.java
index 1bf788c87..27d561a25 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClass9.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClass9.java
@@ -14,6 +14,7 @@
package multi.release.test;
public class TestClass9 {
+ @Override
public String toString() {
return "BASEXX";
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClassAdd10.java b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClassAdd10.java
index b4902711c..88169006c 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClassAdd10.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClassAdd10.java
@@ -14,6 +14,7 @@
package multi.release.test;
public class TestClassAdd10 {
+ @Override
public String toString() {
return "ADD10";
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClassAdd11.java b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClassAdd11.java
index 3ef1e6f7c..ad95e9d38 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClassAdd11.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClassAdd11.java
@@ -14,6 +14,7 @@
package multi.release.test;
public class TestClassAdd11 {
+ @Override
public String toString() {
return "ADD11";
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClassAdd8.java b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClassAdd8.java
index 33f17eaa5..1cedc165a 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClassAdd8.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClassAdd8.java
@@ -14,6 +14,7 @@
package multi.release.test;
public class TestClassAdd8 {
+ @Override
public String toString() {
return "ADD08";
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClassAdd9.java b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClassAdd9.java
index b9840a1a9..c9730362c 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClassAdd9.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClassAdd9.java
@@ -14,6 +14,7 @@
package multi.release.test;
public class TestClassAdd9 {
+ @Override
public String toString() {
return "ADD09";
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClassBase.java b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClassBase.java
index aa1be9ac0..3cd29cb28 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClassBase.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestClassBase.java
@@ -17,6 +17,7 @@ import java.net.MalformedURLException;
import java.net.URL;
public class TestClassBase {
+ @Override
public String toString() {
return "BASEXX";
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestService9.java b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestService9.java
index 92cbf31b6..123a63d14 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestService9.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestService9.java
@@ -14,6 +14,7 @@
package multi.release.test;
public class TestService9 implements TestService {
+ @Override
public String toString() {
return "SERVICE_9";
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestServiceBase.java b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestServiceBase.java
index 2ab44da27..5c9a3b484 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestServiceBase.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/TestServiceBase.java
@@ -14,6 +14,7 @@
package multi.release.test;
public class TestServiceBase implements TestService {
+ @Override
public String toString() {
return "SERVICE_BASE";
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClass10.java b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClass10.java
index 0d4ae7407..12b25ca5d 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClass10.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClass10.java
@@ -14,6 +14,7 @@
package multi.release.test.sub;
public class TestClass10 {
+ @Override
public String toString() {
return "BASEXX";
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClass11.java b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClass11.java
index 8d7727e3c..cd668c3a8 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClass11.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClass11.java
@@ -14,6 +14,7 @@
package multi.release.test.sub;
public class TestClass11 {
+ @Override
public String toString() {
return "BASEXX";
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClass8.java b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClass8.java
index 4fda6f943..21b7fd0cf 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClass8.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClass8.java
@@ -14,6 +14,7 @@
package multi.release.test.sub;
public class TestClass8 {
+ @Override
public String toString() {
return "BASEXX";
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClass9.java b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClass9.java
index 55665b50c..bc6988484 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClass9.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClass9.java
@@ -14,6 +14,7 @@
package multi.release.test.sub;
public class TestClass9 {
+ @Override
public String toString() {
return "BASEXX";
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClassAdd10.java b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClassAdd10.java
index 659bab31f..2b32cc9d6 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClassAdd10.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClassAdd10.java
@@ -14,6 +14,7 @@
package multi.release.test.sub;
public class TestClassAdd10 {
+ @Override
public String toString() {
return "ADD10";
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClassAdd11.java b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClassAdd11.java
index ba2b7e623..2c3cc92c5 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClassAdd11.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClassAdd11.java
@@ -14,6 +14,7 @@
package multi.release.test.sub;
public class TestClassAdd11 {
+ @Override
public String toString() {
return "ADD11";
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClassAdd8.java b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClassAdd8.java
index d38ffbfd9..2bf5b813e 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClassAdd8.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClassAdd8.java
@@ -14,6 +14,7 @@
package multi.release.test.sub;
public class TestClassAdd8 {
+ @Override
public String toString() {
return "ADD08";
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClassAdd9.java b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClassAdd9.java
index 8fb46ccb5..0cad17a4c 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClassAdd9.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClassAdd9.java
@@ -14,6 +14,7 @@
package multi.release.test.sub;
public class TestClassAdd9 {
+ @Override
public String toString() {
return "ADD09";
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClassBase.java b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClassBase.java
index 486611801..bf4734901 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClassBase.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub/TestClassBase.java
@@ -14,6 +14,7 @@
package multi.release.test.sub;
public class TestClassBase {
+ @Override
public String toString() {
return "BASEXX";
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClass10.java b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClass10.java
index 70d39f29b..b3e0aa243 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClass10.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClass10.java
@@ -14,6 +14,7 @@
package multi.release.test.sub2;
public class TestClass10 {
+ @Override
public String toString() {
return "BASEXX";
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClass11.java b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClass11.java
index 63342bea8..7824aef8f 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClass11.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClass11.java
@@ -14,6 +14,7 @@
package multi.release.test.sub2;
public class TestClass11 {
+ @Override
public String toString() {
return "BASEXX";
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClass8.java b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClass8.java
index 1f5a1548c..3b0920952 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClass8.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClass8.java
@@ -14,6 +14,7 @@
package multi.release.test.sub2;
public class TestClass8 {
+ @Override
public String toString() {
return "BASEXX";
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClass9.java b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClass9.java
index 8e95bafa3..c07410ed3 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClass9.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClass9.java
@@ -14,6 +14,7 @@
package multi.release.test.sub2;
public class TestClass9 {
+ @Override
public String toString() {
return "BASEXX";
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClassAdd10.java b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClassAdd10.java
index c2e0a5428..a547a3a4b 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClassAdd10.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClassAdd10.java
@@ -14,6 +14,7 @@
package multi.release.test.sub2;
public class TestClassAdd10 {
+ @Override
public String toString() {
return "ADD10";
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClassAdd11.java b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClassAdd11.java
index b3d2294f1..bb757394a 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClassAdd11.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClassAdd11.java
@@ -14,6 +14,7 @@
package multi.release.test.sub2;
public class TestClassAdd11 {
+ @Override
public String toString() {
return "ADD11";
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClassAdd8.java b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClassAdd8.java
index d6f70599c..d51d4c1b7 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClassAdd8.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClassAdd8.java
@@ -14,6 +14,7 @@
package multi.release.test.sub2;
public class TestClassAdd8 {
+ @Override
public String toString() {
return "ADD08";
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClassAdd9.java b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClassAdd9.java
index f6bf08975..bfa8dbc7e 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClassAdd9.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClassAdd9.java
@@ -14,6 +14,7 @@
package multi.release.test.sub2;
public class TestClassAdd9 {
+ @Override
public String toString() {
return "ADD09";
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClassBase.java b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClassBase.java
index 0ee44e13e..a5a2f7fbd 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClassBase.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/mrBundleInputBase/multi/release/test/sub2/TestClassBase.java
@@ -14,6 +14,7 @@
package multi.release.test.sub2;
public class TestClassBase {
+ @Override
public String toString() {
return "BASEXX";
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/osgi.lazystart/osgi/lazystart/LazyExclude1.java b/bundles/org.eclipse.osgi.tests/bundles_src/osgi.lazystart/osgi/lazystart/LazyExclude1.java
index a7fbdc6b1..cce9027df 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/osgi.lazystart/osgi/lazystart/LazyExclude1.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/osgi.lazystart/osgi/lazystart/LazyExclude1.java
@@ -18,6 +18,7 @@ import osgi.lazystart.b.excluded.a.BAExcluded;
import osgi.lazystart.b.excluded.b.BBExcluded;
public class LazyExclude1 implements ITestRunner {
+ @Override
public Object testIt() throws Exception {
new BAExcluded();
return new BBExcluded();
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/osgi.lazystart/osgi/lazystart/LazyExclude2.java b/bundles/org.eclipse.osgi.tests/bundles_src/osgi.lazystart/osgi/lazystart/LazyExclude2.java
index e5b7c6612..5a0aeb041 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/osgi.lazystart/osgi/lazystart/LazyExclude2.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/osgi.lazystart/osgi/lazystart/LazyExclude2.java
@@ -18,6 +18,7 @@ import osgi.lazystart.b.BTest;
public class LazyExclude2 implements ITestRunner {
+ @Override
public Object testIt() throws Exception {
return new BTest();
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/osgi.lazystart/osgi/lazystart/LazyInclude1.java b/bundles/org.eclipse.osgi.tests/bundles_src/osgi.lazystart/osgi/lazystart/LazyInclude1.java
index 8974c18dc..36ad65011 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/osgi.lazystart/osgi/lazystart/LazyInclude1.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/osgi.lazystart/osgi/lazystart/LazyInclude1.java
@@ -19,6 +19,7 @@ import org.eclipse.osgi.tests.bundles.ITestRunner;
public class LazyInclude1 implements ITestRunner {
+ @Override
public Object testIt() throws Exception {
new CAExcluded();
return new CBExcluded();
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/osgi.lazystart/osgi/lazystart/LazyInclude2.java b/bundles/org.eclipse.osgi.tests/bundles_src/osgi.lazystart/osgi/lazystart/LazyInclude2.java
index 35b4af59d..663920fcd 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/osgi.lazystart/osgi/lazystart/LazyInclude2.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/osgi.lazystart/osgi/lazystart/LazyInclude2.java
@@ -17,6 +17,7 @@ import org.eclipse.osgi.tests.bundles.ITestRunner;
import osgi.lazystart.c.CTest;
public class LazyInclude2 implements ITestRunner {
+ @Override
public Object testIt() throws Exception {
return new CTest();
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/osgi.lazystart/osgi/lazystart/LazySimple.java b/bundles/org.eclipse.osgi.tests/bundles_src/osgi.lazystart/osgi/lazystart/LazySimple.java
index af26f5b51..f161ec60e 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/osgi.lazystart/osgi/lazystart/LazySimple.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/osgi.lazystart/osgi/lazystart/LazySimple.java
@@ -18,6 +18,7 @@ import osgi.lazystart.a.ATest;
public class LazySimple implements ITestRunner {
+ @Override
public Object testIt() throws Exception {
return new ATest();
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.bug306181b/test/bug306181b/Component.java b/bundles/org.eclipse.osgi.tests/bundles_src/test.bug306181b/test/bug306181b/Component.java
index 6bcb27d28..7302a9159 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/test.bug306181b/test/bug306181b/Component.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/test.bug306181b/test/bug306181b/Component.java
@@ -15,6 +15,7 @@ package test.bug306181b;
public class Component implements Runnable {
+ @Override
public void run() {
// nothing
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.a/test/link/a/params/AParam.java b/bundles/org.eclipse.osgi.tests/bundles_src/test.link.a/test/link/a/params/AParam.java
index 14fc5e551..9e3ba58c3 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/test.link.a/test/link/a/params/AParam.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/test.link.a/test/link/a/params/AParam.java
@@ -14,6 +14,7 @@
package test.link.a.params;
public class AParam {
+ @Override
public String toString() {
return "AParam"; //$NON-NLS-1$
}
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/thread.locktest/thread/locktest/Activator.java b/bundles/org.eclipse.osgi.tests/bundles_src/thread.locktest/thread/locktest/Activator.java
index b3006ff10..4c80e3ef7 100644
--- a/bundles/org.eclipse.osgi.tests/bundles_src/thread.locktest/thread/locktest/Activator.java
+++ b/bundles/org.eclipse.osgi.tests/bundles_src/thread.locktest/thread/locktest/Activator.java
@@ -34,6 +34,7 @@ public class Activator implements BundleActivator, Runnable {
AbstractBundleTests.simpleResults.addEvent(new BundleEvent(BundleEvent.STOPPED, context.getBundle()));
}
+ @Override
public void run() {
long startTime = System.currentTimeMillis();
System.out.println("about to load Class1");
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/equinox/log/test/LogReaderServiceTest.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/equinox/log/test/LogReaderServiceTest.java
index f8a617d6c..fdf426e66 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/equinox/log/test/LogReaderServiceTest.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/equinox/log/test/LogReaderServiceTest.java
@@ -62,6 +62,7 @@ public class LogReaderServiceTest extends AbstractBundleTests {
setName(name);
}
+ @Override
protected void setUp() throws Exception {
super.setUp();
logReference = OSGiTestsActivator.getContext().getServiceReference(LogService.class.getName());
@@ -80,6 +81,7 @@ public class LogReaderServiceTest extends AbstractBundleTests {
rootLoggerContext.setLogLevels(copyLogLevels);
}
+ @Override
protected void tearDown() throws Exception {
rootLoggerContext.setLogLevels(rootLogLevels);
OSGiTestsActivator.getContext().ungetService(loggerAdminReference);
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/appadmin/ApplicationAdminTest.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/appadmin/ApplicationAdminTest.java
index 2023936ea..00420aac7 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/appadmin/ApplicationAdminTest.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/appadmin/ApplicationAdminTest.java
@@ -329,6 +329,7 @@ public class ApplicationAdminTest extends OSGiTest {
assertNotNull("app handle is null", handle); //$NON-NLS-1$
final ApplicationHandle destroyHandle = handle;
new Thread(new Runnable() {
+ @Override
public void run() {
try {
Thread.sleep(1000);
@@ -586,6 +587,7 @@ public class ApplicationAdminTest extends OSGiTest {
assertNotNull("app handle is null", handle); //$NON-NLS-1$
final ApplicationHandle destroyHandle = handle;
new Thread(new Runnable() {
+ @Override
public void run() {
try {
Thread.sleep(1000);
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/appadmin/ExitValueApp.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/appadmin/ExitValueApp.java
index d1c54ae5f..545b18a69 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/appadmin/ExitValueApp.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/appadmin/ExitValueApp.java
@@ -72,6 +72,7 @@ public class ExitValueApp implements IApplication, Runnable {
}
}
+ @Override
public synchronized void run() {
if (active) {
try {
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/BundleInstaller.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/BundleInstaller.java
index d08e7d22f..fd4da8e9c 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/BundleInstaller.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/BundleInstaller.java
@@ -65,6 +65,7 @@ public class BundleInstaller {
return getBundleLocation0(name);
try {
return (String) AccessController.doPrivileged(new PrivilegedExceptionAction() {
+ @Override
public Object run() throws Exception {
return getBundleLocation0(name);
}
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/DiscardBundleTests.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/DiscardBundleTests.java
index d796d7508..35aee2deb 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/DiscardBundleTests.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/DiscardBundleTests.java
@@ -43,6 +43,7 @@ public class DiscardBundleTests extends AbstractBundleTests {
private File root;
+ @Override
protected void setUp() throws Exception {
super.setUp();
root = OSGiTestsActivator.getContext().getDataFile(getName());
@@ -50,6 +51,7 @@ public class DiscardBundleTests extends AbstractBundleTests {
createBundleJar();
}
+ @Override
protected void tearDown() throws Exception {
super.tearDown();
}
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/PersistedBundleTests.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/PersistedBundleTests.java
index 0aa8c070c..3d5225989 100755
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/PersistedBundleTests.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/PersistedBundleTests.java
@@ -71,10 +71,12 @@ public class PersistedBundleTests extends AbstractBundleTests {
private static final String NO_PERSISTENCE = "-1";
private static final String PERIODIC_PERSISTENCE = "4000";
+ @Override
protected void setUp() throws Exception {
super.setUp();
}
+ @Override
protected void tearDown() throws Exception {
super.tearDown();
}
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/SystemBundleTests.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/SystemBundleTests.java
index e04fea889..301eb47e4 100755
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/SystemBundleTests.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/SystemBundleTests.java
@@ -670,6 +670,7 @@ public class SystemBundleTests extends AbstractBundleTests {
final Exception[] failureException = new BundleException[1];
final FrameworkEvent[] success = new FrameworkEvent[] {null};
Thread t = new Thread(new Runnable() {
+ @Override
public void run() {
try {
success[0] = equinox.waitForStop(10000);
@@ -1161,6 +1162,7 @@ public class SystemBundleTests extends AbstractBundleTests {
final Exception[] failureException = new BundleException[1];
final FrameworkEvent[] success = new FrameworkEvent[] {null};
Thread waitForUpdate = new Thread(new Runnable() {
+ @Override
public void run() {
try {
success[0] = equinox.waitForStop(10000);
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/dummys/DummyModuleDatabase.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/dummys/DummyModuleDatabase.java
index 60290a60c..398f802b2 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/dummys/DummyModuleDatabase.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/dummys/DummyModuleDatabase.java
@@ -99,6 +99,7 @@ public class DummyModuleDatabase extends ModuleDatabase {
this.state = state;
}
+ @Override
public boolean equals(Object o) {
if (!(o instanceof DummyModuleEvent))
return false;
@@ -106,6 +107,7 @@ public class DummyModuleDatabase extends ModuleDatabase {
return this.event.equals(that.event) && this.module.equals(that.module) && this.state.equals(that.state);
}
+ @Override
public String toString() {
return module + ": " + event + ": " + state;
}
@@ -124,6 +126,7 @@ public class DummyModuleDatabase extends ModuleDatabase {
this.listeners = listeners;
}
+ @Override
public boolean equals(Object o) {
if (!(o instanceof DummyContainerEvent))
return false;
@@ -131,6 +134,7 @@ public class DummyModuleDatabase extends ModuleDatabase {
return this.type.equals(that.type) && this.module.equals(that.module);
}
+ @Override
public String toString() {
return module + ": " + type;
}
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/filter/BundleContextFilterTests.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/filter/BundleContextFilterTests.java
index 202b8f801..6c016740e 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/filter/BundleContextFilterTests.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/filter/BundleContextFilterTests.java
@@ -24,6 +24,7 @@ public class BundleContextFilterTests extends FilterTests {
return new TestSuite(BundleContextFilterTests.class);
}
+ @Override
public Filter createFilter(String filterString) throws InvalidSyntaxException {
return OSGiTestsActivator.getContext().createFilter(filterString);
}
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/filter/FilterTests.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/filter/FilterTests.java
index 65b8e4d05..366d5bb18 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/filter/FilterTests.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/filter/FilterTests.java
@@ -381,10 +381,12 @@ public abstract class FilterTests extends TestCase {
this.value = Integer.parseInt(value);
}
+ @Override
public int compareTo(Object o) {
return value - ((SampleComparable) o).value;
}
+ @Override
public String toString() {
return String.valueOf(value);
}
@@ -397,6 +399,7 @@ public abstract class FilterTests extends TestCase {
this.value = Integer.parseInt(value);
}
+ @Override
public boolean equals(Object o) {
if (o instanceof SampleObject) {
return value == ((SampleObject) o).value;
@@ -404,6 +407,7 @@ public abstract class FilterTests extends TestCase {
return false;
}
+ @Override
public String toString() {
return String.valueOf(value);
}
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/filter/FrameworkUtilFilterTests.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/filter/FrameworkUtilFilterTests.java
index d3781a62e..2e6be3709 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/filter/FrameworkUtilFilterTests.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/filter/FrameworkUtilFilterTests.java
@@ -22,6 +22,7 @@ public class FrameworkUtilFilterTests extends FilterTests {
return new TestSuite(FrameworkUtilFilterTests.class);
}
+ @Override
public Filter createFilter(String filterString) throws InvalidSyntaxException {
return FrameworkUtil.createFilter(filterString);
}
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/hooks/framework/BundleFileWrapperFactoryHookTests.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/hooks/framework/BundleFileWrapperFactoryHookTests.java
index 77479c781..e5f4cbb76 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/hooks/framework/BundleFileWrapperFactoryHookTests.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/hooks/framework/BundleFileWrapperFactoryHookTests.java
@@ -32,6 +32,7 @@ public class BundleFileWrapperFactoryHookTests extends AbstractFrameworkHookTest
private Framework framework;
private String location;
+ @Override
protected void setUp() throws Exception {
super.setUp();
String loc = bundleInstaller.getBundleLocation(HOOK_CONFIGURATOR_BUNDLE);
@@ -45,6 +46,7 @@ public class BundleFileWrapperFactoryHookTests extends AbstractFrameworkHookTest
framework = createFramework(configuration);
}
+ @Override
protected void tearDown() throws Exception {
stopQuietly(framework);
super.tearDown();
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/hooks/framework/ClassLoaderHookTests.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/hooks/framework/ClassLoaderHookTests.java
index 3185a16c9..4d8719e83 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/hooks/framework/ClassLoaderHookTests.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/hooks/framework/ClassLoaderHookTests.java
@@ -52,6 +52,7 @@ public class ClassLoaderHookTests extends AbstractFrameworkHookTests {
private Framework framework;
private String location;
+ @Override
protected void setUp() throws Exception {
super.setUp();
setRejectTransformation(false);
@@ -72,6 +73,7 @@ public class ClassLoaderHookTests extends AbstractFrameworkHookTests {
framework = createFramework(configuration);
}
+ @Override
protected void tearDown() throws Exception {
stopQuietly(framework);
super.tearDown();
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/hooks/framework/ContextFinderTests.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/hooks/framework/ContextFinderTests.java
index 2417d8dcf..c3c43d137 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/hooks/framework/ContextFinderTests.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/hooks/framework/ContextFinderTests.java
@@ -30,6 +30,7 @@ public class ContextFinderTests extends AbstractFrameworkHookTests {
private Map<String, String> configuration;
private Framework framework;
+ @Override
protected void setUp() throws Exception {
super.setUp();
File file = OSGiTestsActivator.getContext().getDataFile(getName());
@@ -39,6 +40,7 @@ public class ContextFinderTests extends AbstractFrameworkHookTests {
initAndStart(framework);
}
+ @Override
protected void tearDown() throws Exception {
stopQuietly(framework);
super.tearDown();
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/hooks/framework/DevClassPathWithExtensionTests.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/hooks/framework/DevClassPathWithExtensionTests.java
index dc6d1a566..2aa869ebd 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/hooks/framework/DevClassPathWithExtensionTests.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/hooks/framework/DevClassPathWithExtensionTests.java
@@ -32,6 +32,7 @@ public class DevClassPathWithExtensionTests extends AbstractFrameworkHookTests {
private Framework framework;
private String location;
+ @Override
protected void setUp() throws Exception {
super.setUp();
location = bundleInstaller.getBundleLocation(TEST_BUNDLE);
@@ -42,6 +43,7 @@ public class DevClassPathWithExtensionTests extends AbstractFrameworkHookTests {
framework = createFramework(configuration);
}
+ @Override
protected void tearDown() throws Exception {
stopQuietly(framework);
super.tearDown();
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/hooks/framework/StorageHookTests.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/hooks/framework/StorageHookTests.java
index ddfb5a9ea..490044def 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/hooks/framework/StorageHookTests.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/hooks/framework/StorageHookTests.java
@@ -229,6 +229,7 @@ public class StorageHookTests extends AbstractFrameworkHookTests {
assertEquals("Wrong bundle found.", framework.getBundleContext().getBundle(Constants.SYSTEM_BUNDLE_LOCATION), b);
}
+ @Override
protected void setUp() throws Exception {
super.setUp();
String loc = bundleInstaller.getBundleLocation(HOOK_CONFIGURATOR_BUNDLE);
@@ -243,6 +244,7 @@ public class StorageHookTests extends AbstractFrameworkHookTests {
resetStorageHook();
}
+ @Override
protected void tearDown() throws Exception {
stopQuietly(framework);
super.tearDown();
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/perf/BasePerformanceTest.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/perf/BasePerformanceTest.java
index 764e196ed..9e096165c 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/perf/BasePerformanceTest.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/perf/BasePerformanceTest.java
@@ -75,6 +75,7 @@ public class BasePerformanceTest extends AbstractStateTest {
return state;
}
+ @Override
protected void setUp() throws Exception {
super.setUp();
// uses a constant seed to prevent variation on results
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/resource/BasicTest.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/resource/BasicTest.java
index 4f7e667e8..79e85f1cb 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/resource/BasicTest.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/resource/BasicTest.java
@@ -212,18 +212,21 @@ public class BasicTest extends AbstractResourceTest {
private void assertTb2() {
final BundleRevision revision = tb2.adapt(BundleRevision.class);
assertNotIdentityCapability(new CapabilityProvider() {
+ @Override
public List getCapabilities(String namespace) {
return revision.getDeclaredCapabilities(namespace);
}
});
final Resource resource = revision;
assertNotIdentityCapability(new CapabilityProvider() {
+ @Override
public List getCapabilities(String namespace) {
return resource.getCapabilities(namespace);
}
});
final BundleWiring wiring = tb2.adapt(BundleWiring.class);
assertNotIdentityCapability(new CapabilityProvider() {
+ @Override
public List getCapabilities(String namespace) {
return wiring.getCapabilities(namespace);
}
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/security/OSGiAPICertificateTest.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/security/OSGiAPICertificateTest.java
index c1b99b505..43df19076 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/security/OSGiAPICertificateTest.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/security/OSGiAPICertificateTest.java
@@ -83,6 +83,7 @@ public class OSGiAPICertificateTest extends BaseSecurityTest {
registerEclipseTrustEngine();
}
+ @Override
protected void tearDown() throws Exception {
super.tearDown();
for (Bundle b : installedBundles) {
@@ -94,6 +95,7 @@ public class OSGiAPICertificateTest extends BaseSecurityTest {
}
}
+ @Override
protected Bundle installBundle(String bundlePath) {
Bundle b = super.installBundle(bundlePath);
installedBundles.add(b);
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/security/SignedBundleTest.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/security/SignedBundleTest.java
index ae8f3e834..629d4b54f 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/security/SignedBundleTest.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/security/SignedBundleTest.java
@@ -107,6 +107,7 @@ public class SignedBundleTest extends BaseSecurityTest {
*/
}
+ @Override
protected void tearDown() throws Exception {
super.tearDown();
}
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/securityadmin/SecurityAdminUnitTests.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/securityadmin/SecurityAdminUnitTests.java
index fbb12ecd7..8b2d82837 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/securityadmin/SecurityAdminUnitTests.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/securityadmin/SecurityAdminUnitTests.java
@@ -83,6 +83,7 @@ public class SecurityAdminUnitTests extends AbstractBundleTests {
private ConditionalPermissionAdmin cpa;
private PermissionAdmin pa;
+ @Override
protected void setUp() throws Exception {
previousPolicy = Policy.getPolicy();
final Permission allPermission = new AllPermission();
@@ -90,22 +91,27 @@ public class SecurityAdminUnitTests extends AbstractBundleTests {
private static final long serialVersionUID = 3258131349494708277L;
// A simple PermissionCollection that only has AllPermission
+ @Override
public void add(Permission permission) {
//no adding to this policy
}
+ @Override
public boolean implies(Permission permission) {
return true;
}
+ @Override
public Enumeration elements() {
return new Enumeration() {
int cur = 0;
+ @Override
public boolean hasMoreElements() {
return cur < 1;
}
+ @Override
public Object nextElement() {
if (cur == 0) {
cur = 1;
@@ -119,10 +125,12 @@ public class SecurityAdminUnitTests extends AbstractBundleTests {
Policy.setPolicy(new Policy() {
+ @Override
public PermissionCollection getPermissions(CodeSource codesource) {
return allPermissions;
}
+ @Override
public void refresh() {
// nothing
}
@@ -143,6 +151,7 @@ public class SecurityAdminUnitTests extends AbstractBundleTests {
super.setUp();
}
+ @Override
protected void tearDown() throws Exception {
try {
equinox.stop();
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/securityadmin/SecurityManagerTests.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/securityadmin/SecurityManagerTests.java
index 3a65a85d0..829bf1bc2 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/securityadmin/SecurityManagerTests.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/securityadmin/SecurityManagerTests.java
@@ -44,6 +44,7 @@ public class SecurityManagerTests extends AbstractBundleTests {
return new TestSuite(SecurityManagerTests.class);
}
+ @Override
protected void setUp() throws Exception {
if (System.getSecurityManager() != null)
fail("Cannot test with security manager set"); //$NON-NLS-1$
@@ -53,22 +54,27 @@ public class SecurityManagerTests extends AbstractBundleTests {
private static final long serialVersionUID = 3258131349494708277L;
// A simple PermissionCollection that only has AllPermission
+ @Override
public void add(Permission permission) {
//no adding to this policy
}
+ @Override
public boolean implies(Permission permission) {
return true;
}
+ @Override
public Enumeration elements() {
return new Enumeration() {
int cur = 0;
+ @Override
public boolean hasMoreElements() {
return cur < 1;
}
+ @Override
public Object nextElement() {
if (cur == 0) {
cur = 1;
@@ -82,10 +88,12 @@ public class SecurityManagerTests extends AbstractBundleTests {
Policy.setPolicy(new Policy() {
+ @Override
public PermissionCollection getPermissions(CodeSource codesource) {
return allPermissions;
}
+ @Override
public void refresh() {
// nothing
}
@@ -94,6 +102,7 @@ public class SecurityManagerTests extends AbstractBundleTests {
super.setUp();
}
+ @Override
protected void tearDown() throws Exception {
super.tearDown();
if (System.getSecurityManager() != null)
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/serviceregistry/ServiceHookTests.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/serviceregistry/ServiceHookTests.java
index a263d07e7..f8e3d818c 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/serviceregistry/ServiceHookTests.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/serviceregistry/ServiceHookTests.java
@@ -29,6 +29,7 @@ public class ServiceHookTests extends AbstractBundleTests {
final String testMethodName = "testFindHook01"; //$NON-NLS-1$
// test the FindHook is called and can remove a reference from the results
Runnable runIt = new Runnable() {
+ @Override
public void run() {
// nothing
}
@@ -331,6 +332,7 @@ public class ServiceHookTests extends AbstractBundleTests {
final String testMethodName = "testEventHook01"; //$NON-NLS-1$
// test the EventHook is called and can remove a reference from the results
Runnable runIt = new Runnable() {
+ @Override
public void run() {
// nothing
}
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/serviceregistry/ServiceRegistryTests.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/serviceregistry/ServiceRegistryTests.java
index ff7dae6eb..ab801cf2e 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/serviceregistry/ServiceRegistryTests.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/serviceregistry/ServiceRegistryTests.java
@@ -38,6 +38,7 @@ public class ServiceRegistryTests extends AbstractBundleTests {
final String testMethodName = getName();
// simple ServiceListener test
Runnable runIt = new Runnable() {
+ @Override
public void run() {
// nothing
}
@@ -133,6 +134,7 @@ public class ServiceRegistryTests extends AbstractBundleTests {
final String testMethodName = getName();
// simple ServiceListener test
Runnable runIt = new Runnable() {
+ @Override
public void run() {
// nothing
}
@@ -228,6 +230,7 @@ public class ServiceRegistryTests extends AbstractBundleTests {
final String testMethodName = getName();
// simple ServiceListener test
Runnable runIt = new Runnable() {
+ @Override
public void run() {
// nothing
}
@@ -358,6 +361,7 @@ public class ServiceRegistryTests extends AbstractBundleTests {
final String testMethodName = getName();
// test that getServiceReference returns the proper service
Runnable runIt = new Runnable() {
+ @Override
public void run() {
// nothing
}
@@ -395,6 +399,7 @@ public class ServiceRegistryTests extends AbstractBundleTests {
ServiceRegistration reg = null;
try {
reg = OSGiTestsActivator.getContext().registerService(new String[] {Runnable.class.getName(), Object.class.getName(), Object.class.getName()}, new Runnable() {
+ @Override
public void run() {
// nothing
}
@@ -411,6 +416,7 @@ public class ServiceRegistryTests extends AbstractBundleTests {
final String testMethodName = getName();
// test that getServiceReference returns the proper service
Runnable runIt = new Runnable() {
+ @Override
public void run() {
// nothing
}
@@ -464,6 +470,7 @@ public class ServiceRegistryTests extends AbstractBundleTests {
public void testModifiedRanking() {
Runnable runIt = new Runnable() {
+ @Override
public void run() {
// nothing
}
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/serviceregistry/ServiceTrackerTests.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/serviceregistry/ServiceTrackerTests.java
index f03d9549d..0d7c3f2c8 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/serviceregistry/ServiceTrackerTests.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/serviceregistry/ServiceTrackerTests.java
@@ -31,6 +31,7 @@ public class ServiceTrackerTests extends AbstractBundleTests {
final String testMethodName = getName();
// simple ServiceTracker test
Runnable runIt = new Runnable() {
+ @Override
public void run() {
// nothing
}
@@ -110,6 +111,7 @@ public class ServiceTrackerTests extends AbstractBundleTests {
final String testMethodName = getName();
// simple ServiceTracker test
Runnable runIt = new Runnable() {
+ @Override
public void run() {
// nothing
}
@@ -189,6 +191,7 @@ public class ServiceTrackerTests extends AbstractBundleTests {
final String testMethodName = getName();
// simple ServiceTracker test
Runnable runIt = new Runnable() {
+ @Override
public void run() {
// nothing
}
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/services/resolver/StateResolverTest.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/services/resolver/StateResolverTest.java
index af2b23027..531ffd05a 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/services/resolver/StateResolverTest.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/services/resolver/StateResolverTest.java
@@ -3809,6 +3809,7 @@ public class StateResolverTest extends AbstractStateTest {
State state = buildEmptyState();
Resolver resolver = state.getResolver();
resolver.setSelectionPolicy(new Comparator() {
+ @Override
public int compare(Object o1, Object o2) {
if (!(o1 instanceof BaseDescription) || !(o2 instanceof BaseDescription))
throw new IllegalArgumentException();
@@ -4402,6 +4403,7 @@ public class StateResolverTest extends AbstractStateTest {
//do nothing
}
+ @Override
public boolean equals(Object obj) {
return true;
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java
index a1179ba10..343ce3dea 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java
@@ -1152,11 +1152,13 @@ public class EclipseStarter {
this.frameworkEventType = frameworkEventType;
}
+ @Override
public void bundleChanged(BundleEvent event) {
if (event.getBundle().getBundleId() == 0 && event.getType() == BundleEvent.STOPPING)
semaphore.release();
}
+ @Override
public void frameworkEvent(FrameworkEvent event) {
if (event.getType() == frameworkEventType)
semaphore.release();
@@ -1417,6 +1419,7 @@ public class EclipseStarter {
for (Iterator<Runnable> it = shutdownHandlers.iterator(); it.hasNext();) {
final Runnable handler = it.next();
BundleListener listener = new BundleListener() {
+ @Override
public void bundleChanged(BundleEvent event) {
if (event.getBundle() == systemBundle && event.getType() == BundleEvent.STOPPED) {
handler.run();
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/internal/adaptor/DefaultStartupMonitor.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/internal/adaptor/DefaultStartupMonitor.java
index b38cc4d4a..583ddd593 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/internal/adaptor/DefaultStartupMonitor.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/internal/adaptor/DefaultStartupMonitor.java
@@ -48,6 +48,7 @@ public class DefaultStartupMonitor implements StartupMonitor {
/* (non-Javadoc)
* @see org.eclipse.core.runtime.adaptor.StartupMonitor#update()
*/
+ @Override
public void update() {
if (updateMethod != null) {
try {
@@ -60,6 +61,7 @@ public class DefaultStartupMonitor implements StartupMonitor {
}
}
+ @Override
public void applicationRunning() {
if (EclipseStarter.debug) {
String timeString = equinoxConfig.getConfiguration("eclipse.startTime"); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/internal/adaptor/EclipseAppLauncher.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/internal/adaptor/EclipseAppLauncher.java
index fd334e548..ffc771cc1 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/internal/adaptor/EclipseAppLauncher.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/internal/adaptor/EclipseAppLauncher.java
@@ -148,6 +148,7 @@ public class EclipseAppLauncher implements ApplicationLauncher {
return null;
}
+ @Override
public void launch(ParameterizedRunnable app, Object applicationContext) {
waitForAppLock.tryAcquire(); // clear out any pending apps notifications
if (!runningLock.tryAcquire()) // check to see if an application is currently running
@@ -158,6 +159,7 @@ public class EclipseAppLauncher implements ApplicationLauncher {
runningLock.release(); // release the running lock
}
+ @Override
public void shutdown() {
// this method will aquire and keep the runningLock to prevent
// all future application launches.
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleRequirement.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleRequirement.java
index 330a2407b..4cacf4e60 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleRequirement.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleRequirement.java
@@ -85,6 +85,7 @@ public class ModuleRequirement implements BundleRequirement {
return revision;
}
+ @Override
public String toString() {
return namespace + ModuleRevision.toString(attributes, false) + ModuleRevision.toString(directives, true);
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleRevisions.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleRevisions.java
index 9d66c8de9..00af04e86 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleRevisions.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleRevisions.java
@@ -127,6 +127,7 @@ public final class ModuleRevisions implements BundleRevisions {
}
}
+ @Override
public String toString() {
return "moduleID=" + module.getId(); //$NON-NLS-1$
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleWire.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleWire.java
index b32588eab..1de66ab12 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleWire.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleWire.java
@@ -72,6 +72,7 @@ public final class ModuleWire implements BundleWire {
return hostingRequirer;
}
+ @Override
public String toString() {
return getRequirement() + " -> " + getCapability(); //$NON-NLS-1$
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/framework/util/ArrayMap.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/framework/util/ArrayMap.java
index 3ee64b64b..fd94dfc67 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/framework/util/ArrayMap.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/framework/util/ArrayMap.java
@@ -61,6 +61,7 @@ public class ArrayMap<K, V> implements Collection<K> {
}
}
+ @Override
public boolean remove(Object key) {
int index = keys.indexOf(key);
if (index < 0)
@@ -70,6 +71,7 @@ public class ArrayMap<K, V> implements Collection<K> {
return true;
}
+ @Override
public void clear() {
keys.clear();
values.clear();
@@ -83,32 +85,39 @@ public class ArrayMap<K, V> implements Collection<K> {
return new ArrayList<>(values);
}
+ @Override
public int size() {
return keys.size();
}
+ @Override
public boolean isEmpty() {
return keys.isEmpty();
}
+ @Override
public boolean contains(Object o) {
return keys.contains(o);
}
+ @Override
public Iterator<K> iterator() {
final Iterator<K> keyIter = keys.iterator();
final Iterator<V> valueIter = values.iterator();
return new Iterator<K>() {
+ @Override
public boolean hasNext() {
return keyIter.hasNext();
}
+ @Override
public K next() {
valueIter.next();
return keyIter.next();
}
+ @Override
public void remove() {
valueIter.remove();
keyIter.remove();
@@ -116,26 +125,32 @@ public class ArrayMap<K, V> implements Collection<K> {
};
}
+ @Override
public Object[] toArray() {
return keys.toArray();
}
+ @Override
public <T> T[] toArray(T[] a) {
return keys.toArray(a);
}
+ @Override
public boolean add(K o) {
throw new UnsupportedOperationException();
}
+ @Override
public boolean containsAll(Collection<?> c) {
throw new UnsupportedOperationException();
}
+ @Override
public boolean addAll(Collection<? extends K> c) {
throw new UnsupportedOperationException();
}
+ @Override
public boolean removeAll(Collection<?> c) {
boolean result = false;
for (Object key : c)
@@ -143,6 +158,7 @@ public class ArrayMap<K, V> implements Collection<K> {
return result;
}
+ @Override
public boolean retainAll(Collection<?> c) {
boolean result = false;
Object[] keyArray = keys.toArray();
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/framework/util/FilePath.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/framework/util/FilePath.java
index bcd99d310..af399cc04 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/framework/util/FilePath.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/framework/util/FilePath.java
@@ -243,6 +243,7 @@ public class FilePath {
*
* @return a string representation of this path
*/
+ @Override
public String toString() {
StringBuffer result = new StringBuffer();
if (device != null)
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/framework/util/Headers.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/framework/util/Headers.java
index 6f51ebdea..02ea3af36 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/framework/util/Headers.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/framework/util/Headers.java
@@ -76,6 +76,7 @@ public class Headers<K, V> extends Dictionary<K, V> implements Map<K, V> {
/**
* Case-preserved keys.
*/
+ @Override
public synchronized Enumeration<K> keys() {
return new ArrayEnumeration<>(headers, size);
}
@@ -83,6 +84,7 @@ public class Headers<K, V> extends Dictionary<K, V> implements Map<K, V> {
/**
* Values.
*/
+ @Override
public synchronized Enumeration<V> elements() {
return new ArrayEnumeration<>(values, size);
}
@@ -141,6 +143,7 @@ public class Headers<K, V> extends Dictionary<K, V> implements Map<K, V> {
*
* @param key name.
*/
+ @Override
public synchronized V get(Object key) {
int i = -1;
if ((i = getIndex(key)) != -1)
@@ -213,6 +216,7 @@ public class Headers<K, V> extends Dictionary<K, V> implements Map<K, V> {
*
* @return the number of keys in this dictionary.
*/
+ @Override
public synchronized int size() {
return size;
}
@@ -225,6 +229,7 @@ public class Headers<K, V> extends Dictionary<K, V> implements Map<K, V> {
* @return <code>true</code> if this dictionary maps no keys to values;
* <code>false</code> otherwise.
*/
+ @Override
public synchronized boolean isEmpty() {
return size == 0;
}
@@ -236,6 +241,7 @@ public class Headers<K, V> extends Dictionary<K, V> implements Map<K, V> {
* @param value header value.
* @throws UnsupportedOperationException
*/
+ @Override
public synchronized V put(K key, V value) {
if (readOnly)
throw new UnsupportedOperationException();
@@ -248,10 +254,12 @@ public class Headers<K, V> extends Dictionary<K, V> implements Map<K, V> {
* @param key header name.
* @throws UnsupportedOperationException
*/
+ @Override
public V remove(Object key) {
throw new UnsupportedOperationException();
}
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append('{');
@@ -301,40 +309,49 @@ public class Headers<K, V> extends Dictionary<K, V> implements Map<K, V> {
System.arraycopy(array, 0, this.array, 0, this.array.length);
}
+ @Override
public boolean hasMoreElements() {
return cur < array.length;
}
+ @Override
public E nextElement() {
return array[cur++];
}
}
+ @Override
public synchronized void clear() {
if (readOnly)
throw new UnsupportedOperationException();
}
+ @Override
public synchronized boolean containsKey(Object key) {
return getIndex(key) >= 0;
}
+ @Override
public boolean containsValue(Object value) {
throw new UnsupportedOperationException();
}
+ @Override
public Set<Map.Entry<K, V>> entrySet() {
throw new UnsupportedOperationException();
}
+ @Override
public Set<K> keySet() {
throw new UnsupportedOperationException();
}
+ @Override
public void putAll(Map<? extends K, ? extends V> c) {
throw new UnsupportedOperationException();
}
+ @Override
public Collection<V> values() {
throw new UnsupportedOperationException();
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/framework/util/SecureAction.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/framework/util/SecureAction.java
index 9ef065a04..89684a902 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/framework/util/SecureAction.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/framework/util/SecureAction.java
@@ -34,6 +34,7 @@ public class SecureAction {
// This ClassLoader is used in loadSystemClass if System.getClassLoader() returns null
static final ClassLoader bootClassLoader = AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
+ @Override
public ClassLoader run() {
return new ClassLoader(Object.class.getClassLoader()) { /* boot class loader */};
}
@@ -59,6 +60,7 @@ public class SecureAction {
*/
public static PrivilegedAction<SecureAction> createSecureAction() {
return new PrivilegedAction<SecureAction>() {
+ @Override
public SecureAction run() {
return new SecureAction();
}
@@ -75,6 +77,7 @@ public class SecureAction {
if (System.getSecurityManager() == null)
return System.getProperty(property);
return AccessController.doPrivileged(new PrivilegedAction<String>() {
+ @Override
public String run() {
return System.getProperty(property);
}
@@ -90,6 +93,7 @@ public class SecureAction {
if (System.getSecurityManager() == null)
return System.getProperties();
return AccessController.doPrivileged(new PrivilegedAction<Properties>() {
+ @Override
public Properties run() {
return System.getProperties();
}
@@ -108,6 +112,7 @@ public class SecureAction {
return new FileInputStream(file);
try {
return AccessController.doPrivileged(new PrivilegedExceptionAction<FileInputStream>() {
+ @Override
public FileInputStream run() throws FileNotFoundException {
return new FileInputStream(file);
}
@@ -132,6 +137,7 @@ public class SecureAction {
return new FileOutputStream(file.getAbsolutePath(), append);
try {
return AccessController.doPrivileged(new PrivilegedExceptionAction<FileOutputStream>() {
+ @Override
public FileOutputStream run() throws FileNotFoundException {
return new FileOutputStream(file.getAbsolutePath(), append);
}
@@ -153,6 +159,7 @@ public class SecureAction {
if (System.getSecurityManager() == null)
return file.length();
return AccessController.doPrivileged(new PrivilegedAction<Long>() {
+ @Override
public Long run() {
return new Long(file.length());
}
@@ -171,6 +178,7 @@ public class SecureAction {
return file.getCanonicalPath();
try {
return AccessController.doPrivileged(new PrivilegedExceptionAction<String>() {
+ @Override
public String run() throws IOException {
return file.getCanonicalPath();
}
@@ -192,6 +200,7 @@ public class SecureAction {
if (System.getSecurityManager() == null)
return file.getAbsoluteFile();
return AccessController.doPrivileged(new PrivilegedAction<File>() {
+ @Override
public File run() {
return file.getAbsoluteFile();
}
@@ -209,6 +218,7 @@ public class SecureAction {
return file.getCanonicalFile();
try {
return AccessController.doPrivileged(new PrivilegedExceptionAction<File>() {
+ @Override
public File run() throws IOException {
return file.getCanonicalFile();
}
@@ -230,6 +240,7 @@ public class SecureAction {
if (System.getSecurityManager() == null)
return file.exists();
return AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
+ @Override
public Boolean run() {
return file.exists() ? Boolean.TRUE : Boolean.FALSE;
}
@@ -240,6 +251,7 @@ public class SecureAction {
if (System.getSecurityManager() == null)
return file.mkdirs();
return AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
+ @Override
public Boolean run() {
return file.mkdirs() ? Boolean.TRUE : Boolean.FALSE;
}
@@ -256,6 +268,7 @@ public class SecureAction {
if (System.getSecurityManager() == null)
return file.isDirectory();
return AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
+ @Override
public Boolean run() {
return file.isDirectory() ? Boolean.TRUE : Boolean.FALSE;
}
@@ -272,6 +285,7 @@ public class SecureAction {
if (System.getSecurityManager() == null)
return file.lastModified();
return AccessController.doPrivileged(new PrivilegedAction<Long>() {
+ @Override
public Long run() {
return new Long(file.lastModified());
}
@@ -288,6 +302,7 @@ public class SecureAction {
if (System.getSecurityManager() == null)
return file.list();
return AccessController.doPrivileged(new PrivilegedAction<String[]>() {
+ @Override
public String[] run() {
return file.list();
}
@@ -307,6 +322,7 @@ public class SecureAction {
return new ZipFile(file);
try {
return AccessController.doPrivileged(new PrivilegedExceptionAction<ZipFile>() {
+ @Override
public ZipFile run() throws IOException {
return new ZipFile(file);
}
@@ -341,6 +357,7 @@ public class SecureAction {
return new URL(protocol, host, port, file, handler);
try {
return AccessController.doPrivileged(new PrivilegedExceptionAction<URL>() {
+ @Override
public URL run() throws MalformedURLException {
return new URL(protocol, host, port, file, handler);
}
@@ -364,6 +381,7 @@ public class SecureAction {
if (System.getSecurityManager() == null)
return createThread0(target, name, contextLoader);
return AccessController.doPrivileged(new PrivilegedAction<Thread>() {
+ @Override
public Thread run() {
return createThread0(target, name, contextLoader);
}
@@ -388,6 +406,7 @@ public class SecureAction {
if (System.getSecurityManager() == null)
return context.getService(reference);
return AccessController.doPrivileged(new PrivilegedAction<S>() {
+ @Override
public S run() {
return context.getService(reference);
}
@@ -406,6 +425,7 @@ public class SecureAction {
return Class.forName(name);
try {
return AccessController.doPrivileged(new PrivilegedExceptionAction<Class<?>>() {
+ @Override
public Class<?> run() throws Exception {
return Class.forName(name);
}
@@ -431,6 +451,7 @@ public class SecureAction {
}
try {
return AccessController.doPrivileged(new PrivilegedExceptionAction<Class<?>>() {
+ @Override
public Class<?> run() throws Exception {
ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader();
return (systemClassLoader != null) ? systemClassLoader.loadClass(name) : bootClassLoader.loadClass(name);
@@ -453,6 +474,7 @@ public class SecureAction {
return;
}
AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ @Override
public Void run() {
tracker.open();
return null;
@@ -473,6 +495,7 @@ public class SecureAction {
}
try {
AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() {
+ @Override
public Void run() throws BundleException {
module.start(options);
return null;
@@ -491,6 +514,7 @@ public class SecureAction {
return bundle.getBundleContext();
}
return AccessController.doPrivileged(new PrivilegedAction<BundleContext>() {
+ @Override
public BundleContext run() {
return bundle.getBundleContext();
}
@@ -502,6 +526,7 @@ public class SecureAction {
return bundle.getLocation();
}
return AccessController.doPrivileged(new PrivilegedAction<String>() {
+ @Override
public String run() {
return bundle.getLocation();
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/cds/CDSBundleEntry.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/cds/CDSBundleEntry.java
index 59a214041..be275411d 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/cds/CDSBundleEntry.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/cds/CDSBundleEntry.java
@@ -56,6 +56,7 @@ public class CDSBundleEntry extends BundleEntry {
*
* This should is likely never to be called.
*/
+ @Override
public URL getFileURL() {
return wrapped.getFileURL();
}
@@ -66,6 +67,7 @@ public class CDSBundleEntry extends BundleEntry {
* wraps the classbytes into a ByteArrayInputStream. This should not be used
* by classloading.
*/
+ @Override
public InputStream getInputStream() throws IOException {
// someone is trying to get the real bytes of the class file!!
// just return the entry from the wrapped file instead of the magic cookie
@@ -79,6 +81,7 @@ public class CDSBundleEntry extends BundleEntry {
* the class during class loading.
* if classbytes is null, it gets the contents from actual BundleEntry and caches it in classbytes.
*/
+ @Override
public byte[] getBytes() throws IOException {
if (classbytes == null) {
classbytes = wrapped.getBytes();
@@ -94,18 +97,22 @@ public class CDSBundleEntry extends BundleEntry {
*
* This should is likely never to be called.
*/
+ @Override
public URL getLocalURL() {
return wrapped.getLocalURL();
}
+ @Override
public String getName() {
return path;
}
+ @Override
public long getSize() {
return wrapped.getSize();
}
+ @Override
public long getTime() {
return wrapped.getTime();
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/cds/CDSBundleFile.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/cds/CDSBundleFile.java
index 941a4118e..b6cdf28d0 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/cds/CDSBundleFile.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/cds/CDSBundleFile.java
@@ -67,6 +67,7 @@ public class CDSBundleFile extends BundleFileWrapper {
* If the path is for a class, it will look for the magic cookie in the
* shared classes cache. If found, the bytes representing the magic cookie are stored in CDSBundleEntry object.
*/
+ @Override
public BundleEntry getEntry(String path) {
BundleEntry wrappedEntry = super.getEntry(path);
if (wrappedEntry == null) {
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/cds/CDSHookConfigurator.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/cds/CDSHookConfigurator.java
index 9891f4cb5..fdd59114e 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/cds/CDSHookConfigurator.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/cds/CDSHookConfigurator.java
@@ -35,6 +35,7 @@ public class CDSHookConfigurator implements HookConfigurator {
private static final String OLD_CDS_CONFIGURATOR = "com.ibm.cds.CDSHookConfigurator"; //$NON-NLS-1$
private static final String J9_SHARED_CLASS_HELPER_CLASS = "com.ibm.oti.shared.SharedClassHelperFactory"; //$NON-NLS-1$
+ @Override
public void addHooks(HookRegistry hookRegistry) {
boolean disableCDS = Boolean.valueOf(hookRegistry.getConfiguration().getProperty(DISABLE_CDS));
if (disableCDS) {
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/cds/CDSHookImpls.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/cds/CDSHookImpls.java
index bde9bde34..18a05b257 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/cds/CDSHookImpls.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/cds/CDSHookImpls.java
@@ -73,6 +73,7 @@ public class CDSHookImpls extends ClassLoaderHook implements BundleFileWrapperFa
return cdsBundleFile;
}
+ @Override
public void recordClassDefine(String name, Class<?> clazz, byte[] classbytes, ClasspathEntry classpathEntry, BundleEntry entry, ClasspathManager manager) { // only attempt to record the class define if:
// 1) the class was found (clazz != null)
// 2) the class has the magic class number CAFEBABE indicating a real class
@@ -139,6 +140,7 @@ public class CDSHookImpls extends ClassLoaderHook implements BundleFileWrapperFa
return (classbytes[0] & 0xCA) == 0xCA && (classbytes[1] & 0xFE) == 0xFE && (classbytes[2] & 0xBA) == 0xBA && (classbytes[3] & 0xBE) == 0xBE;
}
+ @Override
public void classLoaderCreated(ModuleClassLoader classLoader) {
// try to get the url helper for this class loader
if (factory == null) {
@@ -185,6 +187,7 @@ public class CDSHookImpls extends ClassLoaderHook implements BundleFileWrapperFa
}
}
+ @Override
public boolean addClassPathEntry(ArrayList<ClasspathEntry> cpEntries, String cp, ClasspathManager hostmanager, Generation sourceGeneration) {
CDSBundleFile hostFile = getCDSBundleFile(hostmanager.getGeneration().getBundleFile());
CDSBundleFile sourceFile = getCDSBundleFile(sourceGeneration.getBundleFile());
@@ -200,6 +203,7 @@ public class CDSHookImpls extends ClassLoaderHook implements BundleFileWrapperFa
}
//////////////// BundleFileWrapperFactoryHook //////////////
+ @Override
public BundleFileWrapper wrapBundleFile(BundleFile bundleFile, Generation generation, boolean base) {
// wrap the real bundle file for purposes of loading shared classes.
CDSBundleFile newBundleFile;
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/container/EquinoxReentrantLock.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/container/EquinoxReentrantLock.java
index a9a772e8e..dd193b438 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/container/EquinoxReentrantLock.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/container/EquinoxReentrantLock.java
@@ -21,6 +21,7 @@ import java.util.concurrent.locks.ReentrantLock;
public final class EquinoxReentrantLock extends ReentrantLock {
private static final long serialVersionUID = 1L;
+ @Override
final public Thread getOwner() {
return super.getOwner();
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/container/LockSet.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/container/LockSet.java
index 5b751e34a..531fe026a 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/container/LockSet.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/container/LockSet.java
@@ -52,6 +52,7 @@ public class LockSet<T> {
lock.unlock();
}
+ @Override
public String toString() {
return lock.toString();
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/debug/EclipseDebugTrace.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/debug/EclipseDebugTrace.java
index 22118f543..18abfe93a 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/debug/EclipseDebugTrace.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/debug/EclipseDebugTrace.java
@@ -137,6 +137,7 @@ class EclipseDebugTrace implements DebugTrace {
* (non-Javadoc)
* @see org.eclipse.osgi.framework.debug.FrameworkDebugTrace#trace(java.lang.String, java.lang.String)
*/
+ @Override
public void trace(final String optionPath, final String message) {
if (isDebuggingEnabled(optionPath)) {
@@ -149,6 +150,7 @@ class EclipseDebugTrace implements DebugTrace {
* (non-Javadoc)
* @see org.eclipse.osgi.framework.debug.FrameworkDebugTrace#trace(java.lang.String, java.lang.String, java.lang.Throwable)
*/
+ @Override
public void trace(final String optionPath, final String message, final Throwable error) {
if (isDebuggingEnabled(optionPath)) {
@@ -161,6 +163,7 @@ class EclipseDebugTrace implements DebugTrace {
* (non-Javadoc)
* @see org.eclipse.osgi.framework.debug.FrameworkDebugTrace#traceEntry(java.lang.String)
*/
+ @Override
public void traceEntry(final String optionPath) {
if (isDebuggingEnabled(optionPath)) {
@@ -174,6 +177,7 @@ class EclipseDebugTrace implements DebugTrace {
* (non-Javadoc)
* @see org.eclipse.osgi.framework.debug.FrameworkDebugTrace#traceEntry(java.lang.String, java.lang.Object)
*/
+ @Override
public void traceEntry(final String optionPath, final Object methodArgument) {
if (isDebuggingEnabled(optionPath)) {
@@ -185,6 +189,7 @@ class EclipseDebugTrace implements DebugTrace {
* (non-Javadoc)
* @see org.eclipse.osgi.framework.debug.FrameworkDebugTrace#traceEntry(java.lang.String, java.lang.Object[])
*/
+ @Override
public void traceEntry(final String optionPath, final Object[] methodArguments) {
if (isDebuggingEnabled(optionPath)) {
@@ -214,6 +219,7 @@ class EclipseDebugTrace implements DebugTrace {
* (non-Javadoc)
* @see org.eclipse.osgi.framework.debug.FrameworkDebugTrace#traceExit(java.lang.String)
*/
+ @Override
public void traceExit(final String optionPath) {
if (isDebuggingEnabled(optionPath)) {
@@ -227,6 +233,7 @@ class EclipseDebugTrace implements DebugTrace {
* (non-Javadoc)
* @see org.eclipse.osgi.framework.debug.FrameworkDebugTrace#traceExit(java.lang.String, java.lang.Object)
*/
+ @Override
public void traceExit(final String optionPath, final Object result) {
if (isDebuggingEnabled(optionPath)) {
@@ -246,6 +253,7 @@ class EclipseDebugTrace implements DebugTrace {
* (non-Javadoc)
* @see org.eclipse.osgi.framework.debug.FrameworkDebugTrace#traceDumpStack(java.lang.String)
*/
+ @Override
public void traceDumpStack(final String optionPath) {
if (isDebuggingEnabled(optionPath)) {
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/debug/FrameworkDebugOptions.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/debug/FrameworkDebugOptions.java
index 9a316f10f..c2d7209e3 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/debug/FrameworkDebugOptions.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/debug/FrameworkDebugOptions.java
@@ -120,6 +120,7 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
/**
* @see DebugOptions#getBooleanOption(String, boolean)
*/
+ @Override
public boolean getBooleanOption(String option, boolean defaultValue) {
String optionValue = getOption(option);
return optionValue != null ? optionValue.equalsIgnoreCase("true") : defaultValue; //$NON-NLS-1$
@@ -128,6 +129,7 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
/**
* @see DebugOptions#getOption(String)
*/
+ @Override
public String getOption(String option) {
return getOption(option, null);
}
@@ -135,6 +137,7 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
/**
* @see DebugOptions#getOption(String, String)
*/
+ @Override
public String getOption(String option, String defaultValue) {
synchronized (lock) {
if (options != null) {
@@ -147,6 +150,7 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
/**
* @see DebugOptions#getIntegerOption(String, int)
*/
+ @Override
public int getIntegerOption(String option, int defaultValue) {
String value = getOption(option);
try {
@@ -157,6 +161,7 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
}
@SuppressWarnings({"unchecked", "rawtypes"})
+ @Override
public Map<String, String> getOptions() {
Map<String, String> snapShot = new HashMap<>();
synchronized (lock) {
@@ -197,6 +202,7 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
* (non-Javadoc)
* @see org.eclipse.osgi.service.debug.DebugOptions#removeOption(java.lang.String)
*/
+ @Override
public void removeOption(String option) {
if (option == null)
return;
@@ -216,6 +222,7 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
* (non-Javadoc)
* @see org.eclipse.osgi.service.debug.DebugOptions#setOption(java.lang.String, java.lang.String)
*/
+ @Override
public void setOption(String option, String value) {
if (option == null || value == null) {
@@ -256,6 +263,7 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
}
@SuppressWarnings("cast")
+ @Override
public void setOptions(Map<String, String> ops) {
if (ops == null)
throw new IllegalArgumentException("The options must not be null."); //$NON-NLS-1$
@@ -306,6 +314,7 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
* (non-Javadoc)
* @see org.eclipse.osgi.service.debug.DebugOptions#isDebugEnabled()
*/
+ @Override
public boolean isDebugEnabled() {
synchronized (lock) {
return options != null;
@@ -316,6 +325,7 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
* (non-Javadoc)
* @see org.eclipse.osgi.service.debug.DebugOptions#setDebugEnabled()
*/
+ @Override
public void setDebugEnabled(boolean enabled) {
boolean fireChangedEvent = false;
synchronized (lock) {
@@ -359,6 +369,7 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
* (non-Javadoc)
* @see org.eclipse.osgi.service.debug.DebugOptions#createTrace(java.lang.String)
*/
+ @Override
public final DebugTrace newDebugTrace(String bundleSymbolicName) {
return this.newDebugTrace(bundleSymbolicName, null);
@@ -368,6 +379,7 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
* (non-Javadoc)
* @see org.eclipse.osgi.service.debug.DebugOptions#createTrace(java.lang.String, java.lang.Class)
*/
+ @Override
public final DebugTrace newDebugTrace(String bundleSymbolicName, Class<?> traceEntryClass) {
DebugTrace debugTrace = null;
@@ -385,6 +397,7 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
* (non-Javadoc)
* @see org.eclipse.osgi.service.debug.DebugOptions#getFile()
*/
+ @Override
public final File getFile() {
return this.outFile;
@@ -394,6 +407,7 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
* (non-Javadoc)
* @see org.eclipse.osgi.service.debug.DebugOptions#setFile(java.io.File)
*/
+ @Override
public void setFile(final File traceFile) {
synchronized (lock) {
this.outFile = traceFile;
@@ -478,16 +492,19 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
}
}
+ @Override
public DebugOptionsListener addingService(ServiceReference<DebugOptionsListener> reference) {
DebugOptionsListener listener = context.getService(reference);
listener.optionsChanged(this);
return listener;
}
+ @Override
public void modifiedService(ServiceReference<DebugOptionsListener> reference, DebugOptionsListener service) {
// nothing
}
+ @Override
public void removedService(ServiceReference<DebugOptionsListener> reference, DebugOptionsListener service) {
context.ungetService(reference);
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/debug/FrameworkDebugTraceEntry.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/debug/FrameworkDebugTraceEntry.java
index 13be6bf18..13248d889 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/debug/FrameworkDebugTraceEntry.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/debug/FrameworkDebugTraceEntry.java
@@ -145,6 +145,7 @@ public class FrameworkDebugTraceEntry {
*
* @see java.lang.Object#toString()
*/
+ @Override
public String toString() {
final StringBuffer buffer = new StringBuffer(threadName);
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/BundleContextImpl.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/BundleContextImpl.java
index 06781879e..2c5a22106 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/BundleContextImpl.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/BundleContextImpl.java
@@ -147,6 +147,7 @@ public class BundleContextImpl implements BundleContext, EventDispatcher<Object,
* @return The value of the requested property, or <code>null</code> if
* the property is undefined.
*/
+ @Override
public String getProperty(String key) {
SecurityManager sm = System.getSecurityManager();
@@ -162,6 +163,7 @@ public class BundleContextImpl implements BundleContext, EventDispatcher<Object,
*
* @return The context bundle's Bundle object.
*/
+ @Override
public Bundle getBundle() {
checkValid();
@@ -172,10 +174,12 @@ public class BundleContextImpl implements BundleContext, EventDispatcher<Object,
return bundle;
}
+ @Override
public Bundle installBundle(String location) throws BundleException {
return installBundle(location, null);
}
+ @Override
public Bundle installBundle(String location, InputStream in) throws BundleException {
checkValid();
try {
@@ -195,6 +199,7 @@ public class BundleContextImpl implements BundleContext, EventDispatcher<Object,
* @return A Bundle object, or <code>null</code>
* if the identifier doesn't match any installed bundle.
*/
+ @Override
public Bundle getBundle(long id) {
Module m = container.getStorage().getModuleContainer().getModule(id);
if (m == null) {
@@ -210,6 +215,7 @@ public class BundleContextImpl implements BundleContext, EventDispatcher<Object,
return m.getBundle();
}
+ @Override
public Bundle getBundle(String location) {
Module m = container.getStorage().getModuleContainer().getModule(location);
return m == null ? null : m.getBundle();
@@ -224,6 +230,7 @@ public class BundleContextImpl implements BundleContext, EventDispatcher<Object,
* @return An array of {@link Bundle} objects, one
* object per installed bundle.
*/
+ @Override
public Bundle[] getBundles() {
List<Module> modules = container.getStorage().getModuleContainer().getModules();
List<Bundle> bundles = new ArrayList<>(modules.size());
@@ -246,6 +253,7 @@ public class BundleContextImpl implements BundleContext, EventDispatcher<Object,
notifyFindHooksPriviledged(context, shrinkable);
} else {
AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ @Override
public Void run() {
notifyFindHooksPriviledged(context, shrinkable);
return null;
@@ -259,16 +267,19 @@ public class BundleContextImpl implements BundleContext, EventDispatcher<Object,
Debug.println("notifyBundleFindHooks(" + allBundles + ")"); //$NON-NLS-1$ //$NON-NLS-2$
}
container.getServiceRegistry().notifyHooksPrivileged(new HookContext() {
+ @Override
public void call(Object hook, ServiceRegistration<?> hookRegistration) throws Exception {
if (hook instanceof FindHook) {
((FindHook) hook).find(context, allBundles);
}
}
+ @Override
public String getHookClassName() {
return findHookName;
}
+ @Override
public String getHookMethodName() {
return "find"; //$NON-NLS-1$
}
@@ -280,6 +291,7 @@ public class BundleContextImpl implements BundleContext, EventDispatcher<Object,
});
}
+ @Override
public void addServiceListener(ServiceListener listener, String filter) throws InvalidSyntaxException {
checkValid();
@@ -298,6 +310,7 @@ public class BundleContextImpl implements BundleContext, EventDispatcher<Object,
*
* @see #addServiceListener(ServiceListener, String)
*/
+ @Override
public void addServiceListener(ServiceListener listener) {
try {
addServiceListener(listener, null);
@@ -322,6 +335,7 @@ public class BundleContextImpl implements BundleContext, EventDispatcher<Object,
* @exception java.lang.IllegalStateException
* If the bundle context has stopped.
*/
+ @Override
public void removeServiceListener(ServiceListener listener) {
checkValid();
@@ -345,6 +359,7 @@ public class BundleContextImpl implements BundleContext, EventDispatcher<Object,
* @see BundleEvent
* @see BundleListener
*/
+ @Override
public void addBundleListener(BundleListener listener) {
checkValid();
if (listener == null) {
@@ -372,6 +387,7 @@ public class BundleContextImpl implements BundleContext, EventDispatcher<Object,
* @exception java.lang.IllegalStateException
* If the bundle context has stopped.
*/
+ @Override
public void removeBundleListener(BundleListener listener) {
checkValid();
if (listener == null) {
@@ -399,6 +415,7 @@ public class BundleContextImpl implements BundleContext, EventDispatcher<Object,
* @see FrameworkEvent
* @see FrameworkListener
*/
+ @Override
public void addFrameworkListener(FrameworkListener listener) {
checkValid();
if (listener == null) {
@@ -426,6 +443,7 @@ public class BundleContextImpl implements BundleContext, EventDispatcher<Object,
* @exception java.lang.IllegalStateException
* If the bundle context has stopped.
*/
+ @Override
public void removeFrameworkListener(FrameworkListener listener) {
checkValid();
if (listener == null) {
@@ -501,6 +519,7 @@ public class BundleContextImpl implements BundleContext, EventDispatcher<Object,
* @see ServiceRegistration
* @see ServiceFactory
*/
+ @Override
public ServiceRegistration<?> registerService(String[] clazzes, Object service, Dictionary<String, ?> properties) {
checkValid();
return container.getServiceRegistry().registerService(this, clazzes, service, properties);
@@ -518,6 +537,7 @@ public class BundleContextImpl implements BundleContext, EventDispatcher<Object,
*
* @see #registerService(java.lang.String[], java.lang.Object, java.util.Dictionary)
*/
+ @Override
public ServiceRegistration<?> registerService(String clazz, Object service, Dictionary<String, ?> properties) {
String[] clazzes = new String[] {clazz};
@@ -567,11 +587,13 @@ public class BundleContextImpl implements BundleContext, EventDispatcher<Object,
* @exception InvalidSyntaxException If <tt>filter</tt> contains
* an invalid filter string which cannot be parsed.
*/
+ @Override
public ServiceReference<?>[] getServiceReferences(String clazz, String filter) throws InvalidSyntaxException {
checkValid();
return container.getServiceRegistry().getServiceReferences(this, clazz, filter, false);
}
+ @Override
public ServiceReference<?>[] getAllServiceReferences(String clazz, String filter) throws InvalidSyntaxException {
checkValid();
return container.getServiceRegistry().getServiceReferences(this, clazz, filter, true);
@@ -597,6 +619,7 @@ public class BundleContextImpl implements BundleContext, EventDispatcher<Object,
* if no services are registered which implement the named class.
* @see #getServiceReferences
*/
+ @Override
public ServiceReference<?> getServiceReference(String clazz) {
checkValid();
@@ -653,6 +676,7 @@ public class BundleContextImpl implements BundleContext, EventDispatcher<Object,
* @see #ungetService
* @see ServiceFactory
*/
+ @Override
public <S> S getService(ServiceReference<S> reference) {
checkValid();
if (reference == null)
@@ -697,6 +721,7 @@ public class BundleContextImpl implements BundleContext, EventDispatcher<Object,
* @see #getService
* @see ServiceFactory
*/
+ @Override
public boolean ungetService(ServiceReference<?> reference) {
checkValid();
@@ -727,6 +752,7 @@ public class BundleContextImpl implements BundleContext, EventDispatcher<Object,
* @exception java.lang.IllegalStateException
* If the bundle context has stopped.
*/
+ @Override
public File getDataFile(String filename) {
checkValid();
@@ -806,6 +832,7 @@ public class BundleContextImpl implements BundleContext, EventDispatcher<Object,
private void startActivator(final BundleActivator bundleActivator) throws BundleException {
try {
AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() {
+ @Override
public Void run() throws Exception {
if (bundleActivator != null) {
// make sure the context class loader is set correctly
@@ -862,6 +889,7 @@ public class BundleContextImpl implements BundleContext, EventDispatcher<Object,
try {
final BundleActivator bundleActivator = activator;
AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() {
+ @Override
public Void run() throws Exception {
if (bundleActivator != null) {
// make sure the context class loader is set correctly
@@ -926,6 +954,7 @@ public class BundleContextImpl implements BundleContext, EventDispatcher<Object,
* @param action Event class type
* @param object Event object
*/
+ @Override
public void dispatchEvent(Object originalListener, Object l, int action, Object object) {
Object previousTCCL = setContextFinder();
try {
@@ -1007,6 +1036,7 @@ public class BundleContextImpl implements BundleContext, EventDispatcher<Object,
* @exception InvalidSyntaxException If the filter parameter contains
* an invalid filter string which cannot be parsed.
*/
+ @Override
public Filter createFilter(String filter) throws InvalidSyntaxException {
checkValid();
@@ -1035,24 +1065,28 @@ public class BundleContextImpl implements BundleContext, EventDispatcher<Object,
return valid;
}
+ @Override
public <S> ServiceRegistration<S> registerService(Class<S> clazz, S service, Dictionary<String, ?> properties) {
@SuppressWarnings("unchecked")
ServiceRegistration<S> registration = (ServiceRegistration<S>) registerService(clazz.getName(), service, properties);
return registration;
}
+ @Override
public <S> ServiceRegistration<S> registerService(Class<S> clazz, ServiceFactory<S> factory, Dictionary<String, ?> properties) {
@SuppressWarnings("unchecked")
ServiceRegistration<S> registration = (ServiceRegistration<S>) registerService(clazz.getName(), factory, properties);
return registration;
}
+ @Override
public <S> ServiceReference<S> getServiceReference(Class<S> clazz) {
@SuppressWarnings("unchecked")
ServiceReference<S> reference = (ServiceReference<S>) getServiceReference(clazz.getName());
return reference;
}
+ @Override
public <S> Collection<ServiceReference<S>> getServiceReferences(Class<S> clazz, String filter) throws InvalidSyntaxException {
@SuppressWarnings("unchecked")
ServiceReference<S>[] refs = (ServiceReference<S>[]) getServiceReferences(clazz.getName(), filter);
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/ContextFinder.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/ContextFinder.java
index 318e537e5..aece758f9 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/ContextFinder.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/ContextFinder.java
@@ -23,6 +23,7 @@ import org.eclipse.osgi.internal.loader.ModuleClassLoader;
public class ContextFinder extends ClassLoader implements PrivilegedAction<List<ClassLoader>> {
static final class Finder extends SecurityManager {
+ @Override
public Class<?>[] getClassContext() {
return super.getClassContext();
}
@@ -35,6 +36,7 @@ public class ContextFinder extends ClassLoader implements PrivilegedAction<List<
static Finder contextFinder;
static {
AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ @Override
public Void run() {
finderClassLoader = ContextFinder.class.getClassLoader();
contextFinder = new Finder();
@@ -95,6 +97,7 @@ public class ContextFinder extends ClassLoader implements PrivilegedAction<List<
return AccessController.doPrivileged(this);
}
+ @Override
public List<ClassLoader> run() {
return basicFindClassLoaders();
}
@@ -118,6 +121,7 @@ public class ContextFinder extends ClassLoader implements PrivilegedAction<List<
cycleDetector.get().remove(name);
}
+ @Override
protected Class<?> loadClass(String arg0, boolean arg1) throws ClassNotFoundException {
//Shortcut cycle
if (startLoading(arg0) == false)
@@ -138,6 +142,7 @@ public class ContextFinder extends ClassLoader implements PrivilegedAction<List<
}
}
+ @Override
public URL getResource(String arg0) {
//Shortcut cycle
if (startLoading(arg0) == false)
@@ -156,6 +161,7 @@ public class ContextFinder extends ClassLoader implements PrivilegedAction<List<
}
}
+ @Override
public Enumeration<URL> getResources(String arg0) throws IOException {
//Shortcut cycle
if (startLoading(arg0) == false) {
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxBundle.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxBundle.java
index 74438c56a..b3f4a48e8 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxBundle.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxBundle.java
@@ -101,10 +101,12 @@ public class EquinoxBundle implements Bundle, BundleReference {
this.headers = headers;
}
+ @Override
public Enumeration<String> elements() {
return headers.elements();
}
+ @Override
public String get(Object key) {
if (!(key instanceof String))
return null;
@@ -139,22 +141,27 @@ public class EquinoxBundle implements Bundle, BundleReference {
return result;
}
+ @Override
public boolean isEmpty() {
return headers.isEmpty();
}
+ @Override
public Enumeration<String> keys() {
return headers.keys();
}
+ @Override
public String put(String key, String value) {
return headers.put(key, value);
}
+ @Override
public String remove(Object key) {
return headers.remove(key);
}
+ @Override
public int size() {
return headers.size();
}
@@ -257,6 +264,7 @@ public class EquinoxBundle implements Bundle, BundleReference {
this.init((FrameworkListener[]) null);
}
+ @Override
public void init(FrameworkListener... listeners) throws BundleException {
if (listeners != null) {
if (getEquinoxContainer().getConfiguration().getDebug().DEBUG_SYSTEM_BUNDLE) {
@@ -1053,6 +1061,7 @@ public class EquinoxBundle implements Bundle, BundleReference {
return equinoxContainer;
}
+ @Override
public String toString() {
String name = getSymbolicName();
if (name == null)
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxConfiguration.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxConfiguration.java
index f1f5b43e7..cdf363c88 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxConfiguration.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxConfiguration.java
@@ -682,38 +682,47 @@ public class EquinoxConfiguration implements EnvironmentInfo {
return inCheckConfigurationMode;
}
+ @Override
public boolean inDevelopmentMode() {
return inDevelopmentMode;
}
+ @Override
public boolean inDebugMode() {
return debugOptions.isDebugEnabled();
}
+ @Override
public String[] getCommandLineArgs() {
return allArgs;
}
+ @Override
public String[] getFrameworkArgs() {
return frameworkArgs;
}
+ @Override
public String[] getNonFrameworkArgs() {
return appArgs;
}
+ @Override
public String getOSArch() {
return getConfiguration(PROP_OSGI_ARCH);
}
+ @Override
public String getNL() {
return getConfiguration(PROP_OSGI_NL);
}
+ @Override
public String getOS() {
return getConfiguration(PROP_OSGI_OS);
}
+ @Override
public String getWS() {
return getConfiguration(PROP_OSGI_WS);
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxEventPublisher.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxEventPublisher.java
index 192965a82..064983f21 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxEventPublisher.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxEventPublisher.java
@@ -140,6 +140,7 @@ public class EquinoxEventPublisher {
publishBundleEventPrivileged(event);
} else {
AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ @Override
public Void run() {
publishBundleEventPrivileged(event);
return null;
@@ -254,16 +255,19 @@ public class EquinoxEventPublisher {
ServiceRegistry serviceRegistry = container.getServiceRegistry();
if (serviceRegistry != null) {
serviceRegistry.notifyHooksPrivileged(new HookContext() {
+ @Override
public void call(Object hook, ServiceRegistration<?> hookRegistration) throws Exception {
if (hook instanceof EventHook) {
((EventHook) hook).event(event, result);
}
}
+ @Override
public String getHookClassName() {
return eventHookName;
}
+ @Override
public String getHookMethodName() {
return "event"; //$NON-NLS-1$
}
@@ -298,6 +302,7 @@ public class EquinoxEventPublisher {
publishFrameworkEventPrivileged(event, listeners);
} else {
AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ @Override
public Void run() {
publishFrameworkEventPrivileged(event, listeners);
return null;
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/FilterImpl.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/FilterImpl.java
index eb10f3b86..f7eb91df4 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/FilterImpl.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/FilterImpl.java
@@ -162,6 +162,7 @@ public class FilterImpl implements Filter /* since Framework 1.1 */ {
* @return {@code true} if the service's properties match this
* {@code Filter}; {@code false} otherwise.
*/
+ @Override
public boolean match(ServiceReference<?> reference) {
if (reference instanceof ServiceReferenceImpl) {
return matches(((ServiceReferenceImpl<?>) reference).getRegistration().getProperties());
@@ -181,6 +182,7 @@ public class FilterImpl implements Filter /* since Framework 1.1 */ {
* @throws IllegalArgumentException If {@code dictionary} contains case
* variants of the same key name.
*/
+ @Override
public boolean match(Dictionary<String, ?> dictionary) {
if (dictionary == null) {
return matches(null);
@@ -199,6 +201,7 @@ public class FilterImpl implements Filter /* since Framework 1.1 */ {
* filter; {@code false} otherwise.
* @since 1.3
*/
+ @Override
public boolean matchCase(Dictionary<String, ?> dictionary) {
switch (op) {
case AND : {
@@ -265,6 +268,7 @@ public class FilterImpl implements Filter /* since Framework 1.1 */ {
* {@code false} otherwise.
* @since 1.6
*/
+ @Override
public boolean matches(Map<String, ?> map) {
switch (op) {
case AND : {
@@ -328,6 +332,7 @@ public class FilterImpl implements Filter /* since Framework 1.1 */ {
* @return Filter string.
*/
+ @Override
public String toString() {
String result = filterString;
if (result == null) {
@@ -446,6 +451,7 @@ public class FilterImpl implements Filter /* since Framework 1.1 */ {
* returns <code>this.toString().equals(obj.toString()</code>;
* <code>false</code> otherwise.
*/
+ @Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
@@ -464,6 +470,7 @@ public class FilterImpl implements Filter /* since Framework 1.1 */ {
* @return The hashCode of the filter string; that is,
* <code>this.toString().hashCode()</code>.
*/
+ @Override
public int hashCode() {
return this.toString().hashCode();
}
@@ -1785,6 +1792,7 @@ public class FilterImpl implements Filter /* since Framework 1.1 */ {
this.accessible = accessible;
}
+ @Override
public Void run() {
accessible.setAccessible(true);
return null;
@@ -1798,6 +1806,7 @@ public class FilterImpl implements Filter /* since Framework 1.1 */ {
private char rightRule = 0;
private Collection<Version> excludes = new ArrayList<>(0);
+ @Override
public String toString() {
if (rightVersion == null) {
return leftVersion.toString();
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/OSGiFrameworkHooks.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/OSGiFrameworkHooks.java
index 22f98d3b8..bc4cf7d27 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/OSGiFrameworkHooks.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/OSGiFrameworkHooks.java
@@ -104,6 +104,7 @@ class OSGiFrameworkHooks {
notifyCollisionHooksPriviledged(operationType, target, shrinkable);
} else {
AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ @Override
public Void run() {
notifyCollisionHooksPriviledged(operationType, target, shrinkable);
return null;
@@ -119,16 +120,19 @@ class OSGiFrameworkHooks {
ServiceRegistry registry = container.getServiceRegistry();
if (registry != null) {
registry.notifyHooksPrivileged(new HookContext() {
+ @Override
public void call(Object hook, ServiceRegistration<?> hookRegistration) throws Exception {
if (hook instanceof CollisionHook) {
((CollisionHook) hook).filterCollisions(operationType, target, collisionCandidates);
}
}
+ @Override
public String getHookClassName() {
return collisionHookName;
}
+ @Override
public String getHookMethodName() {
return "filterCollisions"; //$NON-NLS-1$
}
@@ -203,6 +207,7 @@ class OSGiFrameworkHooks {
}
+ @Override
public ResolverHook begin(Collection<BundleRevision> triggers) {
if (debug.DEBUG_HOOKS) {
Debug.println("ResolverHook.begin"); //$NON-NLS-1$
@@ -252,6 +257,7 @@ class OSGiFrameworkHooks {
this.systemModule = systemModule;
}
+ @Override
public void filterResolvable(Collection<BundleRevision> candidates) {
if (debug.DEBUG_HOOKS) {
Debug.println("ResolverHook.filterResolvable(" + candidates + ")"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -291,6 +297,7 @@ class OSGiFrameworkHooks {
return systemModule == null || !Module.RESOLVED_SET.contains(systemModule.getState()) || (systemModule.getState().equals(State.STARTING) && inInit);
}
+ @Override
public void filterSingletonCollisions(BundleCapability singleton, Collection<BundleCapability> collisionCandidates) {
if (debug.DEBUG_HOOKS) {
Debug.println("ResolverHook.filterSingletonCollisions(" + singleton + ", " + collisionCandidates + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -312,6 +319,7 @@ class OSGiFrameworkHooks {
}
}
+ @Override
public void filterMatches(BundleRequirement requirement, Collection<BundleCapability> candidates) {
if (debug.DEBUG_HOOKS) {
Debug.println("ResolverHook.filterMatches(" + requirement + ", " + candidates + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -333,6 +341,7 @@ class OSGiFrameworkHooks {
}
}
+ @Override
public void end() {
if (debug.DEBUG_HOOKS) {
Debug.println("ResolverHook.end"); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/SystemBundleActivator.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/SystemBundleActivator.java
index 0a3d865d5..9e9b97276 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/SystemBundleActivator.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/SystemBundleActivator.java
@@ -56,6 +56,7 @@ public class SystemBundleActivator implements BundleActivator {
private SecurityManager setSecurityManagner;
@SuppressWarnings("deprecation")
+ @Override
public void start(BundleContext bc) throws Exception {
registrations.clear();
EquinoxBundle bundle = (EquinoxBundle) bc.getBundle();
@@ -183,6 +184,7 @@ public class SystemBundleActivator implements BundleActivator {
}
}
+ @Override
public void stop(BundleContext bc) throws Exception {
EquinoxBundle bundle = (EquinoxBundle) bc.getBundle();
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/XMLParsingServiceFactory.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/XMLParsingServiceFactory.java
index 8a095ed3e..fbeb96e62 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/XMLParsingServiceFactory.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/XMLParsingServiceFactory.java
@@ -27,6 +27,7 @@ class XMLParsingServiceFactory implements ServiceFactory<Object> {
this.setTccl = setTccl;
}
+ @Override
public Object getService(Bundle bundle, ServiceRegistration<Object> registration) {
if (!setTccl || bundle == null)
return createService();
@@ -59,6 +60,7 @@ class XMLParsingServiceFactory implements ServiceFactory<Object> {
return DocumentBuilderFactory.newInstance();
}
+ @Override
public void ungetService(Bundle bundle, ServiceRegistration<Object> registration, Object service) {
// Do nothing.
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/legacy/PackageAdminImpl.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/legacy/PackageAdminImpl.java
index c6d03ad38..3a9fcd420 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/legacy/PackageAdminImpl.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/legacy/PackageAdminImpl.java
@@ -76,6 +76,7 @@ public class PackageAdminImpl implements PackageAdmin {
this.clazz = clazz;
}
+ @Override
public Bundle run() {
return impl.getBundlePriv(clazz);
}
@@ -90,6 +91,7 @@ public class PackageAdminImpl implements PackageAdmin {
this.container = container;
}
+ @Override
public ExportedPackage[] getExportedPackages(Bundle bundle) {
if (bundle == null) {
return getExportedPackages((String) null);
@@ -112,6 +114,7 @@ public class PackageAdminImpl implements PackageAdmin {
return allExports.isEmpty() ? null : allExports.toArray(new ExportedPackage[allExports.size()]);
}
+ @Override
public ExportedPackage getExportedPackage(String name) {
ExportedPackage[] allExports = getExportedPackages(name);
if (allExports == null)
@@ -132,6 +135,7 @@ public class PackageAdminImpl implements PackageAdmin {
return result;
}
+ @Override
public ExportedPackage[] getExportedPackages(String name) {
String filter = "(" + PackageNamespace.PACKAGE_NAMESPACE + "=" + (name == null ? "*" : name) + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
Map<String, String> directives = Collections.<String, String> singletonMap(Namespace.REQUIREMENT_FILTER_DIRECTIVE, filter);
@@ -170,14 +174,17 @@ public class PackageAdminImpl implements PackageAdmin {
return (result.size() == 0 ? null : result.toArray(new ExportedPackage[result.size()]));
}
+ @Override
public void refreshPackages(Bundle[] input) {
container.getFrameworkWiring().refreshBundles(input == null ? null : Arrays.asList(input));
}
+ @Override
public boolean resolveBundles(Bundle[] input) {
return container.getFrameworkWiring().resolveBundles(input == null ? null : Arrays.asList(input));
}
+ @Override
public RequiredBundle[] getRequiredBundles(String symbolicName) {
String filter = "(" + BundleNamespace.BUNDLE_NAMESPACE + "=" + (symbolicName == null ? "*" : symbolicName) + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
Map<String, String> directives = Collections.<String, String> singletonMap(Namespace.REQUIREMENT_FILTER_DIRECTIVE, filter);
@@ -195,6 +202,7 @@ public class PackageAdminImpl implements PackageAdmin {
return result.isEmpty() ? null : result.toArray(new RequiredBundle[result.size()]);
}
+ @Override
public Bundle[] getBundles(String symbolicName, String versionRange) {
if (symbolicName == null) {
throw new IllegalArgumentException();
@@ -233,6 +241,7 @@ public class PackageAdminImpl implements PackageAdmin {
return sorted.toArray(new Bundle[sorted.size()]);
}
+ @Override
public Bundle[] getFragments(Bundle bundle) {
ModuleWiring wiring = getWiring(bundle);
if (wiring == null) {
@@ -253,6 +262,7 @@ public class PackageAdminImpl implements PackageAdmin {
return fragments.isEmpty() ? null : fragments.toArray(new Bundle[fragments.size()]);
}
+ @Override
public Bundle[] getHosts(Bundle bundle) {
ModuleWiring wiring = getWiring(bundle);
if (wiring == null) {
@@ -298,12 +308,14 @@ public class PackageAdminImpl implements PackageAdmin {
return null;
}
+ @Override
public Bundle getBundle(final Class<?> clazz) {
if (System.getSecurityManager() == null)
return getBundlePriv(clazz);
return AccessController.doPrivileged(new GetBundleAction(this, clazz));
}
+ @Override
public int getBundleType(Bundle bundle) {
Module module = StartLevelImpl.getModule(bundle);
if (module == null) {
@@ -334,16 +346,19 @@ public class PackageAdminImpl implements PackageAdmin {
this.providerWiring = providerWiring;
}
+ @Override
public String getName() {
return (String) packageCapability.getAttributes().get(PackageNamespace.PACKAGE_NAMESPACE);
}
+ @Override
public Bundle getExportingBundle() {
if (!providerWiring.isInUse())
return null;
return providerWiring.getBundle();
}
+ @Override
public Bundle[] getImportingBundles() {
if (!providerWiring.isInUse()) {
return null;
@@ -408,19 +423,23 @@ public class PackageAdminImpl implements PackageAdmin {
/**
* @deprecated
*/
+ @Override
public String getSpecificationVersion() {
return getVersion().toString();
}
+ @Override
public Version getVersion() {
Version version = (Version) packageCapability.getAttributes().get(PackageNamespace.CAPABILITY_VERSION_ATTRIBUTE);
return version == null ? Version.emptyVersion : version;
}
+ @Override
public boolean isRemovalPending() {
return !providerWiring.isCurrent();
}
+ @Override
public String toString() {
return packageCapability.toString();
}
@@ -484,10 +503,12 @@ public class PackageAdminImpl implements PackageAdmin {
return version == null ? Version.emptyVersion : version;
}
+ @Override
public boolean isRemovalPending() {
return !providerWiring.isCurrent();
}
+ @Override
public String toString() {
return bundleCapability.toString();
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/hooks/DevClassLoadingHook.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/hooks/DevClassLoadingHook.java
index ece877b41..861a8d428 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/hooks/DevClassLoadingHook.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/hooks/DevClassLoadingHook.java
@@ -101,14 +101,17 @@ public class DevClassLoadingHook extends ClassLoaderHook implements KeyedElement
return fromFragment ? null : hostGeneration;
}
+ @Override
public boolean compare(KeyedElement other) {
return other.getKey() == KEY;
}
+ @Override
public Object getKey() {
return KEY;
}
+ @Override
public int getKeyHashCode() {
return HASHCODE;
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/BundleLoader.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/BundleLoader.java
index 9d8cfad81..b0e08c00e 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/BundleLoader.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/BundleLoader.java
@@ -75,6 +75,7 @@ public class BundleLoader extends ModuleLoader {
public final static String JAVA_PACKAGE = "java."; //$NON-NLS-1$
public final static ClassContext CLASS_CONTEXT = AccessController.doPrivileged(new PrivilegedAction<ClassContext>() {
+ @Override
public ClassContext run() {
return new ClassContext();
}
@@ -590,6 +591,7 @@ public class BundleLoader extends ModuleLoader {
if (System.getSecurityManager() == null)
return clazz.getClassLoader();
return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
+ @Override
public ClassLoader run() {
return clazz.getClassLoader();
}
@@ -891,6 +893,7 @@ public class BundleLoader extends ModuleLoader {
* Return a string representation of this loader.
* @return String
*/
+ @Override
public final String toString() {
ModuleRevision revision = wiring.getRevision();
String name = revision.getSymbolicName();
@@ -1248,6 +1251,7 @@ public class BundleLoader extends ModuleLoader {
static final class ClassContext extends SecurityManager {
// need to make this method public
+ @Override
public Class<?>[] getClassContext() {
return super.getClassContext();
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/EquinoxClassLoader.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/EquinoxClassLoader.java
index 73ceb783d..cefca1e0e 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/EquinoxClassLoader.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/EquinoxClassLoader.java
@@ -47,18 +47,22 @@ public class EquinoxClassLoader extends ModuleClassLoader {
this.isRegisteredAsParallel = (ModuleClassLoader.REGISTERED_AS_PARALLEL && EQUINOX_REGISTERED_AS_PARALLEL) || this.configuration.PARALLEL_CAPABLE;
}
+ @Override
protected final Generation getGeneration() {
return this.generation;
}
+ @Override
public final ClasspathManager getClasspathManager() {
return manager;
}
+ @Override
public final boolean isRegisteredAsParallel() {
return isRegisteredAsParallel;
}
+ @Override
public final BundleLoader getBundleLoader() {
return delegate;
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/ModuleClassLoader.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/ModuleClassLoader.java
index 89eaa42b7..61bfd8927 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/ModuleClassLoader.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/ModuleClassLoader.java
@@ -43,6 +43,7 @@ public abstract class ModuleClassLoader extends ClassLoader implements BundleRef
this.generation = generation;
}
+ @Override
public Bundle getBundle() {
return generation.getRevision().getBundle();
}
@@ -145,6 +146,7 @@ public abstract class ModuleClassLoader extends ClassLoader implements BundleRef
* @return The Class object.
* @throws ClassNotFoundException if the class is not found.
*/
+ @Override
protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
if (getDebug().DEBUG_LOADER)
Debug.println("ModuleClassLoader[" + getBundleLoader() + "].loadClass(" + name + ")"); //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
@@ -189,6 +191,7 @@ public abstract class ModuleClassLoader extends ClassLoader implements BundleRef
* @param name The resource path to get.
* @return The URL of the resource or null if it does not exist.
*/
+ @Override
public URL getResource(String name) {
if (getDebug().DEBUG_LOADER) {
Debug.println("ModuleClassLoader[" + getBundleLoader() + "].getResource(" + name + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -224,6 +227,7 @@ public abstract class ModuleClassLoader extends ClassLoader implements BundleRef
* @param name The resource path to get.
* @return The Enumeration of the resource URLs.
*/
+ @Override
public Enumeration<URL> getResources(String name) throws IOException {
if (getDebug().DEBUG_LOADER) {
Debug.println("ModuleClassLoader[" + getBundleLoader() + "].getResources(" + name + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -248,6 +252,7 @@ public abstract class ModuleClassLoader extends ClassLoader implements BundleRef
* @param libname The library to find.
* @return The absolution path to the library or null if not found
*/
+ @Override
protected String findLibrary(String libname) {
// let the manager find the library for us
return getClasspathManager().findLibrary(libname);
@@ -368,6 +373,7 @@ public abstract class ModuleClassLoader extends ClassLoader implements BundleRef
}
}
+ @Override
public Bundle getBundle() {
return getGeneration().getRevision().getBundle();
}
@@ -384,6 +390,7 @@ public abstract class ModuleClassLoader extends ClassLoader implements BundleRef
return getClasspathManager().listLocalResources(path, filePattern, options);
}
+ @Override
public String toString() {
Bundle b = getBundle();
StringBuffer result = new StringBuffer(super.toString());
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/SystemBundleLoader.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/SystemBundleLoader.java
index 9495b5b86..e8c7f730f 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/SystemBundleLoader.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/SystemBundleLoader.java
@@ -46,6 +46,7 @@ public class SystemBundleLoader extends BundleLoader {
* The ClassLoader that loads OSGi framework classes is used to find the class.
* This method never gets called because there is no BundleClassLoader for the framework.
*/
+ @Override
public Class<?> findClass(String name) throws ClassNotFoundException {
Class<?> result = findLocalClass(name);
if (result == null)
@@ -56,6 +57,7 @@ public class SystemBundleLoader extends BundleLoader {
/**
* The ClassLoader that loads OSGi framework classes is used to find the class.
*/
+ @Override
public Class<?> findLocalClass(String name) {
try {
return classLoader.loadClass(name);
@@ -68,6 +70,7 @@ public class SystemBundleLoader extends BundleLoader {
/**
* The ClassLoader that loads OSGi framework classes is used to find the resource.
*/
+ @Override
public URL findLocalResource(String name) {
return classLoader.getResource(name);
}
@@ -75,6 +78,7 @@ public class SystemBundleLoader extends BundleLoader {
/**
* The ClassLoader that loads OSGi framework classes is used to find the resource.
*/
+ @Override
public Enumeration<URL> findLocalResources(String name) {
try {
return classLoader.getResources(name);
@@ -88,6 +92,7 @@ public class SystemBundleLoader extends BundleLoader {
* The ClassLoader that loads OSGi framework classes is used to find the resource.
* This method never gets called because there is no ModuleClassLoader for the framework.
*/
+ @Override
public URL findResource(String name) {
return findLocalResource(name);
}
@@ -97,6 +102,7 @@ public class SystemBundleLoader extends BundleLoader {
* This method never gets called because there is no ModuleClassLoader for the framework.
* @throws IOException
*/
+ @Override
public Enumeration<URL> findResources(String name) throws IOException {
return findLocalResources(name);
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/buddy/DependentPolicy.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/buddy/DependentPolicy.java
index 66df2f971..838d9d52c 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/buddy/DependentPolicy.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/buddy/DependentPolicy.java
@@ -44,6 +44,7 @@ public class DependentPolicy implements IBuddyPolicy {
allDependents = null;
}
+ @Override
public Class<?> loadClass(String name) {
if (allDependents == null)
return null;
@@ -72,6 +73,7 @@ public class DependentPolicy implements IBuddyPolicy {
}
}
+ @Override
public URL loadResource(String name) {
if (allDependents == null)
return null;
@@ -91,6 +93,7 @@ public class DependentPolicy implements IBuddyPolicy {
return result;
}
+ @Override
public Enumeration<URL> loadResources(String name) {
if (allDependents == null)
return null;
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/buddy/GlobalPolicy.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/buddy/GlobalPolicy.java
index 7f1433c28..c1a3eb807 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/buddy/GlobalPolicy.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/buddy/GlobalPolicy.java
@@ -34,6 +34,7 @@ public class GlobalPolicy implements IBuddyPolicy {
this.admin = admin;
}
+ @Override
public Class<?> loadClass(String name) {
ExportedPackage pkg = admin.getExportedPackage(BundleLoader.getPackageName(name));
if (pkg == null)
@@ -45,6 +46,7 @@ public class GlobalPolicy implements IBuddyPolicy {
}
}
+ @Override
public URL loadResource(String name) {
//get all exported packages that match the resource's package
ExportedPackage pkg = admin.getExportedPackage(BundleLoader.getResourcePackageName(name));
@@ -53,6 +55,7 @@ public class GlobalPolicy implements IBuddyPolicy {
return pkg.getExportingBundle().getResource(name);
}
+ @Override
public Enumeration<URL> loadResources(String name) {
//get all exported packages that match the resource's package
ExportedPackage[] pkgs = admin.getExportedPackages(BundleLoader.getResourcePackageName(name));
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/buddy/PolicyHandler.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/buddy/PolicyHandler.java
index f1ee4f95d..462e61939 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/buddy/PolicyHandler.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/buddy/PolicyHandler.java
@@ -214,6 +214,7 @@ public class PolicyHandler implements SynchronousBundleListener {
context.removeBundleListener(this);
}
+ @Override
public void bundleChanged(BundleEvent event) {
if ((event.getType() & (BundleEvent.RESOLVED | BundleEvent.UNRESOLVED)) == 0)
return;
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/buddy/RegisteredPolicy.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/buddy/RegisteredPolicy.java
index c4e2d7852..3546bb4c2 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/buddy/RegisteredPolicy.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/buddy/RegisteredPolicy.java
@@ -62,6 +62,7 @@ public class RegisteredPolicy extends DependentPolicy {
allDependents = null;
}
+ @Override
public Class<?> loadClass(String name) {
if (allDependents == null)
return null;
@@ -83,6 +84,7 @@ public class RegisteredPolicy extends DependentPolicy {
return result;
}
+ @Override
public URL loadResource(String name) {
if (allDependents == null)
return null;
@@ -99,6 +101,7 @@ public class RegisteredPolicy extends DependentPolicy {
return result;
}
+ @Override
public Enumeration<URL> loadResources(String name) {
if (allDependents == null)
return null;
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/buddy/SystemPolicy.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/buddy/SystemPolicy.java
index 8b91caec5..6b471d4b1 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/buddy/SystemPolicy.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/buddy/SystemPolicy.java
@@ -34,6 +34,7 @@ public class SystemPolicy implements IBuddyPolicy {
if (instances[type] == null) {
instances[type] = new SystemPolicy();
instances[type].classLoader = AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
+ @Override
public ClassLoader run() {
return createClassLoader(type);
}
@@ -68,6 +69,7 @@ public class SystemPolicy implements IBuddyPolicy {
return null;
}
+ @Override
public Class<?> loadClass(String name) {
try {
return classLoader.loadClass(name);
@@ -76,10 +78,12 @@ public class SystemPolicy implements IBuddyPolicy {
}
}
+ @Override
public URL loadResource(String name) {
return classLoader.getResource(name);
}
+ @Override
public Enumeration<URL> loadResources(String name) {
try {
return classLoader.getResources(name);
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/sources/FilteredSourcePackage.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/sources/FilteredSourcePackage.java
index 815678fc4..18e58fa57 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/sources/FilteredSourcePackage.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/sources/FilteredSourcePackage.java
@@ -29,18 +29,21 @@ public class FilteredSourcePackage extends SingleSourcePackage {
this.excludes = excludes != null ? ManifestElement.getArrayFromList(excludes) : null;
}
+ @Override
public URL getResource(String name) {
if (isFiltered(name, getId()))
return null;
return super.getResource(name);
}
+ @Override
public Enumeration<URL> getResources(String name) {
if (isFiltered(name, getId()))
return null;
return super.getResources(name);
}
+ @Override
public Class<?> loadClass(String name) throws ClassNotFoundException {
if (isFiltered(name, getId()))
return null;
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/sources/MultiSourcePackage.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/sources/MultiSourcePackage.java
index 07beab28c..b5b4779e5 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/sources/MultiSourcePackage.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/sources/MultiSourcePackage.java
@@ -25,10 +25,12 @@ public class MultiSourcePackage extends PackageSource {
this.suppliers = suppliers;
}
+ @Override
public SingleSourcePackage[] getSuppliers() {
return suppliers;
}
+ @Override
public Class<?> loadClass(String name) throws ClassNotFoundException {
Class<?> result = null;
for (int i = 0; i < suppliers.length; i++) {
@@ -39,6 +41,7 @@ public class MultiSourcePackage extends PackageSource {
return result;
}
+ @Override
public URL getResource(String name) {
URL result = null;
for (int i = 0; i < suppliers.length; i++) {
@@ -49,6 +52,7 @@ public class MultiSourcePackage extends PackageSource {
return result;
}
+ @Override
public Enumeration<URL> getResources(String name) {
Enumeration<URL> results = null;
for (int i = 0; i < suppliers.length; i++)
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/sources/NullPackageSource.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/sources/NullPackageSource.java
index d397e4140..3e8c15125 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/sources/NullPackageSource.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/sources/NullPackageSource.java
@@ -33,22 +33,27 @@ public class NullPackageSource extends PackageSource {
super(name);
}
+ @Override
public SingleSourcePackage[] getSuppliers() {
return null;
}
+ @Override
public boolean isNullSource() {
return true;
}
+ @Override
public Class<?> loadClass(String name) {
return null;
}
+ @Override
public URL getResource(String name) {
return null;
}
+ @Override
public Enumeration<URL> getResources(String name) {
return null;
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/sources/SingleSourcePackage.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/sources/SingleSourcePackage.java
index 713ff6ebb..a686cd84e 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/sources/SingleSourcePackage.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/sources/SingleSourcePackage.java
@@ -27,6 +27,7 @@ public class SingleSourcePackage extends PackageSource {
this.supplier = supplier;
}
+ @Override
public SingleSourcePackage[] getSuppliers() {
return new SingleSourcePackage[] {this};
}
@@ -35,18 +36,22 @@ public class SingleSourcePackage extends PackageSource {
return supplier;
}
+ @Override
public Class<?> loadClass(String name) throws ClassNotFoundException {
return supplier.findLocalClass(name);
}
+ @Override
public URL getResource(String name) {
return supplier.findLocalResource(name);
}
+ @Override
public Enumeration<URL> getResources(String name) {
return supplier.findLocalResources(name);
}
+ @Override
public boolean equals(Object source) {
if (this == source)
return true;
@@ -57,6 +62,7 @@ public class SingleSourcePackage extends PackageSource {
return supplier == singleSource.supplier && id == singleSource.getId();
}
+ @Override
public int hashCode() {
final int prime = 31;
int result = 1;
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/location/BasicLocation.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/location/BasicLocation.java
index 0bad33be3..45c38d584 100755
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/location/BasicLocation.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/location/BasicLocation.java
@@ -62,18 +62,22 @@ public class BasicLocation implements Location {
this.debug = debug;
}
+ @Override
public boolean allowsDefault() {
return defaultValue != null;
}
+ @Override
public URL getDefault() {
return defaultValue;
}
+ @Override
public synchronized Location getParentLocation() {
return parent;
}
+ @Override
public synchronized URL getURL() {
if (location == null && defaultValue != null) {
if (debug.get()) {
@@ -88,10 +92,12 @@ public class BasicLocation implements Location {
return location;
}
+ @Override
public synchronized boolean isSet() {
return location != null;
}
+ @Override
public boolean isReadOnly() {
return isReadOnly;
}
@@ -99,6 +105,7 @@ public class BasicLocation implements Location {
/**
* @deprecated
*/
+ @Override
public boolean setURL(URL value, boolean lock) throws IllegalStateException {
try {
return set(value, lock);
@@ -107,10 +114,12 @@ public class BasicLocation implements Location {
}
}
+ @Override
public synchronized boolean set(URL value, boolean lock) throws IllegalStateException, IOException {
return set(value, lock, null);
}
+ @Override
public synchronized boolean set(URL value, boolean lock, String lockFilePath) throws IllegalStateException, IOException {
if (location != null)
throw new IllegalStateException(Msg.ECLIPSE_CANNOT_CHANGE_LOCATION);
@@ -150,12 +159,14 @@ public class BasicLocation implements Location {
parent = value;
}
+ @Override
public synchronized boolean lock() throws IOException {
if (!isSet())
throw new IOException(Msg.location_notSet);
return lock(lockFile, location);
}
+ @Override
public synchronized boolean isLocked() throws IOException {
if (!isSet())
return false;
@@ -216,17 +227,20 @@ public class BasicLocation implements Location {
locker = LocationHelper.createLocker(lock, lockMode, debug.get());
}
+ @Override
public synchronized void release() {
if (locker != null)
locker.release();
}
+ @Override
public Location createLocation(Location parentLocation, URL defaultLocation, boolean readonly) {
BasicLocation result = new BasicLocation(null, defaultLocation, readonly, dataAreaPrefix, configValues, container, debug);
result.setParent(parentLocation);
return result;
}
+ @Override
public URL getDataArea(String filename) throws IOException {
URL base = getURL();
if (base == null)
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EquinoxLogFactory.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EquinoxLogFactory.java
index 5a734f99c..d2fb48fce 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EquinoxLogFactory.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EquinoxLogFactory.java
@@ -30,6 +30,7 @@ class EquinoxLogFactory implements ServiceFactory<FrameworkLog> {
this.logManager = logManager;
}
+ @Override
public FrameworkLog getService(final Bundle bundle, ServiceRegistration<FrameworkLog> registration) {
return createFrameworkLog(bundle, defaultWriter);
}
@@ -39,22 +40,27 @@ class EquinoxLogFactory implements ServiceFactory<FrameworkLog> {
final Logger logger = bundle == null ? logManager.getSystemBundleLog().getLogger(eclipseWriter.getLoggerName()) : logManager.getSystemBundleLog().getLogger(bundle, logWriter.getLoggerName());
return new FrameworkLog() {
+ @Override
public void setWriter(Writer newWriter, boolean append) {
logWriter.setWriter(newWriter, append);
}
+ @Override
public void setFile(File newFile, boolean append) throws IOException {
logWriter.setFile(newFile, append);
}
+ @Override
public void setConsoleLog(boolean consoleLog) {
logWriter.setConsoleLog(consoleLog);
}
+ @Override
public void log(FrameworkLogEntry logEntry) {
logger.log(logEntry, convertLevel(logEntry), logEntry.getMessage(), logEntry.getThrowable());
}
+ @Override
public void log(FrameworkEvent frameworkEvent) {
Bundle b = frameworkEvent.getBundle();
Throwable t = frameworkEvent.getThrowable();
@@ -77,16 +83,19 @@ class EquinoxLogFactory implements ServiceFactory<FrameworkLog> {
log(logEntry);
}
+ @Override
public File getFile() {
return logWriter.getFile();
}
+ @Override
public void close() {
logWriter.close();
}
};
}
+ @Override
public void ungetService(Bundle bundle, ServiceRegistration<FrameworkLog> registration, FrameworkLog service) {
// nothing
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EquinoxLogWriter.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EquinoxLogWriter.java
index 30e3d1048..f8c758785 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EquinoxLogWriter.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EquinoxLogWriter.java
@@ -711,6 +711,7 @@ class EquinoxLogWriter implements SynchronousLogListener, LogFilter {
return (fwkEntrySeverity & logLevel) != 0;
}
+ @Override
public boolean isLoggable(Bundle bundle, String loggableName, int loggableLevel) {
if (!enabled)
return false;
@@ -727,6 +728,7 @@ class EquinoxLogWriter implements SynchronousLogListener, LogFilter {
return loggableLevel == LogService.LOG_ERROR;
}
+ @Override
public void logged(LogEntry entry) {
if (!(entry instanceof ExtendedLogEntry))
// TODO this should never happen
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EventAdminAdapter.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EventAdminAdapter.java
index b07a9a1c5..0ed74014c 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EventAdminAdapter.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EventAdminAdapter.java
@@ -51,6 +51,7 @@ public class EventAdminAdapter implements ServiceTrackerCustomizer<Object, Objec
eventHandlerTracker.close();
}
+ @Override
public Object addingService(ServiceReference<Object> reference) {
Object toTrack = null;
Object objectClass = reference.getProperty(Constants.OBJECTCLASS);
@@ -76,11 +77,13 @@ public class EventAdminAdapter implements ServiceTrackerCustomizer<Object, Objec
return toTrack;
}
+ @Override
public void modifiedService(ServiceReference<Object> reference, Object tracked) {
removedService(reference, tracked);
addingService(reference);
}
+ @Override
public void removedService(ServiceReference<Object> reference, Object tracked) {
if (tracked == eventAdmin) {
eventAdmin = null;
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EventAdminLogListener.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EventAdminLogListener.java
index fb752e0be..2147981af 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EventAdminLogListener.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/EventAdminLogListener.java
@@ -61,6 +61,7 @@ public class EventAdminLogListener implements SynchronousLogListener {
event = eventClass.getConstructor(String.class, Dictionary.class);
}
+ @Override
public void logged(LogEntry entry) {
try {
Object convertedEvent = convertEvent(entry);
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogEntryImpl.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogEntryImpl.java
index 20b41b7ad..13b5c50de 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogEntryImpl.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogEntryImpl.java
@@ -81,47 +81,58 @@ public class ExtendedLogEntryImpl implements ExtendedLogEntry, LogEntry {
this.stackTraceElement = stackTraceElement;
}
+ @Override
public String getLoggerName() {
return loggerName;
}
+ @Override
public long getSequenceNumber() {
return sequenceNumber;
}
+ @Override
public long getThreadId() {
return threadId;
}
+ @Override
public String getThreadName() {
return threadName;
}
+ @Override
public Bundle getBundle() {
return bundle;
}
+ @Override
public Throwable getException() {
return throwable;
}
@SuppressWarnings("deprecation")
+ @Override
public int getLevel() {
return level;
}
+ @Override
public String getMessage() {
return message;
}
+ @Override
public ServiceReference<?> getServiceReference() {
return ref;
}
+ @Override
public long getTime() {
return time;
}
+ @Override
public Object getContext() {
return contextObject;
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogReaderServiceFactory.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogReaderServiceFactory.java
index 620e31ba1..cca82e301 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogReaderServiceFactory.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogReaderServiceFactory.java
@@ -51,6 +51,7 @@ public class ExtendedLogReaderServiceFactory implements ServiceFactory<ExtendedL
this.listener = listener;
}
+ @Override
public void run() {
safeLogged(listener, logEntry);
}
@@ -60,6 +61,7 @@ public class ExtendedLogReaderServiceFactory implements ServiceFactory<ExtendedL
private static final Enumeration<LogEntry> EMPTY_ENUMERATION = Collections.enumeration(Collections.EMPTY_LIST);
static final LogFilter NULL_LOGGER_FILTER = new LogFilter() {
+ @Override
public boolean isLoggable(Bundle b, String loggerName, int logLevel) {
return true;
}
@@ -137,10 +139,12 @@ public class ExtendedLogReaderServiceFactory implements ServiceFactory<ExtendedL
return defaultLevel;
}
+ @Override
public ExtendedLogReaderServiceImpl getService(Bundle bundle, ServiceRegistration<ExtendedLogReaderServiceImpl> registration) {
return new ExtendedLogReaderServiceImpl(this);
}
+ @Override
public void ungetService(Bundle bundle, ServiceRegistration<ExtendedLogReaderServiceImpl> registration, ExtendedLogReaderServiceImpl service) {
service.shutdown();
}
@@ -148,6 +152,7 @@ public class ExtendedLogReaderServiceFactory implements ServiceFactory<ExtendedL
boolean isLoggable(final Bundle bundle, final String name, final int level) {
if (System.getSecurityManager() != null) {
return AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
+ @Override
public Boolean run() {
return isLoggablePrivileged(bundle, name, level);
}
@@ -210,6 +215,7 @@ public class ExtendedLogReaderServiceFactory implements ServiceFactory<ExtendedL
void log(final Bundle bundle, final String name, final StackTraceElement stackTraceElement, final Object context, final LogLevel logLevelEnum, final int level, final String message, final ServiceReference<?> ref, final Throwable exception) {
if (System.getSecurityManager() != null) {
AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ @Override
public Void run() {
logPrivileged(bundle, name, stackTraceElement, context, logLevelEnum, level, message, ref, exception);
return null;
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogReaderServiceImpl.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogReaderServiceImpl.java
index 83bf52cdf..273f9fcf9 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogReaderServiceImpl.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogReaderServiceImpl.java
@@ -25,6 +25,7 @@ public class ExtendedLogReaderServiceImpl implements ExtendedLogReaderService {
this.factory = factory;
}
+ @Override
public synchronized void addLogListener(LogListener listener, LogFilter filter) {
checkShutdown();
if (listener == null)
@@ -37,15 +38,18 @@ public class ExtendedLogReaderServiceImpl implements ExtendedLogReaderService {
factory.addLogListener(listener, filter);
}
+ @Override
public void addLogListener(LogListener listener) {
addLogListener(listener, ExtendedLogReaderServiceFactory.NULL_LOGGER_FILTER);
}
+ @Override
public Enumeration<LogEntry> getLog() {
checkShutdown();
return factory.getLog();
}
+ @Override
public synchronized void removeLogListener(LogListener listener) {
checkShutdown();
if (listener == null)
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogServiceFactory.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogServiceFactory.java
index 18b068a53..75e2d9d5f 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogServiceFactory.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogServiceFactory.java
@@ -43,16 +43,19 @@ public class ExtendedLogServiceFactory implements ServiceFactory<ExtendedLogServ
}
+ @Override
public ExtendedLogServiceImpl getService(Bundle bundle, ServiceRegistration<ExtendedLogService> registration) {
return getLogService(bundle);
}
+ @Override
public void ungetService(Bundle bundle, ServiceRegistration<ExtendedLogService> registration, ExtendedLogService service) {
// do nothing
// Notice that we do not remove the the LogService impl for the bundle because other bundles
// still need to be able to get the cached loggers for a bundle.
}
+ @Override
public void bundleChanged(BundleEvent event) {
if (event.getType() == BundleEvent.UNINSTALLED)
removeLogService(event.getBundle());
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogServiceImpl.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogServiceImpl.java
index 1e2c701d5..ad2fa6978 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogServiceImpl.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogServiceImpl.java
@@ -36,37 +36,45 @@ public class ExtendedLogServiceImpl implements ExtendedLogService {
}
@SuppressWarnings("deprecation")
+ @Override
public void log(int level, String message) {
log(null, level, message, null);
}
@SuppressWarnings("deprecation")
+ @Override
public void log(int level, String message, Throwable exception) {
log(null, level, message, exception);
}
@SuppressWarnings("deprecation")
+ @Override
public void log(ServiceReference<?> sr, int level, String message) {
log(sr, level, message, null);
}
@SuppressWarnings("deprecation")
+ @Override
public void log(ServiceReference<?> sr, int level, String message, Throwable exception) {
getLogger((String) null).log(sr, level, message, exception);
}
+ @Override
public void log(Object context, int level, String message) {
log(context, level, message, null);
}
+ @Override
public void log(Object context, int level, String message, Throwable exception) {
getLogger((String) null).log(context, level, message, exception);
}
+ @Override
public Logger getLogger(String name) {
return (Logger) getLogger(name, org.osgi.service.log.Logger.class);
}
+ @Override
public Logger getLogger(Bundle logBundle, String name) {
if (logBundle == null || logBundle == bundle)
return getLogger(name);
@@ -85,10 +93,12 @@ public class ExtendedLogServiceImpl implements ExtendedLogService {
return bundleLogService.getLogger(name, loggerType);
}
+ @Override
public String getName() {
return getLogger((String) null).getName();
}
+ @Override
public boolean isLoggable(int level) {
return getLogger((String) null).isLoggable(level);
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/LogServiceManager.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/LogServiceManager.java
index 15098738f..38bdb07d7 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/LogServiceManager.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/LogServiceManager.java
@@ -126,6 +126,7 @@ public class LogServiceManager implements SynchronousBundleListener, FrameworkLi
*
*/
@SuppressWarnings("deprecation")
+ @Override
public void bundleChanged(BundleEvent event) {
Bundle bundle = event.getBundle();
String bsn = (bundle == null) ? null : bundle.getSymbolicName();
@@ -141,6 +142,7 @@ public class LogServiceManager implements SynchronousBundleListener, FrameworkLi
* ServiceListener.serviceChanged method.
*
*/
+ @Override
public void serviceChanged(ServiceEvent event) {
ServiceReference<?> reference = event.getServiceReference();
Bundle bundle = reference.getBundle();
@@ -160,6 +162,7 @@ public class LogServiceManager implements SynchronousBundleListener, FrameworkLi
*
*/
@SuppressWarnings("deprecation")
+ @Override
public void frameworkEvent(FrameworkEvent event) {
Bundle bundle = event.getBundle();
int eventType = event.getType();
@@ -272,119 +275,148 @@ public class LogServiceManager implements SynchronousBundleListener, FrameworkLi
static class MockSystemBundle implements Bundle {
+ @Override
public int compareTo(Bundle o) {
long idcomp = getBundleId() - o.getBundleId();
return (idcomp < 0L) ? -1 : ((idcomp > 0L) ? 1 : 0);
}
+ @Override
public int getState() {
return Bundle.RESOLVED;
}
+ @Override
public void start(int options) {
// nothing
}
+ @Override
public void start() {
// nothing
}
+ @Override
public void stop(int options) {
// nothing
}
+ @Override
public void stop() {
// nothing
}
+ @Override
public void update(InputStream input) {
// nothing
}
+ @Override
public void update() {
// nothing
}
+ @Override
public void uninstall() {
// nothing
}
+ @Override
public Dictionary<String, String> getHeaders() {
return new Hashtable<>();
}
+ @Override
public long getBundleId() {
return 0;
}
+ @Override
public String getLocation() {
return Constants.SYSTEM_BUNDLE_LOCATION;
}
+ @Override
public ServiceReference<?>[] getRegisteredServices() {
return null;
}
+ @Override
public ServiceReference<?>[] getServicesInUse() {
return null;
}
+ @Override
public boolean hasPermission(Object permission) {
return true;
}
+ @Override
public URL getResource(String name) {
return null;
}
+ @Override
public Dictionary<String, String> getHeaders(String locale) {
return null;
}
+ @Override
public String getSymbolicName() {
return EquinoxContainer.NAME;
}
+ @Override
public Class<?> loadClass(String name) throws ClassNotFoundException {
throw new ClassNotFoundException();
}
+ @Override
public Enumeration<URL> getResources(String name) {
return null;
}
+ @Override
public Enumeration<String> getEntryPaths(String path) {
return null;
}
+ @Override
public URL getEntry(String path) {
return null;
}
+ @Override
public long getLastModified() {
return System.currentTimeMillis();
}
+ @Override
public Enumeration<URL> findEntries(String path, String filePattern, boolean recurse) {
return null;
}
+ @Override
public BundleContext getBundleContext() {
return null;
}
+ @Override
public Map<X509Certificate, List<X509Certificate>> getSignerCertificates(int signersType) {
return new HashMap<>();
}
+ @Override
public Version getVersion() {
return new Version(0, 0, 0);
}
+ @Override
public <A> A adapt(Class<A> type) {
return null;
}
+ @Override
public File getDataFile(String filename) {
return null;
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/LoggerImpl.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/LoggerImpl.java
index 801d62564..dafdcdcce 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/LoggerImpl.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/LoggerImpl.java
@@ -34,36 +34,44 @@ public class LoggerImpl implements Logger {
applyLoggerContext(loggerContext);
}
+ @Override
public String getName() {
return name;
}
+ @Override
public boolean isLoggable(int level) {
return logServiceImpl.isLoggable(name, level);
}
+ @Override
public void log(int level, String message) {
log(null, level, message, null);
}
+ @Override
public void log(int level, String message, Throwable exception) {
log(null, level, message, exception);
}
@SuppressWarnings("rawtypes")
+ @Override
public void log(ServiceReference sr, int level, String message) {
log(sr, null, level, message, sr, null);
}
@SuppressWarnings("rawtypes")
+ @Override
public void log(ServiceReference sr, int level, String message, Throwable exception) {
log(sr, null, level, message, sr, exception);
}
+ @Override
public void log(Object context, int level, String message) {
log(context, level, message, null);
}
+ @Override
public void log(Object context, int level, String message, Throwable exception) {
log(context, null, level, message, null, exception);
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/BundlePermissions.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/BundlePermissions.java
index ac183fb0e..6168edb5a 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/BundlePermissions.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/BundlePermissions.java
@@ -24,10 +24,12 @@ public final class BundlePermissions extends PermissionCollection {
// Note that this forces the Enumeration inner class to be loaded as soon as possible (see bug 119069)
static final Enumeration<Permission> EMPTY_ENUMERATION = new Enumeration<Permission>() {
+ @Override
public boolean hasMoreElements() {
return false;
}
+ @Override
public Permission nextElement() {
throw new NoSuchElementException();
}
@@ -48,6 +50,7 @@ public final class BundlePermissions extends PermissionCollection {
setReadOnly(); // collections are managed with ConditionalPermissionAdmin
}
+ @Override
public void add(Permission permission) {
throw new SecurityException();
}
@@ -68,6 +71,7 @@ public final class BundlePermissions extends PermissionCollection {
wovenPermissions.add(permission);
}
+ @Override
public Enumeration<Permission> elements() {
// TODO return an empty enumeration for now;
// It does not seem possible to do this properly with multiple exports and conditional permissions.
@@ -75,6 +79,7 @@ public final class BundlePermissions extends PermissionCollection {
return EMPTY_ENUMERATION;
}
+ @Override
public boolean implies(Permission permission) {
// first check implied permissions
if ((impliedPermissions != null) && impliedPermissions.implies(permission))
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/EquinoxSecurityManager.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/EquinoxSecurityManager.java
index 914fa71a9..1b2b333e8 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/EquinoxSecurityManager.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/EquinoxSecurityManager.java
@@ -59,6 +59,7 @@ public class EquinoxSecurityManager extends SecurityManager {
this.context = context;
}
+ @Override
public Void run() {
fsm.internalCheckPermission(perm, context);
return null;
@@ -87,6 +88,7 @@ public class EquinoxSecurityManager extends SecurityManager {
return localCheckContext.get() != null;
}
+ @Override
public void checkPermission(Permission perm, Object context) {
AccessController.doPrivileged(new CheckPermissionAction(this, perm, context));
}
@@ -185,10 +187,12 @@ public class EquinoxSecurityManager extends SecurityManager {
return decision.decision;
}
+ @Override
public void checkPermission(Permission perm) {
checkPermission(perm, getSecurityContext());
}
+ @Override
public Object getSecurityContext() {
return AccessController.getContext();
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/PermissionInfoCollection.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/PermissionInfoCollection.java
index 6006f687a..eadf1e3c7 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/PermissionInfoCollection.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/PermissionInfoCollection.java
@@ -42,15 +42,18 @@ public final class PermissionInfoCollection extends PermissionCollection {
setReadOnly(); // collections are managed with ConditionalPermissionAdmin
}
+ @Override
public void add(Permission arg0) {
throw new SecurityException();
}
+ @Override
public Enumeration<Permission> elements() {
// TODO return an empty enumeration for now;
return BundlePermissions.EMPTY_ENUMERATION;
}
+ @Override
public boolean implies(Permission perm) {
if (hasAllPermission)
return true;
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/PermissionsHash.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/PermissionsHash.java
index a8695a160..bdc384a22 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/PermissionsHash.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/PermissionsHash.java
@@ -56,6 +56,7 @@ class PermissionsHash extends PermissionCollection {
* @exception IllegalStateException
* if the collection is read only.
*/
+ @Override
public void add(Permission perm) {
if (isReadOnly()) {
throw new SecurityException();
@@ -71,6 +72,7 @@ class PermissionsHash extends PermissionCollection {
* @return Enumeration
* the permissions in the receiver.
*/
+ @Override
public Enumeration<Permission> elements() {
return perms.keys();
}
@@ -86,6 +88,7 @@ class PermissionsHash extends PermissionCollection {
* @param perm java.security.Permission
* the permission to check
*/
+ @Override
public boolean implies(Permission perm) {
Permission p = perms.get(perm);
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityAdmin.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityAdmin.java
index f3406d335..5e75d8aa3 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityAdmin.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityAdmin.java
@@ -175,6 +175,7 @@ public final class SecurityAdmin implements PermissionAdmin, ConditionalPermissi
return false;
}
+ @Override
public PermissionInfo[] getDefaultPermissions() {
synchronized (lock) {
if (permAdminDefaults == null)
@@ -183,6 +184,7 @@ public final class SecurityAdmin implements PermissionAdmin, ConditionalPermissi
}
}
+ @Override
public String[] getLocations() {
synchronized (lock) {
String[] results = permAdminTable.getLocations();
@@ -190,12 +192,14 @@ public final class SecurityAdmin implements PermissionAdmin, ConditionalPermissi
}
}
+ @Override
public PermissionInfo[] getPermissions(String location) {
synchronized (lock) {
return permAdminTable.getPermissions(location);
}
}
+ @Override
public void setDefaultPermissions(PermissionInfo[] permissions) {
checkAllPermission();
synchronized (lock) {
@@ -222,6 +226,7 @@ public final class SecurityAdmin implements PermissionAdmin, ConditionalPermissi
return encoded;
}
+ @Override
public void setPermissions(String location, PermissionInfo[] permissions) {
checkAllPermission();
synchronized (lock) {
@@ -252,24 +257,29 @@ public final class SecurityAdmin implements PermissionAdmin, ConditionalPermissi
/**
* @deprecated
*/
+ @Override
public ConditionalPermissionInfo addConditionalPermissionInfo(ConditionInfo[] conds, PermissionInfo[] perms) {
return setConditionalPermissionInfo(null, conds, perms, true);
}
+ @Override
public ConditionalPermissionInfo newConditionalPermissionInfo(String name, ConditionInfo[] conditions, PermissionInfo[] permissions, String decision) {
return new SecurityRowSnapShot(name, conditions, permissions, decision);
}
+ @Override
public ConditionalPermissionInfo newConditionalPermissionInfo(String encoded) {
return SecurityRow.createSecurityRowSnapShot(encoded);
}
+ @Override
public ConditionalPermissionUpdate newConditionalPermissionUpdate() {
synchronized (lock) {
return new SecurityTableUpdate(this, condAdminTable.getRows(), timeStamp);
}
}
+ @Override
public AccessControlContext getAccessControlContext(String[] signers) {
SecurityAdmin snapShot = getSnapShot();
return new AccessControlContext(new ProtectionDomain[] {createProtectionDomain(createMockBundle(signers), snapShot)});
@@ -278,6 +288,7 @@ public final class SecurityAdmin implements PermissionAdmin, ConditionalPermissi
/**
* @deprecated
*/
+ @Override
public ConditionalPermissionInfo getConditionalPermissionInfo(String name) {
synchronized (lock) {
return condAdminTable.getRow(name);
@@ -287,6 +298,7 @@ public final class SecurityAdmin implements PermissionAdmin, ConditionalPermissi
/**
* @deprecated
*/
+ @Override
public Enumeration<ConditionalPermissionInfo> getConditionalPermissionInfos() {
// could implement our own Enumeration, but we don't care about performance here. Just do something simple:
synchronized (lock) {
@@ -301,6 +313,7 @@ public final class SecurityAdmin implements PermissionAdmin, ConditionalPermissi
/**
* @deprecated
*/
+ @Override
public ConditionalPermissionInfo setConditionalPermissionInfo(String name, ConditionInfo[] conds, PermissionInfo[] perms) {
return setConditionalPermissionInfo(name, conds, perms, true);
}
@@ -531,46 +544,57 @@ public final class SecurityAdmin implements PermissionAdmin, ConditionalPermissi
this.signers = signers;
}
+ @Override
public Enumeration<URL> findEntries(String path, String filePattern, boolean recurse) {
return null;
}
+ @Override
public BundleContext getBundleContext() {
return null;
}
+ @Override
public long getBundleId() {
return -1;
}
+ @Override
public URL getEntry(String path) {
return null;
}
+ @Override
public Enumeration<String> getEntryPaths(String path) {
return null;
}
+ @Override
public Dictionary<String, String> getHeaders() {
return new Hashtable<>();
}
+ @Override
public Dictionary<String, String> getHeaders(String locale) {
return getHeaders();
}
+ @Override
public long getLastModified() {
return 0;
}
+ @Override
public String getLocation() {
return ""; //$NON-NLS-1$
}
+ @Override
public ServiceReference<?>[] getRegisteredServices() {
return null;
}
+ @Override
public URL getResource(String name) {
return null;
}
@@ -578,30 +602,37 @@ public final class SecurityAdmin implements PermissionAdmin, ConditionalPermissi
/**
* @throws IOException
*/
+ @Override
public Enumeration<URL> getResources(String name) throws IOException {
return null;
}
+ @Override
public ServiceReference<?>[] getServicesInUse() {
return null;
}
+ @Override
public Map<X509Certificate, List<X509Certificate>> getSignerCertificates(int signersType) {
return new HashMap<>(signers);
}
+ @Override
public int getState() {
return Bundle.UNINSTALLED;
}
+ @Override
public String getSymbolicName() {
return null;
}
+ @Override
public Version getVersion() {
return Version.emptyVersion;
}
+ @Override
public boolean hasPermission(Object permission) {
return false;
}
@@ -609,6 +640,7 @@ public final class SecurityAdmin implements PermissionAdmin, ConditionalPermissi
/**
* @throws ClassNotFoundException
*/
+ @Override
public Class<?> loadClass(String name) throws ClassNotFoundException {
throw new IllegalStateException();
}
@@ -616,6 +648,7 @@ public final class SecurityAdmin implements PermissionAdmin, ConditionalPermissi
/**
* @throws BundleException
*/
+ @Override
public void start(int options) throws BundleException {
throw new IllegalStateException();
}
@@ -623,6 +656,7 @@ public final class SecurityAdmin implements PermissionAdmin, ConditionalPermissi
/**
* @throws BundleException
*/
+ @Override
public void start() throws BundleException {
throw new IllegalStateException();
}
@@ -630,6 +664,7 @@ public final class SecurityAdmin implements PermissionAdmin, ConditionalPermissi
/**
* @throws BundleException
*/
+ @Override
public void stop(int options) throws BundleException {
throw new IllegalStateException();
}
@@ -637,6 +672,7 @@ public final class SecurityAdmin implements PermissionAdmin, ConditionalPermissi
/**
* @throws BundleException
*/
+ @Override
public void stop() throws BundleException {
throw new IllegalStateException();
}
@@ -644,6 +680,7 @@ public final class SecurityAdmin implements PermissionAdmin, ConditionalPermissi
/**
* @throws BundleException
*/
+ @Override
public void uninstall() throws BundleException {
throw new IllegalStateException();
}
@@ -651,6 +688,7 @@ public final class SecurityAdmin implements PermissionAdmin, ConditionalPermissi
/**
* @throws BundleException
*/
+ @Override
public void update() throws BundleException {
throw new IllegalStateException();
}
@@ -658,18 +696,22 @@ public final class SecurityAdmin implements PermissionAdmin, ConditionalPermissi
/**
* @throws BundleException
*/
+ @Override
public void update(InputStream in) throws BundleException {
throw new IllegalStateException();
}
+ @Override
public int compareTo(Bundle o) {
return 0;
}
+ @Override
public <A> A adapt(Class<A> type) {
throw new IllegalStateException();
}
+ @Override
public File getDataFile(String filename) {
return null;
}
@@ -684,10 +726,12 @@ public final class SecurityAdmin implements PermissionAdmin, ConditionalPermissi
this.issuer = issuer;
}
+ @Override
public Principal getSubjectDN() {
return subject;
}
+ @Override
public boolean equals(Object obj) {
if (this == obj)
return true;
@@ -696,10 +740,12 @@ public final class SecurityAdmin implements PermissionAdmin, ConditionalPermissi
return false;
}
+ @Override
public int hashCode() {
return subject.hashCode() + issuer.hashCode();
}
+ @Override
public String toString() {
return subject.toString();
}
@@ -708,6 +754,7 @@ public final class SecurityAdmin implements PermissionAdmin, ConditionalPermissi
* @throws CertificateExpiredException
* @throws java.security.cert.CertificateNotYetValidException
*/
+ @Override
public void checkValidity() throws CertificateExpiredException, java.security.cert.CertificateNotYetValidException {
throw new UnsupportedOperationException();
}
@@ -716,54 +763,67 @@ public final class SecurityAdmin implements PermissionAdmin, ConditionalPermissi
* @throws java.security.cert.CertificateExpiredException
* @throws java.security.cert.CertificateNotYetValidException
*/
+ @Override
public void checkValidity(Date var0) throws java.security.cert.CertificateExpiredException, java.security.cert.CertificateNotYetValidException {
throw new UnsupportedOperationException();
}
+ @Override
public int getBasicConstraints() {
throw new UnsupportedOperationException();
}
+ @Override
public Principal getIssuerDN() {
return issuer;
}
+ @Override
public boolean[] getIssuerUniqueID() {
throw new UnsupportedOperationException();
}
+ @Override
public boolean[] getKeyUsage() {
throw new UnsupportedOperationException();
}
+ @Override
public Date getNotAfter() {
throw new UnsupportedOperationException();
}
+ @Override
public Date getNotBefore() {
throw new UnsupportedOperationException();
}
+ @Override
public BigInteger getSerialNumber() {
throw new UnsupportedOperationException();
}
+ @Override
public String getSigAlgName() {
throw new UnsupportedOperationException();
}
+ @Override
public String getSigAlgOID() {
throw new UnsupportedOperationException();
}
+ @Override
public byte[] getSigAlgParams() {
throw new UnsupportedOperationException();
}
+ @Override
public byte[] getSignature() {
throw new UnsupportedOperationException();
}
+ @Override
public boolean[] getSubjectUniqueID() {
throw new UnsupportedOperationException();
}
@@ -771,10 +831,12 @@ public final class SecurityAdmin implements PermissionAdmin, ConditionalPermissi
/**
* @throws CertificateEncodingException
*/
+ @Override
public byte[] getTBSCertificate() throws CertificateEncodingException {
throw new UnsupportedOperationException();
}
+ @Override
public int getVersion() {
throw new UnsupportedOperationException();
}
@@ -782,10 +844,12 @@ public final class SecurityAdmin implements PermissionAdmin, ConditionalPermissi
/**
* @throws CertificateEncodingException
*/
+ @Override
public byte[] getEncoded() throws CertificateEncodingException {
throw new UnsupportedOperationException();
}
+ @Override
public PublicKey getPublicKey() {
throw new UnsupportedOperationException();
}
@@ -797,6 +861,7 @@ public final class SecurityAdmin implements PermissionAdmin, ConditionalPermissi
* @throws java.security.SignatureException
* @throws java.security.cert.CertificateException
*/
+ @Override
public void verify(PublicKey var0) throws java.security.InvalidKeyException, java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException, java.security.SignatureException, java.security.cert.CertificateException {
throw new UnsupportedOperationException();
}
@@ -808,22 +873,27 @@ public final class SecurityAdmin implements PermissionAdmin, ConditionalPermissi
* @throws SignatureException
* @throws CertificateException
*/
+ @Override
public void verify(PublicKey var0, String var1) throws InvalidKeyException, NoSuchAlgorithmException, NoSuchProviderException, SignatureException, CertificateException {
throw new UnsupportedOperationException();
}
+ @Override
public Set<String> getCriticalExtensionOIDs() {
throw new UnsupportedOperationException();
}
+ @Override
public byte[] getExtensionValue(String var0) {
throw new UnsupportedOperationException();
}
+ @Override
public Set<String> getNonCriticalExtensionOIDs() {
throw new UnsupportedOperationException();
}
+ @Override
public boolean hasUnsupportedCriticalExtension() {
throw new UnsupportedOperationException();
}
@@ -836,10 +906,12 @@ public final class SecurityAdmin implements PermissionAdmin, ConditionalPermissi
this.name = name;
}
+ @Override
public String getName() {
return name;
}
+ @Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
@@ -850,10 +922,12 @@ public final class SecurityAdmin implements PermissionAdmin, ConditionalPermissi
return false;
}
+ @Override
public int hashCode() {
return name.hashCode();
}
+ @Override
public String toString() {
return getName();
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityRow.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityRow.java
index 33d4003b8..0c09613d2 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityRow.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityRow.java
@@ -217,10 +217,12 @@ public final class SecurityRow implements ConditionalPermissionInfo {
return output.toString();
}
+ @Override
public String getName() {
return name;
}
+ @Override
public ConditionInfo[] getConditionInfos() {
// must make a copy for the public API method to prevent modification
return (ConditionInfo[]) cloneArray(conditionInfos);
@@ -230,10 +232,12 @@ public final class SecurityRow implements ConditionalPermissionInfo {
return conditionInfos;
}
+ @Override
public String getAccessDecision() {
return deny ? ConditionalPermissionInfo.DENY : ConditionalPermissionInfo.ALLOW;
}
+ @Override
public PermissionInfo[] getPermissionInfos() {
// must make a copy for the public API method to prevent modification
return (PermissionInfo[]) cloneArray(permissionInfoCollection.getPermissionInfos());
@@ -246,6 +250,7 @@ public final class SecurityRow implements ConditionalPermissionInfo {
/**
* @deprecated
*/
+ @Override
public void delete() {
securityAdmin.delete(this, true);
}
@@ -394,14 +399,17 @@ public final class SecurityRow implements ConditionalPermissionInfo {
return permissionInfoCollection.implies(permission) ? (deny ? DECISION_DENIED : DECISION_GRANTED) : DECISION_ABSTAIN;
}
+ @Override
public String toString() {
return getEncoded();
}
+ @Override
public String getEncoded() {
return getEncoded(name, conditionInfos, internalGetPermissionInfos(), deny);
}
+ @Override
public boolean equals(Object obj) {
// doing the simple (slow) thing for now
if (obj == this)
@@ -412,6 +420,7 @@ public final class SecurityRow implements ConditionalPermissionInfo {
return getEncoded().equals(((ConditionalPermissionInfo) obj).getEncoded());
}
+ @Override
public int hashCode() {
return getHashCode(name, internalGetConditionInfos(), internalGetPermissionInfos(), getAccessDecision());
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityRowSnapShot.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityRowSnapShot.java
index d13a28c95..e9c0b1b86 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityRowSnapShot.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityRowSnapShot.java
@@ -40,18 +40,22 @@ public class SecurityRowSnapShot implements ConditionalPermissionInfo {
this.decision = decision;
}
+ @Override
public ConditionInfo[] getConditionInfos() {
return (ConditionInfo[]) SecurityRow.cloneArray(conditionInfos);
}
+ @Override
public String getAccessDecision() {
return decision;
}
+ @Override
public String getName() {
return name;
}
+ @Override
public PermissionInfo[] getPermissionInfos() {
return (PermissionInfo[]) SecurityRow.cloneArray(permissionInfos);
}
@@ -59,18 +63,22 @@ public class SecurityRowSnapShot implements ConditionalPermissionInfo {
/**
* @deprecated
*/
+ @Override
public void delete() {
throw new UnsupportedOperationException();
}
+ @Override
public String toString() {
return getEncoded();
}
+ @Override
public String getEncoded() {
return SecurityRow.getEncoded(name, conditionInfos, permissionInfos, DENY.equalsIgnoreCase(decision));
}
+ @Override
public boolean equals(Object obj) {
// doing the simple (slow) thing for now
if (obj == this)
@@ -81,6 +89,7 @@ public class SecurityRowSnapShot implements ConditionalPermissionInfo {
return getEncoded().equals(((ConditionalPermissionInfo) obj).getEncoded());
}
+ @Override
public int hashCode() {
return SecurityRow.getHashCode(name, conditionInfos, permissionInfos, getAccessDecision());
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityTable.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityTable.java
index afd1c9c63..7ddaadc83 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityTable.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityTable.java
@@ -188,14 +188,17 @@ public class SecurityTable extends PermissionCollection {
return encoded;
}
+ @Override
public void add(Permission permission) {
throw new SecurityException();
}
+ @Override
public Enumeration<Permission> elements() {
return BundlePermissions.EMPTY_ENUMERATION;
}
+ @Override
public boolean implies(Permission permission) {
return (evaluate(null, permission) & SecurityTable.GRANTED) != 0;
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityTableUpdate.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityTableUpdate.java
index 431a1d1a5..4a45087ab 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityTableUpdate.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/permadmin/SecurityTableUpdate.java
@@ -35,10 +35,12 @@ public class SecurityTableUpdate implements ConditionalPermissionUpdate {
this.rows.add(new SecurityRowSnapShot(rows[i].getName(), rows[i].internalGetConditionInfos(), rows[i].internalGetPermissionInfos(), rows[i].getAccessDecision()));
}
+ @Override
public boolean commit() {
return securityAdmin.commit(rows, timeStamp);
}
+ @Override
public List<ConditionalPermissionInfo> getConditionalPermissionInfos() {
// it is fine to return the internal list; it is a snap shot and we allow clients to modify it.
return rows;
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/provisional/service/security/AuthorizationEngine.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/provisional/service/security/AuthorizationEngine.java
index 3ac578d06..0d148788a 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/provisional/service/security/AuthorizationEngine.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/provisional/service/security/AuthorizationEngine.java
@@ -84,6 +84,7 @@ public abstract class AuthorizationEngine {
abstract public int getStatus();
class AuthEventDispatcher implements EventDispatcher<AuthorizationListener, Object, AuthorizationEvent> {
+ @Override
public void dispatchEvent(AuthorizationListener eventListener, Object listenerObject, int eventAction, AuthorizationEvent eventObject) {
eventListener.authorizationEvent(eventObject);
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/service/security/KeyStoreTrustEngine.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/service/security/KeyStoreTrustEngine.java
index a465e39a9..4295da3f1 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/service/security/KeyStoreTrustEngine.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/service/security/KeyStoreTrustEngine.java
@@ -109,6 +109,7 @@ public class KeyStoreTrustEngine extends TrustEngine {
return keyStore;
}
+ @Override
public Certificate findTrustAnchor(Certificate[] certChain) throws IOException {
if (certChain == null || certChain.length == 0)
@@ -175,6 +176,7 @@ public class KeyStoreTrustEngine extends TrustEngine {
}
}
+ @Override
protected String doAddTrustAnchor(Certificate cert, String alias) throws IOException, GeneralSecurityException {
if (isReadOnly())
throw new IOException(SignedContentMessages.Default_Trust_Read_Only);
@@ -204,6 +206,7 @@ public class KeyStoreTrustEngine extends TrustEngine {
return alias;
}
+ @Override
protected void doRemoveTrustAnchor(Certificate cert) throws IOException, GeneralSecurityException {
if (isReadOnly())
throw new IOException(SignedContentMessages.Default_Trust_Read_Only);
@@ -224,6 +227,7 @@ public class KeyStoreTrustEngine extends TrustEngine {
}
}
+ @Override
protected void doRemoveTrustAnchor(String alias) throws IOException, GeneralSecurityException {
if (alias == null) {
@@ -248,6 +252,7 @@ public class KeyStoreTrustEngine extends TrustEngine {
}
}
+ @Override
public Certificate getTrustAnchor(String alias) throws IOException, GeneralSecurityException {
if (alias == null) {
@@ -264,6 +269,7 @@ public class KeyStoreTrustEngine extends TrustEngine {
}
}
+ @Override
public String[] getAliases() throws IOException, GeneralSecurityException {
List<String> returnList = new ArrayList<>();
@@ -334,10 +340,12 @@ public class KeyStoreTrustEngine extends TrustEngine {
return new FileOutputStream(file);
}
+ @Override
public boolean isReadOnly() {
return getPassword() == null || !(new File(path).canWrite());
}
+ @Override
public String getName() {
return name;
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/FilteredServiceListener.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/FilteredServiceListener.java
index b8bb40dab..1a6638366 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/FilteredServiceListener.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/FilteredServiceListener.java
@@ -76,6 +76,7 @@ class FilteredServiceListener implements ServiceListener, ListenerHook.ListenerI
*
* @param event The <code>ServiceEvent</code> object.
*/
+ @Override
public void serviceChanged(ServiceEvent event) {
ServiceReferenceImpl<?> reference = (ServiceReferenceImpl<?>) event.getServiceReference();
@@ -145,6 +146,7 @@ class FilteredServiceListener implements ServiceListener, ListenerHook.ListenerI
*
* @return The string representation of this listener.
*/
+ @Override
public String toString() {
String filterString = getFilter();
if (filterString == null) {
@@ -158,6 +160,7 @@ class FilteredServiceListener implements ServiceListener, ListenerHook.ListenerI
* @return The context of the bundle which added the service listener.
* @see org.osgi.framework.hooks.service.ListenerHook.ListenerInfo#getBundleContext()
*/
+ @Override
public BundleContext getBundleContext() {
return context;
}
@@ -168,6 +171,7 @@ class FilteredServiceListener implements ServiceListener, ListenerHook.ListenerI
* be <code>null</code> if the listener was added without a filter.
* @see org.osgi.framework.hooks.service.ListenerHook.ListenerInfo#getFilter()
*/
+ @Override
public String getFilter() {
if (filter != null) {
return filter.toString();
@@ -185,6 +189,7 @@ class FilteredServiceListener implements ServiceListener, ListenerHook.ListenerI
* @return <code>false</code> if the listener has not been been removed,
* <code>true</code> otherwise.
*/
+ @Override
public boolean isRemoved() {
return removed;
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceFactoryUse.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceFactoryUse.java
index 4865b3cd3..cd55b5b54 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceFactoryUse.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceFactoryUse.java
@@ -211,6 +211,7 @@ public class ServiceFactoryUse<S> extends ServiceUse<S> {
final S service;
try {
service = AccessController.doPrivileged(new PrivilegedAction<S>() {
+ @Override
public S run() {
return factory.getService(context.getBundleImpl(), registration);
}
@@ -259,6 +260,7 @@ public class ServiceFactoryUse<S> extends ServiceUse<S> {
void factoryUngetService(final S service) {
try {
AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ @Override
public Void run() {
factory.ungetService(context.getBundleImpl(), registration, service);
return null;
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceReferenceImpl.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceReferenceImpl.java
index 82d6ab97c..a1887a767 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceReferenceImpl.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceReferenceImpl.java
@@ -80,6 +80,7 @@ public class ServiceReferenceImpl<S> implements ServiceReference<S> {
* @return The property value to which the key is mapped; <code>null</code>
* if there is no property named after the key.
*/
+ @Override
public Object getProperty(String key) {
return registration.getProperty(key);
}
@@ -104,6 +105,7 @@ public class ServiceReferenceImpl<S> implements ServiceReference<S> {
*
* @return An array of property keys.
*/
+ @Override
public String[] getPropertyKeys() {
return registration.getPropertyKeys();
}
@@ -122,6 +124,7 @@ public class ServiceReferenceImpl<S> implements ServiceReference<S> {
* that service has already been unregistered.
* @see BundleContext#registerService(String[],Object,java.util.Dictionary)
*/
+ @Override
public Bundle getBundle() {
return registration.getBundle();
}
@@ -138,6 +141,7 @@ public class ServiceReferenceImpl<S> implements ServiceReference<S> {
*
* @since 1.1
*/
+ @Override
public Bundle[] getUsingBundles() {
return registration.getUsingBundles();
}
@@ -169,6 +173,7 @@ public class ServiceReferenceImpl<S> implements ServiceReference<S> {
*
* @since 1.3
*/
+ @Override
public boolean isAssignableTo(Bundle bundle, String className) {
return registration.isAssignableTo(bundle, className);
}
@@ -198,6 +203,7 @@ public class ServiceReferenceImpl<S> implements ServiceReference<S> {
* greater than the specified <code>ServiceReference</code>.
* @since 1.4
*/
+ @Override
public int compareTo(Object object) {
ServiceRegistrationImpl<?> other = ((ServiceReferenceImpl<?>) object).registration;
@@ -225,6 +231,7 @@ public class ServiceReferenceImpl<S> implements ServiceReference<S> {
*
* @return a hash code value for this object.
*/
+ @Override
public int hashCode() {
return registration.hashCode();
}
@@ -236,6 +243,7 @@ public class ServiceReferenceImpl<S> implements ServiceReference<S> {
* @return <code>true</code> if this object is the same as the obj
* argument; <code>false</code> otherwise.
*/
+ @Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
@@ -255,6 +263,7 @@ public class ServiceReferenceImpl<S> implements ServiceReference<S> {
*
* @return String
*/
+ @Override
public String toString() {
return registration.toString();
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceRegistrationImpl.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceRegistrationImpl.java
index 49b7f7dba..9c9f09bd0 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceRegistrationImpl.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceRegistrationImpl.java
@@ -152,6 +152,7 @@ public class ServiceRegistrationImpl<S> implements ServiceRegistration<S>, Compa
* @exception IllegalArgumentException If the <tt>properties</tt>
* parameter contains case variants of the same key name.
*/
+ @Override
public void setProperties(Dictionary<String, ?> props) {
final ServiceReferenceImpl<S> ref;
final Map<String, Object> previousProperties;
@@ -201,6 +202,7 @@ public class ServiceRegistrationImpl<S> implements ServiceRegistration<S>, Compa
* this ServiceRegistration has already been unregistered.
* @see BundleContextImpl#ungetService
*/
+ @Override
public void unregister() {
final ServiceReferenceImpl<S> ref;
synchronized (registry) {
@@ -273,6 +275,7 @@ public class ServiceRegistrationImpl<S> implements ServiceRegistration<S>, Compa
* this ServiceRegistration has already been unregistered.
* @return A {@link ServiceReferenceImpl} object.
*/
+ @Override
public ServiceReference<S> getReference() {
return getReferenceImpl();
}
@@ -691,6 +694,7 @@ public class ServiceRegistrationImpl<S> implements ServiceRegistration<S>, Compa
*
* @return String representation of this object.
*/
+ @Override
public String toString() {
int size = clazzes.length;
StringBuilder sb = new StringBuilder(50 * size);
@@ -724,6 +728,7 @@ public class ServiceRegistrationImpl<S> implements ServiceRegistration<S>, Compa
* <code>ServiceRegistrationImpl</code> is greater than, equal to, or
* less than the specified <code>ServiceRegistrationImpl</code>.
*/
+ @Override
public int compareTo(ServiceRegistrationImpl<?> other) {
final int thisRanking = this.getRanking();
final int otherRanking = other.getRanking();
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceRegistry.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceRegistry.java
index 63d22c60e..5d4da714c 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceRegistry.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceRegistry.java
@@ -804,6 +804,7 @@ public class ServiceRegistry {
publishServiceEventPrivileged(event);
} else {
AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ @Override
public Void run() {
publishServiceEventPrivileged(event);
return null;
@@ -1107,6 +1108,7 @@ public class ServiceRegistry {
*/
static String checkServiceClass(final String[] clazzes, final Object serviceObject) {
ClassLoader cl = AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
+ @Override
public ClassLoader run() {
return serviceObject.getClass().getClassLoader();
}
@@ -1164,6 +1166,7 @@ public class ServiceRegistry {
notifyFindHooksPrivileged(context, clazz, filterstring, allservices, result);
} else {
AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ @Override
public Void run() {
notifyFindHooksPrivileged(context, clazz, filterstring, allservices, result);
return null;
@@ -1177,16 +1180,19 @@ public class ServiceRegistry {
Debug.println("notifyServiceFindHooks(" + context.getBundleImpl() + "," + clazz + "," + filterstring + "," + allservices + "," + result + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
}
notifyHooksPrivileged(new HookContext() {
+ @Override
public void call(Object hook, ServiceRegistration<?> hookRegistration) throws Exception {
if (hook instanceof FindHook) {
((FindHook) hook).find(context, clazz, filterstring, allservices, result);
}
}
+ @Override
public String getHookClassName() {
return findHookName;
}
+ @Override
public String getHookMethodName() {
return "find"; //$NON-NLS-1$
}
@@ -1212,16 +1218,19 @@ public class ServiceRegistry {
}
notifyHooksPrivileged(new HookContext() {
@SuppressWarnings("deprecation")
+ @Override
public void call(Object hook, ServiceRegistration<?> hookRegistration) throws Exception {
if (hook instanceof EventHook) {
((EventHook) hook).event(event, result);
}
}
+ @Override
public String getHookClassName() {
return eventHookName;
}
+ @Override
public String getHookMethodName() {
return "event"; //$NON-NLS-1$
}
@@ -1246,16 +1255,19 @@ public class ServiceRegistry {
Debug.println("notifyServiceEventListenerHooks(" + event.getType() + ":" + event.getServiceReference() + "," + result + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
}
notifyHooksPrivileged(new HookContext() {
+ @Override
public void call(Object hook, ServiceRegistration<?> hookRegistration) throws Exception {
if (hook instanceof EventListenerHook) {
((EventListenerHook) hook).event(event, result);
}
}
+ @Override
public String getHookClassName() {
return eventListenerHookName;
}
+ @Override
public String getHookMethodName() {
return "event"; //$NON-NLS-1$
}
@@ -1324,6 +1336,7 @@ public class ServiceRegistry {
notifyNewListenerHookPrivileged(registration);
} else {
AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ @Override
public Void run() {
notifyNewListenerHookPrivileged(registration);
return null;
@@ -1350,16 +1363,19 @@ public class ServiceRegistry {
final Collection<ListenerInfo> listeners = Collections.unmodifiableCollection(addedListeners);
notifyHookPrivileged(systemBundleContext, registration, new HookContext() {
+ @Override
public void call(Object hook, ServiceRegistration<?> hookRegistration) throws Exception {
if (hook instanceof ListenerHook) {
((ListenerHook) hook).added(listeners);
}
}
+ @Override
public String getHookClassName() {
return listenerHookName;
}
+ @Override
public String getHookMethodName() {
return "added"; //$NON-NLS-1$
}
@@ -1386,6 +1402,7 @@ public class ServiceRegistry {
notifyListenerHooksPrivileged(listeners, added);
} else {
AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ @Override
public Void run() {
notifyListenerHooksPrivileged(listeners, added);
return null;
@@ -1402,6 +1419,7 @@ public class ServiceRegistry {
}
notifyHooksPrivileged(new HookContext() {
+ @Override
public void call(Object hook, ServiceRegistration<?> hookRegistration) throws Exception {
if (hook instanceof ListenerHook) {
if (added) {
@@ -1412,10 +1430,12 @@ public class ServiceRegistry {
}
}
+ @Override
public String getHookClassName() {
return listenerHookName;
}
+ @Override
public String getHookMethodName() {
return added ? "added" : "removed"; //$NON-NLS-1$ //$NON-NLS-2$
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ShrinkableCollection.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ShrinkableCollection.java
index 59fbb049a..43e41bd11 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ShrinkableCollection.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ShrinkableCollection.java
@@ -95,14 +95,17 @@ public class ShrinkableCollection<E> implements Collection<E> {
return true;
}
+ @Override
public boolean add(E e) {
throw new UnsupportedOperationException();
}
+ @Override
public boolean addAll(Collection<? extends E> c) {
throw new UnsupportedOperationException();
}
+ @Override
public void clear() {
collection.clear();
for (Collection<? extends E> c : list) {
@@ -110,18 +113,22 @@ public class ShrinkableCollection<E> implements Collection<E> {
}
}
+ @Override
public boolean contains(Object o) {
return collection.contains(o);
}
+ @Override
public boolean containsAll(Collection<?> c) {
return collection.containsAll(c);
}
+ @Override
public boolean isEmpty() {
return collection.isEmpty();
}
+ @Override
public Iterator<E> iterator() {
@SuppressWarnings("unchecked")
final Iterator<E> iter = (Iterator<E>) collection.iterator();
@@ -132,15 +139,18 @@ public class ShrinkableCollection<E> implements Collection<E> {
return new Iterator<E>() {
private E last;
+ @Override
public boolean hasNext() {
return iter.hasNext();
}
+ @Override
public E next() {
last = iter.next();
return last;
}
+ @Override
public void remove() {
iter.remove();
for (Collection<? extends E> c : collections) {
@@ -150,6 +160,7 @@ public class ShrinkableCollection<E> implements Collection<E> {
};
}
+ @Override
public boolean remove(Object o) {
final boolean result = collection.remove(o);
if (result) {
@@ -160,6 +171,7 @@ public class ShrinkableCollection<E> implements Collection<E> {
return result;
}
+ @Override
public boolean removeAll(Collection<?> c) {
final boolean result = collection.removeAll(c);
if (result) {
@@ -170,6 +182,7 @@ public class ShrinkableCollection<E> implements Collection<E> {
return result;
}
+ @Override
public boolean retainAll(Collection<?> c) {
final boolean result = collection.retainAll(c);
if (result) {
@@ -180,18 +193,22 @@ public class ShrinkableCollection<E> implements Collection<E> {
return result;
}
+ @Override
public int size() {
return collection.size();
}
+ @Override
public Object[] toArray() {
return collection.toArray();
}
+ @Override
public <T> T[] toArray(T[] var0) {
return collection.toArray(var0);
}
+ @Override
public String toString() {
return collection.toString();
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ShrinkableEntrySetValueCollection.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ShrinkableEntrySetValueCollection.java
index ed177886b..9df2bb5df 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ShrinkableEntrySetValueCollection.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ShrinkableEntrySetValueCollection.java
@@ -26,18 +26,22 @@ public class ShrinkableEntrySetValueCollection<E> extends AbstractCollection<E>
entrySet = e;
}
+ @Override
public void clear() {
entrySet.clear();
}
+ @Override
public boolean isEmpty() {
return entrySet.isEmpty();
}
+ @Override
public Iterator<E> iterator() {
return new ValueIterator<>(entrySet.iterator());
}
+ @Override
public int size() {
return entrySet.size();
}
@@ -52,15 +56,18 @@ public class ShrinkableEntrySetValueCollection<E> extends AbstractCollection<E>
iter = i;
}
+ @Override
public boolean hasNext() {
return iter.hasNext();
}
+ @Override
public E next() {
final Map.Entry<?, ? extends E> entry = iter.next();
return entry.getValue();
}
+ @Override
public void remove() {
iter.remove();
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ShrinkableValueCollectionMap.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ShrinkableValueCollectionMap.java
index d4033f7fd..b3190bad0 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ShrinkableValueCollectionMap.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ShrinkableValueCollectionMap.java
@@ -28,6 +28,7 @@ public class ShrinkableValueCollectionMap<K, V> extends AbstractMap<K, Collectio
values = null;
}
+ @Override
public void clear() {
map.clear();
if (values != null) {
@@ -35,10 +36,12 @@ public class ShrinkableValueCollectionMap<K, V> extends AbstractMap<K, Collectio
}
}
+ @Override
public boolean containsKey(Object key) {
return map.containsKey(key);
}
+ @Override
public boolean containsValue(Object value) {
/* Since values are collections and the collection has identity equality,
* there is no way any value could be contained in this map unless that
@@ -50,10 +53,12 @@ public class ShrinkableValueCollectionMap<K, V> extends AbstractMap<K, Collectio
return values.containsValue(value);
}
+ @Override
public Set<Map.Entry<K, Collection<V>>> entrySet() {
return new EntrySet();
}
+ @Override
public Collection<V> get(Object key) {
Collection<V> value = null;
if (values != null) {
@@ -73,10 +78,12 @@ public class ShrinkableValueCollectionMap<K, V> extends AbstractMap<K, Collectio
return value;
}
+ @Override
public boolean isEmpty() {
return map.isEmpty();
}
+ @Override
public Collection<V> remove(Object key) {
Set<? extends Map.Entry<?, ? extends V>> entrySet = map.remove(key);
Collection<V> value = null;
@@ -89,6 +96,7 @@ public class ShrinkableValueCollectionMap<K, V> extends AbstractMap<K, Collectio
return value;
}
+ @Override
public int size() {
return map.size();
}
@@ -101,10 +109,12 @@ public class ShrinkableValueCollectionMap<K, V> extends AbstractMap<K, Collectio
super();
}
+ @Override
public Iterator<Map.Entry<K, Collection<V>>> iterator() {
return new EntryIterator();
}
+ @Override
public int size() {
return ShrinkableValueCollectionMap.this.size();
}
@@ -121,15 +131,18 @@ public class ShrinkableValueCollectionMap<K, V> extends AbstractMap<K, Collectio
iter = map.keySet().iterator();
}
+ @Override
public boolean hasNext() {
return iter.hasNext();
}
+ @Override
public Map.Entry<K, Collection<V>> next() {
last = iter.next();
return new Entry(last);
}
+ @Override
public void remove() {
iter.remove();
if (values != null) {
@@ -149,10 +162,12 @@ public class ShrinkableValueCollectionMap<K, V> extends AbstractMap<K, Collectio
key = k;
}
+ @Override
public K getKey() {
return key;
}
+ @Override
public Collection<V> getValue() {
if (value == null) {
value = ShrinkableValueCollectionMap.this.get(key);
@@ -160,18 +175,22 @@ public class ShrinkableValueCollectionMap<K, V> extends AbstractMap<K, Collectio
return value;
}
+ @Override
public Collection<V> setValue(Collection<V> value) {
throw new UnsupportedOperationException(); // entries cannot be modified.
}
+ @Override
public String toString() {
return getKey() + "=" + getValue(); //$NON-NLS-1$
}
+ @Override
public int hashCode() {
return hash(getKey()) ^ hash(getValue());
}
+ @Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/BERProcessor.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/BERProcessor.java
index dc314670d..5da9c8e93 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/BERProcessor.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/BERProcessor.java
@@ -150,6 +150,7 @@ public class BERProcessor {
* @return a String representation of the current BER structure.
* @see java.lang.Object#toString()
*/
+ @Override
public String toString() {
StringBuffer sb = new StringBuffer();
switch (classOfTag) {
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/DigestedInputStream.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/DigestedInputStream.java
index 12119b52c..e871bc5f9 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/DigestedInputStream.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/DigestedInputStream.java
@@ -61,6 +61,7 @@ class DigestedInputStream extends FilterInputStream {
/**
* Not supported.
*/
+ @Override
public synchronized void mark(int readlimit) {
// Noop, we don't want to support this
}
@@ -68,6 +69,7 @@ class DigestedInputStream extends FilterInputStream {
/**
* Always returns false.
*/
+ @Override
public boolean markSupported() {
return false;
}
@@ -82,6 +84,7 @@ class DigestedInputStream extends FilterInputStream {
* expected digests.
* @see java.io.InputStream#read()
*/
+ @Override
public int read() throws IOException {
if (remaining <= 0)
return -1;
@@ -118,6 +121,7 @@ class DigestedInputStream extends FilterInputStream {
* expected digests.
* @see java.io.InputStream#read()
*/
+ @Override
public int read(byte[] b, int off, int len) throws IOException {
if (remaining <= 0)
return -1;
@@ -141,6 +145,7 @@ class DigestedInputStream extends FilterInputStream {
* @throws IOException always thrown if this method is called since mark/reset is not supported.
* @see java.io.InputStream#reset()
*/
+ @Override
public synchronized void reset() throws IOException {
// Throw IOException, we don't want to support this
throw new IOException("Reset not supported"); //$NON-NLS-1$
@@ -149,6 +154,7 @@ class DigestedInputStream extends FilterInputStream {
/**
* This method is implemented as a read into a bitbucket.
*/
+ @Override
public long skip(long n) throws IOException {
byte buffer[] = new byte[4096];
long count = 0;
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignedBundleFile.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignedBundleFile.java
index 2629971b9..7e9d88cea 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignedBundleFile.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignedBundleFile.java
@@ -50,6 +50,7 @@ public class SignedBundleFile extends BundleFileWrapper implements SignedContent
}
}
+ @Override
public BundleEntry getEntry(String path) {
// strip off leading slashes so we can ensure the path matches the one provided in the manifest.
if (path.length() > 0 && path.charAt(0) == '/')
@@ -85,6 +86,7 @@ public class SignedBundleFile extends BundleFileWrapper implements SignedContent
this.nestedEntry = nestedEntry;
}
+ @Override
public InputStream getInputStream() throws IOException {
InputStream in = signedContent.getDigestInputStream(nestedEntry);
if (in == null)
@@ -92,22 +94,27 @@ public class SignedBundleFile extends BundleFileWrapper implements SignedContent
return in;
}
+ @Override
public long getSize() {
return nestedEntry.getSize();
}
+ @Override
public String getName() {
return nestedEntry.getName();
}
+ @Override
public long getTime() {
return nestedEntry.getTime();
}
+ @Override
public URL getLocalURL() {
return nestedEntry.getLocalURL();
}
+ @Override
public URL getFileURL() {
return nestedEntry.getFileURL();
}
@@ -118,30 +125,37 @@ public class SignedBundleFile extends BundleFileWrapper implements SignedContent
return signedContent;
}
+ @Override
public SignedContentEntry[] getSignedEntries() {
return signedContent == null ? null : signedContent.getSignedEntries();
}
+ @Override
public SignedContentEntry getSignedEntry(String name) {
return signedContent == null ? null : signedContent.getSignedEntry(name);
}
+ @Override
public SignerInfo[] getSignerInfos() {
return signedContent == null ? null : signedContent.getSignerInfos();
}
+ @Override
public Date getSigningTime(SignerInfo signerInfo) {
return signedContent == null ? null : signedContent.getSigningTime(signerInfo);
}
+ @Override
public SignerInfo getTSASignerInfo(SignerInfo signerInfo) {
return signedContent == null ? null : signedContent.getTSASignerInfo(signerInfo);
}
+ @Override
public boolean isSigned() {
return signedContent == null ? false : signedContent.isSigned();
}
+ @Override
public void checkValidity(SignerInfo signerInfo) throws CertificateExpiredException, CertificateNotYetValidException {
if (signedContent != null)
signedContent.checkValidity(signerInfo);
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignedBundleHook.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignedBundleHook.java
index 913d60a11..a9f1a37a3 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignedBundleHook.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignedBundleHook.java
@@ -151,6 +151,7 @@ public class SignedBundleHook implements ActivatorHookFactory, BundleFileWrapper
}
}
+ @Override
public BundleFileWrapper wrapBundleFile(BundleFile bundleFile, Generation generation, boolean base) {
try {
if (bundleFile != null) {
@@ -179,6 +180,7 @@ public class SignedBundleHook implements ActivatorHookFactory, BundleFileWrapper
return null;
}
+ @Override
public void addHooks(HookRegistry hookRegistry) {
container = hookRegistry.getContainer();
hookRegistry.addActivatorHookFactory(this);
@@ -201,6 +203,7 @@ public class SignedBundleHook implements ActivatorHookFactory, BundleFileWrapper
}
}
+ @Override
public SignedContent getSignedContent(File content) throws IOException, InvalidKeyException, SignatureException, CertificateException, NoSuchAlgorithmException, NoSuchProviderException {
if (content == null)
throw new IllegalArgumentException("null content"); //$NON-NLS-1$
@@ -231,6 +234,7 @@ public class SignedBundleHook implements ActivatorHookFactory, BundleFileWrapper
return new SignedContentFile(result.getSignedContent());
}
+ @Override
public SignedContent getSignedContent(Bundle bundle) throws IOException, InvalidKeyException, SignatureException, CertificateException, NoSuchAlgorithmException, NoSuchProviderException, IllegalArgumentException {
final Generation generation = (Generation) ((EquinoxBundle) bundle).getModule().getCurrentRevision().getRevisionInfo();
StorageHookImpl hook = generation.getStorageHook(SignedStorageHook.class);
@@ -242,6 +246,7 @@ public class SignedBundleHook implements ActivatorHookFactory, BundleFileWrapper
return getSignedContent(generation.getBundleFile().getBaseFile());
try {
return AccessController.doPrivileged(new PrivilegedExceptionAction<SignedContent>() {
+ @Override
public SignedContent run() throws Exception {
return getSignedContent(generation.getBundleFile().getBaseFile());
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignedContentFile.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignedContentFile.java
index f0c19a28a..b80afe18e 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignedContentFile.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignedContentFile.java
@@ -39,10 +39,12 @@ public class SignedContentFile implements SignedContent {
this.signedContent = signedContent;
}
+ @Override
public void checkValidity(SignerInfo signerInfo) throws CertificateExpiredException, CertificateNotYetValidException {
signedContent.checkValidity(signerInfo);
}
+ @Override
public synchronized SignedContentEntry[] getSignedEntries() {
SignedContentEntry[] entries = signedContent.getSignedEntries();
if (signedContent == null)
@@ -66,6 +68,7 @@ public class SignedContentFile implements SignedContent {
return results;
}
+ @Override
public synchronized SignedContentEntry getSignedEntry(String name) {
if (getEntryExceptions(false) == null)
getSignedEntries(); // populate the entry exceptions
@@ -73,18 +76,22 @@ public class SignedContentFile implements SignedContent {
return entry == null ? null : new SignedContentFileEntry(entry);
}
+ @Override
public SignerInfo[] getSignerInfos() {
return signedContent.getSignerInfos();
}
+ @Override
public Date getSigningTime(SignerInfo signerInfo) {
return signedContent.getSigningTime(signerInfo);
}
+ @Override
public SignerInfo getTSASignerInfo(SignerInfo signerInfo) {
return signedContent.getTSASignerInfo(signerInfo);
}
+ @Override
public boolean isSigned() {
return signedContent.isSigned();
}
@@ -102,18 +109,22 @@ public class SignedContentFile implements SignedContent {
this.entry = entry;
}
+ @Override
public String getName() {
return entry.getName();
}
+ @Override
public SignerInfo[] getSignerInfos() {
return entry.getSignerInfos();
}
+ @Override
public boolean isSigned() {
return entry.isSigned();
}
+ @Override
public void verify() throws IOException, InvalidContentException {
// check the entry exceptions map for the entry name
Map<String, Throwable> exceptions = getEntryExceptions(false);
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignedContentImpl.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignedContentImpl.java
index bb1fa4ccc..f224b2109 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignedContentImpl.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignedContentImpl.java
@@ -39,6 +39,7 @@ public class SignedContentImpl implements SignedContent {
this.contentMDResults = contentMDResults;
}
+ @Override
public SignedContentEntry[] getSignedEntries() {
if (contentMDResults == null)
return new SignedContentEntry[0];
@@ -51,6 +52,7 @@ public class SignedContentImpl implements SignedContent {
return results.toArray(new SignedContentEntry[results.size()]);
}
+ @Override
public SignedContentEntry getSignedEntry(String name) {
if (contentMDResults == null)
return null;
@@ -58,10 +60,12 @@ public class SignedContentImpl implements SignedContent {
return mdResult == null ? null : new SignedContentEntryImpl(name, (SignerInfo[]) mdResult[0]);
}
+ @Override
public SignerInfo[] getSignerInfos() {
return signerInfos;
}
+ @Override
public Date getSigningTime(SignerInfo signerInfo) {
if (tsaSignerInfos == null)
return null;
@@ -69,6 +73,7 @@ public class SignedContentImpl implements SignedContent {
return tsaInfo == null ? null : (Date) tsaInfo[1];
}
+ @Override
public SignerInfo getTSASignerInfo(SignerInfo signerInfo) {
if (tsaSignerInfos == null)
return null;
@@ -76,10 +81,12 @@ public class SignedContentImpl implements SignedContent {
return tsaInfo == null ? null : (SignerInfo) tsaInfo[0];
}
+ @Override
public boolean isSigned() {
return signerInfos.length > 0;
}
+ @Override
public void checkValidity(SignerInfo signer) throws CertificateExpiredException, CertificateNotYetValidException {
Date signingTime = getSigningTime(signer);
if (checkedValid)
@@ -146,18 +153,22 @@ public class SignedContentImpl implements SignedContent {
this.entrySigners = entrySigners == null ? EMPTY_SIGNERINFO : entrySigners;
}
+ @Override
public String getName() {
return entryName;
}
+ @Override
public SignerInfo[] getSignerInfos() {
return entrySigners;
}
+ @Override
public boolean isSigned() {
return entrySigners.length > 0;
}
+ @Override
public void verify() throws IOException, InvalidContentException {
BundleFile currentContent = content;
if (currentContent == null)
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignedStorageHook.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignedStorageHook.java
index ddadafab3..af70b9207 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignedStorageHook.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignedStorageHook.java
@@ -24,6 +24,7 @@ import org.osgi.framework.BundleException;
public class SignedStorageHook extends StorageHookFactory<List<SignerInfo>, List<SignerInfo>, SignedStorageHook.StorageHookImpl> {
private static final int STORAGE_VERSION = 4;
+ @Override
public int getStorageVersion() {
return STORAGE_VERSION;
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignerInfoImpl.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignerInfoImpl.java
index b0368061e..d9c760965 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignerInfoImpl.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignerInfoImpl.java
@@ -26,14 +26,17 @@ public class SignerInfoImpl implements SignerInfo {
this.mdAlgorithm = mdAlgorithm;
}
+ @Override
public Certificate[] getCertificateChain() {
return chain;
}
+ @Override
public Certificate getTrustAnchor() {
return trustAnchor;
}
+ @Override
public boolean isTrusted() {
return trustAnchor != null;
}
@@ -42,10 +45,12 @@ public class SignerInfoImpl implements SignerInfo {
this.trustAnchor = trustAnchor;
}
+ @Override
public String getMessageDigestAlgorithm() {
return mdAlgorithm;
}
+ @Override
public int hashCode() {
int result = mdAlgorithm.hashCode();
for (int i = 0; i < chain.length; i++)
@@ -56,6 +61,7 @@ public class SignerInfoImpl implements SignerInfo {
return result;
}
+ @Override
public boolean equals(Object obj) {
if (!(obj instanceof SignerInfo))
return false;
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/ContentHandlerFactoryImpl.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/ContentHandlerFactoryImpl.java
index 0105f2dd9..c1166cba7 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/ContentHandlerFactoryImpl.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/ContentHandlerFactoryImpl.java
@@ -64,6 +64,7 @@ public class ContentHandlerFactoryImpl extends MultiplexingFactory implements ja
* @see java.net.ContentHandlerFactory#createContentHandler(String)
*/
//TODO method is too long... consider reducing indentation (returning quickly) and moving complex steps to private methods
+ @Override
public ContentHandler createContentHandler(String contentType) {
//first, we check to see if there exists a built in content handler for
//this content type. we can not overwrite built in ContentHandlers
@@ -158,10 +159,12 @@ public class ContentHandlerFactoryImpl extends MultiplexingFactory implements ja
}
}
+ @Override
public Object getParentFactory() {
return parentFactory;
}
+ @Override
public void setParentFactory(Object parentFactory) {
if (this.parentFactory == null) // only allow it to be set once
this.parentFactory = (java.net.ContentHandlerFactory) parentFactory;
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/ContentHandlerProxy.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/ContentHandlerProxy.java
index 768cdfc81..8b8b18bc7 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/ContentHandlerProxy.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/ContentHandlerProxy.java
@@ -71,6 +71,7 @@ public class ContentHandlerProxy extends ContentHandler implements ServiceTracke
/**
* @see org.osgi.util.tracker.ServiceTrackerCustomizer#addingService(ServiceReference)
*/
+ @Override
public ServiceReference<ContentHandler> addingService(ServiceReference<ContentHandler> reference) {
//check to see if our contentType is being registered by another service
Object prop = reference.getProperty(URLConstants.URL_CONTENT_MIMETYPE);
@@ -99,6 +100,7 @@ public class ContentHandlerProxy extends ContentHandler implements ServiceTracke
* @see org.osgi.util.tracker.ServiceTrackerCustomizer#modifiedService(ServiceReference, Object)
*/
+ @Override
public void modifiedService(ServiceReference<ContentHandler> reference, ServiceReference<ContentHandler> service) {
int newrank = getRank(reference);
if (reference == contentHandlerServiceReference) {
@@ -121,6 +123,7 @@ public class ContentHandlerProxy extends ContentHandler implements ServiceTracke
/**
* @see org.osgi.util.tracker.ServiceTrackerCustomizer#removedService(ServiceReference, Object)
*/
+ @Override
public void removedService(ServiceReference<ContentHandler> reference, ServiceReference<ContentHandler> service) {
//check to see if our URLStreamHandler was unregistered.
if (reference != contentHandlerServiceReference)
@@ -136,6 +139,7 @@ public class ContentHandlerProxy extends ContentHandler implements ServiceTracke
* @see java.net.ContentHandler#getContent(URLConnection)
*/
+ @Override
public Object getContent(URLConnection uConn) throws IOException {
return realHandler.getContent(uConn);
}
@@ -152,6 +156,7 @@ public class ContentHandlerProxy extends ContentHandler implements ServiceTracke
/**
* @see java.net.ContentHandler#getContent(URLConnection)
*/
+ @Override
public Object getContent(URLConnection uConn) throws IOException {
return uConn.getInputStream();
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/MultiplexingContentHandler.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/MultiplexingContentHandler.java
index 7ee72500c..87ea74c33 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/MultiplexingContentHandler.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/MultiplexingContentHandler.java
@@ -25,6 +25,7 @@ public class MultiplexingContentHandler extends ContentHandler {
this.factory = factory;
}
+ @Override
public Object getContent(URLConnection uConn) throws IOException {
ContentHandler handler = factory.findAuthorizedContentHandler(contentType);
if (handler != null)
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/MultiplexingFactory.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/MultiplexingFactory.java
index 50e8444ea..ae6084145 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/MultiplexingFactory.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/MultiplexingFactory.java
@@ -71,6 +71,7 @@ public abstract class MultiplexingFactory {
// used to get access to the protected SecurityManager#getClassContext method
static class InternalSecurityManager extends SecurityManager {
+ @Override
public Class<?>[] getClassContext() {
return super.getClassContext();
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/MultiplexingURLStreamHandler.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/MultiplexingURLStreamHandler.java
index 2c00720a3..4ce1cb433 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/MultiplexingURLStreamHandler.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/MultiplexingURLStreamHandler.java
@@ -95,6 +95,7 @@ public class MultiplexingURLStreamHandler extends URLStreamHandler {
initializeMethods(factory);
}
+ @Override
protected URLConnection openConnection(URL url) throws IOException {
URLStreamHandler handler = findAuthorizedURLStreamHandler(protocol);
if (handler != null) {
@@ -130,6 +131,7 @@ public class MultiplexingURLStreamHandler extends URLStreamHandler {
throw new MalformedURLException();
}
+ @Override
protected boolean equals(URL url1, URL url2) {
URLStreamHandler handler = findAuthorizedURLStreamHandler(protocol);
if (handler != null) {
@@ -145,6 +147,7 @@ public class MultiplexingURLStreamHandler extends URLStreamHandler {
throw new IllegalStateException();
}
+ @Override
protected int getDefaultPort() {
URLStreamHandler handler = findAuthorizedURLStreamHandler(protocol);
if (handler != null) {
@@ -160,6 +163,7 @@ public class MultiplexingURLStreamHandler extends URLStreamHandler {
throw new IllegalStateException();
}
+ @Override
protected InetAddress getHostAddress(URL url) {
URLStreamHandler handler = findAuthorizedURLStreamHandler(protocol);
if (handler != null) {
@@ -175,6 +179,7 @@ public class MultiplexingURLStreamHandler extends URLStreamHandler {
throw new IllegalStateException();
}
+ @Override
protected int hashCode(URL url) {
URLStreamHandler handler = findAuthorizedURLStreamHandler(protocol);
if (handler != null) {
@@ -190,6 +195,7 @@ public class MultiplexingURLStreamHandler extends URLStreamHandler {
throw new IllegalStateException();
}
+ @Override
protected boolean hostsEqual(URL url1, URL url2) {
URLStreamHandler handler = findAuthorizedURLStreamHandler(protocol);
if (handler != null) {
@@ -205,6 +211,7 @@ public class MultiplexingURLStreamHandler extends URLStreamHandler {
throw new IllegalStateException();
}
+ @Override
protected void parseURL(URL arg0, String arg1, int arg2, int arg3) {
URLStreamHandler handler = factory.findAuthorizedURLStreamHandler(protocol);
if (handler != null) {
@@ -223,6 +230,7 @@ public class MultiplexingURLStreamHandler extends URLStreamHandler {
throw new IllegalStateException();
}
+ @Override
protected boolean sameFile(URL url1, URL url2) {
URLStreamHandler handler = findAuthorizedURLStreamHandler(protocol);
if (handler != null) {
@@ -238,6 +246,7 @@ public class MultiplexingURLStreamHandler extends URLStreamHandler {
throw new IllegalStateException();
}
+ @Override
protected void setURL(URL arg0, String arg1, String arg2, int arg3, String arg4, String arg5, String arg6, String arg7, String arg8) {
URLStreamHandler handler = findAuthorizedURLStreamHandler(protocol);
if (handler != null) {
@@ -256,6 +265,7 @@ public class MultiplexingURLStreamHandler extends URLStreamHandler {
throw new IllegalStateException();
}
+ @Override
protected String toExternalForm(URL url) {
URLStreamHandler handler = findAuthorizedURLStreamHandler(protocol);
if (handler != null) {
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/NullURLStreamHandlerService.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/NullURLStreamHandlerService.java
index 20e84e934..474a7e942 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/NullURLStreamHandlerService.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/NullURLStreamHandlerService.java
@@ -30,30 +30,37 @@ import org.osgi.service.url.URLStreamHandlerSetter;
public class NullURLStreamHandlerService implements URLStreamHandlerService {
+ @Override
public URLConnection openConnection(URL u) throws IOException {
throw new MalformedURLException();
}
+ @Override
public boolean equals(URL url1, URL url2) {
throw new IllegalStateException();
}
+ @Override
public int getDefaultPort() {
throw new IllegalStateException();
}
+ @Override
public InetAddress getHostAddress(URL url) {
throw new IllegalStateException();
}
+ @Override
public int hashCode(URL url) {
throw new IllegalStateException();
}
+ @Override
public boolean hostsEqual(URL url1, URL url2) {
throw new IllegalStateException();
}
+ @Override
public boolean sameFile(URL url1, URL url2) {
throw new IllegalStateException();
}
@@ -66,10 +73,12 @@ public class NullURLStreamHandlerService implements URLStreamHandlerService {
throw new IllegalStateException();
}
+ @Override
public String toExternalForm(URL url) {
throw new IllegalStateException();
}
+ @Override
public void parseURL(URLStreamHandlerSetter realHandler, URL u, String spec, int start, int limit) {
throw new IllegalStateException();
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/URLStreamHandlerFactoryImpl.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/URLStreamHandlerFactoryImpl.java
index 0fb9bc382..1131d7e98 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/URLStreamHandlerFactoryImpl.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/URLStreamHandlerFactoryImpl.java
@@ -89,6 +89,7 @@ public class URLStreamHandlerFactoryImpl extends MultiplexingFactory implements
* @param protocol The desired protocol
* @return a URLStreamHandler for the specific protocol.
*/
+ @Override
public URLStreamHandler createURLStreamHandler(String protocol) {
// Check if we are recursing
if (isRecursive(protocol))
@@ -201,10 +202,12 @@ public class URLStreamHandlerFactoryImpl extends MultiplexingFactory implements
}
}
+ @Override
public Object getParentFactory() {
return parentFactory;
}
+ @Override
public void setParentFactory(Object parentFactory) {
if (this.parentFactory == null) // only allow it to be set once
this.parentFactory = (URLStreamHandlerFactory) parentFactory;
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/URLStreamHandlerProxy.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/URLStreamHandlerProxy.java
index ea9e1c8ca..f8efc54b3 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/URLStreamHandlerProxy.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/URLStreamHandlerProxy.java
@@ -78,6 +78,7 @@ public class URLStreamHandlerProxy extends URLStreamHandler implements ServiceTr
/**
* @see java.net.URLStreamHandler#equals(URL, URL)
*/
+ @Override
protected boolean equals(URL url1, URL url2) {
return realHandlerService.equals(url1, url2);
}
@@ -85,6 +86,7 @@ public class URLStreamHandlerProxy extends URLStreamHandler implements ServiceTr
/**
* @see java.net.URLStreamHandler#getDefaultPort()
*/
+ @Override
protected int getDefaultPort() {
return realHandlerService.getDefaultPort();
}
@@ -92,6 +94,7 @@ public class URLStreamHandlerProxy extends URLStreamHandler implements ServiceTr
/**
* @see java.net.URLStreamHandler#getHostAddress(URL)
*/
+ @Override
protected InetAddress getHostAddress(URL url) {
return realHandlerService.getHostAddress(url);
}
@@ -99,6 +102,7 @@ public class URLStreamHandlerProxy extends URLStreamHandler implements ServiceTr
/**
* @see java.net.URLStreamHandler#hashCode(URL)
*/
+ @Override
protected int hashCode(URL url) {
return realHandlerService.hashCode(url);
}
@@ -106,6 +110,7 @@ public class URLStreamHandlerProxy extends URLStreamHandler implements ServiceTr
/**
* @see java.net.URLStreamHandler#hostsEqual(URL, URL)
*/
+ @Override
protected boolean hostsEqual(URL url1, URL url2) {
return realHandlerService.hostsEqual(url1, url2);
}
@@ -113,6 +118,7 @@ public class URLStreamHandlerProxy extends URLStreamHandler implements ServiceTr
/**
* @see java.net.URLStreamHandler#openConnection(URL)
*/
+ @Override
protected URLConnection openConnection(URL url) throws IOException {
return realHandlerService.openConnection(url);
}
@@ -120,6 +126,7 @@ public class URLStreamHandlerProxy extends URLStreamHandler implements ServiceTr
/**
* @see java.net.URLStreamHandler#parseURL(URL, String, int, int)
*/
+ @Override
protected void parseURL(URL url, String str, int start, int end) {
realHandlerService.parseURL(urlSetter, url, str, start, end);
}
@@ -127,6 +134,7 @@ public class URLStreamHandlerProxy extends URLStreamHandler implements ServiceTr
/**
* @see java.net.URLStreamHandler#sameFile(URL, URL)
*/
+ @Override
protected boolean sameFile(URL url1, URL url2) {
return realHandlerService.sameFile(url1, url2);
}
@@ -134,6 +142,7 @@ public class URLStreamHandlerProxy extends URLStreamHandler implements ServiceTr
/**
* @see java.net.URLStreamHandler#toExternalForm(URL)
*/
+ @Override
protected String toExternalForm(URL url) {
return realHandlerService.toExternalForm(url);
}
@@ -141,11 +150,13 @@ public class URLStreamHandlerProxy extends URLStreamHandler implements ServiceTr
/**
* @see java.net.URLStreamHandler#setURL(URL, String, String, int, String, String, String, String, String)
*/
+ @Override
public void setURL(URL u, String protocol, String host, int port, String authority, String userInfo, String file, String query, String ref) {
super.setURL(u, protocol, host, port, authority, userInfo, file, query, ref);
}
@SuppressWarnings("deprecation")
+ @Override
public void setURL(URL url, String protocol, String host, int port, String file, String ref) {
//using non-deprecated URLStreamHandler.setURL method.
@@ -156,6 +167,7 @@ public class URLStreamHandlerProxy extends URLStreamHandler implements ServiceTr
/**
* @see org.osgi.util.tracker.ServiceTrackerCustomizer#addingService(ServiceReference)
*/
+ @Override
public ServiceReference<URLStreamHandlerService> addingService(ServiceReference<URLStreamHandlerService> reference) {
//check to see if our protocol is being registered by another service
Object prop = reference.getProperty(URLConstants.URL_HANDLER_PROTOCOL);
@@ -184,6 +196,7 @@ public class URLStreamHandlerProxy extends URLStreamHandler implements ServiceTr
* @see org.osgi.util.tracker.ServiceTrackerCustomizer#modifiedService(ServiceReference, Object)
*/
// check to see if the ranking has changed. If so, re-select a new URLHandler
+ @Override
public void modifiedService(ServiceReference<URLStreamHandlerService> reference, ServiceReference<URLStreamHandlerService> service) {
int newRank = getRank(reference);
if (reference == urlStreamServiceReference) {
@@ -206,6 +219,7 @@ public class URLStreamHandlerProxy extends URLStreamHandler implements ServiceTr
/**
* @see org.osgi.util.tracker.ServiceTrackerCustomizer#removedService(ServiceReference, Object)
*/
+ @Override
public void removedService(ServiceReference<URLStreamHandlerService> reference, ServiceReference<URLStreamHandlerService> service) {
// check to see if our URLStreamHandler was unregistered.
if (reference != urlStreamServiceReference)
@@ -224,6 +238,7 @@ public class URLStreamHandlerProxy extends URLStreamHandler implements ServiceTr
return (property instanceof Integer) ? ((Integer) property).intValue() : 0;
}
+ @Override
protected URLConnection openConnection(URL u, Proxy p) throws IOException {
try {
Method openConn = realHandlerService.getClass().getMethod("openConnection", new Class[] {URL.class, Proxy.class}); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/URLStreamHandlerSetter.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/URLStreamHandlerSetter.java
index 792f004f3..263a39c49 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/URLStreamHandlerSetter.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/url/URLStreamHandlerSetter.java
@@ -28,6 +28,7 @@ public class URLStreamHandlerSetter implements org.osgi.service.url.URLStreamHan
* @see org.osgi.service.url.URLStreamHandlerSetter#setURL(URL, String, String, int, String, String)
* @deprecated
*/
+ @Override
public void setURL(URL url, String protocol, String host, int port, String file, String ref) {
handlerProxy.setURL(url, protocol, host, port, file, ref);
}
@@ -35,6 +36,7 @@ public class URLStreamHandlerSetter implements org.osgi.service.url.URLStreamHan
/**
* @see org.osgi.service.url.URLStreamHandlerSetter#setURL(URL, String, String, int, String, String, String, String, String)
*/
+ @Override
public void setURL(URL url, String protocol, String host, int port, String authority, String userInfo, String path, String query, String ref) {
handlerProxy.setURL(url, protocol, host, port, authority, userInfo, path, query, ref);
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/weaving/WeavingHookConfigurator.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/weaving/WeavingHookConfigurator.java
index eee15dae6..24acd3b27 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/weaving/WeavingHookConfigurator.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/weaving/WeavingHookConfigurator.java
@@ -45,6 +45,7 @@ public class WeavingHookConfigurator extends ClassLoaderHook {
return container.getServiceRegistry();
}
+ @Override
public byte[] processClass(String name, byte[] classbytes, ClasspathEntry classpathEntry, BundleEntry entry, ClasspathManager manager) {
ServiceRegistry registry = getRegistry();
if (registry == null)
@@ -83,6 +84,7 @@ public class WeavingHookConfigurator extends ClassLoaderHook {
return null;
}
+ @Override
public void recordClassDefine(String name, Class<?> clazz, byte[] classbytes, ClasspathEntry classpathEntry, BundleEntry entry, ClasspathManager manager) {
// here we assume the stack contans a woven class with the same name as the class we are defining.
WovenClassContext context = wovenClassContext.get();
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/weaving/WovenClassImpl.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/weaving/WovenClassImpl.java
index ce79e1188..e6bec24c6 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/weaving/WovenClassImpl.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/weaving/WovenClassImpl.java
@@ -66,6 +66,7 @@ public final class WovenClassImpl implements WovenClass, HookContext {
setState(TRANSFORMING);
}
+ @Override
public byte[] getBytes() {
if ((hookFlags & FLAG_HOOKSCOMPLETE) == 0) {
checkPermission();
@@ -79,6 +80,7 @@ public final class WovenClassImpl implements WovenClass, HookContext {
return results;
}
+ @Override
public void setBytes(byte[] newBytes) {
checkPermission();
if (newBytes == null)
@@ -95,6 +97,7 @@ public final class WovenClassImpl implements WovenClass, HookContext {
sm.checkPermission(new AdminPermission(loader.getWiring().getBundle(), AdminPermission.WEAVE));
}
+ @Override
public List<String> getDynamicImports() {
if ((hookFlags & FLAG_HOOKSCOMPLETE) == 0)
return dynamicImports;
@@ -102,6 +105,7 @@ public final class WovenClassImpl implements WovenClass, HookContext {
return Collections.unmodifiableList(dynamicImports);
}
+ @Override
public boolean isWeavingComplete() {
return (hookFlags & FLAG_WEAVINGCOMPLETE) != 0;
}
@@ -130,22 +134,27 @@ public final class WovenClassImpl implements WovenClass, HookContext {
notifyWovenClassListeners();
}
+ @Override
public String getClassName() {
return className;
}
+ @Override
public ProtectionDomain getProtectionDomain() {
return classpathEntry.getDomain();
}
+ @Override
public Class<?> getDefinedClass() {
return clazz;
}
+ @Override
public BundleWiring getBundleWiring() {
return loader.getWiring();
}
+ @Override
public void call(final Object hook, ServiceRegistration<?> hookRegistration) throws Exception {
if (error != null)
return; // do not call any other hooks once an error has occurred.
@@ -196,10 +205,12 @@ public final class WovenClassImpl implements WovenClass, HookContext {
return true;
}
+ @Override
public String getHookMethodName() {
return "weave"; //$NON-NLS-1$
}
+ @Override
public String getHookClassName() {
return weavingHookName;
}
@@ -237,6 +248,7 @@ public final class WovenClassImpl implements WovenClass, HookContext {
else {
try {
AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() {
+ @Override
public Void run() {
registry.notifyHooksPrivileged(context);
return null;
@@ -259,6 +271,7 @@ public final class WovenClassImpl implements WovenClass, HookContext {
} else {
try {
AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() {
+ @Override
public Void run() {
registry.notifyHooksPrivileged(WovenClassImpl.this);
return null;
@@ -320,6 +333,7 @@ public final class WovenClassImpl implements WovenClass, HookContext {
}
}
+ @Override
public String toString() {
return className;
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/launch/Equinox.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/launch/Equinox.java
index 37f284112..40d7bad54 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/launch/Equinox.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/launch/Equinox.java
@@ -110,58 +110,72 @@ public class Equinox implements Framework {
return systemBundle.compareTo(o);
}
+ @Override
public void start(int options) throws BundleException {
systemBundle.start(options);
}
+ @Override
public void start() throws BundleException {
systemBundle.start();
}
+ @Override
public void stop(int options) throws BundleException {
systemBundle.stop(options);
}
+ @Override
public void stop() throws BundleException {
systemBundle.stop();
}
+ @Override
public void update(InputStream input) throws BundleException {
systemBundle.update(input);
}
+ @Override
public void update() throws BundleException {
systemBundle.update();
}
+ @Override
public void uninstall() throws BundleException {
systemBundle.uninstall();
}
+ @Override
public long getBundleId() {
return systemBundle.getBundleId();
}
+ @Override
public String getLocation() {
return systemBundle.getLocation();
}
+ @Override
public String getSymbolicName() {
return systemBundle.getSymbolicName();
}
+ @Override
public Enumeration<String> getEntryPaths(String path) {
return systemBundle.getEntryPaths(path);
}
+ @Override
public URL getEntry(String path) {
return systemBundle.getEntry(path);
}
+ @Override
public Enumeration<URL> findEntries(String path, String filePattern, boolean recurse) {
return systemBundle.findEntries(path, filePattern, recurse);
}
+ @Override
public <A> A adapt(Class<A> type) {
return systemBundle.adapt(type);
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/launch/EquinoxFactory.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/launch/EquinoxFactory.java
index 98dc014f4..c836951ab 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/launch/EquinoxFactory.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/launch/EquinoxFactory.java
@@ -23,6 +23,7 @@ import org.osgi.framework.launch.FrameworkFactory;
*/
public class EquinoxFactory implements FrameworkFactory {
+ @Override
public Framework newFramework(Map<String, String> configuration) {
return new Equinox(configuration);
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/pluginconversion/PluginConversionException.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/pluginconversion/PluginConversionException.java
index 0012daf1c..474242bd9 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/pluginconversion/PluginConversionException.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/pluginconversion/PluginConversionException.java
@@ -68,6 +68,7 @@ public class PluginConversionException extends Exception {
*
* @return the nested exception or <code>null</code>
*/
+ @Override
public Throwable getCause() {
return cause;
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/resolver/BundleDelta.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/resolver/BundleDelta.java
index 49f8bfeae..72e8967be 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/resolver/BundleDelta.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/resolver/BundleDelta.java
@@ -125,5 +125,6 @@ public interface BundleDelta extends Comparable<BundleDelta> {
* comparable with the receiver.
* @since 3.7
*/
+ @Override
public int compareTo(BundleDelta obj);
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/resolver/BundleDescription.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/resolver/BundleDescription.java
index 6207b37e6..f96b546df 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/resolver/BundleDescription.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/resolver/BundleDescription.java
@@ -33,6 +33,7 @@ public interface BundleDescription extends BaseDescription, BundleRevision {
* @return The bundle symbolic name or null if the bundle
* does not have a symbolic name.
*/
+ @Override
public String getSymbolicName();
/**
@@ -168,6 +169,7 @@ public interface BundleDescription extends BaseDescription, BundleRevision {
*
* @return String representation of this bundle.
*/
+ @Override
public String toString();
/**
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/resolver/DisabledInfo.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/resolver/DisabledInfo.java
index 604e6cb6a..7fcb76641 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/resolver/DisabledInfo.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/resolver/DisabledInfo.java
@@ -70,6 +70,7 @@ public final class DisabledInfo {
return bundle;
}
+ @Override
public boolean equals(Object obj) {
if (obj == this)
return true;
@@ -83,6 +84,7 @@ public final class DisabledInfo {
return false;
}
+ @Override
public int hashCode() {
final int prime = 31;
int result = 1;
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/resolver/GenericDescription.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/resolver/GenericDescription.java
index 05a1a93ef..c18431ab5 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/resolver/GenericDescription.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/resolver/GenericDescription.java
@@ -50,6 +50,7 @@ public interface GenericDescription extends BaseDescription {
* @deprecated matching should only be done against a capability's
* attributes.
*/
+ @Override
public String getName();
/**
@@ -63,5 +64,6 @@ public interface GenericDescription extends BaseDescription {
* @deprecated matching should only be done against a capability's
* attributes.
*/
+ @Override
public Version getVersion();
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/resolver/NativeCodeDescription.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/resolver/NativeCodeDescription.java
index 09f087b99..43f5a2674 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/resolver/NativeCodeDescription.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/service/resolver/NativeCodeDescription.java
@@ -76,6 +76,7 @@ public interface NativeCodeDescription extends BaseDescription, Comparable<Nativ
* code description is less than, equal to, or greater than the specified object.
* @since 3.7
*/
+ @Override
public int compareTo(NativeCodeDescription other);
/**
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/signedcontent/InvalidContentException.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/signedcontent/InvalidContentException.java
index ea8a0222b..a01b67a3c 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/signedcontent/InvalidContentException.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/signedcontent/InvalidContentException.java
@@ -43,6 +43,7 @@ public class InvalidContentException extends IOException {
*
* @return The cause of this exception or <code>null</code> if no cause was created.
*/
+ @Override
public Throwable getCause() {
return cause;
}
@@ -56,6 +57,7 @@ public class InvalidContentException extends IOException {
* <code>IllegalStateException</code> since the cause of this
* exception can only be set when constructed.
*/
+ @Override
public Throwable initCause(Throwable t) {
throw new IllegalStateException();
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/BundleLocalizationImpl.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/BundleLocalizationImpl.java
index 77155fdcc..28950e758 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/BundleLocalizationImpl.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/BundleLocalizationImpl.java
@@ -36,6 +36,7 @@ public class BundleLocalizationImpl implements BundleLocalization {
* @return A <code>ResourceBundle</code> object for the given bundle and locale.
* If null is passed for the locale parameter, the default locale is used.
*/
+ @Override
public ResourceBundle getLocalization(Bundle bundle, String locale) {
Module m = ((EquinoxBundle) bundle).getModule();
ModuleRevision r = m.getCurrentRevision();
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/ManifestLocalization.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/ManifestLocalization.java
index 324fc43fa..cf49f7e95 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/ManifestLocalization.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/ManifestLocalization.java
@@ -230,14 +230,17 @@ public class ManifestLocalization {
super(in);
}
+ @Override
public void setParent(ResourceBundle parent) {
super.setParent(parent);
}
+ @Override
public boolean isEmpty() {
return false;
}
+ @Override
public boolean isStemEmpty() {
return parent == null;
}
@@ -252,24 +255,29 @@ public class ManifestLocalization {
}
@SuppressWarnings("unchecked")
+ @Override
public Enumeration<String> getKeys() {
return Collections.enumeration(Collections.EMPTY_LIST);
}
+ @Override
protected Object handleGetObject(String arg0) throws MissingResourceException {
return null;
}
+ @Override
public void setParent(ResourceBundle parent) {
super.setParent(parent);
}
+ @Override
public boolean isEmpty() {
if (parent == null)
return true;
return ((BundleResourceBundle) parent).isEmpty();
}
+ @Override
public boolean isStemEmpty() {
if (defaultRoot.equals(localeString))
return false;
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java
index ddea8b6f5..9f30acd13 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java
@@ -555,6 +555,7 @@ public class Storage {
/**
* @throws IOException
*/
+ @Override
public void connect() throws IOException {
connected = true;
}
@@ -562,6 +563,7 @@ public class Storage {
/**
* @throws IOException
*/
+ @Override
public InputStream getInputStream() throws IOException {
return (in);
}
@@ -580,6 +582,7 @@ public class Storage {
if (System.getSecurityManager() == null)
return getUpdateLocation0(module);
return AccessController.doPrivileged(new PrivilegedAction<String>() {
+ @Override
public String run() {
return getUpdateLocation0(module);
}
@@ -922,6 +925,7 @@ public class Storage {
return getContentFile0(staged, isReference, bundleID, generationID);
try {
return AccessController.doPrivileged(new PrivilegedExceptionAction<File>() {
+ @Override
public File run() throws BundleException {
return getContentFile0(staged, isReference, bundleID, generationID);
}
@@ -1030,6 +1034,7 @@ public class Storage {
return stageContent0(in, sourceURL);
try {
return AccessController.doPrivileged(new PrivilegedExceptionAction<File>() {
+ @Override
public File run() throws BundleException {
return stageContent0(in, sourceURL);
}
@@ -1186,6 +1191,7 @@ public class Storage {
} else {
try {
AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() {
+ @Override
public Void run() throws IOException {
delete0(delete);
return null;
@@ -1216,6 +1222,7 @@ public class Storage {
} else {
try {
AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() {
+ @Override
public Void run() throws IOException {
save0();
return null;
@@ -1859,6 +1866,7 @@ public class Storage {
private int curDataIndex = 0;
private URL nextElement = null;
+ @Override
public boolean hasMoreElements() {
if (nextElement != null)
return true;
@@ -1866,6 +1874,7 @@ public class Storage {
return nextElement != null;
}
+ @Override
public URL nextElement() {
if (!hasMoreElements())
throw new NoSuchElementException();
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/SystemBundleFile.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/SystemBundleFile.java
index 312f6f6c2..c959047c9 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/SystemBundleFile.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/SystemBundleFile.java
@@ -39,26 +39,32 @@ public class SystemBundleFile extends BundleFile {
if (BundleInfo.OSGI_BUNDLE_MANIFEST.equals(path)) {
return new BundleEntry() {
+ @Override
public InputStream getInputStream() throws IOException {
return getManifestURL().openStream();
}
+ @Override
public long getSize() {
return 0;
}
+ @Override
public String getName() {
return BundleInfo.OSGI_BUNDLE_MANIFEST;
}
+ @Override
public long getTime() {
return 0;
}
+ @Override
public URL getLocalURL() {
return getManifestURL();
}
+ @Override
public URL getFileURL() {
return null;
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/BundleEntry.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/BundleEntry.java
index 0fa694a40..81ccd3165 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/BundleEntry.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/BundleEntry.java
@@ -79,6 +79,7 @@ public abstract class BundleEntry {
*
* @return String representation of this BundleEntry.
*/
+ @Override
public String toString() {
return (getName());
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/BundleFile.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/BundleFile.java
index eb41c5588..6fba2d6c4 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/BundleFile.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/BundleFile.java
@@ -177,6 +177,7 @@ abstract public class BundleFile {
return mruIndex;
}
+ @Override
public String toString() {
return String.valueOf(basefile);
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/DirBundleFile.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/DirBundleFile.java
index cfa886448..366c82b47 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/DirBundleFile.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/DirBundleFile.java
@@ -48,6 +48,7 @@ public class DirBundleFile extends BundleFile {
return enableStrictBundleEntryPath ? secureAction.getCanonicalFile(basefile) : basefile;
}
+ @Override
public File getFile(String path, boolean nativeCode) {
final boolean checkInBundle = path != null && path.indexOf(POINTER_UPPER_DIRECTORY) >= 0;
File file = new File(this.basefile, path);
@@ -105,6 +106,7 @@ public class DirBundleFile extends BundleFile {
return file;
}
+ @Override
public BundleEntry getEntry(String path) {
File filePath = getFile(path, false);
if (filePath == null)
@@ -112,11 +114,13 @@ public class DirBundleFile extends BundleFile {
return new FileBundleEntry(filePath, path);
}
+ @Override
public boolean containsDir(String dir) {
File dirPath = getFile(dir, false);
return dirPath != null && BundleFile.secureAction.isDirectory(dirPath);
}
+ @Override
public Enumeration<String> getEntryPaths(String path, boolean recurse) {
if (path.length() > 0 && path.charAt(0) == '/')
path = path.substring(1);
@@ -145,10 +149,12 @@ public class DirBundleFile extends BundleFile {
return Collections.enumeration(entries);
}
+ @Override
public void close() {
// nothing to do.
}
+ @Override
public void open() {
// nothing to do.
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/DirZipBundleEntry.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/DirZipBundleEntry.java
index b0d4e9872..8e6237967 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/DirZipBundleEntry.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/DirZipBundleEntry.java
@@ -42,23 +42,28 @@ public class DirZipBundleEntry extends BundleEntry {
/**
* @throws IOException
*/
+ @Override
public InputStream getInputStream() throws IOException {
return new ByteArrayInputStream(new byte[0]);
}
+ @Override
public long getSize() {
return 0;
}
+ @Override
public String getName() {
return name;
}
+ @Override
public long getTime() {
return 0;
}
@SuppressWarnings("deprecation")
+ @Override
public URL getLocalURL() {
try {
return new URL("jar:" + bundleFile.basefile.toURL() + "!/" + name); //$NON-NLS-1$ //$NON-NLS-2$
@@ -69,6 +74,7 @@ public class DirZipBundleEntry extends BundleEntry {
}
@SuppressWarnings("deprecation")
+ @Override
public URL getFileURL() {
try {
return bundleFile.extractDirectory(name).toURL();
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/FileBundleEntry.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/FileBundleEntry.java
index f1a72623b..77d605bce 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/FileBundleEntry.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/FileBundleEntry.java
@@ -54,6 +54,7 @@ public class FileBundleEntry extends BundleEntry {
* @return InputStream for the entry
* @exception java.io.IOException
*/
+ @Override
public InputStream getInputStream() throws IOException {
return BundleFile.secureAction.getFileInputStream(file);
}
@@ -63,6 +64,7 @@ public class FileBundleEntry extends BundleEntry {
*
* @return size of entry
*/
+ @Override
public long getSize() {
return BundleFile.secureAction.length(file);
}
@@ -72,6 +74,7 @@ public class FileBundleEntry extends BundleEntry {
*
* @return name of entry
*/
+ @Override
public String getName() {
return (name);
}
@@ -83,15 +86,18 @@ public class FileBundleEntry extends BundleEntry {
*
* @return last modification time.
*/
+ @Override
public long getTime() {
return BundleFile.secureAction.lastModified(file);
}
+ @Override
public URL getLocalURL() {
return getFileURL();
}
@SuppressWarnings("deprecation")
+ @Override
public URL getFileURL() {
try {
return file.toURL();
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/MRUBundleFileList.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/MRUBundleFileList.java
index c8253481a..e6d8caf09 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/MRUBundleFileList.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/MRUBundleFileList.java
@@ -181,6 +181,7 @@ public class MRUBundleFileList implements EventDispatcher<Object, Object, Bundle
useStampList[index] = ++curUseStamp;
}
+ @Override
public final void dispatchEvent(Object eventListener, Object listenerObject, int eventAction, BundleFile eventObject) {
if (firstDispatch) {
// used to work around bug 275166; we don't want to leak the TCCL in this thread.
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/NestedDirBundleFile.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/NestedDirBundleFile.java
index 67051edbf..4d8fc7c68 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/NestedDirBundleFile.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/NestedDirBundleFile.java
@@ -61,6 +61,7 @@ public class NestedDirBundleFile extends BundleFile {
this.filterPrefixes = filterPrefixes;
}
+ @Override
public void close() {
// do nothing.
}
@@ -86,6 +87,7 @@ public class NestedDirBundleFile extends BundleFile {
return filterPath(path);
}
+ @Override
public BundleEntry getEntry(String path) {
if (filterPath(path)) {
return null;
@@ -93,6 +95,7 @@ public class NestedDirBundleFile extends BundleFile {
return baseBundleFile.getEntry(prependNestedDir(path));
}
+ @Override
public boolean containsDir(String dir) {
if (dir == null)
return false;
@@ -108,6 +111,7 @@ public class NestedDirBundleFile extends BundleFile {
return new StringBuffer(nestedDirName).append(path).toString();
}
+ @Override
public Enumeration<String> getEntryPaths(String path, boolean recurse) {
if (filterDir(path)) {
return null;
@@ -118,10 +122,12 @@ public class NestedDirBundleFile extends BundleFile {
return null;
return new Enumeration<String>() {
+ @Override
public boolean hasMoreElements() {
return basePaths.hasMoreElements();
}
+ @Override
public String nextElement() {
String next = basePaths.nextElement();
return next.substring(cpLength);
@@ -129,6 +135,7 @@ public class NestedDirBundleFile extends BundleFile {
};
}
+ @Override
public File getFile(String entry, boolean nativeCode) {
// getFile is only valid if this is a root bundle file.
// TODO to catch bugs we probably should throw new UnsupportedOperationException()
@@ -138,6 +145,7 @@ public class NestedDirBundleFile extends BundleFile {
/**
* @throws IOException
*/
+ @Override
public void open() throws IOException {
// do nothing
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/ZipBundleEntry.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/ZipBundleEntry.java
index 187874578..8dba5fdfc 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/ZipBundleEntry.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/ZipBundleEntry.java
@@ -52,6 +52,7 @@ public class ZipBundleEntry extends BundleEntry {
* @return InputStream for the entry
* @exception java.io.IOException
*/
+ @Override
public InputStream getInputStream() throws IOException {
return bundleFile.getInputStream(zipEntry);
}
@@ -61,6 +62,7 @@ public class ZipBundleEntry extends BundleEntry {
*
* @return size of entry
*/
+ @Override
public long getSize() {
return zipEntry.getSize();
}
@@ -70,6 +72,7 @@ public class ZipBundleEntry extends BundleEntry {
*
* @return name of entry
*/
+ @Override
public String getName() {
return zipEntry.getName();
}
@@ -81,11 +84,13 @@ public class ZipBundleEntry extends BundleEntry {
*
* @return last modification time.
*/
+ @Override
public long getTime() {
return zipEntry.getTime();
}
@SuppressWarnings("deprecation")
+ @Override
public URL getLocalURL() {
try {
return new URL("jar:" + bundleFile.basefile.toURL() + "!/" + zipEntry.getName()); //$NON-NLS-1$//$NON-NLS-2$
@@ -96,6 +101,7 @@ public class ZipBundleEntry extends BundleEntry {
}
@SuppressWarnings("deprecation")
+ @Override
public URL getFileURL() {
try {
File file = bundleFile.getFile(zipEntry.getName(), false);
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/ZipBundleFile.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/ZipBundleFile.java
index b80ed90ef..c1cb4d84d 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/ZipBundleFile.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/bundlefile/ZipBundleFile.java
@@ -197,6 +197,7 @@ public class ZipBundleFile extends BundleFile {
return generation.getExtractFile(".cp", entryName); //$NON-NLS-1$
}
+ @Override
public File getFile(String entry, boolean nativeCode) {
if (!lockOpen()) {
return null;
@@ -246,6 +247,7 @@ public class ZipBundleFile extends BundleFile {
return null;
}
+ @Override
public boolean containsDir(String dir) {
if (!lockOpen()) {
return false;
@@ -282,6 +284,7 @@ public class ZipBundleFile extends BundleFile {
return false;
}
+ @Override
public BundleEntry getEntry(String path) {
if (!lockOpen()) {
return null;
@@ -356,6 +359,7 @@ public class ZipBundleFile extends BundleFile {
}
}
+ @Override
public void close() throws IOException {
openLock.lock();
try {
@@ -418,6 +422,7 @@ public class ZipBundleFile extends BundleFile {
return false;
}
+ @Override
public void open() throws IOException {
getZipFile(false);
}
@@ -467,6 +472,7 @@ public class ZipBundleFile extends BundleFile {
incrementReference();
}
+ @Override
public int available() throws IOException {
try {
return super.available();
@@ -475,6 +481,7 @@ public class ZipBundleFile extends BundleFile {
}
}
+ @Override
public void close() throws IOException {
try {
super.close();
@@ -490,6 +497,7 @@ public class ZipBundleFile extends BundleFile {
}
}
+ @Override
public int read() throws IOException {
try {
return super.read();
@@ -498,6 +506,7 @@ public class ZipBundleFile extends BundleFile {
}
}
+ @Override
public int read(byte[] var0, int var1, int var2) throws IOException {
try {
return super.read(var0, var1, var2);
@@ -506,6 +515,7 @@ public class ZipBundleFile extends BundleFile {
}
}
+ @Override
public int read(byte[] var0) throws IOException {
try {
return super.read(var0);
@@ -514,6 +524,7 @@ public class ZipBundleFile extends BundleFile {
}
}
+ @Override
public void reset() throws IOException {
try {
super.reset();
@@ -522,6 +533,7 @@ public class ZipBundleFile extends BundleFile {
}
}
+ @Override
public long skip(long var0) throws IOException {
try {
return super.skip(var0);
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/BundleResourceHandler.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/BundleResourceHandler.java
index f33a490a9..b0ada55f0 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/BundleResourceHandler.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/BundleResourceHandler.java
@@ -48,6 +48,7 @@ public abstract class BundleResourceHandler extends URLStreamHandler {
/**
* Parse reference URL.
*/
+ @Override
protected void parseURL(URL url, String str, int start, int end) {
if (end < start)
return;
@@ -145,6 +146,7 @@ public abstract class BundleResourceHandler extends URLStreamHandler {
*
* @exception IOException thrown if an IO error occurs during connection establishment
*/
+ @Override
protected URLConnection openConnection(URL url) throws IOException {
if (bundleEntry != null) // if the bundleEntry is not null then return quick
return (new BundleURLConnection(url, bundleEntry));
@@ -189,6 +191,7 @@ public abstract class BundleResourceHandler extends URLStreamHandler {
* @param url the URL.
* @return a string representation of the URL.
*/
+ @Override
protected String toExternalForm(URL url) {
StringBuffer result = new StringBuffer(url.getProtocol());
result.append("://"); //$NON-NLS-1$
@@ -216,6 +219,7 @@ public abstract class BundleResourceHandler extends URLStreamHandler {
return (result.toString());
}
+ @Override
protected int hashCode(URL url) {
int hash = 0;
String protocol = url.getProtocol();
@@ -236,14 +240,17 @@ public abstract class BundleResourceHandler extends URLStreamHandler {
return hash;
}
+ @Override
protected boolean equals(URL url1, URL url2) {
return sameFile(url1, url2);
}
+ @Override
protected synchronized InetAddress getHostAddress(URL url) {
return null;
}
+ @Override
protected boolean hostsEqual(URL url1, URL url2) {
String host1 = url1.getHost();
String host2 = url2.getHost();
@@ -252,6 +259,7 @@ public abstract class BundleResourceHandler extends URLStreamHandler {
return (host1 == null && host2 == null);
}
+ @Override
protected boolean sameFile(URL url1, URL url2) {
// do a hashcode test to allow each handler to check the adaptor first
if (url1.hashCode() != url2.hashCode())
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/BundleURLConnection.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/BundleURLConnection.java
index e79a6f8b8..4b92876b7 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/BundleURLConnection.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/BundleURLConnection.java
@@ -50,6 +50,7 @@ public class BundleURLConnection extends URLConnection {
this.contentType = null;
}
+ @Override
public synchronized void connect() throws IOException {
if (!connected) {
if (bundleEntry != null) {
@@ -61,10 +62,12 @@ public class BundleURLConnection extends URLConnection {
}
}
+ @Override
public int getContentLength() {
return ((int) bundleEntry.getSize());
}
+ @Override
public String getContentType() {
if (contentType == null) {
contentType = guessContentTypeFromName(bundleEntry.getName());
@@ -89,14 +92,17 @@ public class BundleURLConnection extends URLConnection {
return (contentType);
}
+ @Override
public boolean getDoInput() {
return (true);
}
+ @Override
public boolean getDoOutput() {
return (false);
}
+ @Override
public InputStream getInputStream() throws IOException {
if (!connected) {
connect();
@@ -105,6 +111,7 @@ public class BundleURLConnection extends URLConnection {
return (in);
}
+ @Override
public long getLastModified() {
long lastModified = bundleEntry.getTime();
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/BundleURLConverter.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/BundleURLConverter.java
index 2313ecf92..2e4afbc11 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/BundleURLConverter.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/BundleURLConverter.java
@@ -31,6 +31,7 @@ public class BundleURLConverter implements URLConverter {
/* (non-Javadoc)
* @see org.eclipse.osgi.service.urlconversion.URLConverter#toFileURL(java.net.URL)
*/
+ @Override
public URL toFileURL(URL url) throws IOException {
URLConnection connection = url.openConnection();
if (connection instanceof BundleURLConnection) {
@@ -49,6 +50,7 @@ public class BundleURLConverter implements URLConverter {
/* (non-Javadoc)
* @see org.eclipse.osgi.service.urlconversion.URLConverter#resolve(java.net.URL)
*/
+ @Override
public URL resolve(URL url) throws IOException {
URLConnection connection = url.openConnection();
if (connection instanceof BundleURLConnection)
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/bundleentry/Handler.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/bundleentry/Handler.java
index 328b7e397..3e9523290 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/bundleentry/Handler.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/bundleentry/Handler.java
@@ -35,6 +35,7 @@ public class Handler extends BundleResourceHandler {
super(container, bundleEntry);
}
+ @Override
protected BundleEntry findBundleEntry(URL url, Module module) throws IOException {
ModuleRevision revision = module.getCurrentRevision();
BundleInfo.Generation revisionInfo = (BundleInfo.Generation) revision.getRevisionInfo();
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/bundleresource/Handler.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/bundleresource/Handler.java
index 0de5a821e..796d10fe1 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/bundleresource/Handler.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/bundleresource/Handler.java
@@ -35,6 +35,7 @@ public class Handler extends BundleResourceHandler {
super(container, bundleEntry);
}
+ @Override
protected BundleEntry findBundleEntry(URL url, Module module) throws IOException {
ModuleRevision current = module.getCurrentRevision();
ModuleWiring wiring = current == null ? null : current.getWiring();
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/reference/Handler.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/reference/Handler.java
index de85c64c8..a6b1c4f66 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/reference/Handler.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/reference/Handler.java
@@ -46,10 +46,12 @@ public class Handler extends URLStreamHandler {
/**
* @throws IOException
*/
+ @Override
protected URLConnection openConnection(URL url) throws IOException {
return new ReferenceURLConnection(url, installPath);
}
+ @Override
protected void parseURL(URL url, String str, int start, int end) {
if (end < start) {
return;
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/reference/ReferenceInputStream.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/reference/ReferenceInputStream.java
index 1e12a6106..b9ff45f04 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/reference/ReferenceInputStream.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/reference/ReferenceInputStream.java
@@ -31,6 +31,7 @@ public class ReferenceInputStream extends InputStream {
/* This method should not be called.
*/
+ @Override
public int read() throws IOException {
throw new IOException();
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/reference/ReferenceURLConnection.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/reference/ReferenceURLConnection.java
index d219c6017..80041aa15 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/reference/ReferenceURLConnection.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/url/reference/ReferenceURLConnection.java
@@ -39,6 +39,7 @@ public class ReferenceURLConnection extends URLConnection {
this.installPath = installPath;
}
+ @Override
public synchronized void connect() throws IOException {
if (!connected) {
// TODO assumes that reference URLs are always based on file: URLs.
@@ -91,14 +92,17 @@ public class ReferenceURLConnection extends URLConnection {
}
}
+ @Override
public boolean getDoInput() {
return true;
}
+ @Override
public boolean getDoOutput() {
return false;
}
+ @Override
public InputStream getInputStream() throws IOException {
if (!connected) {
connect();
diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/equinox/log/ExtendedLogEntry.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/equinox/log/ExtendedLogEntry.java
index f38347680..b87daeb1f 100644
--- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/equinox/log/ExtendedLogEntry.java
+++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/equinox/log/ExtendedLogEntry.java
@@ -31,6 +31,7 @@ public interface ExtendedLogEntry extends LogEntry {
* <code>LogEntry</code> object;<code>null</code> if no logger name is
* associated with this <code>LogEntry</code> object.
*/
+ @Override
String getLoggerName();
/**
diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/equinox/log/ExtendedLogService.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/equinox/log/ExtendedLogService.java
index 05e707747..698088f9c 100644
--- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/equinox/log/ExtendedLogService.java
+++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/equinox/log/ExtendedLogService.java
@@ -30,6 +30,7 @@ public interface ExtendedLogService extends LogService, Logger {
* @param loggerName The logger name.
* @return <code>Logger</code> associated with the logger name.
*/
+ @Override
public Logger getLogger(String loggerName);
/**
diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/equinox/log/LogPermission.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/equinox/log/LogPermission.java
index 05cba89c2..70ce208ef 100644
--- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/equinox/log/LogPermission.java
+++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/equinox/log/LogPermission.java
@@ -46,22 +46,27 @@ public class LogPermission extends Permission {
throw new IllegalArgumentException("actions must be * or log"); //$NON-NLS-1$
}
+ @Override
public boolean equals(Object obj) {
return obj instanceof LogPermission;
}
+ @Override
public String getActions() {
return LOG;
}
+ @Override
public int hashCode() {
return LogPermission.class.hashCode();
}
+ @Override
public boolean implies(Permission permission) {
return permission instanceof LogPermission;
}
+ @Override
public PermissionCollection newPermissionCollection() {
return new LogPermissionCollection();
}
diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/equinox/log/LogPermissionCollection.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/equinox/log/LogPermissionCollection.java
index 04cb91038..f9e2fb0fe 100644
--- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/equinox/log/LogPermissionCollection.java
+++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/equinox/log/LogPermissionCollection.java
@@ -28,6 +28,7 @@ public final class LogPermissionCollection extends PermissionCollection {
private static final long serialVersionUID = -1955409691185916778L;
LogPermission logPermission;
+ @Override
public void add(Permission permission) {
if (!(permission instanceof LogPermission))
throw new IllegalArgumentException("invalid permission: " + permission); //$NON-NLS-1$
@@ -37,14 +38,17 @@ public final class LogPermissionCollection extends PermissionCollection {
logPermission = (LogPermission) permission;
}
+ @Override
public Enumeration<Permission> elements() {
return new Enumeration<Permission>() {
private boolean hasMore = (logPermission != null);
+ @Override
public boolean hasMoreElements() {
return hasMore;
}
+ @Override
public Permission nextElement() {
if (hasMore) {
hasMore = false;
@@ -55,6 +59,7 @@ public final class LogPermissionCollection extends PermissionCollection {
};
}
+ @Override
public boolean implies(Permission permission) {
return logPermission != null && logPermission.implies(permission);
}
diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/equinox/log/Logger.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/equinox/log/Logger.java
index 3f0242b8c..e03633f68 100644
--- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/equinox/log/Logger.java
+++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/equinox/log/Logger.java
@@ -83,5 +83,6 @@ public interface Logger extends org.osgi.service.log.Logger {
* <code>Logger</code> object;<code>null</code> if no name is
* associated.
*/
+ @Override
public String getName();
}
diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/console/ConsoleSession.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/console/ConsoleSession.java
index cacac7761..cdfedce04 100644
--- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/console/ConsoleSession.java
+++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/console/ConsoleSession.java
@@ -82,6 +82,7 @@ public abstract class ConsoleSession implements ServiceFactory<Object> {
/**
* @noreference This method is not intended to be referenced by clients.
*/
+ @Override
public final Object getService(Bundle bundle, ServiceRegistration<Object> registration) {
if (sessionRegistration == null)
sessionRegistration = registration;
@@ -91,6 +92,7 @@ public abstract class ConsoleSession implements ServiceFactory<Object> {
/**
* @noreference This method is not intended to be referenced by clients.
*/
+ @Override
public final void ungetService(Bundle bundle, ServiceRegistration<Object> registration, Object service) {
// do nothing
}
diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/eventmgr/CopyOnWriteIdentityMap.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/eventmgr/CopyOnWriteIdentityMap.java
index 49296fb12..f58ab624e 100644
--- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/eventmgr/CopyOnWriteIdentityMap.java
+++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/eventmgr/CopyOnWriteIdentityMap.java
@@ -72,6 +72,7 @@ public class CopyOnWriteIdentityMap<K, V> implements Map<K, V> {
* Otherwise the previous value of the key.
* @throws IllegalArgumentException If key is null.
*/
+ @Override
public synchronized V put(K key, V value) {
if (key == null) {
throw new IllegalArgumentException();
@@ -108,6 +109,7 @@ public class CopyOnWriteIdentityMap<K, V> implements Map<K, V> {
*
* @param source The map whose entries are to be added to this map.
*/
+ @Override
public void putAll(Map<? extends K, ? extends V> source) {
int sourceSize = source.size();
if (sourceSize == 0) {
@@ -189,6 +191,7 @@ public class CopyOnWriteIdentityMap<K, V> implements Map<K, V> {
* Otherwise, the value associated with the key.
* @throws IllegalArgumentException If key is null.
*/
+ @Override
public synchronized V remove(Object key) {
if (key == null) {
throw new IllegalArgumentException();
@@ -229,6 +232,7 @@ public class CopyOnWriteIdentityMap<K, V> implements Map<K, V> {
* Remove all entries from the map.
*
*/
+ @Override
public synchronized void clear() {
entries = empty();
}
@@ -258,6 +262,7 @@ public class CopyOnWriteIdentityMap<K, V> implements Map<K, V> {
*
* @return <code>true</code> if the list is empty.
*/
+ @Override
public boolean isEmpty() {
return size() == 0;
}
@@ -267,6 +272,7 @@ public class CopyOnWriteIdentityMap<K, V> implements Map<K, V> {
*
* @return The number of entries in the map.
*/
+ @Override
public int size() {
return entries().length;
}
@@ -279,6 +285,7 @@ public class CopyOnWriteIdentityMap<K, V> implements Map<K, V> {
* @return The value object for the specified key.
* @throws IllegalArgumentException If key is null.
*/
+ @Override
public V get(Object key) {
if (key == null) {
throw new IllegalArgumentException();
@@ -301,6 +308,7 @@ public class CopyOnWriteIdentityMap<K, V> implements Map<K, V> {
* @return <code>true</code> if the specified key is in the map.
* @throws IllegalArgumentException If key is null.
*/
+ @Override
public boolean containsKey(Object key) {
if (key == null) {
throw new IllegalArgumentException();
@@ -322,6 +330,7 @@ public class CopyOnWriteIdentityMap<K, V> implements Map<K, V> {
* @param value The value object.
* @return <code>true</code> if the specified value is in the map.
*/
+ @Override
public boolean containsValue(Object value) {
Entry<K, V>[] e = entries();
for (int i = 0; i < e.length; i++) {
@@ -339,6 +348,7 @@ public class CopyOnWriteIdentityMap<K, V> implements Map<K, V> {
* @return A Set of Map.Entry for each entry in this map.
* The entries returned by the set cannot be modified.
*/
+ @Override
public Set<Map.Entry<K, V>> entrySet() {
return new Snapshot<>(entries()).entrySet();
}
@@ -349,6 +359,7 @@ public class CopyOnWriteIdentityMap<K, V> implements Map<K, V> {
*
* @return A Set of the key objects in this map
*/
+ @Override
public Set<K> keySet() {
return new Snapshot<>(entries()).keySet();
}
@@ -359,6 +370,7 @@ public class CopyOnWriteIdentityMap<K, V> implements Map<K, V> {
*
* @return A Collection of the value objects in this map.
*/
+ @Override
public Collection<V> values() {
return new Snapshot<>(entries()).values();
}
@@ -388,26 +400,32 @@ public class CopyOnWriteIdentityMap<K, V> implements Map<K, V> {
this.value = value;
}
+ @Override
public K getKey() {
return key;
}
+ @Override
public V getValue() {
return value;
}
+ @Override
public V setValue(V value) {
throw new UnsupportedOperationException(); // entries cannot be modified.
}
+ @Override
public String toString() {
return key + "=" + value; //$NON-NLS-1$
}
+ @Override
public int hashCode() {
return System.identityHashCode(key) ^ System.identityHashCode(value);
}
+ @Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
@@ -467,14 +485,17 @@ public class CopyOnWriteIdentityMap<K, V> implements Map<K, V> {
super();
}
+ @Override
public Iterator<Map.Entry<K, V>> iterator() {
return new EntryIterator();
}
+ @Override
public int size() {
return entries().length;
}
+ @Override
public boolean remove(Object o) {
if (o == null) {
throw new IllegalArgumentException();
@@ -492,6 +513,7 @@ public class CopyOnWriteIdentityMap<K, V> implements Map<K, V> {
return false;
}
+ @Override
public void clear() {
clearEntries();
}
@@ -505,6 +527,7 @@ public class CopyOnWriteIdentityMap<K, V> implements Map<K, V> {
super();
}
+ @Override
public Map.Entry<K, V> next() {
return nextEntry();
}
@@ -518,14 +541,17 @@ public class CopyOnWriteIdentityMap<K, V> implements Map<K, V> {
super();
}
+ @Override
public Iterator<K> iterator() {
return new KeyIterator();
}
+ @Override
public int size() {
return entries().length;
}
+ @Override
public boolean remove(Object o) {
if (o == null) {
throw new IllegalArgumentException();
@@ -543,6 +569,7 @@ public class CopyOnWriteIdentityMap<K, V> implements Map<K, V> {
return false;
}
+ @Override
public void clear() {
clearEntries();
}
@@ -556,6 +583,7 @@ public class CopyOnWriteIdentityMap<K, V> implements Map<K, V> {
super();
}
+ @Override
public K next() {
return nextEntry().key;
}
@@ -569,14 +597,17 @@ public class CopyOnWriteIdentityMap<K, V> implements Map<K, V> {
super();
}
+ @Override
public Iterator<V> iterator() {
return new ValueIterator();
}
+ @Override
public int size() {
return entries().length;
}
+ @Override
public boolean remove(Object o) {
if (o == null) {
throw new IllegalArgumentException();
@@ -594,6 +625,7 @@ public class CopyOnWriteIdentityMap<K, V> implements Map<K, V> {
return false;
}
+ @Override
public void clear() {
clearEntries();
}
@@ -607,6 +639,7 @@ public class CopyOnWriteIdentityMap<K, V> implements Map<K, V> {
super();
}
+ @Override
public V next() {
return nextEntry().value;
}
@@ -624,6 +657,7 @@ public class CopyOnWriteIdentityMap<K, V> implements Map<K, V> {
cursor = 0;
}
+ @Override
public final boolean hasNext() {
return cursor < length;
}
@@ -639,6 +673,7 @@ public class CopyOnWriteIdentityMap<K, V> implements Map<K, V> {
return e[cursor++];
}
+ @Override
public final void remove() {
if (length != entries().length) {
throw new ConcurrentModificationException();
diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/eventmgr/EventManager.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/eventmgr/EventManager.java
index 22982e794..e35f244bc 100644
--- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/eventmgr/EventManager.java
+++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/eventmgr/EventManager.java
@@ -196,6 +196,7 @@ public class EventManager {
if (thread == null) {
/* if there is no thread, then create a new one */
thread = AccessController.doPrivileged(new PrivilegedAction<EventThread<K, V, E>>() {
+ @Override
public EventThread<K, V, E> run() {
EventThread<K, V, E> t = new EventThread<>(threadGroup, threadName);
return t;
@@ -333,6 +334,7 @@ public class EventManager {
* This method pulls events from
* the queue and dispatches them.
*/
+ @Override
public void run() {
try {
while (true) {
diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/internal/reliablefile/ReliableFileInputStream.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/internal/reliablefile/ReliableFileInputStream.java
index 86b371e74..2c514dc94 100644
--- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/internal/reliablefile/ReliableFileInputStream.java
+++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/internal/reliablefile/ReliableFileInputStream.java
@@ -110,6 +110,7 @@ public class ReliableFileInputStream extends FilterInputStream {
*
* @exception java.io.IOException If an error occurs closing the file.
*/
+ @Override
public synchronized void close() throws IOException {
if (reliable != null) {
try {
@@ -125,6 +126,7 @@ public class ReliableFileInputStream extends FilterInputStream {
* Override default FilterInputStream method.
* @see FilterInputStream#read(byte[], int, int)
*/
+ @Override
public synchronized int read(byte b[], int off, int len) throws IOException {
if (readPos >= length) {
return -1;
@@ -144,6 +146,7 @@ public class ReliableFileInputStream extends FilterInputStream {
* Override default FilterInputStream method.
* @see FilterInputStream#read(byte[])
*/
+ @Override
public synchronized int read(byte b[]) throws IOException {
return read(b, 0, b.length);
}
@@ -152,6 +155,7 @@ public class ReliableFileInputStream extends FilterInputStream {
* Override default FilterInputStream method.
* @see FilterInputStream#read()
*/
+ @Override
public synchronized int read() throws IOException {
if (readPos >= length) {
return -1;
@@ -169,6 +173,7 @@ public class ReliableFileInputStream extends FilterInputStream {
* @throws IOException
* @see FilterInputStream#available()
*/
+ @Override
public synchronized int available() throws IOException {
if (readPos < length) // just in case
return (int) (length - readPos);
@@ -179,6 +184,7 @@ public class ReliableFileInputStream extends FilterInputStream {
* Override default skip method.
* @see FilterInputStream#skip(long)
*/
+ @Override
public synchronized long skip(long n) throws IOException {
long len = super.skip(n);
if (readPos + len > length)
@@ -191,6 +197,7 @@ public class ReliableFileInputStream extends FilterInputStream {
* Override default markSupported method.
* @see FilterInputStream#markSupported()
*/
+ @Override
public boolean markSupported() {
return false;
}
@@ -199,6 +206,7 @@ public class ReliableFileInputStream extends FilterInputStream {
* Override default mark method.
* @see FilterInputStream#mark(int)
*/
+ @Override
public void mark(int readlimit) {
//ignore
}
@@ -207,6 +215,7 @@ public class ReliableFileInputStream extends FilterInputStream {
* Override default reset method.
* @see FilterInputStream#reset()
*/
+ @Override
public void reset() throws IOException {
throw new IOException("reset not supported."); //$NON-NLS-1$
}
diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/internal/reliablefile/ReliableFileOutputStream.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/internal/reliablefile/ReliableFileOutputStream.java
index cbdf7284b..42f4771a3 100644
--- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/internal/reliablefile/ReliableFileOutputStream.java
+++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/internal/reliablefile/ReliableFileOutputStream.java
@@ -114,6 +114,7 @@ public class ReliableFileOutputStream extends FilterOutputStream {
*
* @exception java.io.IOException If an error occurs closing the file.
*/
+ @Override
public synchronized void close() throws IOException {
closeIntermediateFile();
reliable.closeOutputFile(crc);
@@ -147,6 +148,7 @@ public class ReliableFileOutputStream extends FilterOutputStream {
* Override default FilterOutputStream method.
* @see FilterOutputStream#write(byte[])
*/
+ @Override
public void write(byte[] b) throws IOException {
this.write(b, 0, b.length);
}
@@ -155,6 +157,7 @@ public class ReliableFileOutputStream extends FilterOutputStream {
* Override default FilterOutputStream method.
* @see FilterOutputStream#write(byte[], int, int)
*/
+ @Override
public void write(byte[] b, int off, int len) throws IOException {
out.write(b, off, len);
crc.update(b, off, len);
@@ -164,6 +167,7 @@ public class ReliableFileOutputStream extends FilterOutputStream {
* Override default FilterOutputStream method.
* @see FilterOutputStream#write(int)
*/
+ @Override
public void write(int b) throws IOException {
out.write(b);
crc.update((byte) b);
diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/location/Locker.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/location/Locker.java
index bc0e0b84f..217ad8ca0 100644
--- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/location/Locker.java
+++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/location/Locker.java
@@ -29,16 +29,19 @@ public interface Locker {
/**
* @throws IOException
*/
+ @Override
public boolean lock() throws IOException {
// locking always successful
return true;
}
+ @Override
public boolean isLocked() {
// this lock is never locked
return false;
}
+ @Override
public void release() {
// nothing to release
}
diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/location/Locker_JavaIo.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/location/Locker_JavaIo.java
index 572730ddd..a1c4d5b5b 100644
--- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/location/Locker_JavaIo.java
+++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/location/Locker_JavaIo.java
@@ -26,6 +26,7 @@ public class Locker_JavaIo implements Locker {
this.lockFile = lockFile;
}
+ @Override
public synchronized boolean lock() throws IOException {
//if the lock file already exists, try to delete,
//assume failure means another eclipse has it open
@@ -47,6 +48,7 @@ public class Locker_JavaIo implements Locker {
return true;
}
+ @Override
public synchronized void release() {
try {
if (lockRAF != null) {
@@ -60,6 +62,7 @@ public class Locker_JavaIo implements Locker {
lockFile.delete();
}
+ @Override
public synchronized boolean isLocked() throws IOException {
if (lockRAF != null)
return true;
diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/location/Locker_JavaNio.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/location/Locker_JavaNio.java
index a881bd79c..9ce70d018 100644
--- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/location/Locker_JavaNio.java
+++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/internal/location/Locker_JavaNio.java
@@ -35,6 +35,7 @@ public class Locker_JavaNio implements Locker {
this.debug = debug;
}
+ @Override
public synchronized boolean lock() throws IOException {
raFile = new RandomAccessFile(lockFile, "rw"); //$NON-NLS-1$
try {
@@ -62,6 +63,7 @@ public class Locker_JavaNio implements Locker {
return false;
}
+ @Override
public synchronized void release() {
if (fileLock != null) {
try {
@@ -81,6 +83,7 @@ public class Locker_JavaNio implements Locker {
}
}
+ @Override
public synchronized boolean isLocked() throws IOException {
if (fileLock != null)
return true;
diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/storagemanager/ManagedOutputStream.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/storagemanager/ManagedOutputStream.java
index a270694a4..c4454e6be 100644
--- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/storagemanager/ManagedOutputStream.java
+++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/storagemanager/ManagedOutputStream.java
@@ -51,6 +51,7 @@ public final class ManagedOutputStream extends FilterOutputStream {
* of the managed output streams in the set are closed successfully.
* @see FilterOutputStream#close()
*/
+ @Override
public void close() throws IOException {
manager.closeOutputStream(this);
}
@@ -99,6 +100,7 @@ public final class ManagedOutputStream extends FilterOutputStream {
* Override this method to prevent single byte writes to the output stream
* which is done by the default implementation of FilteredOutputStream
*/
+ @Override
public void write(byte[] bytes, int off, int len) throws IOException {
out.write(bytes, off, len);
}
diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/ManifestElement.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/ManifestElement.java
index fed59f10b..3c3af9fbc 100644
--- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/ManifestElement.java
+++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/ManifestElement.java
@@ -583,6 +583,7 @@ public class ManifestElement {
return result;
}
+ @Override
public String toString() {
Enumeration<String> attrKeys = getKeys();
Enumeration<String> directiveKeys = getDirectiveKeys();
diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/NLS.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/NLS.java
index 6660e46f0..58c1ca975 100644
--- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/NLS.java
+++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/NLS.java
@@ -65,6 +65,7 @@ public abstract class NLS {
private static final String PROP_WARNINGS = "osgi.nls.warnings"; //$NON-NLS-1$
private static final String IGNORE = "ignore"; //$NON-NLS-1$
private static final boolean ignoreWarnings = AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
+ @Override
public Boolean run() {
return IGNORE.equals(System.getProperty(PROP_WARNINGS));
}
@@ -152,6 +153,7 @@ public abstract class NLS {
return;
}
AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ @Override
public Void run() {
load(baseName, clazz);
return null;
@@ -411,6 +413,7 @@ public abstract class NLS {
/* (non-Javadoc)
* @see java.util.Hashtable#put(java.lang.Object, java.lang.Object)
*/
+ @Override
public synchronized Object put(Object key, Object value) {
Object fieldObject = fields.put(key, ASSIGNED);
// if already assigned, there is nothing to do

Back to the top