Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update to JDK21 - EXO-71474 - meeds-io/MIPs#91 #63

Merged
merged 2 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

6 changes: 0 additions & 6 deletions exo.kernel.commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,6 @@
</testResource>
</testResources>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>@{argLine} -Djava.security.manager=org.exoplatform.commons.test.TestSecurityManager -Djava.security.policy=${project.build.directory}/test-classes/test.policy</argLine>
</configuration>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
*/
package org.exoplatform.commons;

import org.exoplatform.commons.utils.PrivilegedSystemHelper;

public class Environment
{

Expand All @@ -43,12 +41,12 @@ public class Environment

private Environment()
{
String catalinaHome = PrivilegedSystemHelper.getProperty("catalina.home");
String jbossHome = PrivilegedSystemHelper.getProperty("jboss.home.dir");
String jettyHome = PrivilegedSystemHelper.getProperty("jetty.home");
String websphereHome = PrivilegedSystemHelper.getProperty("was.install.root");
String weblogicHome = PrivilegedSystemHelper.getProperty("weblogic.Name");
String standAlone = PrivilegedSystemHelper.getProperty("maven.exoplatform.dir");
String catalinaHome = System.getProperty("catalina.home");
String jbossHome = System.getProperty("jboss.home.dir");
String jettyHome = System.getProperty("jetty.home");
String websphereHome = System.getProperty("was.install.root");
String weblogicHome = System.getProperty("weblogic.Name");
String standAlone = System.getProperty("maven.exoplatform.dir");
if (jbossHome != null)
{
platform_ = JBOSS_PLATFORM;
Expand Down Expand Up @@ -95,4 +93,4 @@ static public Environment getInstance()
}
return singleton_;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@
*/
package org.exoplatform.commons.reflect;

import org.exoplatform.commons.utils.SecurityHelper;

import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.security.PrivilegedAction;
import java.util.HashMap;
import java.util.Map;

Expand Down Expand Up @@ -102,16 +99,7 @@ public static <A extends Annotation> Map<Method, A> resolveMethodAnnotations(fin
//
Map<Method, A> methods = new HashMap<Method, A>();

//
PrivilegedAction<Method[]> action = new PrivilegedAction<Method[]>()
{
public Method[] run()
{
return clazz.getDeclaredMethods();
}
};

for (Method method : SecurityHelper.doPrivilegedAction(action))
for (Method method : clazz.getDeclaredMethods())
{
A annotation = method.getAnnotation(methodAnnotation);
if (annotation != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
public class ExceptionUtil
{
private static String LINE_SEPARATOR = PrivilegedSystemHelper.getProperty("line.separator");
private static String LINE_SEPARATOR = System.getProperty("line.separator");

static public String getExoStackTrace(Throwable t)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static public String getFileContentAsString(File file, String charset) throws IO
{
throw new IllegalArgumentException("No null file accepted");
}
FileInputStream is = PrivilegedFileHelper.fileInputStream(file);
FileInputStream is = new FileInputStream(file);
return new String(getStreamContentAsBytes(is), charset);
}

Expand Down Expand Up @@ -136,7 +136,7 @@ static public byte[] getFileContentAsBytes(String fileName) throws IOException,
{
throw new IllegalArgumentException("No null file name accepted");
}
FileInputStream is = PrivilegedFileHelper.fileInputStream(fileName);
FileInputStream is = new FileInputStream(fileName);
return getStreamContentAsBytes(is);
}

Expand Down
Loading