Skip to content

Commit

Permalink
fix: Update to JDK21 - EXO-71474 - Meeds-io/MIPs#91
Browse files Browse the repository at this point in the history
Remove usage of SecurityManager as it is deprecated for removal in jdk21
Remove also usage of classes
- SecurityHelper
- PrivilegedSystemHelper
- PrivilegedFileHelper
- SecureList
- SecureSet
- SecureCollections

These classes are here only to use securityManager, and as it is removed, it is no more necessary
  • Loading branch information
rdenarie committed May 22, 2024
1 parent 333493d commit d124b74
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import org.exoplatform.commons.info.MissingProductInformationException;
import org.exoplatform.commons.info.ProductInformations;
import org.exoplatform.commons.upgrade.UpgradeProductPlugin;
import org.exoplatform.commons.utils.PrivilegedSystemHelper;
import org.exoplatform.commons.version.util.VersionComparator;
import org.exoplatform.container.xml.InitParams;
import org.exoplatform.services.cms.templates.TemplateService;
Expand Down Expand Up @@ -76,7 +75,7 @@ public void processUpgrade(String oldVersion, String newVersion) {
if (log.isInfoEnabled()) {
log.info("Start " + this.getClass().getName() + ".............");
}
String unchangedNodeTypes = PrivilegedSystemHelper.getProperty(UNCHANG_NODE_TYPES_CONFIG);
String unchangedNodeTypes = System.getProperty(UNCHANG_NODE_TYPES_CONFIG);
String previousPlfVersion = PRODUCT_VERSION_ZERO;
Set<String> modifiedTemplateLog = new HashSet<String>();
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import org.apache.commons.lang3.StringUtils;

import org.exoplatform.commons.upgrade.UpgradeProductPlugin;
import org.exoplatform.commons.utils.PrivilegedSystemHelper;
import org.exoplatform.container.xml.InitParams;
import org.exoplatform.services.cms.views.ApplicationTemplateManagerService;
import org.exoplatform.services.cms.views.impl.ApplicationTemplateManagerServiceImpl;
Expand All @@ -51,8 +50,8 @@ public void processUpgrade(String oldVersion, String newVersion) {
if (log.isInfoEnabled()) {
log.info("Start " + this.getClass().getName() + ".............");
}
String unchangedClvTemplates = PrivilegedSystemHelper.getProperty("unchanged-clv-templates");
String unchangedSearchTemplates = PrivilegedSystemHelper.getProperty("unchanged-wcm-search-templates");
String unchangedClvTemplates = System.getProperty("unchanged-clv-templates");
String unchangedSearchTemplates = System.getProperty("unchanged-wcm-search-templates");
upgrade(unchangedClvTemplates, "content-list-viewer");
upgrade(unchangedSearchTemplates, "search");

Expand Down Expand Up @@ -117,4 +116,4 @@ private void upgrade(String unchangedTemplates, String portletName) {
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import org.apache.commons.lang3.StringUtils;

import org.exoplatform.commons.upgrade.UpgradeProductPlugin;
import org.exoplatform.commons.utils.PrivilegedSystemHelper;
import org.exoplatform.container.xml.InitParams;
import org.exoplatform.services.cms.BasePath;
import org.exoplatform.services.cms.impl.DMSConfiguration;
Expand Down Expand Up @@ -87,7 +86,7 @@ public void processUpgrade(String oldVersion, String newVersion) {
long startupTime = System.currentTimeMillis();
log.info("Start upgrade of site explorer templates");

String unchangedViews = PrivilegedSystemHelper.getProperty("unchanged-site-explorer-templates");
String unchangedViews = System.getProperty("unchanged-site-explorer-templates");
SessionProvider sessionProvider = null;
if (StringUtils.isEmpty(unchangedViews)) {
unchangedViews = "";
Expand Down

0 comments on commit d124b74

Please sign in to comment.