buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public MappingJackson2HttpMessageConverter() { super(new MediaType("application", "json", DEFAULT_CHARSET)); }
public MappingJackson2HttpMessageConverter() { super(new MediaType("application", "json", DEFAULT_CHARSET), new MediaType("application", "*+json", DEFAULT_CHARSET)); }
public MappingJacksonHttpMessageConverter() { super(new MediaType("application", "json", DEFAULT_CHARSET)); }
public MappingJacksonHttpMessageConverter() { super(new MediaType("application", "json", DEFAULT_CHARSET), new MediaType("application", "*+json", DEFAULT_CHARSET)); }
package org.jboss.as.demos.ejb3.archive; /* * 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; you ca...
package org.jboss.as.demos.ejb3.archive; /* * 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; you ca...
package org.jboss.as.demos.ejb3.archive; /* * JBoss, Home of Professional Open Source. * Copyright 2010, 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; you ca...
package org.jboss.as.demos.ejb3.archive; /* * JBoss, Home of Professional Open Source. * Copyright 2010, 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; you ca...
package org.jboss.as.demos.ejb3.archive; /* * JBoss, Home of Professional Open Source. * Copyright (c) 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.demos.ejb3.archive; /* * JBoss, Home of Professional Open Source. * Copyright (c) 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.demos.ejb3.archive; /* * JBoss, Home of Professional Open Source. * Copyright (c) 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.demos.ejb3.archive; /* * JBoss, Home of Professional Open Source. * Copyright (c) 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...
public Boolean invoke(Cache<K, V> cache) { boolean locked = cache.getAdvancedCache().lock(Collections.singleton(key)); if (locked) { cache.getAdvancedCache().withFlags(Flag.SKIP_LOCKING).evict(this.key); } return locked; }
public Boolean invoke(Cache<K, V> cache) { boolean locked = cache.getAdvancedCache().lock(Collections.singleton(this.key)); if (locked) { cache.getAdvancedCache().withFlags(Flag.SKIP_LOCKING).evict(this.key); } return locked; }
public <L> SSOManager<L> createSSOManager(LocalContextFactory<L> localContextFactory) { Cache<String, CoarseSSOCacheEntry<L>> cache = (Cache<String, CoarseSSOCacheEntry<L>>) this.cache.getValue(); SSOFactory<CoarseSSOCacheEntry<L>, L> factory = new CoarseSSOFactory<>(cache, this.invoker, localContex...
public <L> SSOManager<L> createSSOManager(LocalContextFactory<L> localContextFactory) { Cache<String, CoarseSSOCacheEntry<L>> cache = this.cache.getValue(); SSOFactory<CoarseSSOCacheEntry<L>, L> factory = new CoarseSSOFactory<>(cache, this.invoker, localContextFactory); return new Infinispan...
public void setAuthenticationType(AuthenticationType type) { this.authType = authType; }
public void setAuthenticationType(AuthenticationType type) { this.authType = type; }
public void test() throws InterruptedException { String evictedSessionId = "evicted"; String activeSessionId = "active"; Session<Void> evictedSession = mock(Session.class); Session<Void> activeSession = mock(Session.class); Batcher batcher = mock(Batcher.class); Evict...
public void test() { String evictedSessionId = "evicted"; String activeSessionId = "active"; Session<Void> evictedSession = mock(Session.class); Session<Void> activeSession = mock(Session.class); Batcher batcher = mock(Batcher.class); Evictor<String> evictor = mock(Ev...
public void getServletContext() { DeploymentInfo info = mock(DeploymentInfo.class); ServletContainer container = mock(ServletContainer.class); when(this.deployment.getDeploymentInfo()).thenReturn(info); ServletContextImpl context = new ServletContextImpl(container, deployment); ...
public void getServletContext() { DeploymentInfo info = mock(DeploymentInfo.class); ServletContainer container = mock(ServletContainer.class); when(this.deployment.getDeploymentInfo()).thenReturn(info); ServletContextImpl context = new ServletContextImpl(container, this.deployment);...
public <T> T getBusinessObject(SessionContext ctx, Class<T> businessInterface) throws IllegalStateException { final Serializable sessionId = ((SessionBeanComponentInstance.SessionBeanComponentInstanceContext) ctx).getId(); if (viewServices.containsKey(businessInterface.getName())) { fin...
public <T> T getBusinessObject(SessionContext ctx, Class<T> businessInterface) throws IllegalStateException { final Serializable sessionId = ((SessionBeanComponentInstance.SessionBeanComponentInstanceContext) ctx).getId(); if (viewServices.containsKey(businessInterface.getName())) { fin...
public <T> T convertIfNecessary(String propertyName, Object oldValue, Object newValue, Class<T> requiredType, TypeDescriptor typeDescriptor) throws IllegalArgumentException { Object convertedValue = newValue; // Custom editor for this type? PropertyEditor editor = this.propertyEditorRegistry.findCustomEdito...
public <T> T convertIfNecessary(String propertyName, Object oldValue, Object newValue, Class<T> requiredType, TypeDescriptor typeDescriptor) throws IllegalArgumentException { Object convertedValue = newValue; // Custom editor for this type? PropertyEditor editor = this.propertyEditorRegistry.findCustomEdito...
public TransformedOperation transformOperation(TransformationContext context, PathAddress address, ModelNode operation) throws OperationFailedException { ModelNode transformed = operation; if (transformed.get(NAME).equals(BOOT_TIME) || transformed.get(NAME...
public TransformedOperation transformOperation(TransformationContext context, PathAddress address, ModelNode operation) throws OperationFailedException { ModelNode transformed = operation; if (transformed.get(NAME).asString().equals(BOOT_TIME)) { ...
private boolean processMapping(String securityDomain, ModelNode node, ApplicationPolicy applicationPolicy) { node = peek(node, MAPPING, CLASSIC); if (node == null) return false; List<ModelNode> modules = node.get(MAPPING_MODULES).asList(); for (ModelNode module : module...
private boolean processMapping(String securityDomain, ModelNode node, ApplicationPolicy applicationPolicy) { node = peek(node, MAPPING, CLASSIC); if (node == null) return false; List<ModelNode> modules = node.get(MAPPING_MODULES).asList(); for (ModelNode module : module...
public void testEvictQueryCache() throws Exception { SFSB2LC sfsb = lookup("SFSB2LC", SFSB2LC.class); String id = "3"; String message = sfsb.queryCacheCheck(id); if (!message.equals("OK")){ fail(message); } // evict query cache sfsb.evictQueryCache(); message = sfsb.queryCach...
public void testEvictQueryCache() throws Exception { SFSB2LC sfsb = lookup("SFSB2LC", SFSB2LC.class); String id = "3"; String message = sfsb.queryCacheCheck(id); if (!message.equals("OK")){ fail(message); } // evict query cache sfsb.evictQueryCache(); message = sfsb.queryCach...
public static ChannelServer create(final Configuration configuration) throws IOException { if (configuration == null) { throw new IllegalArgumentException("Null configuration"); } configuration.validate(); final Endpoint endpoint = Remoting.createEndpoint(configuration.g...
public static ChannelServer create(final Configuration configuration) throws IOException { if (configuration == null) { throw new IllegalArgumentException("Null configuration"); } configuration.validate(); final Endpoint endpoint = Remoting.createEndpoint(configuration.g...
public static ChannelServer create(final Configuration configuration) throws IOException { if (configuration == null) { throw new IllegalArgumentException("Null configuration"); } configuration.validate(); final Endpoint endpoint = Remoting.createEndpoint(configuration.g...
public static ChannelServer create(final Configuration configuration) throws IOException { if (configuration == null) { throw new IllegalArgumentException("Null configuration"); } configuration.validate(); final Endpoint endpoint = Remoting.createEndpoint(configuration.g...
public void start(final StartContext context) throws StartException { try { NetworkServerProvider networkServerProvider = endpointValue.getValue().getConnectionProviderInterface("remote", NetworkServerProvider.class); ServerAuthenticationProvider sap = authenticationProviderValue.get...
public void start(final StartContext context) throws StartException { try { NetworkServerProvider networkServerProvider = endpointValue.getValue().getConnectionProviderInterface("remote", NetworkServerProvider.class); ServerAuthenticationProvider sap = authenticationProviderValue.get...
protected <T> void writeWithMessageConverters(T returnValue, MethodParameter returnType, ServletServerHttpRequest inputMessage, ServletServerHttpResponse outputMessage) throws IOException, HttpMediaTypeNotAcceptableException { Class<?> returnValueClass = returnValue.getClass()...
protected <T> void writeWithMessageConverters(T returnValue, MethodParameter returnType, ServletServerHttpRequest inputMessage, ServletServerHttpResponse outputMessage) throws IOException, HttpMediaTypeNotAcceptableException { Class<?> returnValueClass = returnValue.getClass()...
public static final String SUBSYSTEM_NAME = "infinispan"; static final PathElement SUBSYSTEM_PATH = PathElement.pathElement(ModelDescriptionConstants.SUBSYSTEM, SUBSYSTEM_NAME); public static final String RESOURCE_NAME = InfinispanExtension.class.getPackage().getName() + "." +"LocalDescriptions";
public static final String SUBSYSTEM_NAME = "infinispan"; static final PathElement SUBSYSTEM_PATH = PathElement.pathElement(ModelDescriptionConstants.SUBSYSTEM, SUBSYSTEM_NAME); public static final String RESOURCE_NAME = InfinispanExtension.class.getPackage().getName() + ".LocalDescriptions";
public Set<K> invoke(Cache<Address, Map.Entry<K, V>> cache) { Collection<Address> oldMembers = event.getOldMembers(); Collection<Address> newMembers = event.getNewMembers(); Set<K> removed = new HashSet<K>(); // Remove entry of crashed member ...
public Set<K> invoke(Cache<Address, Map.Entry<K, V>> cache) { Collection<Address> oldMembers = event.getOldMembers(); Collection<Address> newMembers = event.getNewMembers(); Set<K> removed = new HashSet<K>(); // Remove entry of crashed member ...
public void open(Map conf, TopologyContext context, SpoutOutputCollector collector) { _collector = collector; if(_local_drpc_id==null) { int numTasks = context.getComponentTasks(context.getThisComponentId()).size(); int index = context.getThisTaskIndex(); int por...
public void open(Map conf, TopologyContext context, SpoutOutputCollector collector) { _collector = collector; if(_local_drpc_id==null) { int numTasks = context.getComponentTasks(context.getThisComponentId()).size(); int index = context.getThisTaskIndex(); int por...
private void setupSSLFactories(final Properties props) throws OperationFailedException { boolean supportSSL = "on".equalsIgnoreCase(props.getProperty(Constants.SECURITY_SUPPORT_SSL)); if (supportSSL) { // if SSL is to be used, check if a security domain has been specified. S...
private void setupSSLFactories(final Properties props) throws OperationFailedException { boolean supportSSL = "on".equalsIgnoreCase(props.getProperty(Constants.SECURITY_SUPPORT_SSL)); if (supportSSL) { // if SSL is to be used, check if a security domain has been specified. S...
public TypedValue lookupVariable(String name) { Object value = this.relatedContext.lookupVariable(name); if (value == null) { return TypedValue.NULL_TYPED_VALUE; } else { return new TypedValue(value, TypeDescriptor.forObject(value)); } }
public TypedValue lookupVariable(String name) { Object value = this.relatedContext.lookupVariable(name); if (value == null) { return TypedValue.NULL; } else { return new TypedValue(value, TypeDescriptor.forObject(value)); } }
public TypedValue getValueInternal(ExpressionState state) throws EvaluationException { TypedValue currentContext = state.getActiveContextObject(); Object[] arguments = new Object[getChildCount()]; for (int i = 0; i < arguments.length; i++) { // Make the root object the active context again for evaluating the ...
public TypedValue getValueInternal(ExpressionState state) throws EvaluationException { TypedValue currentContext = state.getActiveContextObject(); Object[] arguments = new Object[getChildCount()]; for (int i = 0; i < arguments.length; i++) { // Make the root object the active context again for evaluating the ...
public TypedValue getLiteralValue() { return TypedValue.NULL_TYPED_VALUE; }
public TypedValue getLiteralValue() { return TypedValue.NULL; }
private void assertTypedValueNotNull(TypedValue typedValue) { if (TypedValue.NULL_TYPED_VALUE.equals(typedValue)) { throw new SpelEvaluationException(SpelMessage.TYPE_CONVERSION_ERROR, "null", "boolean"); } }
private void assertTypedValueNotNull(TypedValue typedValue) { if (TypedValue.NULL.equals(typedValue)) { throw new SpelEvaluationException(SpelMessage.TYPE_CONVERSION_ERROR, "null", "boolean"); } }
public BooleanTypedValue getValueInternal(ExpressionState state) throws EvaluationException { try { TypedValue typedValue = children[0].getValueInternal(state); if (TypedValue.NULL_TYPED_VALUE.equals(typedValue)) { throw new SpelEvaluationException(SpelMessage.TYPE_CONVERSION_ERROR, "null", "boolean"); ...
public BooleanTypedValue getValueInternal(ExpressionState state) throws EvaluationException { try { TypedValue typedValue = children[0].getValueInternal(state); if (TypedValue.NULL.equals(typedValue)) { throw new SpelEvaluationException(SpelMessage.TYPE_CONVERSION_ERROR, "null", "boolean"); } boolean...
public TypedValue getValueInternal(ExpressionState state) throws EvaluationException { TypedValue op = state.getActiveContextObject(); Object operand = op.getValue(); boolean operandIsArray = ObjectUtils.isArray(operand); // TypeDescriptor operandTypeDescriptor = op.getTypeDescriptor(); // When the input...
public TypedValue getValueInternal(ExpressionState state) throws EvaluationException { TypedValue op = state.getActiveContextObject(); Object operand = op.getValue(); boolean operandIsArray = ObjectUtils.isArray(operand); // TypeDescriptor operandTypeDescriptor = op.getTypeDescriptor(); // When the input...
private TypedValue readProperty(ExpressionState state, String name) throws EvaluationException { TypedValue contextObject = state.getActiveContextObject(); Object targetObject = contextObject.getValue(); if (targetObject == null && nullSafe) { return TypedValue.NULL_TYPED_VALUE; } PropertyAccessor acces...
private TypedValue readProperty(ExpressionState state, String name) throws EvaluationException { TypedValue contextObject = state.getActiveContextObject(); Object targetObject = contextObject.getValue(); if (targetObject == null && nullSafe) { return TypedValue.NULL; } PropertyAccessor accessorToUse = t...
private TypedValue toTypedValue(Object object) { if (object == null) { return TypedValue.NULL_TYPED_VALUE; } else { return new TypedValue(object); } }
private TypedValue toTypedValue(Object object) { if (object == null) { return TypedValue.NULL; } else { return new TypedValue(object); } }
public void setRootObject(Object rootObject) { if (this.rootObject == null) { this.rootObject = TypedValue.NULL_TYPED_VALUE; } else { this.rootObject = new TypedValue(rootObject);//, TypeDescriptor.forObject(rootObject)); } }
public void setRootObject(Object rootObject) { if (this.rootObject == null) { this.rootObject = TypedValue.NULL; } else { this.rootObject = new TypedValue(rootObject);//, TypeDescriptor.forObject(rootObject)); } }
public static final SimpleAttributeDefinition MAP_GROUPS_TO_ROLES = new SimpleAttributeDefinitionBuilder(ModelDescriptionConstants.MAP_GROUPS_TO_ROLES, ModelType.BOOLEAN, true) .setDefaultValue(new ModelNode(false)) .setAllowExpression(true)
public static final SimpleAttributeDefinition MAP_GROUPS_TO_ROLES = new SimpleAttributeDefinitionBuilder(ModelDescriptionConstants.MAP_GROUPS_TO_ROLES, ModelType.BOOLEAN, true) .setDefaultValue(new ModelNode(true)) .setAllowExpression(true)
public AnnotatedGenericBeanDefinition(Class beanClass) { setBeanClass(beanClass); this.annotationMetadata = new StandardAnnotationMetadata(beanClass); }
public AnnotatedGenericBeanDefinition(Class beanClass) { setBeanClass(beanClass); this.annotationMetadata = new StandardAnnotationMetadata(beanClass, true); }
protected void validateXml(String configId, String original, String marshalled) throws Exception { //FIXME remove this and marshall properly } }
protected void compareXml(String configId, String original, String marshalled) throws Exception { //FIXME remove this and marshall properly } }
protected void setUp() throws Exception { super.setUp(); b = DistributionFactory.newInstance().createBinomailDistribution(10, 0.70); }
protected void setUp() throws Exception { super.setUp(); b = DistributionFactory.newInstance().createBinomialDistribution(10, 0.70); }
public static void beforeTestClass() throws Exception { // the node name that the test methods can use nodeName = EJBManagementUtil.getNodeName("localhost", 9999); logger.info("Using node name " + nodeName); }
public static void beforeTestClass() throws Exception { // the node name that the test methods can use nodeName = EJBManagementUtil.getNodeName(); logger.info("Using node name " + nodeName); }
private void deflate() throws IOException { int len = def.deflate(outputBuffer, 0, outputBuffer.length); if (len > 0) { writeCounted(outputBuffer, 0, len); } }
private void deflateUntilInputIsNeeded() throws IOException { while (!def.needsInput()) { deflate(); } } void deflate() throws IOException { int len = def.deflate(outputBuffer, 0, outputBuffer.length); if (len > 0) { writeCounted(outputBuffer, 0, len)...
private int readFromInflater(byte[] buffer, int start, int length) throws IOException { int read = 0; do { if (inf.needsInput()) { int l = fill(); if (l > 0) { current.bytesReadFromStream += buf.limit(); } else i...
private int readFromInflater(byte[] buffer, int start, int length) throws IOException { int read = 0; do { if (inf.needsInput()) { int l = fill(); if (l > 0) { current.bytesReadFromStream += buf.limit(); } else i...
public static <K> Boolean getBoolean(final Map<? super K, ?> map, final K key) { if (map != null) { Object answer = map.get(key); if (answer != null) { if (answer instanceof Boolean) { return (Boolean) answer; } if (...
public static <K> Boolean getBoolean(final Map<? super K, ?> map, final K key) { if (map != null) { Object answer = map.get(key); if (answer != null) { if (answer instanceof Boolean) { return (Boolean) answer; } if (...
public ComparatorChain(Comparator<E> comparator, boolean reverse) { comparatorChain = new ArrayList<Comparator<E>>(); comparatorChain.add(comparator); orderingBits = new BitSet(1); if (reverse == true) { orderingBits.set(0); } }
public ComparatorChain(Comparator<E> comparator, boolean reverse) { comparatorChain = new ArrayList<Comparator<E>>(1); comparatorChain.add(comparator); orderingBits = new BitSet(1); if (reverse == true) { orderingBits.set(0); } }
public static Collection<Object[]> data() { Object[][] data = new Object[][] { { "subsystem-infinispan_1_0.xml", 31 }, { "subsystem-infinispan_1_1.xml", 31 }, { "subsystem-infinispan_1_2.xml", 31 } ...
public static Collection<Object[]> data() { Object[][] data = new Object[][] { { "subsystem-infinispan_1_0.xml", 31 }, { "subsystem-infinispan_1_1.xml", 31 }, { "subsystem-infinispan_1_2.xml", 35 } ...
public final String[] selectImports(AnnotationMetadata importingClassMetadata) { Class<?> annoType = GenericTypeResolver.resolveTypeArgument(this.getClass(), AdviceModeImportSelector.class); AnnotationAttributes attributes = AnnotationConfigUtils.attributesFor(importingClassMetadata, annoType); Assert.notNull(at...
public final String[] selectImports(AnnotationMetadata importingClassMetadata) { Class<?> annoType = GenericTypeResolver.resolveTypeArgument(getClass(), AdviceModeImportSelector.class); AnnotationAttributes attributes = AnnotationConfigUtils.attributesFor(importingClassMetadata, annoType); Assert.notNull(attribu...
private final AnnotationMetadata annotationMetadata; SimpleMetadataReader(Resource resource, ClassLoader classLoader) throws IOException { InputStream is = new BufferedInputStream(resource.getInputStream()); ClassReader classReader = null; try { classReader = new ClassReader(is); } finally { is.clos...
private final AnnotationMetadata annotationMetadata; SimpleMetadataReader(Resource resource, ClassLoader classLoader) throws IOException { InputStream is = new BufferedInputStream(resource.getInputStream()); ClassReader classReader = null; try { classReader = new ClassReader(is); } finally { is.clos...
private LockResult acquireSessionOwnership(MarshalledValue<K, C> key, boolean newLock) { if (this.lockManager == null) return null; Serializable lockKey = this.lockKeyFactory.createLockKey(key); this.trace("Acquiring %slock on %s", newLock ? "new " : "", lockKey); try { ...
private LockResult acquireSessionOwnership(MarshalledValue<K, C> key, boolean newLock) { if (this.lockManager == null) return null; Serializable lockKey = this.lockKeyFactory.createLockKey(key); this.trace("Acquiring %slock on %s", newLock ? "new " : "", lockKey); try { ...
public void initializeParsers(ExtensionParsingContext context) { for (Namespace namespace: Namespace.values()) { if (namespace != Namespace.UNKNOWN) { context.setSubsystemXmlMapping(namespace.getUri(), namespace.getReader()); } } }
public void initializeParsers(ExtensionParsingContext context) { for (Namespace namespace: Namespace.values()) { if (namespace != Namespace.UNKNOWN) { context.setSubsystemXmlMapping(SUBSYSTEM_NAME, namespace.getUri(), namespace.getReader()); } } }
public LockResult acquireSessionOwnership(String sessionId, boolean newLock) throws TimeoutException, InterruptedException { ROOT_LOGGER.tracef("acquireSessionOwnership(%s, %s)", sessionId, newLock); EmbeddedCacheManager container = (EmbeddedCacheManager) this.sessionCache.getCacheManager(); ...
public LockResult acquireSessionOwnership(String sessionId, boolean newLock) throws TimeoutException, InterruptedException { ROOT_LOGGER.tracef("acquireSessionOwnership(%s, %s)", sessionId, newLock); EmbeddedCacheManager container = (EmbeddedCacheManager) this.sessionCache.getCacheManager(); ...
private ModelNode resolveRewriteExpressions(OperationContext context, ModelNode unresolvedRewriteChildren) throws OperationFailedException { ModelNode result = new ModelNode(); for (Property prop : unresolvedRewriteChildren.asPropertyList()) { ModelNode resolvedParent = resolveExpression...
private ModelNode resolveRewriteExpressions(OperationContext context, ModelNode unresolvedRewriteChildren) throws OperationFailedException { ModelNode result = new ModelNode(); for (Property prop : unresolvedRewriteChildren.asPropertyList()) { ModelNode resolvedParent = resolveExpression...
private static ModelNode createProtocolStackOperationDescription(String operation, ResourceBundle resources) { return createOperationDescription(operation, resources, "jgroups.stack" + operation); }
private static ModelNode createProtocolStackOperationDescription(String operation, ResourceBundle resources) { return createOperationDescription(operation, resources, "jgroups.stack." + operation); }
public void testMessageNumber() { Assert.assertEquals(318, LocalizedFormats.values().length); }
public void testMessageNumber() { Assert.assertEquals(319, LocalizedFormats.values().length); }
public void messageDeliverExceptionIfSystemSessionForwardFails() throws Exception { StompHeaderAccessor headers = StompHeaderAccessor.create(StompCommand.MESSAGE); this.relay.handleMessage(MessageBuilder.withPayloadAndHeaders("test", headers).build()); }
public void messageDeliverExceptionIfSystemSessionForwardFails() throws Exception { StompHeaderAccessor headers = StompHeaderAccessor.create(StompCommand.SEND); this.relay.handleMessage(MessageBuilder.withPayloadAndHeaders("test", headers).build()); }
package org.jboss.as.jsr88.spi; /* * 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; you can redistr...
package org.jboss.as.jsr88.spi; /* * 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; you can redistr...
package org.jboss.as.jsr88.spi; /* * JBoss, Home of Professional Open Source. * Copyright 2008, Red Hat Middleware LLC, 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; you ca...
package org.jboss.as.jsr88.spi; /* * JBoss, Home of Professional Open Source. * Copyright 2008, Red Hat Middleware LLC, 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; you ca...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ModuleLoader moduleLoader = Module.getSystemModuleLoader(); final ModuleSpecification moduleSpecification = deploym...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ModuleLoader moduleLoader = Module.getBootModuleLoader(); final ModuleSpecification moduleSpecification = deploymen...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION); final Co...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION); final Co...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ModuleLoader moduleLoader = Module.getSystemModuleLoader(); final ModuleSpecification moduleSpecification = deploym...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ModuleLoader moduleLoader = Module.getBootModuleLoader(); final ModuleSpecification moduleSpecification = deploymen...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ModuleLoader moduleLoader = Module.getSystemModuleLoader(); final ModuleSpecification moduleSpecification = deploym...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ModuleLoader moduleLoader = Module.getBootModuleLoader(); final ModuleSpecification moduleSpecification = deploymen...
public static ModuleLoader getModuleLoader(File modulePath, String... systemPackages) { if (modulePath == null || modulePath.isDirectory() == false) throw new IllegalArgumentException("Invalid module path: " + modulePath); String oldClassPath = SecurityActions.getSystemProperty("java.c...
public static ModuleLoader getModuleLoader(File modulePath, String... systemPackages) { if (modulePath == null || modulePath.isDirectory() == false) throw new IllegalArgumentException("Invalid module path: " + modulePath); String oldClassPath = SecurityActions.getSystemProperty("java.c...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION); List<Res...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION); List<Res...
public static void startServer() throws Exception { ServerEnvironment serverEnvironment = Main.determineEnvironment(new String[0], new Properties(System.getProperties()), System.getenv()); Assert.assertNotNull(serverEnvironment); final Bootstrap bootstrap = Bootstrap.Factory.newInstance(); ...
public static void startServer() throws Exception { ServerEnvironment serverEnvironment = Main.determineEnvironment(new String[0], new Properties(System.getProperties()), System.getenv()); Assert.assertNotNull(serverEnvironment); final Bootstrap bootstrap = Bootstrap.Factory.newInstance(); ...
void testServersReconnectToRestartedServerManager() throws Exception; /* * JBoss, Home of Professional Open Source. * Copyright 2010, 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. * * ...
void testServersReconnectToRestartedServerManager() throws Exception; /* * JBoss, Home of Professional Open Source. * Copyright 2010, 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. * * ...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { context.completeStep(); // On the way out, fix up the response final boolean isDomain = isDomainOperation(operation); boolean shouldContinue = collectDomainFailure(context, isDomain...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { context.completeStep(); // On the way out, fix up the response final boolean isDomain = isDomainOperation(operation); boolean shouldContinue = collectDomainFailure(context, isDomain...
protected DeploymentScannerSubsystemDefinition() { super(PathElement.pathElement(ModelDescriptionConstants.SUBSYSTEM, DeploymentScannerExtension.SUBSYSTEM_NAME), DeploymentScannerExtension.getResourceDescriptionResolver(DeploymentScannerExtension.SUBSYSTEM_NAME), DeploymentSc...
protected DeploymentScannerSubsystemDefinition() { super(PathElement.pathElement(ModelDescriptionConstants.SUBSYSTEM, DeploymentScannerExtension.SUBSYSTEM_NAME), DeploymentScannerExtension.getResourceDescriptionResolver("deployment.scanner.subsystem"), DeploymentScannerSubsys...
public static ServiceName getSecurityDomainServiceName(PathAddress pathAddress) { PathAddress domain = Util.getParentAddressByKey(pathAddress, Constants.SECURITY_DOMAIN); if (domain == null) throw new IllegalArgumentException("Address did not contain a security domain name"); ret...
public static ServiceName getSecurityDomainServiceName(PathAddress pathAddress) { PathAddress domain = Util.getParentAddressByKey(pathAddress, Constants.SECURITY_DOMAIN); if (domain == null) throw SecurityMessages.MESSAGES.addressDidNotContainSecurityDomain(); return SecurityDoma...
public void remove() { throw new UnsupportedOperationException("remove() method not supported for an NodeListIterator."); }
public void remove() { throw new UnsupportedOperationException("remove() method not supported for a NodeListIterator."); }
public ClassicalRungeKuttaIntegrator(double step) { super(false, c, a, b, new ClassicalRungeKuttaStepInterpolator(), step); }
public ClassicalRungeKuttaIntegrator(double step) { super(c, a, b, new ClassicalRungeKuttaStepInterpolator(), step); }
public EulerIntegrator(double step) { super(false, c, a, b, new EulerStepInterpolator(), step); }
public EulerIntegrator(double step) { super(c, a, b, new EulerStepInterpolator(), step); }
public GillIntegrator(double step) { super(false, c, a, b, new GillStepInterpolator(), step); }
public GillIntegrator(double step) { super(c, a, b, new GillStepInterpolator(), step); }
public MidpointIntegrator(double step) { super(false, c, a, b, new MidpointStepInterpolator(), step); }
public MidpointIntegrator(double step) { super(c, a, b, new MidpointStepInterpolator(), step); }
public ThreeEighthesIntegrator(double step) { super(false, c, a, b, new ThreeEighthesStepInterpolator(), step); }
public ThreeEighthesIntegrator(double step) { super(c, a, b, new ThreeEighthesStepInterpolator(), step); }
protected void performBoottime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException { newControllers.addAll(installRuntimeServices(context, model, verificationHandler)); ...
protected void performBoottime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException { newControllers.addAll(installRuntimeServices(context, model, verificationHandler)); ...
public void testInputSigmaOutOfRange() { double[] startPoint = point(DIM,0.5); double[] insigma = point(DIM, 1.1); double[][] boundaries = boundaries(DIM,-1,2); RealPointValuePair expected = new RealPointValuePair(point(DIM,1.0),0.0); doTest(new Rosen(), startPoin...
public void testInputSigmaOutOfRange() { double[] startPoint = point(DIM,0.5); double[] insigma = point(DIM, 1.1); double[][] boundaries = boundaries(DIM,-0.5,0.5); RealPointValuePair expected = new RealPointValuePair(point(DIM,1.0),0.0); doTest(new Rosen(), start...
public void validateResolvedParameter(String parameterName, ModelNode value) throws OperationFailedException { validateParameter(parameterName, value.resolve()); } });;
public void validateResolvedParameter(String parameterName, ModelNode value) throws OperationFailedException { validateParameter(parameterName, value.resolve()); } });
public void validateResolvedParameter(String parameterName, ModelNode value) throws OperationFailedException { validateParameter(parameterName, value.resolve()); } }); static SimpleAttributeDefinition DATASOURCE_DRIVER = new SimpleAttributeDefinition(DATASOURCE_DRIVER_NAME, DataSou...
public void validateResolvedParameter(String parameterName, ModelNode value) throws OperationFailedException { validateParameter(parameterName, value.resolve()); } }); static SimpleAttributeDefinition DATASOURCE_DRIVER = new SimpleAttributeDefinition(DATASOURCE_DRIVER_NAME, DataSou...
private static EjbJarMetaData parseJBossEjb3Xml(final DeploymentUnit deploymentUnit) throws DeploymentUnitProcessingException { final VirtualFile deploymentRoot = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT).getRoot(); // Locate the descriptor final VirtualFile descriptor = get...
private static EjbJarMetaData parseJBossEjb3Xml(final DeploymentUnit deploymentUnit) throws DeploymentUnitProcessingException { final VirtualFile deploymentRoot = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT).getRoot(); // Locate the descriptor final VirtualFile descriptor = get...
public static ServiceName getPooledConnectionFactoryBaseServiceName(ServiceName hornetqServiceName) { return hornetqServiceName.append(JMS).append(JMS_POOLED_CF_BASE); } static String AUTO_GROUP_METHOD = "autoGroup"; static String BLOCK_ON_ACK_METHOD = "blockOnAcknowledge"; static String BL...
public static ServiceName getPooledConnectionFactoryBaseServiceName(ServiceName hornetqServiceName) { return hornetqServiceName.append(JMS).append(JMS_POOLED_CF_BASE); } static String AUTO_GROUP_METHOD = "autoGroup"; static String BLOCK_ON_ACK_METHOD = "blockOnAcknowledge"; static String BL...
private static List<ServletMetaData> getWebServiceServlets(final DeploymentUnit unit, final boolean jaxws) { final JBossWebMetaData jbossWebMD = getJBossWebMetaData(unit); return selectWebServiceServlets(unit, jbossWebMD.getServlets(), jaxws); }
private static List<ServletMetaData> getWebServiceServlets(final DeploymentUnit unit, final boolean jaxws) { final JBossWebMetaData jbossWebMD = getJBossWebMetaData(unit); return selectWebServiceServlets(unit, jbossWebMD != null ? jbossWebMD.getServlets() : null, jaxws); }
protected void processWebMetaData(JBossWebMetaData metaData) { if (context instanceof StandardContext) { ((StandardContext) context).setReplaceWelcomeFiles(true); } // Version context.setVersion(metaData.getVersion()); // SetPublicId if (metaData.is30())...
protected void processWebMetaData(JBossWebMetaData metaData) { if (context instanceof StandardContext) { ((StandardContext) context).setReplaceWelcomeFiles(true); } // Version context.setVersion(metaData.getVersion()); // SetPublicId if (metaData.is30())...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); if (!DeploymentTypeMarker.isType(DeploymentType.WAR, deploymentUnit)) { return; // Skip non web deployments }...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); if (!DeploymentTypeMarker.isType(DeploymentType.WAR, deploymentUnit)) { return; // Skip non web deployments }...
public T get() { LinkedList<T> list = stack.get(); if (list == null) { return null; } return list.getLast(); } }
public T peek() { LinkedList<T> list = stack.get(); if (list == null) { return null; } return list.getLast(); } }
public static String registerWithGeneratedName( BeanDefinition definition, BeanDefinitionRegistry registry) throws BeanDefinitionStoreException { String generatedName = generateBeanName(definition, registry, false); registry.registerBeanDefinition(generatedName, definition); return generatedName; }
public static String registerWithGeneratedName( AbstractBeanDefinition definition, BeanDefinitionRegistry registry) throws BeanDefinitionStoreException { String generatedName = generateBeanName(definition, registry, false); registry.registerBeanDefinition(generatedName, definition); return generatedName; ...
protected Object locateToBeMarshalled(Map model) throws ServletException { if (this.modelKey != null) { Object o = model.get(this.modelKey); if (o == null) { throw new ServletException("Model contains no object with key [" + modelKey + "]"); } if (!this.marshaller.supports(o.getClass())) { throw ...
protected Object locateToBeMarshalled(Map model) throws ServletException { if (this.modelKey != null) { Object o = model.get(this.modelKey); if (o == null) { throw new ServletException("Model contains no object with key [" + modelKey + "]"); } if (!this.marshaller.supports(o.getClass())) { throw ...
public void readElement(XMLExtendedStreamReader reader, List<ModelNode> list) throws XMLStreamException { // no attributes if (reader.getAttributeCount() > 0) { throw unexpectedAttribute(reader, 0); } final ModelNode address = new ModelNode(); address.add(ModelDe...
public void readElement(XMLExtendedStreamReader reader, List<ModelNode> list) throws XMLStreamException { // no attributes if (reader.getAttributeCount() > 0) { throw unexpectedAttribute(reader, 0); } final ModelNode address = new ModelNode(); address.add(ModelDe...
protected void renderMergedOutputModel( Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws IOException { String targetUrl = createTargetUrl(model, request); targetUrl = updateTargetUrl(targetUrl, model, request, response); FlashMap flashMap = RequestContextUtil...
protected void renderMergedOutputModel( Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws IOException { String targetUrl = createTargetUrl(model, request); targetUrl = updateTargetUrl(targetUrl, model, request, response); FlashMap flashMap = RequestContextUtil...
protected List<MediaType> getMediaTypes(HttpServletRequest request) { if (this.favorPathExtension) { String requestUri = urlPathHelper.getRequestUri(request); String filename = WebUtils.extractFullFilenameFromUrlPath(requestUri); MediaType mediaType = getMediaTypeFromFilename(filename); if (mediaType != ...
protected List<MediaType> getMediaTypes(HttpServletRequest request) { if (this.favorPathExtension) { String requestUri = urlPathHelper.getLookupPathForRequest(request); String filename = WebUtils.extractFullFilenameFromUrlPath(requestUri); MediaType mediaType = getMediaTypeFromFilename(filename); if (med...
SimpleAttributeDefinition USE_PARENT_HANDLERS = new SimpleAttributeDefinitionBuilder("use-parent-handlers", ModelType.BOOLEAN, true). /* * JBoss, Home of Professional Open Source. * Copyright 2010, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * di...
SimpleAttributeDefinition USE_PARENT_HANDLERS = new SimpleAttributeDefinitionBuilder("use-parent-handlers", ModelType.BOOLEAN, true). /* * JBoss, Home of Professional Open Source. * Copyright 2010, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * di...
public WSIntegrationProcessorJAXWS_HANDLER() { super(HANDLER_CHAIN_ANNOTATION); } @Override protected void processAnnotation(final DeploymentUnit unit, final ClassInfo classInfo, final AnnotationInstance wsAnnotation, final CompositeIndex compositeIndex) throws DeploymentUnitProcessingException...
public WSIntegrationProcessorJAXWS_HANDLER() { super(HANDLER_CHAIN_ANNOTATION); } @Override protected void processAnnotation(final DeploymentUnit unit, final ClassInfo classInfo, final AnnotationInstance wsAnnotation, final CompositeIndex compositeIndex) throws DeploymentUnitProcessingException...
package org.springframework.ui.binding.support; /* * Copyright 2004-2009 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...
package org.springframework.ui.binding.support; /* * Copyright 2004-2009 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...
private void writeHandlersContent(final XMLExtendedStreamWriter writer, Element element, final ModelNode handlers) throws XMLStreamException { if (handlers.getType() == ModelType.LIST) { writer.writeStartElement(Element.HANDLERS.getLocalName()); for (ModelNode handler : handlers.asLi...
private void writeHandlersContent(final XMLExtendedStreamWriter writer, Element element, final ModelNode handlers) throws XMLStreamException { if (handlers.getType() == ModelType.LIST) { writer.writeStartElement(element.getLocalName()); for (ModelNode handler : handlers.asList()) { ...
class SecurityActions { /* * JBoss, Home of Professional Open Source. * Copyright 2011, Red Hat Middleware LLC, 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; you can redistribute...
class SecurityActions { /* * JBoss, Home of Professional Open Source. * Copyright 2011, Red Hat Middleware LLC, 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; you can redistribute...
public Object getEntityObject(final Object primaryKey) { return localHome ? cmpComponent.getEjbLocalObject(primaryKey) : cmpComponent.getEJBObject(primaryKey); } }; if (getReturnType() == ReturnType.SINGLE) { return store.findEntity(context.getMethod(...
public Object getEntityObject(final Object primaryKey) { return localHome ? cmpComponent.getEJBLocalObject(primaryKey) : cmpComponent.getEJBObject(primaryKey); } }; if (getReturnType() == ReturnType.SINGLE) { return store.findEntity(context.getMethod(...
public void invokeRemoveRelated(Object relatedId) throws RemoveException, RemoteException { CmpEntityBeanComponent component = relatedManager.getComponent(); /* try { EntityCache instanceCache = (EntityCache) container.getInstanceCache(); SecurityActions action...
public void invokeRemoveRelated(Object relatedId) throws RemoveException, RemoteException { CmpEntityBeanComponent component = relatedManager.getComponent(); /* try { EntityCache instanceCache = (EntityCache) container.getInstanceCache(); SecurityActions action...
public Object getEntityObject(Object primaryKey) { return metadata.isResultTypeMappingLocal() && component.getLocalHomeClass() != null ? component.getEjbLocalObject(primaryKey) : component.getEJBObject(primaryKey); } }; return execute( ...
public Object getEntityObject(Object primaryKey) { return metadata.isResultTypeMappingLocal() && component.getLocalHomeClass() != null ? component.getEJBLocalObject(primaryKey) : component.getEJBObject(primaryKey); } }; return execute( ...
public Object getEntityObject(Object primaryKey) { return queryMetaData.isResultTypeMappingLocal() && selectedComponent.getLocalHomeClass() != null ? selectedComponent.getEjbLocalObject(primaryKey) : selectedComponent.getEJBObject(primaryKey); ...
public Object getEntityObject(Object primaryKey) { return queryMetaData.isResultTypeMappingLocal() && selectedComponent.getLocalHomeClass() != null ? selectedComponent.getEJBLocalObject(primaryKey) : selectedComponent.getEJBObject(primaryKey); ...
public Object getEntityObject(Object primaryKey) { return metadata.isResultTypeMappingLocal() && selectedComponent.getLocalHomeClass() != null ? selectedComponent.getEjbLocalObject(primaryKey) : selectedComponent.getEJBObject(primaryKey); } }; ...
public Object getEntityObject(Object primaryKey) { return metadata.isResultTypeMappingLocal() && selectedComponent.getLocalHomeClass() != null ? selectedComponent.getEJBLocalObject(primaryKey) : selectedComponent.getEJBObject(primaryKey); } }; ...
public Object processInvocation(final InterceptorContext context) throws Exception { final EntityBeanComponent component = getComponent(context, EntityBeanComponent.class); if(remote) { component.getEJBObject(context.getParameters()[0]).remove(); ...
public Object processInvocation(final InterceptorContext context) throws Exception { final EntityBeanComponent component = getComponent(context, EntityBeanComponent.class); if(remote) { component.getEJBObject(context.getParameters()[0]).remove(); ...
public void doHandshake() throws Exception { HttpHeaders headers = new HttpHeaders(); headers.setSecWebSocketProtocol(Arrays.asList("echo")); this.wsSession = this.client.doHandshake(new TextWebSocketHandlerAdapter(), headers, new URI(this.wsUrl)); assertEquals(this.wsUrl, this.wsSession.getUri().toString()...
public void doHandshake() throws Exception { HttpHeaders headers = new HttpHeaders(); headers.setSecWebSocketProtocol(Arrays.asList("echo")); this.wsSession = this.client.doHandshake(new TextWebSocketHandlerAdapter(), headers, new URI(this.wsUrl)).get(); assertEquals(this.wsUrl, this.wsSession.getUri().toSt...
private void configure(WebBinder binder, Object model) { Model m = AnnotationUtils.findAnnotation(model.getClass(), Model.class); if (m != null) { if (StringUtils.hasText(m.value())) { // TODO model name setting //binder.setModelName(m.value()); } binder.setStrict(m.strictBinding()); } if...
private void configure(WebBinder binder, Object model) { Model m = AnnotationUtils.findAnnotation(model.getClass(), Model.class); if (m != null) { if (StringUtils.hasText(m.value())) { // TODO model name setting //binder.setModelName(m.value()); } binder.setStrict(m.strictBinding()); } if...
protected Object createFlights() { FlightType flight = new FlightType(); flight.setNumber(42L); flights = new Flights(); flights.getFlight().add(flight); return flights; }
protected Object createFlights() { FlightType flight = new FlightType(); flight.setNumber(42L); flights = new Flights(); flights.getFlight().configureBinding(flight); return flights; }