buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public void createSessionNoSessionId() { HttpServerExchange exchange = new HttpServerExchange(null); Batcher batcher = mock(Batcher.class); Batch batch = mock(Batch.class); SessionConfig config = mock(SessionConfig.class); Session<LocalSessionContext> session = mock(Session.c...
public void createSessionNoSessionId() { HttpServerExchange exchange = new HttpServerExchange(null); Batcher batcher = mock(Batcher.class); Batch batch = mock(Batch.class); SessionConfig config = mock(SessionConfig.class); Session<LocalSessionContext> session = mock(Session.c...
public void changeSessionId() { HttpServerExchange exchange = new HttpServerExchange(null); SessionConfig config = mock(SessionConfig.class); SessionManager<LocalSessionContext> manager = mock(SessionManager.class); Session<LocalSessionContext> session = mock(Session.class); ...
public void changeSessionId() { HttpServerExchange exchange = new HttpServerExchange(null); SessionConfig config = mock(SessionConfig.class); SessionManager<LocalSessionContext> manager = mock(SessionManager.class); Session<LocalSessionContext> session = mock(Session.class); ...
package org.jboss.as.network; /* * 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 and/or...
package org.jboss.as.network; /* * 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 and/or...
package org.jboss.as.network; /* * 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 redistrib...
package org.jboss.as.network; /* * 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 redistrib...
package org.jboss.as.network; /* * 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 and/or...
package org.jboss.as.network; /* * 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 and/or...
package org.jboss.as.protocol.old; /* * 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 can redi...
package org.jboss.as.protocol.old; /* * 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 can redi...
package org.jboss.as.protocol.old; /* * 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 can redi...
package org.jboss.as.protocol.old; /* * 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 can redi...
package org.jboss.as.protocol.old; /* * 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 can redi...
package org.jboss.as.protocol.old; /* * 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 can redi...
package org.jboss.as.protocol.old; /* * 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 can redi...
package org.jboss.as.protocol.old; /* * 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 can redi...
protected long getFreeSpaceWindows(String path) throws IOException { path = FilenameUtils.normalize(path); if (path.length() > 2 && path.charAt(1) == ':') { path = path.substring(0, 2); } // build and run the 'dir' command String[] cmdAttrbs = new String[] {"cmd....
protected long getFreeSpaceWindows(String path) throws IOException { path = FilenameUtils.normalize(path); if (path.length() > 2 && path.charAt(1) == ':') { path = path.substring(0, 2); // seems to make it work } // build and run the 'dir' command String[] cmdAt...
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException { final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR)); fina...
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException { final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR)); fina...
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException { final ModelNode fullModel = Resource.Tools....
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException { final ModelNode fullModel = Resource.Tools....
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException { final ModelNode fullModel = Resource.Tools.readModel(context.readResource(PathAddress.EMP...
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException { final ModelNode fullModel = Resource.Tools.readModel(context.readResource(PathAddress.EMP...
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException { final ModelNode fullModel = Resource.Tools.readModel(context.readResource(PathAddress.EMP...
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> newControllers) throws OperationFailedException { final ModelNode fullModel = Resource.Tools.readModel(context.readResource(PathAddress.EMP...
private void paxHeaders() throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(this, "UTF-8")); Map headers = new HashMap(); // Format is "length keyword=value\n"; while(true){ // get length int ch; int len=0; int read=0...
private void paxHeaders() throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(this, "UTF-8")); Map<String, String> headers = new HashMap<String, String>(); // Format is "length keyword=value\n"; while(true){ // get length int ch; i...
public void addAsFirstExtraField(ZipExtraField ze) { if (ze instanceof UnparseableExtraFieldData) { unparseableExtra = (UnparseableExtraFieldData) ze; } else { LinkedHashMap copy = extraFields; extraFields = new LinkedHashMap<ZipShort, ZipExtraField>(); ...
public void addAsFirstExtraField(ZipExtraField ze) { if (ze instanceof UnparseableExtraFieldData) { unparseableExtra = (UnparseableExtraFieldData) ze; } else { LinkedHashMap<ZipShort, ZipExtraField> copy = extraFields; extraFields = new LinkedHashMap<ZipShort, Zip...
public void testReadLongNamesGNU() throws Exception { ArrayList l = new ArrayList(); l.add("this_is_a_long_file_name.txt"); checkArchiveContent(getFile("longfile_gnu.ar"), l); }
public void testReadLongNamesGNU() throws Exception { ArrayList<String> l = new ArrayList<String>(); l.add("this_is_a_long_file_name.txt"); checkArchiveContent(getFile("longfile_gnu.ar"), l); }
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final ResourceRoot resourceRoot = phaseContext.getAttachment(Attachments.DEPLOYMENT_ROOT); final VirtualFile deploymentRoot = resourceRoot.getRoot(); if (deploymentRoot == null || !deploymentR...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final ResourceRoot resourceRoot = phaseContext.getDeploymentUnit().getAttachment(Attachments.DEPLOYMENT_ROOT); final VirtualFile deploymentRoot = resourceRoot.getRoot(); if (deploymentRoot == ...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final VirtualFile deploymentRoot = phaseContext.getAttachment(Attachments.DEPLOYMENT_ROOT).getRoot(); if (deploymentRoot == null || !deploymentRoot.exists()) return; final String ...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final VirtualFile deploymentRoot = phaseContext.getDeploymentUnit().getAttachment(Attachments.DEPLOYMENT_ROOT).getRoot(); if (deploymentRoot == null || !deploymentRoot.exists()) return; ...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final VirtualFile deploymentRoot = phaseContext.getAttachment(Attachments.DEPLOYMENT_ROOT).getRoot(); if (deploymentRoot == null || !deploymentRoot.exists()) return; final String d...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final VirtualFile deploymentRoot = phaseContext.getDeploymentUnit().getAttachment(Attachments.DEPLOYMENT_ROOT).getRoot(); if (deploymentRoot == null || !deploymentRoot.exists()) return; ...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { // Check if we already have an OSGi deployment final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); BundleInfo info = BundleInfoAttachment.getBundleInfoAttachment(deployment...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { // Check if we already have an OSGi deployment final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); BundleInfo info = BundleInfoAttachment.getBundleInfoAttachment(deployment...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { // Check if we already have an OSGi deployment final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); Deployment deployment = OSGiDeploymentAttachment.getAttachment(deployment...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { // Check if we already have an OSGi deployment final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); Deployment deployment = OSGiDeploymentAttachment.getAttachment(deployment...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final VirtualFile deploymentRoot = phaseContext.getAttachment(Attachments.DEPLOYMENT_ROOT).getRoot(); if(deploymentRoot == null || !deploymentRoot.exists()) return; final String d...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final VirtualFile deploymentRoot = phaseContext.getDeploymentUnit().getAttachment(Attachments.DEPLOYMENT_ROOT).getRoot(); if(deploymentRoot == null || !deploymentRoot.exists()) return; ...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentModuleLoader deploymentModuleLoader = phaseContext.getDeploymentUnit().getAttachment(Attachments.DEPLOYMENT_MODULE_LOADER); if(deploymentModuleLoader == null) { return; ...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentModuleLoader deploymentModuleLoader = phaseContext.getDeploymentUnit().getAttachment(Attachments.DEPLOYMENT_MODULE_LOADER); if(deploymentModuleLoader == null) { return; ...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final ResourceRoot deploymentRoot = phaseContext.getAttachment(Attachments.DEPLOYMENT_ROOT); if(deploymentRoot == null) return; if(deploymentRoot.getRoot().getChild(SERVICE_ACTIVATO...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final ResourceRoot deploymentRoot = phaseContext.getDeploymentUnit().getAttachment(Attachments.DEPLOYMENT_ROOT); if(deploymentRoot == null) return; if(deploymentRoot.getRoot().getCh...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { if(!isWarDeployment(phaseContext.getDeploymentUnit())) { return; // Skip non web deployments } final VirtualFile deploymentRoot = phaseContext.getAttachment(Attachments.DEPLOYMENT_R...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { if(!isWarDeployment(phaseContext.getDeploymentUnit())) { return; // Skip non web deployments } final VirtualFile deploymentRoot = phaseContext.getDeploymentUnit().getAttachment(Atta...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { if(!isWarDeployment(phaseContext.getDeploymentUnit())) { return; // Skip non web deployments } final VirtualFile deploymentRoot = phaseContext.getAttachment(Attachments.DEPLOYMENT_R...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { if(!isWarDeployment(phaseContext.getDeploymentUnit())) { return; // Skip non web deployments } final VirtualFile deploymentRoot = phaseContext.getDeploymentUnit().getAttachment(Atta...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { if(!isWarDeployment(phaseContext.getDeploymentUnit())) { return; // Skip non web deployments } if(phaseContext.getAttachment(ATTACHMENT_KEY) != null) { return; }...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { if(!isWarDeployment(phaseContext.getDeploymentUnit())) { return; // Skip non web deployments } if(phaseContext.getAttachment(ATTACHMENT_KEY) != null) { return; }...
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { VirtualFile virtualFile = phaseContext.getAttachment(Attachments.DEPLOYMENT_ROOT).getRoot(); if(virtualFile.getName().toLowerCase().endsWith(WAR_EXTENSION)) { markDeployment(phaseCont...
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { VirtualFile virtualFile = phaseContext.getDeploymentUnit().getAttachment(Attachments.DEPLOYMENT_ROOT).getRoot(); if(virtualFile.getName().toLowerCase().endsWith(WAR_EXTENSION)) { mark...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { if(!isWarDeployment(phaseContext.getDeploymentUnit())) { return; // Skip non web deployments } final ResourceRoot deploymentRoot = phaseContext.getAttachment(Attachments.DEPLOYMENT_...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { if(!isWarDeployment(phaseContext.getDeploymentUnit())) { return; // Skip non web deployments } final ResourceRoot deploymentRoot = phaseContext.getDeploymentUnit().getAttachment(Att...
public void writeUnboundedQueueThreadPool(final XMLExtendedStreamWriter writer, final ModelNode node, final String elementName, final boolean includeName) throws XMLStreamException { writer.writeStartElement(elementName); if (includeName && node.hasDefined(NAME)) { writeAttr...
public void writeUnboundedQueueThreadPool(final XMLExtendedStreamWriter writer, final ModelNode node, final String elementName, final boolean includeName) throws XMLStreamException { writer.writeStartElement(elementName); if (includeName && node.hasDefined(NAME)) { writeAttr...
public boolean isCologneEqual(String text1, String text2) { return colognePhonetic(text1).equals(colognePhonetic(text2));
public boolean isEncodeEqual(String text1, String text2) { return colognePhonetic(text1).equals(colognePhonetic(text2));
public OperationResult execute(OperationContext context, ModelNode operation, ResultHandler resultHandler) { if (context instanceof BootOperationContext) { /* set Hibernate persistence provider as the default provider */ javax.persistence.spi.PersistenceProviderResolverHolder.setPe...
public OperationResult execute(OperationContext context, ModelNode operation, ResultHandler resultHandler) { if (context instanceof BootOperationContext) { /* set Hibernate persistence provider as the default provider */ javax.persistence.spi.PersistenceProviderResolverHolder.setPe...
protected void newXSampleData(double[][] x) { super.newXSampleData(x); qr = new QRDecomposition(getX()); }
protected void newXSampleData(double[][] x) { super.newXSampleData(x); qr = new QRDecomposition(getX(), threshold); }
public void execute(RuntimeTaskContext context) throws OperationFailedException { ServiceTarget target = context.getServiceTarget(); target.addService(EmbeddedCacheManagerDefaultsService.SERVICE_NAME, new EmbeddedCacheManagerDefaultsService()) ...
public void execute(RuntimeTaskContext context) throws OperationFailedException { ServiceTarget target = context.getServiceTarget(); target.addService(EmbeddedCacheManagerDefaultsService.SERVICE_NAME, new EmbeddedCacheManagerDefaultsService()) ...
public void testToMapWithNoHeader() throws Exception { final CSVParser parser = CSVParser.parse("a,b", CSVFormat.newFormat(',')); final CSVRecord shortRec = parser.iterator().next(); Map<String, String> map = shortRec.toMap(); assertNotNull("Map is not null.", map); assertTrue("M...
public void testToMapWithNoHeader() throws Exception { final CSVParser parser = CSVParser.parse("a,b", CSVFormat.newFormat(',')); final CSVRecord shortRec = parser.iterator().next(); final Map<String, String> map = shortRec.toMap(); assertNotNull("Map is not null.", map); assertT...
private boolean asBool(final AnnotationInstance annotation, String property) { AnnotationValue value = annotation.value(property); return value == null ? false : value.asBoolean(); }
private boolean asBool(final AnnotationInstance annotation, String property) { AnnotationValue value = annotation.value(property); return value == null ? true : value.asBoolean(); }
public static final String OPERATION_NAME = ADD; static final ModelNode getOperation(ModelNode address, ModelNode state) { ModelNode op = Util.getEmptyOperation(OPERATION_NAME, address); op.get(RUNTIME_NAME).set(state.get(RUNTIME_NAME)); op.get(HASH).set(state.get(HASH)); op.get...
public static final String OPERATION_NAME = ADD; static ModelNode getOperation(ModelNode address, ModelNode state) { ModelNode op = Util.getEmptyOperation(OPERATION_NAME, address); op.get(RUNTIME_NAME).set(state.get(RUNTIME_NAME)); op.get(HASH).set(state.get(HASH)); op.get(ENABL...
public static final String OPERATION_NAME = DEPLOY; static final ModelNode getOperation(ModelNode address) { return Util.getEmptyOperation(OPERATION_NAME, address); }
public static final String OPERATION_NAME = DEPLOY; static ModelNode getOperation(ModelNode address) { return Util.getEmptyOperation(OPERATION_NAME, address); }
public SingletonComponent(final SingletonComponentCreateService singletonComponentCreateService, final List<ServiceName> dependsOn) { super(singletonComponentCreateService); this.dependsOn = dependsOn; this.initOnStartup = singletonComponentCreateService.isInitOnStartup(); this.bean...
public SingletonComponent(final SingletonComponentCreateService singletonComponentCreateService, final List<ServiceName> dependsOn) { super(singletonComponentCreateService); this.dependsOn = dependsOn; this.initOnStartup = singletonComponentCreateService.isInitOnStartup(); this.bean...
protected List<SqlParameter> reconcileParameters(List<SqlParameter> parameters) { final List<SqlParameter> declaredReturnParameters = new ArrayList<SqlParameter>(); final Map<String, SqlParameter> declaredParameters = new LinkedHashMap<String, SqlParameter>(); boolean returnDeclared = false; List<String> outPa...
protected List<SqlParameter> reconcileParameters(List<SqlParameter> parameters) { final List<SqlParameter> declaredReturnParameters = new ArrayList<SqlParameter>(); final Map<String, SqlParameter> declaredParameters = new LinkedHashMap<String, SqlParameter>(); boolean returnDeclared = false; List<String> outPa...
public void setup() { MessageChannel channel = Mockito.mock(MessageChannel.class); this.webSocketHandler = new SubProtocolWebSocketHandler(channel); this.queueSuffixResolver = new SimpleUserQueueSuffixResolver(); TaskScheduler taskScheduler = Mockito.mock(TaskScheduler.class); this.registry = new ServletStom...
public void setup() { MessageChannel channel = Mockito.mock(MessageChannel.class); this.webSocketHandler = new SubProtocolWebSocketHandler(channel); this.queueSuffixResolver = new SimpleUserQueueSuffixResolver(); TaskScheduler taskScheduler = Mockito.mock(TaskScheduler.class); this.registry = new ServletStom...
private void maybeBindPrimitiveArgsFromPointcutExpression() { int numUnboundPrimitives = countNumberOfUnboundPrimitiveArguments(); if (numUnboundPrimitives > 1) { throw new AmbiguousBindingException("Found '" + numUnboundPrimitives + "' unbound primitive arguments with no way to distinguish between them.")...
private void maybeBindPrimitiveArgsFromPointcutExpression() { int numUnboundPrimitives = countNumberOfUnboundPrimitiveArguments(); if (numUnboundPrimitives > 1) { throw new AmbiguousBindingException("Found '" + numUnboundPrimitives + "' unbound primitive arguments with no way to distinguish between them.")...
protected List<Advisor> sortAdvisors(List<Advisor> advisors) { // build list for sorting List<PartiallyComparableAdvisorHolder> partiallyComparableAdvisors = new LinkedList<PartiallyComparableAdvisorHolder>(); for (Advisor element : advisors) { partiallyComparableAdvisors.add( new PartiallyComparable...
protected List<Advisor> sortAdvisors(List<Advisor> advisors) { // build list for sorting List<PartiallyComparableAdvisorHolder> partiallyComparableAdvisors = new LinkedList<PartiallyComparableAdvisorHolder>(); for (Advisor element : advisors) { partiallyComparableAdvisors.add( new PartiallyComparable...
public void testIntroductionOnTargetImplementingInterface() { CannotBeUnlocked target = new CannotBeUnlocked(); Lockable proxy = (Lockable) createProxy(target, // Ensure that we exclude AopUtils.findAdvisorsThatCanApply( getFixture().getAdvisors( new SingletonMetadataAwareAspectInstanceFactor...
public void testIntroductionOnTargetImplementingInterface() { CannotBeUnlocked target = new CannotBeUnlocked(); Lockable proxy = (Lockable) createProxy(target, // Ensure that we exclude AopUtils.findAdvisorsThatCanApply( getFixture().getAdvisors( new SingletonMetadataAwareAspectInstanceFactor...
// copy all attributes (emulating behavior of private FeatureDescriptor#addTable) Enumeration<String> keys = source.attributeNames(); while (keys.hasMoreElements()) { String key = (String)keys.nextElement(); target.setValue(key, source.getValue(key)); } // see java.beans.PropertyDescriptor#PropertyDesc...
// copy all attributes (emulating behavior of private FeatureDescriptor#addTable) Enumeration<String> keys = source.attributeNames(); while (keys.hasMoreElements()) { String key = keys.nextElement(); target.setValue(key, source.getValue(key)); } // see java.beans.PropertyDescriptor#PropertyDescriptor(P...
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { if (this.propertyEditorRegistrars != null) { for (PropertyEditorRegistrar propertyEditorRegistrar : this.propertyEditorRegistrars) { beanFactory.addPropertyEditorRegistrar(propertyEditorRegistrar); } }...
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { if (this.propertyEditorRegistrars != null) { for (PropertyEditorRegistrar propertyEditorRegistrar : this.propertyEditorRegistrars) { beanFactory.addPropertyEditorRegistrar(propertyEditorRegistrar); } }...
public void testDoesNotComplainWhenTargetBeanNameRefersToSingleton() throws Exception { final String targetBeanName = "singleton"; final String expectedSingleton = "Alicia Keys"; BeanFactory beanFactory = createMock(BeanFactory.class); expect(beanFactory.getBean(targetBeanName)).andReturn(expectedSingleton); ...
public void testDoesNotComplainWhenTargetBeanNameRefersToSingleton() throws Exception { final String targetBeanName = "singleton"; final String expectedSingleton = "Alicia Keys"; BeanFactory beanFactory = createMock(BeanFactory.class); expect(beanFactory.getBean(targetBeanName)).andReturn(expectedSingleton); ...
public FieldError getFieldError(String field) { List<FieldError> fieldErrors = getFieldErrors(field); return (!fieldErrors.isEmpty() ? (FieldError) fieldErrors.get(0) : null); }
public FieldError getFieldError(String field) { List<FieldError> fieldErrors = getFieldErrors(field); return (!fieldErrors.isEmpty() ? fieldErrors.get(0) : null); }
public void testReturningBeanArray() { this.testBeanTarget.setSpouse(new TestBean()); ITestBean[] spouses = (ITestBean[]) this.testBeanTarget.getSpouses(); mockCollaborator.testBeanArrayArg(spouses); replay(mockCollaborator); testBeanProxy.getSpouses(); verify(mockCollaborator); }
public void testReturningBeanArray() { this.testBeanTarget.setSpouse(new TestBean()); ITestBean[] spouses = this.testBeanTarget.getSpouses(); mockCollaborator.testBeanArrayArg(spouses); replay(mockCollaborator); testBeanProxy.getSpouses(); verify(mockCollaborator); }
public void testGrandparentTypedDefinitionFound() throws Exception { TestBean dad = (TestBean) applicationContext.getBean("father", TestBean.class); assertTrue("Dad has correct name", dad.getName().equals("Albert")); }
public void testGrandparentTypedDefinitionFound() throws Exception { TestBean dad = applicationContext.getBean("father", TestBean.class); assertTrue("Dad has correct name", dad.getName().equals("Albert")); }
public void setup() { this.context = new ClassPathXmlApplicationContext( "scheduledTasksContext.xml", ScheduledTasksBeanDefinitionParserTests.class); this.registrar = (ScheduledTaskRegistrar) this.context.getBeansOfType( ScheduledTaskRegistrar.class).values().iterator().next(); this.testBean = this.conte...
public void setup() { this.context = new ClassPathXmlApplicationContext( "scheduledTasksContext.xml", ScheduledTasksBeanDefinitionParserTests.class); this.registrar = this.context.getBeansOfType( ScheduledTaskRegistrar.class).values().iterator().next(); this.testBean = this.context.getBean("testBean"); ...
public void testSpr7766() throws Exception { ConverterRegistry registry = ((ConverterRegistry) conversionService); registry.addConverter(new ColorConverter()); List<Color> colors = (List<Color>) conversionService.convert(new String[] { "ffffff", "#000000" }, TypeDescriptor.valueOf(String[].class), new TypeDescri...
public void testSpr7766() throws Exception { ConverterRegistry registry = (conversionService); registry.addConverter(new ColorConverter()); List<Color> colors = (List<Color>) conversionService.convert(new String[] { "ffffff", "#000000" }, TypeDescriptor.valueOf(String[].class), new TypeDescriptor(new MethodParam...
public void incrementAllNodeTypes() throws SecurityException, NoSuchMethodException { Spr9751 helper = new Spr9751(); StandardEvaluationContext ctx = new StandardEvaluationContext(helper); ExpressionParser parser = new SpelExpressionParser(new SpelParserConfiguration(true, true)); Expression e = null; // Bo...
public void incrementAllNodeTypes() throws SecurityException, NoSuchMethodException { Spr9751 helper = new Spr9751(); StandardEvaluationContext ctx = new StandardEvaluationContext(helper); ExpressionParser parser = new SpelExpressionParser(new SpelParserConfiguration(true, true)); Expression e = null; // Bo...
public void parseCheck(String expression, String expectedStringFormOfAST) { try { SpelExpression e = (SpelExpression) parser.parseRaw(expression); if (e != null && !e.toStringAST().equals(expectedStringFormOfAST)) { SpelUtilities.printAbstractSyntaxTree(System.err, e); } if (e == null) { Assert.f...
public void parseCheck(String expression, String expectedStringFormOfAST) { try { SpelExpression e = parser.parseRaw(expression); if (e != null && !e.toStringAST().equals(expectedStringFormOfAST)) { SpelUtilities.printAbstractSyntaxTree(System.err, e); } if (e == null) { Assert.fail("Parsed excep...
public DataSource getDataSource(String dataSourceName) throws DataSourceLookupFailureException { Assert.state(this.beanFactory != null, "BeanFactory is required"); try { return (DataSource) this.beanFactory.getBean(dataSourceName, DataSource.class); } catch (BeansException ex) { throw new DataSourceLooku...
public DataSource getDataSource(String dataSourceName) throws DataSourceLookupFailureException { Assert.state(this.beanFactory != null, "BeanFactory is required"); try { return this.beanFactory.getBean(dataSourceName, DataSource.class); } catch (BeansException ex) { throw new DataSourceLookupFailureExcep...
protected Resource loadResource(String path) { if (SQLErrorCodesFactory.SQL_ERROR_CODE_OVERRIDE_PATH.equals(path)) { return new ClassPathResource("custom-error-codes.xml", SQLErrorCodesFactoryTests.class); } return null; } } // Should have loaded without error TestSQLErrorCodesFactory sf =...
protected Resource loadResource(String path) { if (SQLErrorCodesFactory.SQL_ERROR_CODE_OVERRIDE_PATH.equals(path)) { return new ClassPathResource("custom-error-codes.xml", SQLErrorCodesFactoryTests.class); } return null; } } // Should have loaded without error TestSQLErrorCodesFactory sf =...
public Destination resolveDestinationName(Session session, String destinationName, boolean pubSubDomain) throws JMSException { Assert.state(this.beanFactory != null, "BeanFactory is required"); try { return (Destination) this.beanFactory.getBean(destinationName, Destination.class); } catch (BeansExcepti...
public Destination resolveDestinationName(Session session, String destinationName, boolean pubSubDomain) throws JMSException { Assert.state(this.beanFactory != null, "BeanFactory is required"); try { return this.beanFactory.getBean(destinationName, Destination.class); } catch (BeansException ex) { th...
public Interceptor getEntityInterceptor() throws IllegalStateException, BeansException { if (this.entityInterceptor instanceof String) { if (this.beanFactory == null) { throw new IllegalStateException("Cannot get entity interceptor via bean name if no bean factory set"); } return (Interceptor) this.bean...
public Interceptor getEntityInterceptor() throws IllegalStateException, BeansException { if (this.entityInterceptor instanceof String) { if (this.beanFactory == null) { throw new IllegalStateException("Cannot get entity interceptor via bean name if no bean factory set"); } return this.beanFactory.getBea...
public void testValidUsage() { Object o = new Object(); MockControl emMc = MockControl.createControl(EntityManager.class); EntityManager mockEm = (EntityManager) emMc.getMock(); mockEm.contains(o); emMc.setReturnValue(false, 1); emMc.expectAndReturn(mockEm.isOpen(), true); mockEm.close(); emMc.setVo...
public void testValidUsage() { Object o = new Object(); MockControl emMc = MockControl.createControl(EntityManager.class); EntityManager mockEm = (EntityManager) emMc.getMock(); mockEm.contains(o); emMc.setReturnValue(false, 1); emMc.expectAndReturn(mockEm.isOpen(), true); mockEm.close(); emMc.setVo...
protected Action getDelegateAction(ActionMapping mapping) throws BeansException { WebApplicationContext wac = getWebApplicationContext(getServlet(), mapping.getModuleConfig()); String beanName = determineActionBeanName(mapping); return (Action) wac.getBean(beanName, Action.class); }
protected Action getDelegateAction(ActionMapping mapping) throws BeansException { WebApplicationContext wac = getWebApplicationContext(getServlet(), mapping.getModuleConfig()); String beanName = determineActionBeanName(mapping); return wac.getBean(beanName, Action.class); }
protected Action getDelegateAction(ActionMapping mapping) throws BeansException { String beanName = determineActionBeanName(mapping); if (!getWebApplicationContext().containsBean(beanName)) { return null; } return (Action) getWebApplicationContext().getBean(beanName, Action.class); }
protected Action getDelegateAction(ActionMapping mapping) throws BeansException { String beanName = determineActionBeanName(mapping); if (!getWebApplicationContext().containsBean(beanName)) { return null; } return getWebApplicationContext().getBean(beanName, Action.class); }
public String getProperty(String key) { Assert.notNull(key, "Property key must not be null"); List<String> list = this.properties.get(key); return (list != null && list.size() > 0 ? (String) list.get(0) : null); }
public String getProperty(String key) { Assert.notNull(key, "Property key must not be null"); List<String> list = this.properties.get(key); return (list != null && list.size() > 0 ? list.get(0) : null); }
public void testTemplateExecuteInputFalseTrue() throws ResourceException { ConnectionFactory connectionFactory = createMock(ConnectionFactory.class); Connection connection = createMock(Connection.class); Interaction interaction = createMock(Interaction.class); Record inputOutputRecord = createMock(Record.clas...
public void testTemplateExecuteInputFalseTrue() throws ResourceException { ConnectionFactory connectionFactory = createMock(ConnectionFactory.class); Connection connection = createMock(Connection.class); Interaction interaction = createMock(Interaction.class); Record inputOutputRecord = createMock(Record.clas...
public boolean canRead(Class<?> clazz, MediaType mediaType) { return canRead((Type) clazz, null, mediaType); }
public boolean canRead(Class<?> clazz, MediaType mediaType) { return canRead(clazz, null, mediaType); }
public UnsatisfiedServletRequestParameterException(String[] paramConditions, Map actualParams) { super(""); this.paramConditions = paramConditions; this.actualParams = (Map<String, String[]>) actualParams; }
public UnsatisfiedServletRequestParameterException(String[] paramConditions, Map actualParams) { super(""); this.paramConditions = paramConditions; this.actualParams = actualParams; }
public static String htmlEscapeHex(String input) { if (input == null) { return null; } StringBuilder escaped = new StringBuilder(input.length() * 2); for (int i = 0; i < input.length(); i++) { char character = input.charAt(i); if (characterEntityReferences.isMappedToReference(character)) { escaped...
public static String htmlEscapeHex(String input) { if (input == null) { return null; } StringBuilder escaped = new StringBuilder(input.length() * 2); for (int i = 0; i < input.length(); i++) { char character = input.charAt(i); if (characterEntityReferences.isMappedToReference(character)) { escaped...
protected <T> Object readWithMessageConverters(HttpInputMessage inputMessage, MethodParameter methodParam, Type targetType) throws IOException, HttpMediaTypeNotSupportedException { MediaType contentType = inputMessage.getHeaders().getContentType(); if (contentType == null) { contentType = MediaType.AP...
protected <T> Object readWithMessageConverters(HttpInputMessage inputMessage, MethodParameter methodParam, Type targetType) throws IOException, HttpMediaTypeNotSupportedException { MediaType contentType = inputMessage.getHeaders().getContentType(); if (contentType == null) { contentType = MediaType.AP...
protected void writeTagDetails(TagWriter tagWriter) throws JspException { tagWriter.writeAttribute("type", getInputType()); Object boundValue = getBoundValue(); Class valueType = getBindStatus().getValueType(); if (Boolean.class.equals(valueType) || boolean.class.equals(valueType)) { // the concrete type ...
protected void writeTagDetails(TagWriter tagWriter) throws JspException { tagWriter.writeAttribute("type", getInputType()); Object boundValue = getBoundValue(); Class valueType = getBindStatus().getValueType(); if (Boolean.class.equals(valueType) || boolean.class.equals(valueType)) { // the concrete type ...
public View resolveViewName(String viewName, Locale locale) throws BeansException { ApplicationContext context = getApplicationContext(); if (!context.containsBean(viewName)) { // Allow for ViewResolver chaining. return null; } return (View) context.getBean(viewName, View.class); }
public View resolveViewName(String viewName, Locale locale) throws BeansException { ApplicationContext context = getApplicationContext(); if (!context.containsBean(viewName)) { // Allow for ViewResolver chaining. return null; } return context.getBean(viewName, View.class); }
protected View loadView(String viewName, Locale locale) throws BeansException { BeanFactory factory = initFactory(); try { return (View) factory.getBean(viewName, View.class); } catch (NoSuchBeanDefinitionException ex) { // to allow for ViewResolver chaining return null; } }
protected View loadView(String viewName, Locale locale) throws BeansException { BeanFactory factory = initFactory(); try { return factory.getBean(viewName, View.class); } catch (NoSuchBeanDefinitionException ex) { // to allow for ViewResolver chaining return null; } }
public void methodNotAllowed() throws Exception { initServlet(MethodNotAllowedController.class); MockHttpServletRequest request = new MockHttpServletRequest("GET", "/myPath.do"); MockHttpServletResponse response = new MockHttpServletResponse(); servlet.service(request, response); assertEquals("Invalid respo...
public void methodNotAllowed() throws Exception { initServlet(MethodNotAllowedController.class); MockHttpServletRequest request = new MockHttpServletRequest("GET", "/myPath.do"); MockHttpServletResponse response = new MockHttpServletResponse(); servlet.service(request, response); assertEquals("Invalid respo...
public void methodNotAllowed() throws Exception { initServletWithControllers(MethodNotAllowedController.class); MockHttpServletRequest request = new MockHttpServletRequest("GET", "/myPath.do"); MockHttpServletResponse response = new MockHttpServletResponse(); getServlet().service(request, response); assertE...
public void methodNotAllowed() throws Exception { initServletWithControllers(MethodNotAllowedController.class); MockHttpServletRequest request = new MockHttpServletRequest("GET", "/myPath.do"); MockHttpServletResponse response = new MockHttpServletResponse(); getServlet().service(request, response); assertE...
public String getAsText() { return "F" + (Float) getValue(); } }
public String getAsText() { return "F" + getValue(); } }
private void checkContainsAll(Map expected, Map<String, Object> actual) { Set<String> keys = expected.keySet(); for (Iterator<String> iter = keys.iterator(); iter.hasNext();) { String key = (String) iter.next(); //System.out.println("Checking model key " + key); assertTrue("Value for model key '" + key + ...
private void checkContainsAll(Map expected, Map<String, Object> actual) { Set<String> keys = expected.keySet(); for (Iterator<String> iter = keys.iterator(); iter.hasNext();) { String key = iter.next(); //System.out.println("Checking model key " + key); assertTrue("Value for model key '" + key + "' must m...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { if(phaseContext.getDeploymentUnit().getAttachment(ConnectorXmlDescriptor.ATTACHMENT_KEY) == null) { return; // Skip non ra deployments } final DeploymentUnit deploymentUnit = phase...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { if(phaseContext.getDeploymentUnit().getAttachment(ConnectorXmlDescriptor.ATTACHMENT_KEY) == null) { return; // Skip non ra deployments } final DeploymentUnit deploymentUnit = phase...
public static Archive<?> deployment1() { WebArchive war = ShrinkWrap.create(WebArchive.class, "distributable.war"); war.addClass(SimpleServlet.class); war.setWebXML(ClusteredWebTestCase.class.getPackage(), "web.xml"); war.addAsWebInfResource(EmptyAsset.INSTANCE, "force-hashcode-chang...
public static Archive<?> deployment1() { WebArchive war = ShrinkWrap.create(WebArchive.class, "distributable.war"); war.addClass(SimpleServlet.class); war.setWebXML(ClusteredWebTestCase.class.getPackage(), "web.xml"); war.addAsWebInfResource(EmptyAsset.INSTANCE, "force-hashcode-chang...
private JdkORBSubsystemResource() { super(PathElement.pathElement(ModelDescriptionConstants.SUBSYSTEM, JdkORBExtension.SUBSYSTEM_NAME), JdkORBExtension.getResourceDescriptionResolver(JdkORBExtension.SUBSYSTEM_NAME), JdkORBSubsystemAdd.INSTANCE, ReloadRequiredR...
private JdkORBSubsystemResource() { super(PathElement.pathElement(ModelDescriptionConstants.SUBSYSTEM, JdkORBExtension.SUBSYSTEM_NAME), JdkORBExtension.getResourceDescriptionResolver(), JdkORBSubsystemAdd.INSTANCE, ReloadRequiredRemoveStepHandler.INSTANCE); ...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final ConnectorXmlDescriptor connectorXmlDescriptor = phaseContext.getDeploymentUnit().getAttachment(ConnectorXmlDescriptor.ATTACHMENT_KEY); if(connectorXmlDescriptor == null) { return; //...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final ConnectorXmlDescriptor connectorXmlDescriptor = phaseContext.getDeploymentUnit().getAttachment(ConnectorXmlDescriptor.ATTACHMENT_KEY); if(connectorXmlDescriptor == null) { return; //...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ConnectorXmlDescriptor connectorXmlDescriptor = deploymentUnit .getAttachment(ConnectorXmlDescriptor.ATTACH...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ConnectorXmlDescriptor connectorXmlDescriptor = deploymentUnit .getAttachment(ConnectorXmlDescriptor.ATTACH...
public void stop(StopContext context) { DEPLOYMENT_CONNECTOR_LOGGER.debugf("Stopping sevice %s", ConnectorServices.RESOURCE_ADAPTER_SERVICE_PREFIX.append(this.value.getDeployment().getDeploymentName())); managementRepository.getValue().getConnectors().remove(value.getDeployment().get...
public void stop(StopContext context) { DEPLOYMENT_CONNECTOR_LOGGER.debugf("Stopping sevice %s", ConnectorServices.RESOURCE_ADAPTER_DEPLOYER_SERVICE_PREFIX.append(this.value.getDeployment().getDeploymentName())); managementRepository.getValue().getConnectors().remove(value.getDeploym...
private ServiceRegistry getServiceRegistry() { return getDeploymentUnitInjector().getValue().getServiceRegistry(); } ServiceName getResourceAdapterServiceName() { // See ResourceAdapterDeploymentService return ServiceName.of(this.resourceAdapterName); }
private ServiceRegistry getServiceRegistry() { return getDeploymentUnitInjector().getValue().getServiceRegistry(); } ServiceName getResourceAdapterServiceName() { // See ResourceAdapterDeploymentService return ServiceName.JBOSS.append("ra").append(this.resourceAdapterName); }
private void createService(ServiceTarget serviceTarget, ServiceContainer container) throws Exception { InputStream is = null; InputStream isIj = null; List<ConfigProperty16> properties = new ArrayList<ConfigProperty16>(); try { StringBuilder connectorClassname = new Strin...
private void createService(ServiceTarget serviceTarget, ServiceContainer container) throws Exception { InputStream is = null; InputStream isIj = null; List<ConfigProperty16> properties = new ArrayList<ConfigProperty16>(); try { StringBuilder connectorClassname = new Strin...
private void assertXlsOutputCorrect(byte[] output) throws Exception { HSSFWorkbook workbook = new HSSFWorkbook(new ByteArrayInputStream(output)); HSSFSheet sheet = workbook.getSheetAt(0); assertNotNull("Sheet should not be null", sheet); HSSFRow row = sheet.getRow(3); HSSFCell cell = row.getCell((short) 1); ...
private void assertXlsOutputCorrect(byte[] output) throws Exception { HSSFWorkbook workbook = new HSSFWorkbook(new ByteArrayInputStream(output)); HSSFSheet sheet = workbook.getSheetAt(0); assertNotNull("Sheet should not be null", sheet); HSSFRow row = sheet.getRow(3); HSSFCell cell = row.getCell((short) 1); ...
protected void onRefresh() throws BeansException { addApplicationListener(listener); } } StaticApplicationContext ctx = new TestContext(); MutablePropertyValues pvs = new MutablePropertyValues(); pvs.add("applicationEventClass", TestEvent.class.getName()); // should automatically receive applicatio...
protected void onRefresh() throws BeansException { addListener(listener); } } StaticApplicationContext ctx = new TestContext(); MutablePropertyValues pvs = new MutablePropertyValues(); pvs.add("applicationEventClass", TestEvent.class.getName()); // should automatically receive applicationEventPubli...
public void testPrototypeScriptedBean() throws Exception { GenericApplicationContext ctx = new GenericApplicationContext(); ctx.registerBeanDefinition("messenger", BeanDefinitionBuilder.rootBeanDefinition(StubMessenger.class).getBeanDefinition()); BeanDefinitionBuilder scriptedBeanBuilder = BeanDefinitionBuilde...
public void testPrototypeScriptedBean() throws Exception { GenericApplicationContext ctx = new GenericApplicationContext(); ctx.registerBeanDefinition("messenger", BeanDefinitionBuilder.rootBeanDefinition(StubMessenger.class).getBeanDefinition()); BeanDefinitionBuilder scriptedBeanBuilder = BeanDefinitionBuilde...
public void convertArrayToObjectAssignableTargetType() { Long[] array = new Long[] { 3L }; Long[] result = (Long[]) conversionService.convert(array, Object.class); assertArrayEquals(array, result); }
public void convertArrayToObjectAssignableTargetType() { Long[] array = new Long[] { 3L }; Long[] result = (Long[]) conversionService.convert(array, Object.class); assertEquals(array, result); }
public void undeploy(DeploymentUnit context) { context.removeAttachment(Attachments.SERVICE_MODULE_LOADER); } })); // Activate core processors for jar deployment deployers.get(Phase.STRUCTURE).add(new RegisteredProcessor(Phase.STRUCTURE_MOUNT, new Deploym...
public void undeploy(DeploymentUnit context) { context.removeAttachment(Attachments.SERVICE_MODULE_LOADER); } })); // Activate core processors for jar deployment deployers.get(Phase.STRUCTURE).add(new RegisteredProcessor(Phase.STRUCTURE_MOUNT, new Deploym...
private String getHttpResponse(String message) throws IOException, ExecutionException, TimeoutException { String reqPath = "http://localhost:8080/resteasy-osgi-client/rest/echo/" + message; return HttpRequest.get(reqPath, 10, TimeUnit.SECONDS); }
private String getHttpResponse(String message) throws IOException, ExecutionException, TimeoutException { String reqPath = "http://" + System.getProperty("test.bind.address", "localhost") + ":8080/resteasy-osgi-client/rest/echo/" + message; return HttpRequest.get(reqPath, 10, TimeUnit.SECONDS); ...
public ArquillianService getValue() throws IllegalStateException { return this; } void registerDeployment(ArquillianConfig arqConfig) { synchronized (deployedTests) { for (String className : arqConfig.getTestClasses()) { deployedTests.put(className, arqConfig); ...
public ArquillianService getValue() throws IllegalStateException { return this; } void registerDeployment(ArquillianConfig arqConfig) { synchronized (deployedTests) { for (String className : arqConfig.getTestClasses()) { deployedTests.put(className, arqConfig); ...
protected String getThreadGroupName(String threadPoolName) { return "batch-" + threadPoolName; } }
protected String getThreadGroupName(String threadPoolName) { return "Batch Thread"; } }
public void handle(ParsingContext ctx) throws CommandFormatException { if(ctx.getCharacter() == '\\') { if(ctx.getInput().length() > ctx.getLocation() + Util.LINE_SEPARATOR.length() && ctx.getInput().startsWith(Util.LINE_SEPARATOR, ctx.getLocation() + 1)) { if...
public void handle(ParsingContext ctx) throws CommandFormatException { if(ctx.getCharacter() == '\\') { if(ctx.getInput().length() > ctx.getLocation() + Util.LINE_SEPARATOR.length() && ctx.getInput().startsWith(Util.LINE_SEPARATOR, ctx.getLocation() + 1)) { if...
public static final SimpleAttributeDefinition VALUE = new SimpleAttributeDefinitionBuilder(ModelDescriptionConstants.VALUE, ModelType.STRING, false) .setValidator(new StringLengthValidator(1, Integer.MAX_VALUE, false, false)).build();
public static final SimpleAttributeDefinition VALUE = new SimpleAttributeDefinitionBuilder(ModelDescriptionConstants.VALUE, ModelType.STRING, false) .setValidator(new StringLengthValidator(1, Integer.MAX_VALUE, false, true)).setAllowExpression(true).build();
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final EEModuleDescription eeModuleDescription = deploymentUnit.getAttachment(Attachments.EE_MODULE_DESCRIPTION); fi...
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final EEModuleDescription eeModuleDescription = deploymentUnit.getAttachment(Attachments.EE_MODULE_DESCRIPTION); fi...
public final void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final EEModuleDescription eeModuleDescription = deploymentUnit.getAttachment(Attachments.EE_MODULE_DESCRIPTION); ...
public final void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final EEModuleDescription eeModuleDescription = deploymentUnit.getAttachment(Attachments.EE_MODULE_DESCRIPTION); ...
public static PropertyReplacer propertyReplacer(final DeploymentUnit deploymentUnit) { Boolean replacement = deploymentUnit.getAttachment(Attachments.EJB_ANNOTATION_PROPERTY_REPLACEMENT); if (replacement == null || replacement) { final PropertyResolver propertyResolver = deploymentUnit ...
public static PropertyReplacer propertyReplacer(final DeploymentUnit deploymentUnit) { Boolean replacement = deploymentUnit.getAttachment(Attachments.ANNOTATION_PROPERTY_REPLACEMENT); if (replacement == null || replacement) { final PropertyResolver propertyResolver = deploymentUnit ...
String ANNOTATION_PROPERTY_REPLACEMENT = "annotation-property-replacement"; /* * 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. ...
String ANNOTATION_PROPERTY_REPLACEMENT = "annotation-property-replacement"; /* * 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. ...
public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context) throws XMLStreamException { context.startSubsystemElement(Namespace.EE_2_0.getUriString(), false); ModelNode eeSubSystem = context.getModelNode(); GlobalModulesDefinition.INSTANCE.marshallAsElement...
public void writeContent(XMLExtendedStreamWriter writer, SubsystemMarshallingContext context) throws XMLStreamException { context.startSubsystemElement(Namespace.EE_2_0.getUriString(), false); ModelNode eeSubSystem = context.getModelNode(); GlobalModulesDefinition.INSTANCE.marshallAsElement...
private void applyUpdateToDeploymentUnitProcessor(final OperationContext context, ModelNode newValue, String attributeName) throws OperationFailedException { if (GlobalModulesDefinition.INSTANCE.getName().equals(attributeName)) { moduleDependencyProcessor.setGlobalModules(GlobalModulesDefinition...
private void applyUpdateToDeploymentUnitProcessor(final OperationContext context, ModelNode newValue, String attributeName) throws OperationFailedException { if (GlobalModulesDefinition.INSTANCE.getName().equals(attributeName)) { moduleDependencyProcessor.setGlobalModules(GlobalModulesDefinition...
private void testTransformers1_0_0_reject(ModelTestControllerVersion controllerVersion) throws Exception { String subsystemXml = readResource("subsystem.xml"); ModelVersion modelVersion = ModelVersion.create(1, 0, 0); //Use the non-runtime version of the extension which will happen on the HC...
private void testTransformers1_0_0_reject(ModelTestControllerVersion controllerVersion) throws Exception { String subsystemXml = readResource("subsystem.xml"); ModelVersion modelVersion = ModelVersion.create(1, 0, 0); //Use the non-runtime version of the extension which will happen on the HC...