diff options
author | Thomas Watson | 2020-02-05 17:59:29 +0000 |
---|---|---|
committer | Thomas Watson | 2020-02-05 18:00:25 +0000 |
commit | 53cda2fec39d3a012525051b96af1155c9c7f07b (patch) | |
tree | 7f2e9ca25a982f389186150151df6b81ab5f568b | |
parent | 12b32a9c577e8102eae1242d9bac2104b5cbf244 (diff) | |
download | rt.equinox.framework-53cda2fec39d3a012525051b96af1155c9c7f07b.tar.gz rt.equinox.framework-53cda2fec39d3a012525051b96af1155c9c7f07b.tar.xz rt.equinox.framework-53cda2fec39d3a012525051b96af1155c9c7f07b.zip |
Update connect api to remove return this
The API is not really a good candidate for chaining
and the return of this makes it awkward.
Change-Id: Iad1bcb1cd347f5887817d3e62a0d78d398631421
Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
3 files changed, 7 insertions, 14 deletions
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/ConnectTests.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/ConnectTests.java index ccb8ab250..40067d2d9 100644 --- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/ConnectTests.java +++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/ConnectTests.java @@ -114,9 +114,8 @@ public class ConnectTests extends AbstractBundleTests { private final Map<String, ConnectModule> modules = new ConcurrentHashMap<>(); @Override - public ModuleConnector initialize(File storage, Map<String, String> config) { + public void initialize(File storage, Map<String, String> config) { initializeCalled.getAndIncrement(); - return this; } @Override @@ -211,20 +210,18 @@ public class ConnectTests extends AbstractBundleTests { @SuppressWarnings("unused") @Override - public ConnectContent open() throws IOException { + public void open() throws IOException { if (!isOpen.compareAndSet(false, true)) { throw new IllegalStateException("Already Opened."); } - return this; } @SuppressWarnings("unused") @Override - public ConnectContent close() throws IOException { + public void close() throws IOException { if (!isOpen.compareAndSet(true, false)) { throw new IllegalStateException("Already Closed."); } - return this; } void addEntry(String path, ConnectEntry entry) { @@ -391,11 +388,10 @@ public class ConnectTests extends AbstractBundleTests { final AtomicReference<Map<String, String>> initConfig = new AtomicReference<>(); ModuleConnector initParamsModuleConnector = new TestCountingModuleConnector() { @Override - public ModuleConnector initialize(File storage, Map<String, String> config) { + public void initialize(File storage, Map<String, String> config) { super.initialize(storage, config); initFile.set(storage); initConfig.set(config); - return this; } }; diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/connect/ConnectContent.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/connect/ConnectContent.java index 56c1ddbed..44ec66031 100644 --- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/connect/ConnectContent.java +++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/connect/ConnectContent.java @@ -110,18 +110,16 @@ public interface ConnectContent { * until right before requests to access the bundle revision content are * made. * - * @return a reference to this object * @throws IOException if an error occurred opening the content */ - ConnectContent open() throws IOException; + void open() throws IOException; /** * Closes this connect content. * - * @return a reference to this object * @throws IOException if an error occurred closing the connect content */ - ConnectContent close() throws IOException; + void close() throws IOException; /** * Represents the entry of a connect module diff --git a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/connect/ModuleConnector.java b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/connect/ModuleConnector.java index 3a5ec012d..3f9a112c5 100644 --- a/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/connect/ModuleConnector.java +++ b/bundles/org.eclipse.osgi/osgi/src/org/osgi/framework/connect/ModuleConnector.java @@ -57,9 +57,8 @@ public interface ModuleConnector { * @param storage the persistent storage area used by the {@link Framework} * or {@code null} if the platform does not have file system * support. - * @return a reference to this object */ - ModuleConnector initialize(File storage, Map<String,String> configuration); + void initialize(File storage, Map<String,String> configuration); /** * Connects a bundle location with a {@link ConnectModule}. If an |