buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public ObjectName getObjectName(Object managedBean, String beanKey) throws MalformedObjectNameException {
String domain = ClassUtils.getPackageName(managedBean.getClass());
Hashtable keys = new Hashtable();
keys.put(TYPE_KEY, ClassUtils.getShortName(managedBean.getClass()));
keys.put(HASH_CODE_KEY, ObjectUtils... | public ObjectName getObjectName(Object managedBean, String beanKey) throws MalformedObjectNameException {
String domain = ClassUtils.getPackageName(managedBean.getClass());
Hashtable<String, String> keys = new Hashtable<String, String>();
keys.put(TYPE_KEY, ClassUtils.getShortName(managedBean.getClass()));
key... |
public ObjectName getObjectName(Object managedBean, String beanKey) throws MalformedObjectNameException {
Class managedClass = AopUtils.getTargetClass(managedBean);
ManagedResource mr = this.attributeSource.getManagedResource(managedClass);
// Check that an object name has been specified.
if (mr != null && St... | public ObjectName getObjectName(Object managedBean, String beanKey) throws MalformedObjectNameException {
Class<?> managedClass = AopUtils.getTargetClass(managedBean);
ManagedResource mr = this.attributeSource.getManagedResource(managedClass);
// Check that an object name has been specified.
if (mr != null &&... |
public void afterPropertiesSet() throws MBeanServerNotFoundException {
try {
/*
* this.mbeanServer = AdminServiceFactory.getMBeanFactory().getMBeanServer();
*/
Class adminServiceClass = getClass().getClassLoader().loadClass(ADMIN_SERVICE_FACTORY_CLASS);
Method getMBeanFactoryMethod = adminServiceCla... | public void afterPropertiesSet() throws MBeanServerNotFoundException {
try {
/*
* this.mbeanServer = AdminServiceFactory.getMBeanFactory().getMBeanServer();
*/
Class<?> adminServiceClass = getClass().getClassLoader().loadClass(ADMIN_SERVICE_FACTORY_CLASS);
Method getMBeanFactoryMethod = adminService... |
public CodebaseAwareObjectInputStream(
InputStream in, ClassLoader classLoader, boolean acceptProxyClasses) throws IOException {
super(in, classLoader, acceptProxyClasses);
this.codebaseUrl = null;
}
@Override
protected Class resolveFallbackIfPossible(String className, ClassNotFoundException ex)
throws... | public CodebaseAwareObjectInputStream(
InputStream in, ClassLoader classLoader, boolean acceptProxyClasses) throws IOException {
super(in, classLoader, acceptProxyClasses);
this.codebaseUrl = null;
}
@Override
protected Class<?> resolveFallbackIfPossible(String className, ClassNotFoundException ex)
thr... |
public String getTargetInterfaceName() {
Class ifc = this.rmiExporter.getServiceInterface();
return (ifc != null ? ifc.getName() : null);
}
| public String getTargetInterfaceName() {
Class<?> ifc = this.rmiExporter.getServiceInterface();
return (ifc != null ? ifc.getName() : null);
}
|
public Object getScriptedObject(ScriptSource scriptSource, Class<?>... actualInterfaces)
throws IOException, ScriptCompilationException {
try {
Class<?> clazz;
synchronized (this.scriptClassMonitor) {
boolean requiresScriptEvaluation = (this.wasModifiedForTypeCheck && this.scriptClass == null);
th... | public Object getScriptedObject(ScriptSource scriptSource, Class<?>... actualInterfaces)
throws IOException, ScriptCompilationException {
try {
Class<?> clazz;
synchronized (this.scriptClassMonitor) {
boolean requiresScriptEvaluation = (this.wasModifiedForTypeCheck && this.scriptClass == null);
th... |
public ModelMap addAttribute(Object attributeValue) {
Assert.notNull(attributeValue, "Model object must not be null");
if (attributeValue instanceof Collection && ((Collection) attributeValue).isEmpty()) {
return this;
}
return addAttribute(Conventions.getVariableName(attributeValue), attributeValue);
}
| public ModelMap addAttribute(Object attributeValue) {
Assert.notNull(attributeValue, "Model object must not be null");
if (attributeValue instanceof Collection && ((Collection<?>) attributeValue).isEmpty()) {
return this;
}
return addAttribute(Conventions.getVariableName(attributeValue), attributeValue);
}... |
public void putAll(Map<? extends String, ?> map) {
for (Map.Entry entry : map.entrySet()) {
removeBindingResultIfNecessary(entry.getKey(), entry.getValue());
}
super.putAll(map);
}
| public void putAll(Map<? extends String, ?> map) {
for (Map.Entry<? extends String, ?> entry : map.entrySet()) {
removeBindingResultIfNecessary(entry.getKey(), entry.getValue());
}
super.putAll(map);
}
|
public boolean contains(Class exType) {
if (exType == null) {
return false;
}
if (exType.isInstance(this)) {
return true;
}
Throwable cause = getCause();
if (cause == this) {
return false;
}
if (cause instanceof NestedCheckedException) {
return ((NestedCheckedException) cause).contains(exTy... | public boolean contains(Class<?> exType) {
if (exType == null) {
return false;
}
if (exType.isInstance(this)) {
return true;
}
Throwable cause = getCause();
if (cause == this) {
return false;
}
if (cause instanceof NestedCheckedException) {
return ((NestedCheckedException) cause).contains(e... |
public boolean contains(Class exType) {
if (exType == null) {
return false;
}
if (exType.isInstance(this)) {
return true;
}
Throwable cause = getCause();
if (cause == this) {
return false;
}
if (cause instanceof NestedRuntimeException) {
return ((NestedRuntimeException) cause).contains(exTy... | public boolean contains(Class<?> exType) {
if (exType == null) {
return false;
}
if (exType.isInstance(this)) {
return true;
}
Throwable cause = getCause();
if (cause == this) {
return false;
}
if (cause instanceof NestedRuntimeException) {
return ((NestedRuntimeException) cause).contains(e... |
public static void sortIfNecessary(Object value) {
if (value instanceof Object[]) {
sort((Object[]) value);
}
else if (value instanceof List) {
sort((List) value);
}
}
| public static void sortIfNecessary(Object value) {
if (value instanceof Object[]) {
sort((Object[]) value);
}
else if (value instanceof List) {
sort((List<?>) value);
}
}
|
public String[] getParameterNames(Constructor ctor) {
for (ParameterNameDiscoverer pnd : this.parameterNameDiscoverers) {
String[] result = pnd.getParameterNames(ctor);
if (result != null) {
return result;
}
}
return null;
}
} | public String[] getParameterNames(Constructor<?> ctor) {
for (ParameterNameDiscoverer pnd : this.parameterNameDiscoverers) {
String[] result = pnd.getParameterNames(ctor);
if (result != null) {
return result;
}
}
return null;
}
} |
boolean isClassReloadable(Class<?> clazz);
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/lice... | boolean isClassReloadable(Class<?> clazz);
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/lice... |
Object[] convArray = (classValuesAsString ? new String[array.length] : new Class<?>[array.length]);
/*
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a cop... | Object[] convArray = (classValuesAsString ? new String[array.length] : new Class<?>[array.length]);
/*
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a cop... |
public static Method findMethod(Class<?> clazz, String name) {
return findMethod(clazz, name, new Class[0]);
}
| public static Method findMethod(Class<?> clazz, String name) {
return findMethod(clazz, name, new Class<?>[0]);
}
|
private static boolean nodeNameMatch(Node node, Collection desiredNames) {
return (desiredNames.contains(node.getNodeName()) || desiredNames.contains(node.getLocalName()));
}
} | private static boolean nodeNameMatch(Node node, Collection<?> desiredNames) {
return (desiredNames.contains(node.getNodeName()) || desiredNames.contains(node.getLocalName()));
}
} |
Class<?>[] getSpecificTargetClasses();
/*
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses... | Class<?>[] getSpecificTargetClasses();
/*
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses... |
public static String formatClassNameForMessage(Class<?> clazz) {
if (clazz == null) {
return "null";
}
StringBuilder fmtd = new StringBuilder();
if (clazz.isArray()) {
int dims = 1;
Class baseClass = clazz.getComponentType();
while (baseClass.isArray()) {
baseClass = baseClass.getComponentType(... | public static String formatClassNameForMessage(Class<?> clazz) {
if (clazz == null) {
return "null";
}
StringBuilder fmtd = new StringBuilder();
if (clazz.isArray()) {
int dims = 1;
Class<?> baseClass = clazz.getComponentType();
while (baseClass.isArray()) {
baseClass = baseClass.getComponentTy... |
public ReflectiveConstructorExecutor(Constructor<?> ctor, int[] argsRequiringConversion) {
this.ctor = ctor;
if (ctor.isVarArgs()) {
Class[] paramTypes = ctor.getParameterTypes();
this.varargsPosition = paramTypes.length - 1;
}
else {
this.varargsPosition = null;
}
this.argsRequiringConversion = a... | public ReflectiveConstructorExecutor(Constructor<?> ctor, int[] argsRequiringConversion) {
this.ctor = ctor;
if (ctor.isVarArgs()) {
Class<?>[] paramTypes = ctor.getParameterTypes();
this.varargsPosition = paramTypes.length - 1;
}
else {
this.varargsPosition = null;
}
this.argsRequiringConversion ... |
public ReflectiveMethodExecutor(Method theMethod, int[] argumentsRequiringConversion) {
this.method = theMethod;
if (theMethod.isVarArgs()) {
Class[] paramTypes = theMethod.getParameterTypes();
this.varargsPosition = paramTypes.length - 1;
}
else {
this.varargsPosition = null;
}
this.argsRequiring... | public ReflectiveMethodExecutor(Method theMethod, int[] argumentsRequiringConversion) {
this.method = theMethod;
if (theMethod.isVarArgs()) {
Class<?>[] paramTypes = theMethod.getParameterTypes();
this.varargsPosition = paramTypes.length - 1;
}
else {
this.varargsPosition = null;
}
this.argsRequir... |
public int compare(Object left, Object right) throws SpelEvaluationException {
// If one is null, check if the other is
if (left == null) {
return right == null ? 0 : -1;
}
else if (right == null) {
return 1; // left cannot be null
}
// Basic number comparisons
if (left instanceof Number && right ... | public int compare(Object left, Object right) throws SpelEvaluationException {
// If one is null, check if the other is
if (left == null) {
return right == null ? 0 : -1;
}
else if (right == null) {
return 1; // left cannot be null
}
// Basic number comparisons
if (left instanceof Number && right ... |
public void setValues(PreparedStatement ps) throws SQLException {
int parameterPosition = 1;
if (this.args != null) {
for (int i = 0; i < this.args.length; i++) {
Object arg = this.args[i];
if (arg instanceof Collection && this.argTypes[i] != Types.ARRAY) {
Collection entries = (Collection) arg;
... | public void setValues(PreparedStatement ps) throws SQLException {
int parameterPosition = 1;
if (this.args != null) {
for (int i = 0; i < this.args.length; i++) {
Object arg = this.args[i];
if (arg instanceof Collection && this.argTypes[i] != Types.ARRAY) {
Collection<?> entries = (Collection<?>) a... |
protected Connection createConnectionProxy(Connection con) {
return (Connection) Proxy.newProxyInstance(
ConnectionProxy.class.getClassLoader(),
new Class[] {ConnectionProxy.class},
new CloseSuppressingInvocationHandler(con));
}
| protected Connection createConnectionProxy(Connection con) {
return (Connection) Proxy.newProxyInstance(
ConnectionProxy.class.getClassLoader(),
new Class<?>[] {ConnectionProxy.class},
new CloseSuppressingInvocationHandler(con));
}
|
public void initializeWithTableColumnMetaData(DatabaseMetaData databaseMetaData,
String catalogName, String schemaName, String tableName) throws SQLException {
if (!this.includeSynonyms) {
logger.debug("Defaulting to no synonyms in table metadata lookup");
super.initializeWithTableColumnMetaData(databaseMe... | public void initializeWithTableColumnMetaData(DatabaseMetaData databaseMetaData,
String catalogName, String schemaName, String tableName) throws SQLException {
if (!this.includeSynonyms) {
logger.debug("Defaulting to no synonyms in table metadata lookup");
super.initializeWithTableColumnMetaData(databaseMe... |
public int getSqlType(String paramName) {
int sqlType = super.getSqlType(paramName);
if (sqlType != TYPE_UNKNOWN) {
return sqlType;
}
Class propType = this.beanWrapper.getPropertyType(paramName);
return StatementCreatorUtils.javaTypeToSqlParameterType(propType);
}
| public int getSqlType(String paramName) {
int sqlType = super.getSqlType(paramName);
if (sqlType != TYPE_UNKNOWN) {
return sqlType;
}
Class<?> propType = this.beanWrapper.getPropertyType(paramName);
return StatementCreatorUtils.javaTypeToSqlParameterType(propType);
}
|
SimpleJdbcCallOperations returningResultSet(String parameterName, RowMapper<?> rowMapper);
/*
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the ... | SimpleJdbcCallOperations returningResultSet(String parameterName, RowMapper<?> rowMapper);
/*
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the ... |
public void afterPropertiesSet() {
if (this.targetDataSources == null) {
throw new IllegalArgumentException("Property 'targetDataSources' is required");
}
this.resolvedDataSources = new HashMap<Object, DataSource>(this.targetDataSources.size());
for (Map.Entry entry : this.targetDataSources.entrySet()) {
... | public void afterPropertiesSet() {
if (this.targetDataSources == null) {
throw new IllegalArgumentException("Property 'targetDataSources' is required");
}
this.resolvedDataSources = new HashMap<Object, DataSource>(this.targetDataSources.size());
for (Map.Entry<Object, Object> entry : this.targetDataSources.... |
protected void validateNamedParameters(Map<String, ?> parameters) throws InvalidDataAccessApiUsageException {
checkCompiled();
Map paramsToUse = (parameters != null ? parameters : Collections.emptyMap());
int declaredInParameters = 0;
for (SqlParameter param : this.declaredParameters) {
if (param.isInputVal... | protected void validateNamedParameters(Map<String, ?> parameters) throws InvalidDataAccessApiUsageException {
checkCompiled();
Map<String, ?> paramsToUse = (parameters != null ? parameters : Collections.<String, Object> emptyMap());
int declaredInParameters = 0;
for (SqlParameter param : this.declaredParameter... |
public C3P0NativeJdbcExtractor() {
try {
this.getRawConnectionMethod = getClass().getMethod("getRawConnection", new Class[] {Connection.class});
}
catch (NoSuchMethodException ex) {
throw new IllegalStateException("Internal error in C3P0NativeJdbcExtractor: " + ex.getMessage());
}
}
| public C3P0NativeJdbcExtractor() {
try {
this.getRawConnectionMethod = getClass().getMethod("getRawConnection", new Class<?>[] {Connection.class});
}
catch (NoSuchMethodException ex) {
throw new IllegalStateException("Internal error in C3P0NativeJdbcExtractor: " + ex.getMessage());
}
}
|
private static Object getInnermostDelegate(Object obj) throws SQLException {
if (obj == null) {
return null;
}
try {
Class classToAnalyze = obj.getClass();
while (!Modifier.isPublic(classToAnalyze.getModifiers())) {
classToAnalyze = classToAnalyze.getSuperclass();
if (classToAnalyze == null) {
... | private static Object getInnermostDelegate(Object obj) throws SQLException {
if (obj == null) {
return null;
}
try {
Class<?> classToAnalyze = obj.getClass();
while (!Modifier.isPublic(classToAnalyze.getModifiers())) {
classToAnalyze = classToAnalyze.getSuperclass();
if (classToAnalyze == null) ... |
public void onMessage(Message message, Session session) throws JMSException {
// Check whether the delegate is a MessageListener impl itself.
// In that case, the adapter will simply act as a pass-through.
Object delegate = getDelegate();
if (delegate != this) {
if (delegate instanceof SessionAwareMessageLi... | public void onMessage(Message message, Session session) throws JMSException {
// Check whether the delegate is a MessageListener impl itself.
// In that case, the adapter will simply act as a pass-through.
Object delegate = getDelegate();
if (delegate != this) {
if (delegate instanceof SessionAwareMessageLi... |
protected void validateDestination(Destination destination, String destinationName, boolean pubSubDomain) {
Class targetClass = Queue.class;
if (pubSubDomain) {
targetClass = Topic.class;
}
if (!targetClass.isInstance(destination)) {
throw new DestinationResolutionException(
"Destination [" + destin... | protected void validateDestination(Destination destination, String destinationName, boolean pubSubDomain) {
Class<?> targetClass = Queue.class;
if (pubSubDomain) {
targetClass = Topic.class;
}
if (!targetClass.isInstance(destination)) {
throw new DestinationResolutionException(
"Destination [" + des... |
public void handleReturnValue(Object returnValue, MethodParameter returnType, Message<?> inputMessage)
throws Exception {
if (returnValue == null) {
return;
}
SimpMessageHeaderAccessor inputHeaders = SimpMessageHeaderAccessor.wrap(inputMessage);
String sessionId = inputHeaders.getSessionId();
Messag... | public void handleReturnValue(Object returnValue, MethodParameter returnType, Message<?> inputMessage)
throws Exception {
if (returnValue == null) {
return;
}
SimpMessageHeaderAccessor inputHeaders = SimpMessageHeaderAccessor.wrap(inputMessage);
String sessionId = inputHeaders.getSessionId();
Messag... |
public void afterPropertiesSet() {
if (getPersistenceManagerFactory() == null) {
throw new IllegalArgumentException("Property 'persistenceManagerFactory' is required");
}
// Build default JdoDialect if none explicitly specified.
if (this.jdoDialect == null) {
this.jdoDialect = new DefaultJdoDialect(getPe... | public void afterPropertiesSet() {
if (getPersistenceManagerFactory() == null) {
throw new IllegalArgumentException("Property 'persistenceManagerFactory' is required");
}
// Build default JdoDialect if none explicitly specified.
if (this.jdoDialect == null) {
this.jdoDialect = new DefaultJdoDialect(getPe... |
private static void assertNonEmptyAnnotationTypeArray(Class<?>[] annotationTypes, String message) {
if (ObjectUtils.isEmpty(annotationTypes)) {
throw new IllegalArgumentException(message);
}
for (Class clazz : annotationTypes) {
if (!Annotation.class.isAssignableFrom(clazz)) {
throw new IllegalArgumen... | private static void assertNonEmptyAnnotationTypeArray(Class<?>[] annotationTypes, String message) {
if (ObjectUtils.isEmpty(annotationTypes)) {
throw new IllegalArgumentException(message);
}
for (Class<?> clazz : annotationTypes) {
if (!Annotation.class.isAssignableFrom(clazz)) {
throw new IllegalArgu... |
protected Connection getCloseSuppressingConnectionProxy(Connection target) {
return (Connection) Proxy.newProxyInstance(
Connection.class.getClassLoader(),
new Class[] {Connection.class},
new CloseSuppressingInvocationHandler(target));
}
| protected Connection getCloseSuppressingConnectionProxy(Connection target) {
return (Connection) Proxy.newProxyInstance(
Connection.class.getClassLoader(),
new Class<?>[] {Connection.class},
new CloseSuppressingInvocationHandler(target));
}
|
protected Connection getTransactionAwareConnectionProxy(Connection target, ConnectionFactory cf) {
return (Connection) Proxy.newProxyInstance(
Connection.class.getClassLoader(),
new Class[] {Connection.class},
new TransactionAwareInvocationHandler(target, cf));
}
| protected Connection getTransactionAwareConnectionProxy(Connection target, ConnectionFactory cf) {
return (Connection) Proxy.newProxyInstance(
Connection.class.getClassLoader(),
new Class<?>[] {Connection.class},
new TransactionAwareInvocationHandler(target, cf));
}
|
public boolean contains(Class exType) {
return super.contains(exType) || (exType != null && exType.isInstance(this.applicationException));
}
} | public boolean contains(Class<?> exType) {
return super.contains(exType) || (exType != null && exType.isInstance(this.applicationException));
}
} |
public void addTransactionalMethod(String name, TransactionAttribute attr) {
Assert.notNull(name, "Name must not be null");
int lastDotIndex = name.lastIndexOf(".");
if (lastDotIndex == -1) {
throw new IllegalArgumentException("'" + name + "' is not a valid method name: format is FQN.methodName");
}
Strin... | public void addTransactionalMethod(String name, TransactionAttribute attr) {
Assert.notNull(name, "Name must not be null");
int lastDotIndex = name.lastIndexOf(".");
if (lastDotIndex == -1) {
throw new IllegalArgumentException("'" + name + "' is not a valid method name: format is FQN.methodName");
}
Strin... |
public void setProperties(Properties transactionAttributes) {
TransactionAttributeEditor tae = new TransactionAttributeEditor();
Enumeration propNames = transactionAttributes.propertyNames();
while (propNames.hasMoreElements()) {
String methodName = (String) propNames.nextElement();
String value = transact... | public void setProperties(Properties transactionAttributes) {
TransactionAttributeEditor tae = new TransactionAttributeEditor();
Enumeration<?> propNames = transactionAttributes.propertyNames();
while (propNames.hasMoreElements()) {
String methodName = (String) propNames.nextElement();
String value = trans... |
public void setAsText(String text) throws IllegalArgumentException {
MethodMapTransactionAttributeSource source = new MethodMapTransactionAttributeSource();
if (StringUtils.hasLength(text)) {
// Use properties editor to tokenize the hold string.
PropertiesEditor propertiesEditor = new PropertiesEditor();
... | public void setAsText(String text) throws IllegalArgumentException {
MethodMapTransactionAttributeSource source = new MethodMapTransactionAttributeSource();
if (StringUtils.hasLength(text)) {
// Use properties editor to tokenize the hold string.
PropertiesEditor propertiesEditor = new PropertiesEditor();
... |
Class<?>[] types() default {};
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE... | Class<?>[] types() default {};
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE... |
public String getSessionId() {
Object session = getExternalContext().getSession(true);
try {
// Both HttpSession and PortletSession have a getId() method.
Method getIdMethod = session.getClass().getMethod("getId", new Class[0]);
return ReflectionUtils.invokeMethod(getIdMethod, session).toString();
}
c... | public String getSessionId() {
Object session = getExternalContext().getSession(true);
try {
// Both HttpSession and PortletSession have a getId() method.
Method getIdMethod = session.getClass().getMethod("getId", new Class<?>[0]);
return ReflectionUtils.invokeMethod(getIdMethod, session).toString();
}
... |
public HtmlCharacterEntityReferences() {
Properties entityReferences = new Properties();
// Load reference definition file
InputStream is = HtmlCharacterEntityReferences.class.getResourceAsStream(PROPERTIES_FILE);
if (is == null) {
throw new IllegalStateException(
"Cannot find reference definition fil... | public HtmlCharacterEntityReferences() {
Properties entityReferences = new Properties();
// Load reference definition file
InputStream is = HtmlCharacterEntityReferences.class.getResourceAsStream(PROPERTIES_FILE);
if (is == null) {
throw new IllegalStateException(
"Cannot find reference definition fil... |
protected void registerHandler(K lookupKey, Object handler, PortletRequestMappingPredicate predicate)
throws BeansException, IllegalStateException {
Assert.notNull(lookupKey, "Lookup key must not be null");
Assert.notNull(handler, "Handler object must not be null");
Object resolvedHandler = handler;
// Ea... | protected void registerHandler(K lookupKey, Object handler, PortletRequestMappingPredicate predicate)
throws BeansException, IllegalStateException {
Assert.notNull(lookupKey, "Lookup key must not be null");
Assert.notNull(handler, "Handler object must not be null");
Object resolvedHandler = handler;
// Ea... |
private ModelAndView getModelAndView(Object returnValue) {
if (returnValue instanceof ModelAndView) {
return (ModelAndView) returnValue;
}
else if (returnValue instanceof Model) {
return new ModelAndView().addAllObjects(((Model) returnValue).asMap());
}
else if (returnValue instanceof Map) {
return ... | private ModelAndView getModelAndView(Object returnValue) {
if (returnValue instanceof ModelAndView) {
return (ModelAndView) returnValue;
}
else if (returnValue instanceof Model) {
return new ModelAndView().addAllObjects(((Model) returnValue).asMap());
}
else if (returnValue instanceof Map) {
return ... |
public void setCacheMappings(Properties cacheMappings) {
this.cacheMappings.clear();
Enumeration propNames = cacheMappings.propertyNames();
while (propNames.hasMoreElements()) {
String path = (String) propNames.nextElement();
this.cacheMappings.put(path, Integer.valueOf(cacheMappings.getProperty(path)));
... | public void setCacheMappings(Properties cacheMappings) {
this.cacheMappings.clear();
Enumeration<?> propNames = cacheMappings.propertyNames();
while (propNames.hasMoreElements()) {
String path = (String) propNames.nextElement();
this.cacheMappings.put(path, Integer.valueOf(cacheMappings.getProperty(path)))... |
* public ModelAndView resolveModelAndView(Method handlerMethod,
* Class handlerType,
* Object returnValue,
* ExtendedModelMap implicitModel,
* NativeWebRequest webRequest) {
* if (returnValue instanceof MySpecialRetVal.class)) {
* return new MySpecialRetVal(returnValue);
* ... | * public ModelAndView resolveModelAndView(Method handlerMethod,
* Class handlerType,
* Object returnValue,
* ExtendedModelMap implicitModel,
* NativeWebRequest webRequest) {
* if (returnValue instanceof MySpecialRetVal.class)) {
* return new MySpecialRetVal(returnValue);
* ... |
private Set<String> getRequestParams(HttpServletRequest request, Set<RequestMappingInfo> partialMatches) {
for (RequestMappingInfo partialMatch : partialMatches) {
ParamsRequestCondition condition = partialMatch.getParamsCondition();
if (!CollectionUtils.isEmpty(condition.getExpressions()) && (condition.getMat... | private Set<String> getRequestParams(HttpServletRequest request, Set<RequestMappingInfo> partialMatches) {
for (RequestMappingInfo partialMatch : partialMatches) {
ParamsRequestCondition condition = partialMatch.getParamsCondition();
if (!CollectionUtils.isEmpty(condition.getExpressions()) && (condition.getMat... |
protected <T> Object readWithMessageConverters(HttpInputMessage inputMessage,
MethodParameter methodParam, Type targetType) throws IOException, HttpMediaTypeNotSupportedException {
MediaType contentType;
try {
contentType = inputMessage.getHeaders().getContentType();
}
catch (InvalidMediaTypeException e... | protected <T> Object readWithMessageConverters(HttpInputMessage inputMessage,
MethodParameter methodParam, Type targetType) throws IOException, HttpMediaTypeNotSupportedException {
MediaType contentType;
try {
contentType = inputMessage.getHeaders().getContentType();
}
catch (InvalidMediaTypeException e... |
public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer,
NativeWebRequest request, WebDataBinderFactory binderFactory) throws Exception {
HttpServletRequest servletRequest = request.getNativeRequest(HttpServletRequest.class);
assertIsMultipartRequest(servletRequest);
Mult... | public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer,
NativeWebRequest request, WebDataBinderFactory binderFactory) throws Exception {
HttpServletRequest servletRequest = request.getNativeRequest(HttpServletRequest.class);
assertIsMultipartRequest(servletRequest);
Mult... |
protected String getHandlerMethodNameForUrlPath(String urlPath) {
String methodName = this.mappings.getProperty(urlPath);
if (methodName != null) {
return methodName;
}
Enumeration propNames = this.mappings.propertyNames();
while (propNames.hasMoreElements()) {
String registeredPath = (String) propName... | protected String getHandlerMethodNameForUrlPath(String urlPath) {
String methodName = this.mappings.getProperty(urlPath);
if (methodName != null) {
return methodName;
}
Enumeration<?> propNames = this.mappings.propertyNames();
while (propNames.hasMoreElements()) {
String registeredPath = (String) propN... |
protected Object[] resolveArguments(Object arguments) throws JspException {
if (arguments instanceof String) {
String[] stringArray =
StringUtils.delimitedListToStringArray((String) arguments, this.argumentSeparator);
if (stringArray.length == 1) {
Object argument = stringArray[0];
if (argument !=... | protected Object[] resolveArguments(Object arguments) throws JspException {
if (arguments instanceof String) {
String[] stringArray =
StringUtils.delimitedListToStringArray((String) arguments, this.argumentSeparator);
if (stringArray.length == 1) {
Object argument = stringArray[0];
if (argument !=... |
protected void writeTagDetails(TagWriter tagWriter) throws JspException {
tagWriter.writeAttribute("type", getInputType());
Object boundValue = getBoundValue();
Class valueType = getBindStatus().getValueType();
if (Boolean.class.equals(valueType) || boolean.class.equals(valueType)) {
// the concrete type ... | protected void writeTagDetails(TagWriter tagWriter) throws JspException {
tagWriter.writeAttribute("type", getInputType());
Object boundValue = getBoundValue();
Class<?> valueType = getBindStatus().getValueType();
if (Boolean.class.equals(valueType) || boolean.class.equals(valueType)) {
// the concrete ty... |
protected Class requiredViewClass() {
return FreeMarkerView.class;
}
} | protected Class<?> requiredViewClass() {
return FreeMarkerView.class;
}
} |
protected Class requiredViewClass() {
return TilesView.class;
}
} | protected Class<?> requiredViewClass() {
return TilesView.class;
}
} |
protected Context createVelocityContext(
Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception {
// Create a ChainedContext instance.
ChainedContext velocityContext = new ChainedContext(
new VelocityContext(model), getVelocityEngine(), request, response, getS... | protected Context createVelocityContext(
Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception {
// Create a ChainedContext instance.
ChainedContext velocityContext = new ChainedContext(
new VelocityContext(model), getVelocityEngine(), request, response, getS... |
protected void exposeHelpers(Map<String, Object> model, HttpServletRequest request) throws Exception {
model.put("myHelper", "myValue");
}
};
vv.setUrl(templateName);
vv.setApplicationContext(wac);
Map<String, Class> toolAttributes = new HashMap<String, Class>();
toolAttributes.put("math", MathTool... | protected void exposeHelpers(Map<String, Object> model, HttpServletRequest request) throws Exception {
model.put("myHelper", "myValue");
}
};
vv.setUrl(templateName);
vv.setApplicationContext(wac);
Map<String, Class<?>> toolAttributes = new HashMap<String, Class<?>>();
toolAttributes.put("math", Ma... |
void handleMessageFromClient(WebSocketSession session, WebSocketMessage<?> message,
/*
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License... | void handleMessageFromClient(WebSocketSession session, WebSocketMessage<?> message,
/*
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License... |
package org.jboss.as.controller.persistence;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2011, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; yo... | package org.jboss.as.controller.persistence;
/*
* JBoss, Home of Professional Open Source.
* Copyright 2011, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; yo... |
protected void doBegin(Object transaction, TransactionDefinition definition) {
HibernateTransactionObject txObject = (HibernateTransactionObject) transaction;
if (txObject.hasConnectionHolder() && !txObject.getConnectionHolder().isSynchronizedWithTransaction()) {
throw new IllegalTransactionStateException(
... | protected void doBegin(Object transaction, TransactionDefinition definition) {
HibernateTransactionObject txObject = (HibernateTransactionObject) transaction;
if (txObject.hasConnectionHolder() && !txObject.getConnectionHolder().isSynchronizedWithTransaction()) {
throw new IllegalTransactionStateException(
... |
public void readElement(final XMLExtendedStreamReader reader, final List<ModelNode> list) throws XMLStreamException {
// No attributes
if (reader.getAttributeCount() > 0) {
throw unexpectedAttribute(reader, 0);
}
final PathAddress address = PathAddress.pathAddress(PathEle... | public void readElement(final XMLExtendedStreamReader reader, final List<ModelNode> list) throws XMLStreamException {
// No attributes
if (reader.getAttributeCount() > 0) {
throw unexpectedAttribute(reader, 0);
}
final PathAddress address = PathAddress.pathAddress(PathEle... |
ConnectorLogger ROOT_LOGGER = Logger.getMessageLogger(ConnectorLogger.class, "org.jboss.as.connector");
/*
* JBoss, Home of Professional Open Source.
* Copyright 2011, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing ... | ConnectorLogger ROOT_LOGGER = Logger.getMessageLogger(ConnectorLogger.class, "org.jboss.as.connector");
/*
* JBoss, Home of Professional Open Source.
* Copyright 2011, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing ... |
protected ProcessingInstructionNode parseProcessingInstruction(XMLStreamReader reader, ElementNode parent) throws XMLStreamException {
ProcessingInstructionNode node = null;
String pi = reader.getPITarget();
Map<String, String> data = parseProcessingInstructionData(reader.getPIData());
... | protected ProcessingInstructionNode parseProcessingInstruction(XMLStreamReader reader, ElementNode parent) throws XMLStreamException {
ProcessingInstructionNode node = null;
String pi = reader.getPITarget();
Map<String, String> data = parseProcessingInstructionData(reader.getPIData());
... |
protected AbstractFileTask(PatchingTaskDescription description, File target, File backup) {
super(description, MiscContentItem.class);
this.target = target;
this.backup = backup;
}
/**
* Create the rollback item.
*
* @param original the original content modification
... | protected AbstractFileTask(PatchingTaskDescription description, File target, File backup) {
super(description, MiscContentItem.class);
this.target = target;
this.backup = backup;
}
/**
* Create the rollback item.
*
* @param original the original content modification
... |
@Message(id = 17118, value = "Destination URI cannot be null while creating an outbound remote connection service")
/*
* JBoss, Home of Professional Open Source.
* Copyright 2011, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a f... | @Message(id = 17118, value = "Destination URI cannot be null while creating an outbound remote connection service")
/*
* JBoss, Home of Professional Open Source.
* Copyright 2011, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a f... |
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final JBossServiceXmlDescriptor serviceXmlDescriptor = deploymentUnit
.getAttachment(JBossServiceXmlDescriptor.AT... | public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final JBossServiceXmlDescriptor serviceXmlDescriptor = deploymentUnit
.getAttachment(JBossServiceXmlDescriptor.AT... |
public void registerAttributes(ManagementResourceRegistration resourceRegistration) {
if (serverEnvironment != null) { // TODO eliminate test cases that result in serverEnviroment == null
if (isDomain) {
resourceRegistration.registerReadOnlyAttribute(NAME, serverEnvironment.getPr... | public void registerAttributes(ManagementResourceRegistration resourceRegistration) {
if (serverEnvironment != null) { // TODO eliminate test cases that result in serverEnvironment == null
if (isDomain) {
resourceRegistration.registerReadOnlyAttribute(NAME, serverEnvironment.getP... |
protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
// Get the batch file name
final String jobXml = req.getParameter(JOB_XML_PARAMETER);
final String timeoutString = req.getParameter(TIMEOUT_PARAM);
final String ... | protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
// Get the batch file name
final String jobXml = req.getParameter(JOB_XML_PARAMETER);
final String timeoutString = req.getParameter(TIMEOUT_PARAM);
final String ... |
public void init(ServletConfig config) throws ServletException {
try {
final KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
final InputStream in = new BufferedInputStream(new FileInputStream("../jcetest.keystore"));
try {
keyStore.loa... | public void init(ServletConfig config) throws ServletException {
try {
final KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
final InputStream in = new BufferedInputStream(new FileInputStream("../jcetest.keystore"));
try {
keyStore.loa... |
public void intercept(InvocationContext ctx) {
aroundConstructCalled = true;
throw new Error("Do not supress me.");
}
| public void intercept(InvocationContext ctx) {
aroundConstructCalled = true;
throw new Error("Do not suppress me.");
}
|
public String help(String arg) {
final StringBuilder sb = new StringBuilder();
if (arg == null) {
for (String s : cmds.keySet()) {
sb.append(s).append("\n");
}
} else {
final Cmd cmd = cmds.get(arg);
if (cmd == null) {
... | public String help(String arg) {
final StringBuilder sb = new StringBuilder();
if (arg == null) {
for (String s : cmds.keySet()) {
sb.append(s).append("\n");
}
} else {
final Cmd cmd = cmds.get(arg);
if (cmd == null) {
... |
public void testClientTransactionManagement() throws Exception {
final StatelessEJBLocator<RemoteBatch> batchBeanLocator = new StatelessEJBLocator<RemoteBatch>(RemoteBatch.class, APP_NAME, MODULE_NAME, BatchCreationBean.class.getSimpleName(), "");
final RemoteBatch batchBean = EJBClient.createProxy(... | public void testClientTransactionManagement() throws Exception {
final StatelessEJBLocator<RemoteBatch> batchBeanLocator = new StatelessEJBLocator<RemoteBatch>(RemoteBatch.class, APP_NAME, MODULE_NAME, BatchCreationBean.class.getSimpleName(), "");
final RemoteBatch batchBean = EJBClient.createProxy(... |
public void testSFSBNotDestroyed() throws SystemException, NotSupportedException {
try {
sfsb.doStuff();
throw new RuntimeException("Expected a EJBTransactionRequiredException");
} catch (EJBTransactionRequiredException e) {
//ignore
}
userTransact... | public void testSFSBNotDestroyed() throws SystemException, NotSupportedException {
try {
sfsb.doStuff();
throw new RuntimeException("Expected an EJBTransactionRequiredException");
} catch (EJBTransactionRequiredException e) {
//ignore
}
userTransac... |
public void run() {
try {
LOGGER.debug("Creating Syslog server socket");
this.serverSocket = createServerSocket();
} catch (IOException e) {
LOGGER.error("ServerSocket creation failed.", e);
throw new SyslogRuntimeException(e);
}
while... | public void run() {
try {
LOGGER.debug("Creating Syslog server socket");
this.serverSocket = createServerSocket();
} catch (IOException e) {
LOGGER.error("ServerSocket creation failed.", e);
throw new SyslogRuntimeException(e);
}
while... |
public void run() {
try {
final BufferedInputStream bis = new BufferedInputStream(socket.getInputStream());
int b = -1;
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
boolean firstByte = true;
boolean octetCounting = false;
... | public void run() {
try {
final BufferedInputStream bis = new BufferedInputStream(socket.getInputStream());
int b = -1;
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
boolean firstByte = true;
boolean octetCounting = false;
... |
public void initialize() throws SyslogRuntimeException {
super.initialize();
// remove BouncyCastle provider if installed
Security.removeProvider("BC");
final SSLTCPNetSyslogServerConfigIF config = (SSLTCPNetSyslogServerConfigIF) this.tcpNetSyslogServerConfig;
try {
... | public void initialize() throws SyslogRuntimeException {
super.initialize();
// remove BouncyCastle provider if installed
Security.removeProvider("BC");
final SSLTCPNetSyslogServerConfigIF config = (SSLTCPNetSyslogServerConfigIF) this.tcpNetSyslogServerConfig;
try {
... |
public static ModelNode executeOp(ModelNode op, ModelControllerClient client) {
ModelNode modelNodeResult;
try {
modelNodeResult = client.execute(op);
} catch (IOException ioe) {
throw new RuntimeException(ioe);
}
if(!SUCCESS.equals(modelNodeR... | public static ModelNode executeOp(ModelNode op, ModelControllerClient client) {
ModelNode modelNodeResult;
try {
modelNodeResult = client.execute(op);
} catch (IOException ioe) {
throw new RuntimeException(ioe);
}
if(!SUCCESS.equals(modelNodeR... |
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
LOGGER.debug("New request comming.");
final GSSCredential credential = DelegationCredentialContext.getDelegCredential();
if (credential == null) {
resp.sendError(HttpServ... | protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
LOGGER.debug("New request coming.");
final GSSCredential credential = DelegationCredentialContext.getDelegCredential();
if (credential == null) {
resp.sendError(HttpServl... |
public void testOrder2(Processor processor) {
Counter.count = 0;
SimpleProcessor.count = 0;
CdiInterceptor.count = 0;
CdiInterceptor2.count = 0;
EjbInterceptor.count = 0;
EjbInterceptor2.count = 0;
int sum = processor.substract(34, 13);
Assert.assert... | public void testOrder2(Processor processor) {
Counter.count = 0;
SimpleProcessor.count = 0;
CdiInterceptor.count = 0;
CdiInterceptor2.count = 0;
EjbInterceptor.count = 0;
EjbInterceptor2.count = 0;
int sum = processor.subtract(34, 13);
Assert.assertE... |
int subtract(int x, int y);
/*
* JBoss, Home of Professional Open Source
* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual
* contributors by the @authors tag. See the copyright.txt in the
* distribution for a full listing of individual contributors.
*
* Licensed under the Apache License, Vers... | int subtract(int x, int y);
/*
* JBoss, Home of Professional Open Source
* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual
* contributors by the @authors tag. See the copyright.txt in the
* distribution for a full listing of individual contributors.
*
* Licensed under the Apache License, Vers... |
public int substract(int x, int y) {
count = Counter.next();
return x - y;
}
} | public int subtract(int x, int y) {
count = Counter.next();
return x - y;
}
} |
public void saveData(String value, ServiceCommand... serviceCommands) throws TestApplicationException {
log.info("[BA COORDINATOR COMPL SERVICE] web method saveData('" + value + "')");
eventLog.foundEventLogName(value);
BusinessActivityManager activityManager = BusinessActivityManagerFactor... | public void saveData(String value, ServiceCommand... serviceCommands) throws TestApplicationException {
log.info("[BA COORDINATOR COMPL SERVICE] web method saveData('" + value + "')");
eventLog.foundEventLogName(value);
BusinessActivityManager activityManager = BusinessActivityManagerFactor... |
public void saveData(String value, ServiceCommand... serviceCommands) throws TestApplicationException {
log.info("[BA PARTICIPANT COMPL SERVICE] invoked saveData('" + value + "')");
eventLog.foundEventLogName(value);
BAParticipantManager participantManager;
BusinessActivity... | public void saveData(String value, ServiceCommand... serviceCommands) throws TestApplicationException {
log.info("[BA PARTICIPANT COMPL SERVICE] invoked saveData('" + value + "')");
eventLog.foundEventLogName(value);
BAParticipantManager participantManager;
BusinessActivity... |
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
if (!DeploymentTypeMarker.isType(DeploymentType.WAR, deploymentUnit)) {
return;
}
final Map<String,... | public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
if (!DeploymentTypeMarker.isType(DeploymentType.WAR, deploymentUnit)) {
return;
}
final Map<String,... |
private static void formatLongBinary(final long value, byte[] buf,
final int offset, final int length,
final boolean negative) {
final int bits = (length - 1) * 8;
final long max = (long) Math.pow(2, bits);
lon... | private static void formatLongBinary(final long value, byte[] buf,
final int offset, final int length,
final boolean negative) {
final int bits = (length - 1) * 8;
final long max = 1l << bits;
long val = Math.a... |
public void initialize(ExtensionContext context) {
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, 1, 0);
subsystem.registerXMLElementWriter(Messaging12SubsystemParser.getInstance());
boolean registerRuntimeOnly = context.isRuntimeOnlyRegistrationValid();
... | public void initialize(ExtensionContext context) {
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, 1, 1);
subsystem.registerXMLElementWriter(Messaging12SubsystemParser.getInstance());
boolean registerRuntimeOnly = context.isRuntimeOnlyRegistrationValid();
... |
public void setup() {
this.tcpClient = new StubTcpOperations();
this.brokerRelay = new StompBrokerRelayMessageHandler(new StubMessageChannel(),
new StubMessageChannel(), new StubMessageChannel(), Arrays.asList("/topic"));
this.brokerRelay.setTcpClient(tcpClient);
}
| public void setup() {
this.tcpClient = new StubTcpOperations();
this.brokerRelay = new StompBrokerRelayMessageHandler(new StubMessageChannel(),
new StubMessageChannel(), new StubMessageChannel(), Arrays.asList("/topic"));
this.brokerRelay.setTcpClient(this.tcpClient);
}
|
public void testEncryptedArchiveRequiresPassword() throws Exception {
try {
SevenZFile sevenZFile = new SevenZFile(getFile("bla.encrypted.7z"));
fail("shouldn't decrypt without a password");
} catch (IOException ex) {
assertEquals("Cannot read encrypted files with... | public void testEncryptedArchiveRequiresPassword() throws Exception {
try {
new SevenZFile(getFile("bla.encrypted.7z"));
fail("shouldn't decrypt without a password");
} catch (IOException ex) {
assertEquals("Cannot read encrypted files without a password",
... |
public TransactionAttribute getTransactionAttribute(Method method, Class<?> targetClass) {
return (ClassUtils.isUserLevelMethod(method) ? this.transactionAttribute : null);
}
| public TransactionAttribute getTransactionAttribute(Method method, Class<?> targetClass) {
return (method == null || ClassUtils.isUserLevelMethod(method) ? this.transactionAttribute : null);
}
|
public static ServiceName getServiceName(String contextName) {
ServiceName deploymentServiceName = Services.JBOSS_DEPLOYMENT.append(contextName);
return SERVICE_NAME_BASE.append(deploymentServiceName.getSimpleName());
}
| public static ServiceName getServiceName(String contextName) {
ServiceName deploymentServiceName = Services.deploymentUnitName(contextName);
return SERVICE_NAME_BASE.append(deploymentServiceName.getSimpleName());
}
|
public void bundleChanged(BundleEvent event) {
if (event.getType() == BundleEvent.INSTALLED) {
AbstractUserBundle userBundle;
try {
userBundle = AbstractUserBundle.assertBundleState(event.getBundle());
} cat... | public void bundleChanged(BundleEvent event) {
if (event.getType() == BundleEvent.INSTALLED) {
AbstractUserBundle userBundle;
try {
userBundle = AbstractUserBundle.assertBundleState(event.getBundle());
} cat... |
public <P> void applyUpdate(final UpdateContext updateContext, final UpdateResultHandler<? super Void, P> resultHandler, final P param) {
// TODO using the deploymentElement cached in the model update method
// has a bad smell
final ServiceName deploymentUnitServiceName = Services.JBOSS_DEPL... | public <P> void applyUpdate(final UpdateContext updateContext, final UpdateResultHandler<? super Void, P> resultHandler, final P param) {
// TODO using the deploymentElement cached in the model update method
// has a bad smell
final ServiceName deploymentUnitServiceName = Services.deployment... |
public <P> void applyUpdate(final UpdateContext updateContext, final UpdateResultHandler<? super Void, P> resultHandler, final P param) {
// TODO using the deploymentElement cached in the model update method
// has a bad smell
final ServiceName deploymentUnitServiceName = Services.JBOSS_DEPL... | public <P> void applyUpdate(final UpdateContext updateContext, final UpdateResultHandler<? super Void, P> resultHandler, final P param) {
// TODO using the deploymentElement cached in the model update method
// has a bad smell
final ServiceName deploymentUnitServiceName = Services.deployment... |
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final DeploymentModuleLoader deploymentModuleLoader = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_MODULE_LOADER);
... | public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final DeploymentModuleLoader deploymentModuleLoader = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_MODULE_LOADER);
... |
public void execute(SpecificationContext specificationContext) {
FeatureSpecificationExecutor executor =
BeanUtils.instantiateClass(this.executorType, FeatureSpecificationExecutor.class);
executor.execute(this, specificationContext);
}
| public void execute(SpecificationContext specificationContext) {
FeatureSpecificationExecutor executor =
BeanUtils.instantiateClass(this.executorType);
executor.execute(this, specificationContext);
}
|
protected static final CustomLoadMetricDefinition INSTANCE = new CustomLoadMetricDefinition();
static final SimpleAttributeDefinition CLASS = SimpleAttributeDefinitionBuilder.create(CommonAttributes.CLASS, ModelType.STRING, false)
.setAllowExpression(true)
.setRestartAllServices()
| protected static final CustomLoadMetricDefinition INSTANCE = new CustomLoadMetricDefinition();
static final SimpleAttributeDefinition CLASS = SimpleAttributeDefinitionBuilder.create(CommonAttributes.CLASS, ModelType.STRING, false)
.setAllowExpression(false)
.setRestartAllServices()
|
protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {
ManagedMap<RuntimeBeanReference, String> cronTaskMap = new ManagedMap<RuntimeBeanReference, String>();
ManagedMap<RuntimeBeanReference, String> fixedDelayTaskMap = new ManagedMap<RuntimeBeanReference, String>();
... | protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {
ManagedMap<RuntimeBeanReference, String> cronTaskMap = new ManagedMap<RuntimeBeanReference, String>();
ManagedMap<RuntimeBeanReference, String> fixedDelayTaskMap = new ManagedMap<RuntimeBeanReference, String>();
... |
public Object configureBean(Object existingBean, String beanName) throws BeansException {
markBeanAsCreated(beanName);
BeanDefinition mbd = getMergedBeanDefinition(beanName);
RootBeanDefinition bd = null;
if (mbd instanceof RootBeanDefinition) {
RootBeanDefinition rbd = (RootBeanDefinition) mbd;
if (SCOP... | public Object configureBean(Object existingBean, String beanName) throws BeansException {
markBeanAsCreated(beanName);
BeanDefinition mbd = getMergedBeanDefinition(beanName);
RootBeanDefinition bd = null;
if (mbd instanceof RootBeanDefinition) {
RootBeanDefinition rbd = (RootBeanDefinition) mbd;
if (rbd.... |
protected RootBeanDefinition getMergedBeanDefinition(
String beanName, BeanDefinition bd, BeanDefinition containingBd)
throws BeanDefinitionStoreException {
synchronized (this.mergedBeanDefinitions) {
RootBeanDefinition mbd = null;
// Check with full lock now in order to enforce the same merged instanc... | protected RootBeanDefinition getMergedBeanDefinition(
String beanName, BeanDefinition bd, BeanDefinition containingBd)
throws BeanDefinitionStoreException {
synchronized (this.mergedBeanDefinitions) {
RootBeanDefinition mbd = null;
// Check with full lock now in order to enforce the same merged instanc... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.