buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { final ServiceName endpointName = ManagementRemotingServices.MANAGEMENT_ENDPOINT; // Remove management Channel ManagementRemotingServices.removeManagementChannelSe...
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { final ServiceName endpointName = ManagementRemotingServices.MANAGEMENT_ENDPOINT; // Remove management Channel ManagementRemotingServices.removeManagementChannelSe...
private void installNativeManagementService(final OperationContext context, final ModelNode subModel, final ServiceVerificationHandler verificationHandler) throws OperationFailedException { // Remove the old connector final ModelNode portNode = NativeManagementResourceDefinition.NATIVE_PORT.resolve...
private void installNativeManagementService(final OperationContext context, final ModelNode subModel, final ServiceVerificationHandler verificationHandler) throws OperationFailedException { // Remove the old connector final ModelNode portNode = NativeManagementResourceDefinition.NATIVE_PORT.resolve...
public Short getValue() { return new Short(this.value); }
public Short getValue() { return Short.valueOf(this.value); }
public boolean isCallerInRole(final String roleName) throws IllegalStateException { return utilities.getSecurityManager().isCallerInRole(roleName); }
public boolean isCallerInRole(final String roleName) throws IllegalStateException { return utilities.getSecurityManager().isCallerInRole(securityMetaData.getSecurityRoles(), roleName); }
public Object processInvocation(InterceptorContext context) throws Exception { final Component component = context.getPrivateData(Component.class); if (component instanceof EJBComponent == false) { throw new IllegalStateException("Unexpected component type: " + component.getClass() + " e...
public Object processInvocation(InterceptorContext context) throws Exception { final Component component = context.getPrivateData(Component.class); if (component instanceof EJBComponent == false) { throw new IllegalStateException("Unexpected component type: " + component.getClass() + " e...
public void testAuthentication_TwoBeans() throws Exception { LoginContext lc = Util.getCLMLoginContext("user1", "password1"); lc.login(); try { String[] response = entryBean.doubleWhoAmI(); assertEquals("user1", response[0]); assertEquals("run-as-principal...
public void testAuthentication_TwoBeans() throws Exception { LoginContext lc = Util.getCLMLoginContext("user1", "password1"); lc.login(); try { String[] response = entryBean.doubleWhoAmI(); assertEquals("user1", response[0]); assertEquals("anonymous", resp...
protected StringEncoder createStringEncoder() { return new BeiderMorseEncoder(); } /** * Tests https://issues.apache.org/jira/browse/CODEC-125?focusedCommentId=13071566&page=com.atlassian.jira.plugin.system.issuetabpanels: * comment-tabpanel#comment-13071566 * * @throws Encoder...
protected StringEncoder createStringEncoder() { return new BeiderMorseEncoder(); } /** * Tests https://issues.apache.org/jira/browse/CODEC-125?focusedCommentId=13071566&page=com.atlassian.jira.plugin.system.issuetabpanels: * comment-tabpanel#comment-13071566 * * @throws Encoder...
private <T> void addDependency(ServiceBuilder<?> builder, Dependency<T> dependency) { ServiceName name = dependency.getName(); Injector<T> injector = dependency.getInjector(); if (injector != null) { builder.addDependency(name, dependency.getType(), injector); } else { ...
private <T> void addDependency(ServiceBuilder<?> builder, Dependency<T> dependency) { ServiceName name = dependency.getName(); Injector<T> injector = dependency.getInjector(); if (injector != null) { builder.addDependency(name, dependency.getType(), injector); } else { ...
private LocalCacheAdd() { super(CacheMode.LOCAL); } // used to create subsystem description static ModelNode createOperation(ModelNode address, ModelNode model) { ModelNode operation = Util.getEmptyOperation(ADD, address); INSTANCE.populate(model, operation); return oper...
private LocalCacheAdd() { super(CacheMode.LOCAL); } // used to create subsystem description static ModelNode createOperation(ModelNode address, ModelNode model) { ModelNode operation = Util.getEmptyOperation(ADD, address); INSTANCE.populate(model, operation); return oper...
// static final String CACHE_MODE = "cache-mode"; /* * 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 softwar...
// static final String CACHE_MODE = "cache-mode"; /* * 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 softwar...
public interface PatchingTask { /* * JBoss, Home of Professional Open Source. * Copyright 2012, 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...
public interface PatchingTask { /* * JBoss, Home of Professional Open Source. * Copyright 2012, 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...
public synchronized void start(StartContext context) throws StartException { final SocketBinding binding = this.binding.getValue(); final InetSocketAddress address = binding.getSocketAddress(); final Executor executor = this.executor.getOptionalValue(); try { // Create co...
public synchronized void start(StartContext context) throws StartException { final SocketBinding binding = this.binding.getValue(); final InetSocketAddress address = binding.getSocketAddress(); final Executor executor = this.executor.getOptionalValue(); try { // Create co...
public Object processInvocation(InterceptorContext context) throws Exception { final Component component = context.getPrivateData(Component.class); //if a session bean is participating in a transaction, it //is an error for a client to invoke the remove method //on the session objec...
public Object processInvocation(InterceptorContext context) throws Exception { final Component component = context.getPrivateData(Component.class); //if a session bean is participating in a transaction, it //is an error for a client to invoke the remove method //on the session objec...
public String getTargetDestination(String sessionId) { return (this.targetDestination != null) ? this.targetDestination + "/" + sessionId : null; } }
public String getTargetDestination(String sessionId) { return (this.targetDestination != null) ? this.targetDestination + sessionId : null; } }
public static SimpleAttributeDefinition MODE = new SimpleAttributeDefinitionBuilder(ModelKeys.MODE, ModelType.STRING, false) .setXmlName(Attribute.MODE.getLocalName()) .setAllowExpression(true) .setFlags(AttributeAccess.Flag.RESTART_ALL_SERVICE...
public static SimpleAttributeDefinition MODE = new SimpleAttributeDefinitionBuilder(ModelKeys.MODE, ModelType.STRING, false) .setXmlName(Attribute.MODE.getLocalName()) .setAllowExpression(true) .setFlags(AttributeAccess.Flag.RESTART_ALL_SERVICE...
.setValidator(new EnumValidator<TransactionMode>(TransactionMode.class, true, true)) package org.jboss.as.clustering.infinispan.subsystem; import org.infinispan.eviction.EvictionStrategy; import org.infinispan.transaction.LockingMode; import org.infinispan.util.concurrent.IsolationLevel; import org.jboss.as.controlle...
.setValidator(new EnumValidator<TransactionMode>(TransactionMode.class, true, true)) package org.jboss.as.clustering.infinispan.subsystem; import org.infinispan.eviction.EvictionStrategy; import org.infinispan.transaction.LockingMode; import org.infinispan.util.concurrent.IsolationLevel; import org.jboss.as.controlle...
protected static final SimpleAttributeDefinition NAME = new SimpleAttributeDefinitionBuilder(CommonAttributes.NAME, ModelType.STRING, false) .setXmlName(Attribute.NAME.getLocalName()) .setAllowExpression(true) .setValidator(new StringLengthVali...
protected static final SimpleAttributeDefinition NAME = new SimpleAttributeDefinitionBuilder(CommonAttributes.NAME, ModelType.STRING, false) .setXmlName(Attribute.NAME.getLocalName()) .setAllowExpression(false) .setValidator(new StringLengthVal...
private static SimpleAttributeDefinition createIntAttribute(String name, Attribute attribute, int defaultValue) { return SimpleAttributeDefinitionBuilder.create(name, ModelType.INT, true).setDefaultValue(new ModelNode().set(defaultValue)).setXmlName(attribute.getLocalName()).setValidator(new IntRangeValidat...
private static SimpleAttributeDefinition createIntAttribute(String name, Attribute attribute, int defaultValue) { return SimpleAttributeDefinitionBuilder.create(name, ModelType.INT, true).setDefaultValue(new ModelNode().set(defaultValue)).setXmlName(attribute.getLocalName()).setValidator(new IntRangeValidat...
public static final String PARTICIPANTS = "participants"; static enum ParticipantStatus { PENDING, PREPARED, FAILED, HEURISTIC, READONLY } static final String JMX_ON_ATTRIBUTE = "jmx-name"; static final String JNDI_ATTRIBUTE = "jndi-name"; static fina...
public static final String PARTICIPANTS = "participants"; static enum ParticipantStatus { PENDING, PREPARED, FAILED, HEURISTIC, READONLY } static final String JMX_ON_ATTRIBUTE = "jmx-name"; static final String JNDI_ATTRIBUTE = "jndi-name"; static fina...
public ApplicationClientComponentDescription( final String componentClassName, final EEModuleDescription moduleDescription, final ServiceName deploymentUnitServiceName, final EEApplicationClasses applicationClassesDescription) { super(APP_CLIENT_COMPONENT_NAME, componentClassName, moduleDescription, deploym...
public ApplicationClientComponentDescription( final String componentClassName, final EEModuleDescription moduleDescription, final ServiceName deploymentUnitServiceName, final EEApplicationClasses applicationClassesDescription) { super(APP_CLIENT_COMPONENT_NAME, componentClassName, moduleDescription, deploym...
public WebComponentDescription(final String componentName, final String componentClassName, final EEModuleDescription moduleDescription, final ServiceName deploymentUnitServiceName, final EEApplicationClasses applicationClassesDescription) { super(componentName, componentClassName, moduleDescription, deploy...
public WebComponentDescription(final String componentName, final String componentClassName, final EEModuleDescription moduleDescription, final ServiceName deploymentUnitServiceName, final EEApplicationClasses applicationClassesDescription) { super(componentName, componentClassName, moduleDescription, deploy...
public static int reflectionCompare(Object lhs, Object rhs, boolean compareTransients, Class<?> reflectUpToClass) { return reflectionCompare(lhs, rhs, false, reflectUpToClass, null); }
public static int reflectionCompare(Object lhs, Object rhs, boolean compareTransients, Class<?> reflectUpToClass) { return reflectionCompare(lhs, rhs, compareTransients, reflectUpToClass, null); }
public void testSha1Hex() throws IOException { // Examples from FIPS 180-1 assertEquals("a9993e364706816aba3e25717850c26c9cd0d89d", DigestUtils.sha1Hex("abc")); assertEquals("a9993e364706816aba3e25717850c26c9cd0d89d", DigestUtils.sha1Hex(getBytesUtf8("abc"))); assertEquals( ...
public void testSha1Hex() throws IOException { // Examples from FIPS 180-1 assertEquals("a9993e364706816aba3e25717850c26c9cd0d89d", DigestUtils.sha1Hex("abc")); assertEquals("a9993e364706816aba3e25717850c26c9cd0d89d", DigestUtils.sha1Hex(getBytesUtf8("abc"))); assertEquals( ...
public ApplicationClientComponentDescription( final String componentClassName, final EEModuleDescription moduleDescription, final ServiceName deploymentUnitServiceName, final EEApplicationClasses applicationClassesDescription) { super(APP_CLIENT_COMPONENT_NAME, componentClassName, moduleDescription, applica...
public ApplicationClientComponentDescription( final String componentClassName, final EEModuleDescription moduleDescription, final ServiceName deploymentUnitServiceName, final EEApplicationClasses applicationClassesDescription) { super(APP_CLIENT_COMPONENT_NAME, componentClassName, moduleDescription, deploym...
public EJBComponentDescription(final String componentName, final String componentClassName, final EjbJarDescription ejbJarDescription, final ServiceName deploymentUnitServiceName) { super(componentName, componentClassName, ejbJarDescription.getEEModuleDescription(), ejbJarDescription.getApplicationClassesDe...
public EJBComponentDescription(final String componentName, final String componentClassName, final EjbJarDescription ejbJarDescription, final ServiceName deploymentUnitServiceName) { super(componentName, componentClassName, ejbJarDescription.getEEModuleDescription(), deploymentUnitServiceName, ejbJarDescript...
public WebComponentDescription(final String componentName, final String componentClassName, final EEModuleDescription moduleDescription, final ServiceName deploymentUnitServiceName, final EEApplicationClasses applicationClassesDescription) { super(componentName, componentClassName, moduleDescription, applic...
public WebComponentDescription(final String componentName, final String componentClassName, final EEModuleDescription moduleDescription, final ServiceName deploymentUnitServiceName, final EEApplicationClasses applicationClassesDescription) { super(componentName, componentClassName, moduleDescription, deploy...
public boolean evaluate(T object) { return iSet.add(object); } }
public boolean evaluate(final T object) { return iSet.add(object); } }
public V setValue(V value) { throw new IllegalStateException("Iterator contains no elements"); } }
public V setValue(final V value) { throw new IllegalStateException("Iterator contains no elements"); } }
public UniqueFilterIterator(Iterator<E> iterator) { super(iterator, UniquePredicate.uniquePredicate()); } }
public UniqueFilterIterator(final Iterator<E> iterator) { super(iterator, UniquePredicate.uniquePredicate()); } }
public boolean equals(final Object obj) { if (obj == this) { return true; } if (obj instanceof DefaultKeyValue == false) { return false; } DefaultKeyValue<?, ?> other = (DefaultKeyValue<?, ?>) obj; return (getKey() == null ? other...
public boolean equals(final Object obj) { if (obj == this) { return true; } if (obj instanceof DefaultKeyValue == false) { return false; } final DefaultKeyValue<?, ?> other = (DefaultKeyValue<?, ?>) obj; return (getKey() == null ?...
public V setValue(V value) { throw new UnsupportedOperationException("setValue() is not supported"); } }
public V setValue(final V value) { throw new UnsupportedOperationException("setValue() is not supported"); } }
public void closureSanityTests() throws Exception { Closure<?> closure = generateClosure(); Assert.assertNotNull(closure); }
public void closureSanityTests() throws Exception { final Closure<?> closure = generateClosure(); Assert.assertNotNull(closure); }
protected final Predicate<T> getPredicateInstance(final Boolean... mockReturnValues) { final List<Predicate<T>> predicates = new ArrayList<Predicate<T>>(); for (Boolean returnValue : mockReturnValues) { predicates.add(createMockPredicate(returnValue)); } return getPredica...
protected final Predicate<T> getPredicateInstance(final Boolean... mockReturnValues) { final List<Predicate<T>> predicates = new ArrayList<Predicate<T>>(); for (final Boolean returnValue : mockReturnValues) { predicates.add(createMockPredicate(returnValue)); } return getP...
public final void verifyPredicates() { for (Predicate<? super T> predicate : mockPredicatesToVerify) { verify(predicate); } }
public final void verifyPredicates() { for (final Predicate<? super T> predicate : mockPredicatesToVerify) { verify(predicate); } }
public void ensurePredicateCanBeTypedWithoutWarning() throws Exception { Predicate<String> predicate = NullPredicate.nullPredicate(); assertFalse(predicate, cString); }
public void ensurePredicateCanBeTypedWithoutWarning() throws Exception { final Predicate<String> predicate = NullPredicate.nullPredicate(); assertFalse(predicate, cString); }
public static int objectToIndex(Object val, int numPartitions) { if(val==null) return 0; else return val.hashCode() % numPartitions; }
public static int objectToIndex(Object val, int numPartitions) { if(val==null) return 0; else return Math.abs(val.hashCode()) % numPartitions; }
public void testSpeedCheck() throws EncoderException { BeiderMorseEncoder bmpm = this.createGenericApproxEncoder(); StringBuffer stringBuffer = new StringBuffer(); stringBuffer.append(TEST_CHARS[0]); for (int i = 0, j = 1; i < 40; i++, j++) { if (j == TEST_CHARS.length) {...
public void testSpeedCheck() throws EncoderException { BeiderMorseEncoder bmpm = this.createGenericApproxEncoder(); StringBuilder stringBuffer = new StringBuilder(); stringBuffer.append(TEST_CHARS[0]); for (int i = 0, j = 1; i < 40; i++, j++) { if (j == TEST_CHARS.length)...
private String constructString(int[] unicodeChars) { StringBuffer buffer = new StringBuffer(); if (unicodeChars != null) { for (int unicodeChar : unicodeChars) { buffer.append((char) unicodeChar); } } return buffer.toString(); }
private String constructString(int[] unicodeChars) { StringBuilder buffer = new StringBuilder(); if (unicodeChars != null) { for (int unicodeChar : unicodeChars) { buffer.append((char) unicodeChar); } } return buffer.toString(); }
private String constructString(int [] unicodeChars) { StringBuffer buffer = new StringBuffer(); if (unicodeChars != null) { for (int unicodeChar : unicodeChars) { buffer.append((char)unicodeChar); } } return buffer.toString(); }
private String constructString(int [] unicodeChars) { StringBuilder buffer = new StringBuilder(); if (unicodeChars != null) { for (int unicodeChar : unicodeChars) { buffer.append((char)unicodeChar); } } return buffer.toString(); }
public void readElement(XMLExtendedStreamReader reader, PatchXml.Result<PatchMetadataResolver> factory) throws XMLStreamException { final PatchBuilder builder = new PatchBuilder(); doReadElement(reader, builder, factory.getOriginalIdentity()); factory.setResult(builder); }
public void readElement(XMLExtendedStreamReader reader, PatchXml.Result<PatchMetadataResolver> factory) throws XMLStreamException { final PatchBuilder builder = new PatchBuilder(); doReadElement(reader, builder); factory.setResult(builder); }
protected Patch createProcessedPatch(final Patch original) { // Process elements final List<PatchElement> elements = new ArrayList<PatchElement>(); // Process layers for (final PatchEntry entry : getLayers()) { final PatchElement element = createPatchElement(entry, entry...
protected Patch createProcessedPatch(final Patch original) { // Process elements final List<PatchElement> elements = new ArrayList<PatchElement>(); // Process layers for (final PatchEntry entry : getLayers()) { final PatchElement element = createPatchElement(entry, entry...
public static Archive<?> deploy() throws Exception { File jdbcJar = new File(System.getProperty("jbossas.ts.integ.dir", "."), "/basic/src/test/resources/mysql-connector-java-5.1.15.jar"); JavaArchive ja = ShrinkWrap.createFromZipFile(JavaArchive.class, jdbcJar); Ja...
public static Archive<?> deploy() throws Exception { File jdbcJar = new File(System.getProperty("jbossas.ts.integ.dir", "."), "/basic/src/test/resources/mysql-connector-java-5.1.15.jar"); JavaArchive ja = ShrinkWrap.createFromZipFile(JavaArchive.class, jdbcJar); Ja...
public enum EmbeddedDatabaseType { HSQL, H2; }
public enum EmbeddedDatabaseType { HSQL, H2, DERBY; }
private MethodParameter resolveMethodParameter() { MethodParameter read = resolveReadMethodParameter(); MethodParameter write = resolveWriteMethodParameter(); if (read == null && write == null) { throw new IllegalStateException("Property is neither readable or writeable"); } if (read != null && write ...
private MethodParameter resolveMethodParameter() { MethodParameter read = resolveReadMethodParameter(); MethodParameter write = resolveWriteMethodParameter(); if (read == null && write == null) { throw new IllegalStateException("Property is neither readable nor writeable"); } if (read != null && write != ...
public void setPersistenceProviderClass(Class<? extends PersistenceProvider> persistenceProviderClass) { Assert.isAssignable(PersistenceProvider.class, persistenceProviderClass); this.persistenceProvider = (PersistenceProvider) BeanUtils.instantiateClass(persistenceProviderClass); }
public void setPersistenceProviderClass(Class<? extends PersistenceProvider> persistenceProviderClass) { Assert.isAssignable(PersistenceProvider.class, persistenceProviderClass); this.persistenceProvider = BeanUtils.instantiateClass(persistenceProviderClass); }
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { // [TODO] AS7-2278 JAXR configuration through the domain model JAXRConfiguration config = new JAXRConfiguration(); ServiceTarget serviceTarget = context.getSer...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { // [TODO] AS7-2278 JAXR configuration through the domain model JAXRConfiguration config = JAXRConfiguration.INSTANCE; ServiceTarget serviceTarget = context.get...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ManagementResourceRegistration baseRegistration = deploymentUnit.getAttachment(DeploymentModelUtils.MUTABLE_REGISTRATION_AT...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ManagementResourceRegistration baseRegistration = deploymentUnit.getAttachment(DeploymentModelUtils.MUTABLE_REGISTRATION_AT...
public void configureDependency(final ServiceBuilder<?> serviceBuilder, final ComponentStartService service) throws DeploymentUnitProcessingException { serviceBuilder.addDependency(createdView.getServiceName(), ComponentView.class, factory.getViewToCreate()); ...
public void configureDependency(final ServiceBuilder<?> serviceBuilder, final ComponentStartService service) throws DeploymentUnitProcessingException { serviceBuilder.addDependency(createdView.getServiceName(), ComponentView.class, factory.getViewToCreate()); ...
Collection getUserIds() throws FinderException, RemoteException; /* * 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 ...
Collection getUserIds() throws FinderException, RemoteException; /* * 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 ...
public Object[][] getContents() { return (Object[][]) contents.clone(); } /** Non-translated/translated messages arrays. */ static final Object[][] contents = { // org.apache.commons.math.util.MathUtils { "overflow: gcd({0}, {1}) is 2^31", "d\u00e9passement de capacit\u00e9 : le PGCD de {0} ...
private static final Object[][] contents = { // org.apache.commons.math.util.MathUtils { "overflow: gcd({0}, {1}) is 2^31", "d\u00e9passement de capacit\u00e9 : le PGCD de {0} et {1} vaut 2^31" }, { "cannot raise an integral value to a negative power ({0}^{1})", "impossible d''\u00e9lever une...
package org.jboss.as.naming; /* * JBoss, Home of Professional Open Source * Copyright 2010, Red Hat Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it a...
package org.jboss.as.naming; /* * JBoss, Home of Professional Open Source * Copyright 2010, Red Hat Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it a...
package org.jboss.as.naming; /* * JBoss, Home of Professional Open Source * Copyright 2010, Red Hat Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it a...
package org.jboss.as.naming; /* * JBoss, Home of Professional Open Source * Copyright 2010, Red Hat Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it a...
public void execute(RuntimeTaskContext context) throws OperationFailedException { updateContext.addDeploymentProcessor(Phase.DEPENDENCIES, Phase.DEPENDENCIES_MODULE, new SecurityDependencyProcessor()); final ServiceTarget target = cont...
public void execute(RuntimeTaskContext context) throws OperationFailedException { updateContext.addDeploymentProcessor(Phase.DEPENDENCIES, Phase.DEPENDENCIES_MODULE, new SecurityDependencyProcessor()); final ServiceTarget target = cont...
import org.jboss.as.naming.ManagedReferenceFactory; /* * JBoss, Home of Professional Open Source * Copyright 2010, Red Hat Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; yo...
import org.jboss.as.naming.ManagedReferenceFactory; /* * JBoss, Home of Professional Open Source * Copyright 2010, Red Hat Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; yo...
public void testRollbackBatch() throws Exception { // test rollback of a batch with corrupted deployment cli.sendLine("batch"); cli.sendLine("deploy " + warFiles[0].getAbsolutePath()); cli.sendLine("deploy " + warFiles[2].getAbsolutePath()); // check none of the archives ar...
public void testRollbackBatch() throws Exception { // test rollback of a batch with corrupted deployment cli.sendLine("batch"); cli.sendLine("deploy " + warFiles[0].getAbsolutePath()); cli.sendLine("deploy " + warFiles[2].getAbsolutePath()); // check none of the archives ar...
public OperationNameState() { super(ID); //setEnterHandler(GlobalCharacterHandlers.CONTENT_CHARACTER_HANDLER); setDefaultHandler(GlobalCharacterHandlers.CONTENT_CHARACTER_HANDLER); putHandler('(', GlobalCharacterHandlers.LEAVE_STATE_HANDLER); putHandler(OutputRedirectionState...
public OperationNameState() { super(ID); //setEnterHandler(GlobalCharacterHandlers.CONTENT_CHARACTER_HANDLER); setDefaultHandler(GlobalCharacterHandlers.CONTENT_CHARACTER_HANDLER); putHandler('(', GlobalCharacterHandlers.LEAVE_STATE_HANDLER); putHandler(OutputTargetState.OUTP...
public int hashCode() { return 17 + (sign << 8) + (nans << 16) + exp + mant.hashCode(); }
public int hashCode() { return 17 + (sign << 8) + (nans << 16) + exp + Arrays.hashCode(mant); }
public static <T> T clone(final T obj) { if (obj instanceof Cloneable) { final Object result; if (obj.getClass().isArray()) { final Class<?> componentType = obj.getClass().getComponentType(); if (!componentType.isPrimitive()) { resu...
public static <T> T clone(final T obj) { if (obj instanceof Cloneable) { final Object result; if (obj.getClass().isArray()) { final Class<?> componentType = obj.getClass().getComponentType(); if (!componentType.isPrimitive()) { resu...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final Resource resource = context.readResourceForUpdate(PathAddress.EMPTY_ADDRESS); final ModelNode model = resource.getModel(); ModelNode dc = model.get(DOMAIN_CONTROLLER); ModelNode...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final Resource resource = context.readResourceForUpdate(PathAddress.EMPTY_ADDRESS); final ModelNode model = resource.getModel(); ModelNode dc = model.get(DOMAIN_CONTROLLER); ModelNode...
public void start(StartContext context) throws StartException { this.value.setDefaultBootstrapContext(defaultBootstrapContext.getValue()); ROOT_LOGGER.startingSubsystem("JCS", Version.FULL_VERSION); ROOT_LOGGER.tracef("config=%s", value); }
public void start(StartContext context) throws StartException { this.value.setDefaultBootstrapContext(defaultBootstrapContext.getValue()); ROOT_LOGGER.startingSubsystem("JCA", Version.FULL_VERSION); ROOT_LOGGER.tracef("config=%s", value); }
private Object getObjectInstance(final Object object, final Name name, final Hashtable<?, ?> environment) throws NamingException { try { final ObjectFactoryBuilder factoryBuilder = ObjectFactoryBuilder.INSTANCE; final ObjectFactory objectFactory = factoryBuilder.createObjectFactory(o...
private Object getObjectInstance(final Object object, final Name name, final Hashtable<?, ?> environment) throws NamingException { try { final ObjectFactoryBuilder factoryBuilder = ObjectFactoryBuilder.INSTANCE; final ObjectFactory objectFactory = factoryBuilder.createObjectFactory(o...
public static Collection<Object[]> data() { Object[][] data = new Object[][] { { "subsystem-infinispan_1_0.xml", 33 }, { "subsystem-infinispan_1_1.xml", 33 }, { "subsystem-infinispan_1_2.xml", 37 }, { "subsystem-infinispan_1_3.xml", 37 }, ...
public static Collection<Object[]> data() { Object[][] data = new Object[][] { { "subsystem-infinispan_1_0.xml", 33 }, { "subsystem-infinispan_1_1.xml", 33 }, { "subsystem-infinispan_1_2.xml", 37 }, { "subsystem-infinispan_1_3.xml", 37 }, ...
String getClusterName(); /* * JBoss, Home of Professional Open Source. * Copyright 2012, 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 redistribute i...
String getClusterName(); /* * JBoss, Home of Professional Open Source. * Copyright 2012, 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 redistribute i...
public void registerChildren(ManagementResourceRegistration registration) { registration.registerSubModel(new RemoteSiteResource()); registration.registerSubModel(PropertyResource.INSTANCE); }
public void registerChildren(ManagementResourceRegistration registration) { registration.registerSubModel(new RemoteSiteResource()); registration.registerSubModel(PropertyResourceDefinition.INSTANCE); }
public synchronized void register() throws IOException { boolean connected = false; //This takes about 30 seconds should be enough to start up master if booted at the same time final long timeout = 30000; final long endTime = System.currentTimeMillis() + timeout; int retries ...
public synchronized void register() throws IOException { boolean connected = false; //This takes about 30 seconds should be enough to start up master if booted at the same time final long timeout = 30000; final long endTime = System.currentTimeMillis() + timeout; int retries ...
public ClassReflectionIndex getClassIndex(Class<?> clazz) { ClassReflectionIndex index = classes.get(clazz); if (index == null) { classes.put(clazz, index = new ClassReflectionIndex(clazz)); } return index; } }
public synchronized ClassReflectionIndex getClassIndex(Class<?> clazz) { ClassReflectionIndex index = classes.get(clazz); if (index == null) { classes.put(clazz, index = new ClassReflectionIndex(clazz)); } return index; } }
void sendMessage(byte[] msg, long checksum) throws IOException; /** * */ package org.jboss.as.server.manager; import java.io.IOException; import java.util.List; /** * Abstraction for objects that handle communication between a ServerManager * and a Server. * * @author Brian Stansberry */ public interface Se...
void sendMessage(byte[] msg, long checksum) throws IOException; /** * */ package org.jboss.as.server.manager; import java.io.IOException; import java.util.List; /** * Abstraction for objects that handle communication between a ServerManager * and a Server. * * @author Brian Stansberry */ public interface Se...
public void getType() { assertSame(Connector.Type.AJP, new UndertowConnector(new AjpListenerService("", "", 0)).getType()); assertSame(Connector.Type.HTTP, new UndertowConnector(new HttpListenerService("", "", 0)).getType()); assertSame(Connector.Type.HTTPS, new UndertowConnector(new HttpsLi...
public void getType() { assertSame(Connector.Type.AJP, new UndertowConnector(new AjpListenerService("", "", 0)).getType()); assertSame(Connector.Type.HTTP, new UndertowConnector(new HttpListenerService("", "", 0, false)).getType()); assertSame(Connector.Type.HTTPS, new UndertowConnector(new ...
public HttpsListenerService(final String name, String serverName, long maxUploadSize) { super(name, serverName, maxUploadSize); this.maxUploadSize = maxUploadSize; }
public HttpsListenerService(final String name, String serverName, long maxUploadSize) { super(name, serverName, maxUploadSize, false); this.maxUploadSize = maxUploadSize; }
public PrepareStepHandler(final LocalHostControllerInfo localHostControllerInfo, final Map<String, ProxyController> hostProxies, final Map<String, ProxyController> serverProxies) { this.localHostControllerInfo = localHostControllerInfo; thi...
public PrepareStepHandler(final LocalHostControllerInfo localHostControllerInfo, final Map<String, ProxyController> hostProxies, final Map<String, ProxyController> serverProxies) { this.localHostControllerInfo = localHostControllerInfo; thi...
private void applyUpdateToDeploymentUnitProcessor(final OperationContext context, ModelNode newValue, String attributeName) throws OperationFailedException { if (GlobalModulesDefinition.INSTANCE.getName().equals(attributeName)) { moduleDependencyProcessor.setGlobalModules(newValue); } el...
private void applyUpdateToDeploymentUnitProcessor(final OperationContext context, ModelNode newValue, String attributeName) throws OperationFailedException { if (GlobalModulesDefinition.INSTANCE.getName().equals(attributeName)) { moduleDependencyProcessor.setGlobalModules(GlobalModulesDefinition...
private File getModulePath() { String modulePath = System.getProperty("module.path", null); if (modulePath == null) { String jbossHome = System.getProperty("jboss.home", null); if (jbossHome == null) { throw new IllegalStateException("Neither -Dmodule.path nor...
private File getModulePath() { String modulePath = System.getProperty("module.path", null); if (modulePath == null) { String jbossHome = System.getProperty("jboss.home", null); if (jbossHome == null) { throw new IllegalStateException("Neither -Dmodule.path nor...
private File getModulePath() { String modulePath = System.getProperty("module.path", null); if (modulePath == null) { String jbossHome = System.getProperty("jboss.home", null); if (jbossHome == null) { throw new IllegalStateException( "...
private File getModulePath() { String modulePath = System.getProperty("module.path", null); if (modulePath == null) { String jbossHome = System.getProperty("jboss.home", null); if (jbossHome == null) { throw new IllegalStateException( "...
private static File getModulesHome() { String modulePath = System.getProperty("module.path", null); if (modulePath == null) { String jbossHome = System.getProperty("jboss.home", null); if (jbossHome == null) { throw new IllegalStateException("Neither -Dmodule....
private static File getModulesHome() { String modulePath = System.getProperty("module.path", null); if (modulePath == null) { String jbossHome = System.getProperty("jboss.home", null); if (jbossHome == null) { throw new IllegalStateException("Neither -Dmodule....
private static File getModulePath() { String modulePath = System.getProperty("module.path", null); if (modulePath == null) { String jbossHome = System.getProperty("jboss.home", null); if (jbossHome == null) { throw new IllegalStateException("Neither -Dmodule.p...
private static File getModulePath() { String modulePath = System.getProperty("module.path", null); if (modulePath == null) { String jbossHome = System.getProperty("jboss.home", null); if (jbossHome == null) { throw new IllegalStateException("Neither -Dmodule.p...
public enum PatchType { CUMULATIVE, ONE_OFF, ; } /** * Get the unique patch ID. * * @return the patch id */ String getPatchId(); /** * Get the patch description. * * @return the patch description */ String getDescription(); /...
public enum PatchType { CUMULATIVE, ONE_OFF, ; } /** * Get the unique patch ID. * * @return the patch id */ String getPatchId(); /** * Get the patch description. * * @return the patch description */ String getDescription(); /...
private void readHostElement(final XMLExtendedStreamReader reader, final ModelNode address, final List<ModelNode> list) throws XMLStreamException { String hostName = null; // Deffer adding the namespaces and schema locations until after the host has been created. List<ModelNode> namespaceOp...
private void readHostElement(final XMLExtendedStreamReader reader, final ModelNode address, final List<ModelNode> list) throws XMLStreamException { String hostName = null; // Deffer adding the namespaces and schema locations until after the host has been created. List<ModelNode> namespaceOp...
public void readElement(XMLExtendedStreamReader reader, ParseResult<SubsystemConfiguration<JMSSubsystemElement>> result) throws XMLStreamException { final JMSSubsystemAdd subsystemAdd = new JMSSubsystemAdd(); final List<AbstractSubsystemUpdate<JMSSubsystemElement, ?>> updates = new ArrayList<Abstra...
public void readElement(XMLExtendedStreamReader reader, ParseResult<SubsystemConfiguration<JMSSubsystemElement>> result) throws XMLStreamException { final JMSSubsystemAdd subsystemAdd = new JMSSubsystemAdd(); final List<AbstractSubsystemUpdate<JMSSubsystemElement, ?>> updates = new ArrayList<Abstra...
public void expireTimer() { ROOT_LOGGER.debug("expireTimer: " + this); setTimerState(TimerState.EXPIRED); // remove from timerservice timerService.removeTimer(this); // Cancel any scheduled timer task for this timer this.cancelTimeout(); }
public void expireTimer() { ROOT_LOGGER.debug("expireTimer: " + this); setTimerState(TimerState.EXPIRED); // remove from timerservice timerService.persistTimer(this); // Cancel any scheduled timer task for this timer this.cancelTimeout(); }
public void testMessageNumber() { Assert.assertEquals(315, LocalizedFormats.values().length); }
public void testMessageNumber() { Assert.assertEquals(316, LocalizedFormats.values().length); }
public enum PatchType { CUMULATIVE, ONE_OFF, ; } /** * Get the unique patch ID. * * @return the patch id */ String getPatchId(); /** * Get the patch description. * * @return the patch description */ String getDescription(); /...
public enum PatchType { CUMULATIVE, ONE_OFF, ; } /** * Get the unique patch ID. * * @return the patch id */ String getPatchId(); /** * Get the patch description. * * @return the patch description */ String getDescription(); /...
public ManagedReference getReference() { PersistenceUnitServiceImpl service = (PersistenceUnitServiceImpl) deploymentUnit.getServiceRegistry().getRequiredService(puServiceName).getValue(); EntityManagerFactory emf = service.getEntityManagerFactory(); EntityManager entityManag...
public ManagedReference getReference() { PersistenceUnitServiceImpl service = (PersistenceUnitServiceImpl) deploymentUnit.getServiceRegistry().getRequiredService(puServiceName).getValue(); EntityManagerFactory emf = service.getEntityManagerFactory(); EntityManager entityManag...
private final DeploymentRepository deploymentRepository; private final EnumMap<Phase, SortedSet<RegisteredProcessor>> deployers = new EnumMap<Phase, SortedSet<RegisteredProcessor>>(Phase.class); ServerControllerImpl(final ServiceContainer container, final ServiceTarget serviceTarget, final ServerEnvironmen...
private final DeploymentRepository deploymentRepository; private final EnumMap<Phase, SortedSet<RegisteredProcessor>> deployers = new EnumMap<Phase, SortedSet<RegisteredProcessor>>(Phase.class); ServerControllerImpl(final ServiceContainer container, final ServiceTarget serviceTarget, final ServerEnvironmen...
public void registerXMLElementWriter(XMLElementWriter<SubsystemMarshallingContext> writer) { Assert.assertNotNull(writer); } }; } } static List<ModelNode> createSubSystem(String subsystemContents) throws XMLStreamException { final ...
public void registerXMLElementWriter(XMLElementWriter<SubsystemMarshallingContext> writer) { Assert.assertNotNull(writer); } }; } } static List<ModelNode> createSubSystem(String subsystemContents) throws XMLStreamException { final ...
public InputStream compress(InputStream input) throws CompressException { FileOutputStream outputStream = null; FileOutputStream tempFileOutputStream = null; try { File temp = File.createTempFile("commons_","jkt");; tempFileOutputStream = new FileOutputStream(temp); compressTo(input, tempFileOutputStrea...
public InputStream compress(InputStream input) throws CompressException { FileOutputStream outputStream = null; FileOutputStream tempFileOutputStream = null; try { File temp = File.createTempFile("commons_","jkt"); tempFileOutputStream = new FileOutputStream(temp); compressTo(input, tempFileOutputStream...
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 Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if (source == null) { return null; } Collection<?> sourceCollection = (Collection<?>) source; Object array = Array.newInstance(targetType.getElementType(), sourceCollection.size()); int i = 0; for (Object source...
public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if (source == null) { return null; } Collection<?> sourceCollection = (Collection<?>) source; Object array = Array.newInstance(targetType.getElementType(), sourceCollection.size()); int i = 0; for (Object source...
public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if (source == null) { return null; } Collection<?> sourceCollection = (Collection<?>) source; if (sourceCollection.size() == 0) { return null; } Object firstElement = sourceCollection.iterator().next(); ret...
public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if (source == null) { return null; } Collection<?> sourceCollection = (Collection<?>) source; if (sourceCollection.size() == 0) { return null; } Object firstElement = sourceCollection.iterator().next(); ret...
public static <T> T convert(EvaluationContext context, Object value, Class<T> targetType) throws EvaluationException { // TODO remove this function over time and use the one it delegates to return convertTypedValue(context,new TypedValue(value,TypeDescriptor.forObject(value)),targetType); }
public static <T> T convert(EvaluationContext context, Object value, Class<T> targetType) throws EvaluationException { // TODO remove this function over time and use the one it delegates to return convertTypedValue(context,new TypedValue(value),targetType); }
public void testRootContextObject() { ExpressionState state = getState(); Assert.assertEquals(Inventor.class,state.getRootContextObject().getValue().getClass()); // although the root object is being set on the evaluation context, the value in the 'state' remains what it was when constructed ((StandardEvaluati...
public void testRootContextObject() { ExpressionState state = getState(); Assert.assertEquals(Inventor.class,state.getRootContextObject().getValue().getClass()); // although the root object is being set on the evaluation context, the value in the 'state' remains what it was when constructed ((StandardEvaluati...
public synchronized <T> ClassReflectionIndex<T> getClassIndex(Class<T> clazz) { try { ClassReflectionIndex<T> index = (ClassReflectionIndex<T>) classes.get(clazz); if (index == null) { classes.put(clazz, index = new ClassReflectionIndex<T>(clazz, this)); }...
public synchronized <T> ClassReflectionIndex<T> getClassIndex(Class<T> clazz) { try { ClassReflectionIndex<T> index = (ClassReflectionIndex<T>) classes.get(clazz); if (index == null) { classes.put(clazz, index = new ClassReflectionIndex<T>(clazz, this)); }...
public void setAsText(String text) throws IllegalArgumentException { Properties props = new Properties(); if (text != null) { try { // Must use the ISO-8859-1 encoding because Properties.load(stream) expects it. props.load(new ByteArrayInputStream(text.getBytes("ISO-8859-1"))); } catch (IOExceptio...
public void setAsText(String text) throws IllegalArgumentException { Properties props = new Properties(); if (text != null) { try { // Must use the ISO-8859-1 encoding because Properties.load(stream) expects it. props.load(new ByteArrayInputStream(text.getBytes("ISO-8859-1"))); } catch (IOExceptio...
public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { String submittedValue = (String) source; if (submittedValue.isEmpty()) { return null; } Object parsedValue; try { parsedValue = this.parser.parse(submittedValue, LocaleContextHolder.getLocale()); } c...
public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { String submittedValue = (String) source; if (submittedValue == null || submittedValue.length() == 0) { return null; } Object parsedValue; try { parsedValue = this.parser.parse(submittedValue, LocaleCont...
public void registerAttributes(final ManagementResourceRegistration registry, boolean registerRuntimeOnly) { for (AttributeDefinition attr : CommonAttributes.SIMPLE_ROOT_RESOURCE_ATTRIBUTES) { if (registerRuntimeOnly || !attr.getFlags().contains(AttributeAccess.Flag.STORAGE_RUNTIME)) { ...
public void registerAttributes(final ManagementResourceRegistration registry, boolean registerRuntimeOnly) { for (AttributeDefinition attr : CommonAttributes.SIMPLE_ROOT_RESOURCE_ATTRIBUTES) { if (registerRuntimeOnly || !attr.getFlags().contains(AttributeAccess.Flag.STORAGE_RUNTIME)) { ...
protected void processBridge(XMLExtendedStreamReader reader, ModelNode address, List<ModelNode> updates) throws XMLStreamException { requireSingleAttribute(reader, CommonAttributes.NAME); String name = reader.getAttributeValue(0); ModelNode bridgeAdd = org.jboss.as.controller.operations.co...
protected void processBridge(XMLExtendedStreamReader reader, ModelNode address, List<ModelNode> updates) throws XMLStreamException { requireSingleAttribute(reader, CommonAttributes.NAME); String name = reader.getAttributeValue(0); ModelNode bridgeAdd = org.jboss.as.controller.operations.co...
private static ServerConfigImpl createServerConfig(ModelNode configuration, boolean appclient, OperationContext context) throws OperationFailedException { final ServerConfigImpl config = ServerConfigImpl.newInstance(); try { ModelNode wsdlHost = Attributes.WSDL_HOST.resolveModelAttribute...
private static ServerConfigImpl createServerConfig(ModelNode configuration, boolean appclient, OperationContext context) throws OperationFailedException { final ServerConfigImpl config = ServerConfigImpl.newInstance(); try { ModelNode wsdlHost = Attributes.WSDL_HOST.resolveModelAttribute...
public void testStatelessBean() throws Exception { Archive<?> ejbArchive = provider.getClientDeployment("ejb3-osgi.jar"); String ejbName = deployer.deploy(ejbArchive); try { String jndiname = "java:global/ejb3-osgi/SimpleStatelessSessionBean!org.jboss.as.testsuite.integration.osg...
public void testStatelessBean() throws Exception { Archive<?> ejbArchive = provider.getClientDeployment("ejb3-osgi.jar"); String ejbName = deployer.deploy(ejbArchive); try { String jndiname = "java:global/ejb3-osgi/SimpleClientServlet!org.jboss.as.testsuite.integration.osgi.ejb3....
private void parseTimer(XMLExtendedStreamReader reader, List<TimerImpl> timers) throws XMLStreamException { LoadableElements loadableElements = new LoadableElements(); TimerImpl.Builder builder = TimerImpl.builder(); final Set<String> required = new HashSet<>(Arrays.asList(new String[]{TIMED...
private void parseTimer(XMLExtendedStreamReader reader, List<TimerImpl> timers) throws XMLStreamException { LoadableElements loadableElements = new LoadableElements(); TimerImpl.Builder builder = TimerImpl.builder(); final Set<String> required = new HashSet<>(Arrays.asList(new String[]{TIMED...
static final char BACKSLASH = '\\'; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Ver...
static final char BACKSLASH = '\\'; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Ver...
private static File getModulePath() { String modulePath = System.getProperty("module.path", null); if (modulePath == null) { String jbossHome = System.getProperty("jboss.home", null); if (jbossHome == null) { throw new IllegalStateException("Neither -Dmodule.p...
private static File getModulePath() { String modulePath = System.getProperty("module.path", null); if (modulePath == null) { String jbossHome = System.getProperty("jboss.home", null); if (jbossHome == null) { throw new IllegalStateException("Neither -Dmodule.p...