/** * Try to get a system property for obsolete keys. The value is automatically converted - a runtime exception may be thrown during conversion. * * @return all the properties whose system property keys were different in previous versions */ private Map<ConfigurationKey, Object> getObsoleteSystemProperties() { Map<ConfigurationKey, Object> found = new EnumMap<ConfigurationKey, Object>(ConfigurationKey.class); String concurrentDeployment = getSystemProperty("org.jboss.weld.bootstrap.properties.concurrentDeployment"); if (concurrentDeployment != null) { processKeyValue(found, ConfigurationKey.CONCURRENT_DEPLOYMENT, concurrentDeployment); found.put(ConfigurationKey.CONCURRENT_DEPLOYMENT, ConfigurationKey.CONCURRENT_DEPLOYMENT.convertValue(concurrentDeployment)); } String preloaderThreadPoolSize = getSystemProperty("org.jboss.weld.bootstrap.properties.preloaderThreadPoolSize"); if (preloaderThreadPoolSize != null) { found.put(ConfigurationKey.PRELOADER_THREAD_POOL_SIZE, ConfigurationKey.PRELOADER_THREAD_POOL_SIZE.convertValue(preloaderThreadPoolSize)); } return found; }
/** * Try to get a system property for obsolete keys. The value is automatically converted - a runtime exception may be thrown during conversion. * * @return all the properties whose system property keys were different in previous versions */ private Map<ConfigurationKey, Object> getObsoleteSystemProperties() { Map<ConfigurationKey, Object> found = new EnumMap<ConfigurationKey, Object>(ConfigurationKey.class); String concurrentDeployment = getSystemProperty("org.jboss.weld.bootstrap.properties.concurrentDeployment"); if (concurrentDeployment != null) { processKeyValue(found, ConfigurationKey.CONCURRENT_DEPLOYMENT, concurrentDeployment); found.put(ConfigurationKey.CONCURRENT_DEPLOYMENT, ConfigurationKey.CONCURRENT_DEPLOYMENT.convertValue(concurrentDeployment)); } String preloaderThreadPoolSize = getSystemProperty("org.jboss.weld.bootstrap.properties.preloaderThreadPoolSize"); if (preloaderThreadPoolSize != null) { found.put(ConfigurationKey.PRELOADER_THREAD_POOL_SIZE, ConfigurationKey.PRELOADER_THREAD_POOL_SIZE.convertValue(preloaderThreadPoolSize)); } return found; }
/** * Try to get a system property for obsolete keys. The value is automatically converted - a runtime exception may be thrown during conversion. * * @return all the properties whose system property keys were different in previous versions */ private Map<ConfigurationKey, Object> getObsoleteSystemProperties() { Map<ConfigurationKey, Object> found = new EnumMap<ConfigurationKey, Object>(ConfigurationKey.class); String concurrentDeployment = getSystemProperty("org.jboss.weld.bootstrap.properties.concurrentDeployment"); if (concurrentDeployment != null) { processKeyValue(found, ConfigurationKey.CONCURRENT_DEPLOYMENT, concurrentDeployment); found.put(ConfigurationKey.CONCURRENT_DEPLOYMENT, ConfigurationKey.CONCURRENT_DEPLOYMENT.convertValue(concurrentDeployment)); } String preloaderThreadPoolSize = getSystemProperty("org.jboss.weld.bootstrap.properties.preloaderThreadPoolSize"); if (preloaderThreadPoolSize != null) { found.put(ConfigurationKey.PRELOADER_THREAD_POOL_SIZE, ConfigurationKey.PRELOADER_THREAD_POOL_SIZE.convertValue(preloaderThreadPoolSize)); } return found; }
/** * Try to get a system property for obsolete keys. The value is automatically converted - a runtime exception may be thrown during conversion. * * @return all the properties whose system property keys were different in previous versions */ private Map<ConfigurationKey, Object> getObsoleteSystemProperties() { Map<ConfigurationKey, Object> found = new EnumMap<ConfigurationKey, Object>(ConfigurationKey.class); String concurrentDeployment = getSystemProperty("org.jboss.weld.bootstrap.properties.concurrentDeployment"); if (concurrentDeployment != null) { processKeyValue(found, ConfigurationKey.CONCURRENT_DEPLOYMENT, concurrentDeployment); found.put(ConfigurationKey.CONCURRENT_DEPLOYMENT, ConfigurationKey.CONCURRENT_DEPLOYMENT.convertValue(concurrentDeployment)); } String preloaderThreadPoolSize = getSystemProperty("org.jboss.weld.bootstrap.properties.preloaderThreadPoolSize"); if (preloaderThreadPoolSize != null) { found.put(ConfigurationKey.PRELOADER_THREAD_POOL_SIZE, ConfigurationKey.PRELOADER_THREAD_POOL_SIZE.convertValue(preloaderThreadPoolSize)); } return found; }
/** * Try to get a system property for obsolete keys. The value is automatically converted - a runtime exception may be thrown during conversion. * * @return all the properties whose system property keys were different in previous versions */ private Map<ConfigurationKey, Object> getObsoleteSystemProperties() { Map<ConfigurationKey, Object> found = new EnumMap<ConfigurationKey, Object>(ConfigurationKey.class); String concurrentDeployment = getSystemProperty("org.jboss.weld.bootstrap.properties.concurrentDeployment"); if (concurrentDeployment != null) { processKeyValue(found, ConfigurationKey.CONCURRENT_DEPLOYMENT, concurrentDeployment); found.put(ConfigurationKey.CONCURRENT_DEPLOYMENT, ConfigurationKey.CONCURRENT_DEPLOYMENT.convertValue(concurrentDeployment)); } String preloaderThreadPoolSize = getSystemProperty("org.jboss.weld.bootstrap.properties.preloaderThreadPoolSize"); if (preloaderThreadPoolSize != null) { found.put(ConfigurationKey.PRELOADER_THREAD_POOL_SIZE, ConfigurationKey.PRELOADER_THREAD_POOL_SIZE.convertValue(preloaderThreadPoolSize)); } return found; }
/** * Try to get a system property for obsolete keys. The value is automatically converted - a runtime exception may be thrown during conversion. * * @return all the properties whose system property keys were different in previous versions */ private Map<ConfigurationKey, Object> getObsoleteSystemProperties() { Map<ConfigurationKey, Object> found = new EnumMap<ConfigurationKey, Object>(ConfigurationKey.class); String concurrentDeployment = getSystemProperty("org.jboss.weld.bootstrap.properties.concurrentDeployment"); if (concurrentDeployment != null) { processKeyValue(found, ConfigurationKey.CONCURRENT_DEPLOYMENT, concurrentDeployment); found.put(ConfigurationKey.CONCURRENT_DEPLOYMENT, ConfigurationKey.CONCURRENT_DEPLOYMENT.convertValue(concurrentDeployment)); } String preloaderThreadPoolSize = getSystemProperty("org.jboss.weld.bootstrap.properties.preloaderThreadPoolSize"); if (preloaderThreadPoolSize != null) { found.put(ConfigurationKey.PRELOADER_THREAD_POOL_SIZE, ConfigurationKey.PRELOADER_THREAD_POOL_SIZE.convertValue(preloaderThreadPoolSize)); } return found; }
@SuppressWarnings("unchecked") private <T> T initSystemProperty(ConfigurationKey key, Class<T> requiredType) { checkRequiredType(key, requiredType); String property = getSystemProperty(key.get()); return (T) (property != null ? key.convertValue(property) : key.getDefaultValue()); }
@SuppressWarnings("unchecked") private <T> T initSystemProperty(ConfigurationKey key, Class<T> requiredType) { checkRequiredType(key, requiredType); String property = getSystemProperty(key.get()); return (T) (property != null ? key.convertValue(property) : key.getDefaultValue()); }
@SuppressWarnings("unchecked") private <T> T initSystemProperty(ConfigurationKey key, Class<T> requiredType) { checkRequiredType(key, requiredType); String property = getSystemProperty(key.get()); return (T) (property != null ? key.convertValue(property) : key.getDefaultValue()); }
@SuppressWarnings("unchecked") private <T> T initSystemProperty(ConfigurationKey key, Class<T> requiredType) { checkRequiredType(key, requiredType); String property = getSystemProperty(key.get()); return (T) (property != null ? key.convertValue(property) : key.getDefaultValue()); }
/** * Process the given key and value. First validate the value and check if there's no different value for the same key in the same source - invalid and * different values are treated as a deployment problem. * * @param properties * @param key * @param value */ private void processKeyValue(Map<ConfigurationKey, Object> properties, ConfigurationKey key, Object value) { if (value instanceof String) { value = key.convertValue((String) value); } if (key.isValidValue(value)) { Object previous = properties.put(key, value); if (previous != null && !previous.equals(value)) { throw ConfigurationLogger.LOG.configurationKeyHasDifferentValues(key.get(), previous, value); } } else { throw ConfigurationLogger.LOG.invalidConfigurationPropertyValue(value, key.get()); } }
@SuppressWarnings("unchecked") private <T> T initSystemProperty(ConfigurationKey key, Class<T> requiredType) { checkRequiredType(key, requiredType); String property = getSystemProperty(key.get()); return (T) (property != null ? key.convertValue(property) : key.getDefaultValue()); }
/** * Process the given key and value. First validate the value and check if there's no different value for the same key in the same source - invalid and * different values are treated as a deployment problem. * * @param properties * @param key * @param value */ private void processKeyValue(Map<ConfigurationKey, Object> properties, ConfigurationKey key, Object value) { if (value instanceof String) { value = key.convertValue((String) value); } if (key.isValidValue(value)) { Object previous = properties.put(key, value); if (previous != null && !previous.equals(value)) { throw ConfigurationLogger.LOG.configurationKeyHasDifferentValues(key.get(), previous, value); } } else { throw ConfigurationLogger.LOG.invalidConfigurationPropertyValue(value, key.get()); } }
@SuppressWarnings("unchecked") private <T> T initSystemProperty(ConfigurationKey key, Class<T> requiredType) { checkRequiredType(key, requiredType); String property = getSystemProperty(key.get()); return (T) (property != null ? key.convertValue(property) : key.getDefaultValue()); }
/** * Process the given key and value. First validate the value and check if there's no different value for the same key in the same source - invalid and * different values are treated as a deployment problem. * * @param properties * @param key * @param value */ private void processKeyValue(Map<ConfigurationKey, Object> properties, ConfigurationKey key, Object value) { if (value instanceof String) { value = key.convertValue((String) value); } if (key.isValidValue(value)) { Object previous = properties.put(key, value); if (previous != null && !previous.equals(value)) { throw ConfigurationLogger.LOG.configurationKeyHasDifferentValues(key.get(), previous, value); } } else { throw ConfigurationLogger.LOG.invalidConfigurationPropertyValue(value, key.get()); } }
/** * Process the given key and value. First validate the value and check if there's no different value for the same key in the same source - invalid and * different values are treated as a deployment problem. * * @param properties * @param key * @param value */ private void processKeyValue(Map<ConfigurationKey, Object> properties, ConfigurationKey key, Object value) { if (value instanceof String) { value = key.convertValue((String) value); } if (key.isValidValue(value)) { Object previous = properties.put(key, value); if (previous != null && !previous.equals(value)) { throw ConfigurationLogger.LOG.configurationKeyHasDifferentValues(key.get(), previous, value); } } else { throw ConfigurationLogger.LOG.invalidConfigurationPropertyValue(value, key.get()); } }
/** * Process the given key and value. First validate the value and check if there's no different value for the same key in the same source - invalid and * different values are treated as a deployment problem. * * @param properties * @param key * @param value */ private void processKeyValue(Map<ConfigurationKey, Object> properties, ConfigurationKey key, Object value) { if (value instanceof String) { value = key.convertValue((String) value); } if (key.isValidValue(value)) { Object previous = properties.put(key, value); if (previous != null && !previous.equals(value)) { throw ConfigurationLogger.LOG.configurationKeyHasDifferentValues(key.get(), previous, value); } } else { throw ConfigurationLogger.LOG.invalidConfigurationPropertyValue(value, key.get()); } }
/** * Process the given key and value. First validate the value and check if there's no different value for the same key in the same source - invalid and * different values are treated as a deployment problem. * * @param properties * @param key * @param value */ private void processKeyValue(Map<ConfigurationKey, Object> properties, ConfigurationKey key, Object value) { if (value instanceof String) { value = key.convertValue((String) value); } if (key.isValidValue(value)) { Object previous = properties.put(key, value); if (previous != null && !previous.equals(value)) { throw ConfigurationLogger.LOG.configurationKeyHasDifferentValues(key.get(), previous, value); } } else { throw ConfigurationLogger.LOG.invalidConfigurationPropertyValue(value, key.get()); } }