You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by st...@apache.org on 2026/07/19 17:01:54 UTC

(openwebbeans) branch main updated (78152dd6f -> f00686efc)

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

asf-gitbox-commits pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/openwebbeans.git


    from 78152dd6f OWB-1463 perform bean validation in parallel
     new 443cbef62 OWB-1467 remove unused private method from BeansDeployer
     new f00686efc OWB-1467 remove SecurityManager from WebBeansConfiguration

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/webbeans/config/BeansDeployer.java  | 64 ----------------------
 .../webbeans/config/OpenWebBeansConfiguration.java | 28 +---------
 2 files changed, 1 insertion(+), 91 deletions(-)


(openwebbeans) 01/02: OWB-1467 remove unused private method from BeansDeployer

Posted by st...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/openwebbeans.git

commit 443cbef622d53908ffa3c99c082da2c71646ffcd
Author: Mark Struberg <st...@apache.org>
AuthorDate: Sun Jul 19 18:58:25 2026 +0200

    OWB-1467 remove unused private method from BeansDeployer
---
 .../org/apache/webbeans/config/BeansDeployer.java  | 64 ----------------------
 1 file changed, 64 deletions(-)

diff --git a/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java b/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
index 721949838..9470e10f5 100644
--- a/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
+++ b/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
@@ -60,7 +60,6 @@ import jakarta.enterprise.inject.Vetoed;
 import jakarta.enterprise.inject.spi.BeanAttributes;
 import jakarta.enterprise.inject.spi.DefinitionException;
 
-import org.apache.webbeans.exception.WebBeansException;
 import org.apache.webbeans.inject.AlternativesManager;
 import org.apache.webbeans.intercept.InterceptorsManager;
 import org.apache.webbeans.logger.WebBeansLoggerFacade;
@@ -109,13 +108,11 @@ import jakarta.enterprise.inject.spi.ObserverMethod;
 import jakarta.enterprise.inject.spi.Producer;
 
 import java.lang.annotation.Annotation;
-import java.lang.reflect.Constructor;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
 import java.lang.reflect.ParameterizedType;
 import java.lang.reflect.Type;
 import java.net.URL;
-import java.security.PrivilegedActionException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
@@ -793,67 +790,6 @@ public class BeansDeployer
         }
             
     }
-    
-    private void addDefaultBean(WebBeansContext ctx,String className)
-    {
-        Bean<?> bean = null;
-        
-        Class<?> beanClass = ClassUtil.getClassFromName(className);
-        if(beanClass != null)
-        {
-            bean  = (Bean)newInstance(ctx, beanClass);
-        }
-        
-        if(bean != null)
-        {
-            ctx.getBeanManagerImpl().addInternalBean(bean);
-        }
-    }
-
-    /**
-     * create a new instance of the class
-     */
-    private Object newInstance(WebBeansContext wbc, Class<?> clazz)
-    {
-        try
-        {
-            if(System.getSecurityManager() != null)
-            {
-                Constructor<?> c = webBeansContext.getSecurityService().doPrivilegedGetConstructor(clazz, WebBeansContext.class);
-                if (c == null)
-                {
-                    return webBeansContext.getSecurityService().doPrivilegedObjectCreate(clazz);
-                }
-                return c.newInstance(wbc);
-            }
-
-            if (clazz.getConstructors().length > 0)
-            {
-                try
-                {
-                    return clazz.getConstructor(new Class<?>[] { WebBeansContext.class }).newInstance(wbc);
-                }
-                catch (Exception e)
-                {
-                    return clazz.newInstance();
-                }
-            }
-            return clazz.newInstance();
-
-        }
-        catch(Exception e)
-        {
-            Throwable cause = e;
-            if(e instanceof PrivilegedActionException)
-            {
-                cause = e.getCause();
-            }
-
-            String error = "Error occurred while creating an instance of class : " + clazz.getName();
-            logger.log(Level.SEVERE, error, cause);
-            throw new WebBeansException(error,cause);
-        }
-    }
 
     /**
      * Fires event before bean discovery.


(openwebbeans) 02/02: OWB-1467 remove SecurityManager from WebBeansConfiguration

Posted by st...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/openwebbeans.git

commit f00686efc8cc9dd31f5a9bc8679e2a08a7f0bc87
Author: Mark Struberg <st...@apache.org>
AuthorDate: Sun Jul 19 19:01:19 2026 +0200

    OWB-1467 remove SecurityManager from WebBeansConfiguration
---
 .../webbeans/config/OpenWebBeansConfiguration.java | 28 +---------------------
 1 file changed, 1 insertion(+), 27 deletions(-)

diff --git a/webbeans-impl/src/main/java/org/apache/webbeans/config/OpenWebBeansConfiguration.java b/webbeans-impl/src/main/java/org/apache/webbeans/config/OpenWebBeansConfiguration.java
index a042c06f0..1bb70bf03 100644
--- a/webbeans-impl/src/main/java/org/apache/webbeans/config/OpenWebBeansConfiguration.java
+++ b/webbeans-impl/src/main/java/org/apache/webbeans/config/OpenWebBeansConfiguration.java
@@ -19,8 +19,6 @@
 package org.apache.webbeans.config;
 
 import java.io.IOException;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
@@ -342,15 +340,7 @@ public class OpenWebBeansConfiguration
 
     private void overrideWithGlobalSettings(Properties configProperties)
     {
-        Properties systemProperties;
-        if(System.getSecurityManager() != null)
-        {
-            systemProperties = doPrivilegedGetSystemProperties();
-        }
-        else
-        {
-            systemProperties = System.getProperties();
-        }
+        Properties systemProperties = System.getProperties();
 
         Map<String, String> systemEnvironment = System.getenv();
 
@@ -371,22 +361,6 @@ public class OpenWebBeansConfiguration
         }
     }
 
-    private Properties doPrivilegedGetSystemProperties()
-    {
-        return AccessController.doPrivileged(
-            new PrivilegedAction<>()
-            {
-                @Override
-                public Properties run()
-                {
-                    return System.getProperties();
-                }
-
-            }
-        );
-    }
-
-
     /**
      * Gets property.
      * @param key