This is an automated email from the ASF dual-hosted git repository.

pengzheng pushed a commit to branch hotfix/framework-startup-optimization
in repository https://gitbox.apache.org/repos/asf/celix.git


The following commit(s) were added to 
refs/heads/hotfix/framework-startup-optimization by this push:
     new 6c867498 Remove unused deprecated APIs.
6c867498 is described below

commit 6c86749810582266f141bf8ee14f85f5bad4561c
Author: PengZheng <[email protected]>
AuthorDate: Wed Aug 2 21:03:20 2023 +0800

    Remove unused deprecated APIs.
---
 libs/framework/src/bundle.c         | 16 ++--------------
 libs/framework/src/bundle_archive.c | 14 ++++++--------
 2 files changed, 8 insertions(+), 22 deletions(-)

diff --git a/libs/framework/src/bundle.c b/libs/framework/src/bundle.c
index ad6f73d2..20a14e7e 100644
--- a/libs/framework/src/bundle.c
+++ b/libs/framework/src/bundle.c
@@ -334,20 +334,8 @@ celix_status_t bundle_close(const_bundle_pt bundle) {
 }
 
 celix_status_t bundle_closeAndDelete(const_bundle_pt bundle) {
-       celix_status_t status;
-
-       bundle_archive_pt archive = NULL;
-
-    bundle_closeModules(bundle);
-    bundle_closeRevisions(bundle);
-    status = bundle_getArchive(bundle, &archive);
-    if (status == CELIX_SUCCESS) {
-       bundleArchive_closeAndDelete(archive);
-    }
-
-       framework_logIfError(bundle->framework->logger, status, NULL, "Failed 
to close and delete bundle");
-
-    return status;
+    fw_log(bundle->framework->logger, CELIX_LOG_LEVEL_DEBUG, "Usage of 
bundle_closeAndDelete is deprecated and no longer needed. Called for bundle 
%s", bundle->symbolicName);
+    return CELIX_SUCCESS;
 }
 
 celix_status_t bundle_closeRevisions(const_bundle_pt bundle) {
diff --git a/libs/framework/src/bundle_archive.c 
b/libs/framework/src/bundle_archive.c
index ee60ffe0..c8880dae 100644
--- a/libs/framework/src/bundle_archive.c
+++ b/libs/framework/src/bundle_archive.c
@@ -446,17 +446,15 @@ celix_status_t bundleArchive_close(bundle_archive_pt 
archive) {
     // not yet needed/possible
     return CELIX_SUCCESS;
 }
-//LCOV_EXCL_STOP
 
 celix_status_t bundleArchive_closeAndDelete(bundle_archive_pt archive) {
-    celix_status_t status = CELIX_SUCCESS;
-    if (archive->id != CELIX_FRAMEWORK_BUNDLE_ID) {
-        const char* err = NULL;
-        status = celix_utils_deleteDirectory(archive->archiveRoot, &err);
-        framework_logIfError(archive->fw->logger, status, NULL, "Failed to 
delete archive root '%s': %s", archive->archiveRoot, err);
-    }
-    return status;
+    fw_log(archive->fw->logger,
+           CELIX_LOG_LEVEL_DEBUG,
+           "Usage of bundleArchive_closeAndDelete is deprecated and no longer 
needed. Called for bundle %s",
+           archive->bundleSymbolicName);
+    return CELIX_SUCCESS;
 }
+//LCOV_EXCL_STOP
 
 const char* celix_bundleArchive_getPersistentStoreRoot(bundle_archive_t* 
archive) {
     return archive->storeRoot;

Reply via email to