buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public void handleRollback(OperationContext context, ModelNode operation) { try { final String path = PathAddHandler.getPathValue(context, PATH_SPECIFIED, model); final String relativeTo = PathAddHandler....
public void handleRollback(OperationContext context, ModelNode operation) { try { final String path = PathAddHandler.getPathValue(context, PATH_SPECIFIED, model); final String relativeTo = PathAddHandler....
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { String path = PATH.resolveModelAttribute(context, operation).asString(); dumpManagementResourceRegistration(extensionRegistry, path); context.completeStep(); }
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { String path = PATH.resolveModelAttribute(context, operation).asString(); dumpManagementResourceRegistration(extensionRegistry, path); context.stepCompleted(); }
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { Resource resource = context.createResource(PathAddress.EMPTY_ADDRESS); final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR)); String module = address.ge...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { Resource resource = context.createResource(PathAddress.EMPTY_ADDRESS); final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR)); String module = address.ge...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { context.completeStep(); } }
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { context.completeStep(OperationContext.RollbackHandler.NOOP_ROLLBACK_HANDLER); } }
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { context.completeStep(); } } }
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { context.completeStep(OperationContext.RollbackHandler.NOOP_ROLLBACK_HANDLER); } } }
protected void doHandle(CommandContext ctx) throws CommandLineException { final IfElseBlock ifBlock = IfElseBlock.remove(ctx); final BatchManager batchManager = ctx.getBatchManager(); if(!batchManager.isBatchActive()) { if(ifBlock.isInIf()) { throw new CommandLi...
protected void doHandle(CommandContext ctx) throws CommandLineException { final IfElseBlock ifBlock = IfElseBlock.remove(ctx); final BatchManager batchManager = ctx.getBatchManager(); if(!batchManager.isBatchActive()) { if(ifBlock.isInIf()) { throw new CommandLi...
public static void createHostRegistry(final ManagementResourceRegistration root, final HostControllerConfigurationPersister configurationPersister, final HostControllerEnvironment environment, final FileRepository localFileRepository, ...
public static void createHostRegistry(final ManagementResourceRegistration root, final HostControllerConfigurationPersister configurationPersister, final HostControllerEnvironment environment, final FileRepository localFileRepository, ...
package org.springframework.test.web.client; /* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/li...
package org.springframework.test.web.client; /* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/li...
package org.springframework.test.web.client; /* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/li...
package org.springframework.test.web.client; /* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/li...
package org.springframework.test.web.servlet; /* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/l...
package org.springframework.test.web.servlet; /* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/l...
package org.springframework.test.web.servlet; /* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License; Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/l...
package org.springframework.test.web.servlet; /* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License; Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/l...
package org.springframework.test.web.servlet; package org.springframework.test.web.mock.servlet; import javax.servlet.ServletContext; import org.springframework.mock.web.MockHttpServletRequest; /** * Builds a {@link MockHttpServletRequest}. * * <p>See static, factory methods in * {@code org.springframework.test...
package org.springframework.test.web.servlet; package org.springframework.test.web.servlet; import javax.servlet.ServletContext; import org.springframework.mock.web.MockHttpServletRequest; /** * Builds a {@link MockHttpServletRequest}. * * <p>See static, factory methods in * {@code org.springframework.test.web....
package org.springframework.test.web.servlet; /* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/l...
package org.springframework.test.web.servlet; /* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/l...
package org.springframework.test.web.servlet; /* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/l...
package org.springframework.test.web.servlet; /* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/l...
package org.springframework.test.web.servlet; /* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/l...
package org.springframework.test.web.servlet; /* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/l...
package org.springframework.test.web.servlet.request; /* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apac...
package org.springframework.test.web.servlet.request; /* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apac...
public void declareOutputFields(OutputFieldsDeclarer declarer) { // in partitioned example, in case an emitter task receives a later transaction than it's emitted so far, // when it sees the earlier txid it should know to emit nothing declarer.declareStream(TRANSACTION_BATCH_STREAM_ID, new F...
public void declareOutputFields(OutputFieldsDeclarer declarer) { // in partitioned example, in case an emitter task receives a later transaction than it's emitted so far, // when it sees the earlier txid it should know to emit nothing declarer.declareStream(TRANSACTION_BATCH_STREAM_ID, new F...
public CSVParser(final Reader input) throws IOException { this(input, CSVFormat.RFC4180_EMPTY_LINES); }
public CSVParser(final Reader input) throws IOException { this(input, CSVFormat.DEFAULT); }
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final EjbJarMetaData metaData = deploymentUnit.getAttachment(EjbDeploymentAttachmentKeys.EJB_JAR_METADATA); if (me...
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final EjbJarMetaData metaData = deploymentUnit.getAttachment(EjbDeploymentAttachmentKeys.EJB_JAR_METADATA); if (me...
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final EjbJarMetaData metaData = deploymentUnit.getAttachment(EjbDeploymentAttachmentKeys.EJB_JAR_METADATA); final ...
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final EjbJarMetaData metaData = deploymentUnit.getAttachment(EjbDeploymentAttachmentKeys.EJB_JAR_METADATA); final ...
private final int offset; /** * Next annotation writer. This field is used to store annotation lists. */ AnnotationWriter next; /** * Previous annotation writer. This field is used to store annotation lists. */ AnnotationWriter prev; // ------------------------------------...
private final int offset; /** * Next annotation writer. This field is used to store annotation lists. */ AnnotationWriter next; /** * Previous annotation writer. This field is used to store annotation lists. */ AnnotationWriter prev; // ------------------------------------...
private Attribute attrs; // ------------------------------------------------------------------------ // Constructor // ------------------------------------------------------------------------ /** * Constructs a new {@link FieldWriter}. * * @param cw * the class writ...
private Attribute attrs; // ------------------------------------------------------------------------ // Constructor // ------------------------------------------------------------------------ /** * Constructs a new {@link FieldWriter}. * * @param cw * the class writ...
public void test() { MutablePropertySources sources = new MutablePropertySources(); sources.addLast(new MockPropertySource("b").withProperty("p1", "bValue")); sources.addLast(new MockPropertySource("d").withProperty("p1", "dValue")); sources.addLast(new MockPropertySource("f").withProperty("p1", "fValue")); ...
public void test() { MutablePropertySources sources = new MutablePropertySources(); sources.addLast(new MockPropertySource("b").withProperty("p1", "bValue")); sources.addLast(new MockPropertySource("d").withProperty("p1", "dValue")); sources.addLast(new MockPropertySource("f").withProperty("p1", "fValue")); ...
public void testFeedWithLinefeedChars() throws Exception { // Map<String, String> namespace = Collections.singletonMap("ns", ""); standaloneSetup(new BlogFeedController()).build() .perform(get("/blog.atom").accept(MediaType.APPLICATION_ATOM_XML)) .andExpect(status().isOk()) .andExpect(content().content...
public void testFeedWithLinefeedChars() throws Exception { // Map<String, String> namespace = Collections.singletonMap("ns", ""); standaloneSetup(new BlogFeedController()).build() .perform(get("/blog.atom").accept(MediaType.APPLICATION_ATOM_XML)) .andExpect(status().isOk()) .andExpect(content().content...
private String committedPath() { return _spoutConfig.zkRoot + "/" + _spoutConfig.id + "/" + _partition.getId(); }
private String committedPath() { return _spoutConfig.zkRoot + "/" + _spoutConfig.id + "/" + _spoutConfig.topic + "/" + _partition.getId(); }
public boolean equals(final Object object) { synchronized (lock) { if (object == this) { return true; } return decorated().equals(object); } }
public boolean equals(final Object object) { synchronized (lock) { if (object == this) { return true; } return object == this || decorated().equals(object); } }
public static long freeSpaceKb(long timeout) throws IOException { return freeSpaceKb(new File(".").getAbsolutePath(), timeout); } //----------------------------------------------------------------------- /** * Returns the free space on a drive or volume in a cross-platform manner. ...
public static long freeSpaceKb(long timeout) throws IOException { return freeSpaceKb(new File(".").getAbsolutePath(), timeout); } //----------------------------------------------------------------------- /** * Returns the free space on a drive or volume in a cross-platform manner. ...
public static boolean wildcardMatch(String filename, String wildcardMatcher, IOCase caseSensitivity) { if (filename == null && wildcardMatcher == null) { return true; } if (filename == null || wildcardMatcher == null) { return false; } if (caseSensitiv...
public static boolean wildcardMatch(String filename, String wildcardMatcher, IOCase caseSensitivity) { if (filename == null && wildcardMatcher == null) { return true; } if (filename == null || wildcardMatcher == null) { return false; } if (caseSensitiv...
protected void prepare() { final Configuration hbConfig = HBaseConfiguration.create(); Map<String, Object> conf = (Map<String, Object>) map.get(options.configKey); if(conf == null){ LOG.info("HBase configuration not found using key '" + options.configKey + "'"); LOG.i...
protected void prepare() { final Configuration hbConfig = HBaseConfiguration.create(); Map<String, Object> conf = (Map<String, Object>) map.get(options.configKey); if(conf == null){ LOG.info("HBase configuration not found using key '" + options.configKey + "'"); LOG.i...
public void setSubMatrix(final T[][] subMatrix, final int row, final int column) throws DimensionMismatchException, OutOfRangeException, NoDataException, NullArgumentException, NumberIsTooSmallException { if (subMatrix == null) { throw new NullArgumen...
public void setSubMatrix(final T[][] subMatrix, final int row, final int column) throws DimensionMismatchException, OutOfRangeException, NoDataException, NullArgumentException { if (subMatrix == null) { throw new NullArgumentException(); } ...
public void setSubMatrix(final T[][] subMatrix, final int row, final int column) throws DimensionMismatchException, OutOfRangeException, NoDataException, NullArgumentException, NumberIsTooSmallException { // safety checks MathUtils.checkNotNull(subMatrix)...
public void setSubMatrix(final T[][] subMatrix, final int row, final int column) throws DimensionMismatchException, OutOfRangeException, NoDataException, NullArgumentException { // safety checks MathUtils.checkNotNull(subMatrix); final int refLeng...
protected void installServices(final OperationContext context, final String realmName, final ModelNode model, final ServiceVerificationHandler verificationHandler, final List<ServiceController<?>> newControllers) throws OperationFailedException { final ModelNod...
protected void installServices(final OperationContext context, final String realmName, final ModelNode model, final ServiceVerificationHandler verificationHandler, final List<ServiceController<?>> newControllers) throws OperationFailedException { final ModelNod...
public MathArithmeticException() { addMessage(LocalizedFormats.ARITHMETIC_EXCEPTION, null); }
public MathArithmeticException() { addMessage(LocalizedFormats.ARITHMETIC_EXCEPTION); }
public MathIllegalStateException() { addMessage(LocalizedFormats.ILLEGAL_STATE, null); }
public MathIllegalStateException() { addMessage(LocalizedFormats.ILLEGAL_STATE); }
public MathUnsupportedOperationException() { this(LocalizedFormats.UNSUPPORTED_OPERATION, null); }
public MathUnsupportedOperationException() { this(LocalizedFormats.UNSUPPORTED_OPERATION); }
private static void processType(final UnifiedServiceRefMetaData serviceRefUMDM) { final boolean isJAXRPC = serviceRefUMDM.getMappingFile() != null || "javax.xml.rpc.Service".equals(serviceRefUMDM.getServiceInterface()); serviceRefUMDM.setType(isJAXRPC ? Type.JAXRPC : Type.JAXWS); }
private static UnifiedHandlerChainsMetaData getUnifiedHandlerChainsMetaData(final ServiceReferenceHandlerChainsMetaData handlerChainsMD) { final UnifiedHandlerChainsMetaData handlerChainsUMDM = new UnifiedHandlerChainsMetaData(); for (final ServiceReferenceHandlerChainMetaData handlerChainMD : hand...
public interface BaseMultivariateOptimizer<FUNC extends MultivariateFunction> /* * 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...
public interface BaseMultivariateOptimizer<FUNC extends MultivariateFunction> /* * 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...
extends BaseMultivariateOptimizer<FUNC> { /* * 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 Licens...
extends BaseMultivariateOptimizer<FUNC> { /* * 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 Licens...
extends BaseMultivariateOptimizer<DifferentiableMultivariateFunction> {} /* * 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...
extends BaseMultivariateOptimizer<DifferentiableMultivariateFunction> {} /* * 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...
extends BaseMultivariateOptimizer<MultivariateFunction> {} /* * 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 ...
extends BaseMultivariateOptimizer<MultivariateFunction> {} /* * 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 ...
public JGroupsSubsystemTest() { super(JGroupsExtension.SUBSYSTEM_NAME, new JGroupsExtension(), "subsystem-jgroups.xml"); }
public JGroupsSubsystemTest() { super(JGroupsExtension.SUBSYSTEM_NAME, new JGroupsExtension(), "subsystem-jgroups-test.xml"); }
public ServerDeploymentRepositoryDisable(String path) { super(); this.path = path; }
public ServerDeploymentRepositoryDisable(String path) { super(false, true); this.path = path; }
public ServerDeploymentRepositoryEnable(String path) { super(); this.path = path; }
public ServerDeploymentRepositoryEnable(String path) { super(false, true); this.path = path; }
public ServerExtensionAdd(final String moduleName) { super(true); this.moduleName = moduleName; }
public ServerExtensionAdd(final String moduleName) { super(true, false); this.moduleName = moduleName; }
public ServerExtensionRemove(final String moduleName) { super(true); this.moduleName = moduleName; }
public ServerExtensionRemove(final String moduleName) { super(true, false); this.moduleName = moduleName; }
public ServerSubsystemRemove(final SubsystemRemove subsystemRemove) { super(true); this.subsystemRemove = subsystemRemove; }
public ServerSubsystemRemove(final SubsystemRemove subsystemRemove) { super(true, false); this.subsystemRemove = subsystemRemove; }
public int getPort() { return this.listener.getBinding().getValue().getPort(); }
public int getPort() { return this.listener.getBinding().getValue().getAbsolutePort(); }
public static boolean sameResourceFactory(ResourceTransactionManager tm, Object resourceFactory) { return unwrapResourceIfNecessary(tm.getResourceFactory()).equals(unwrapResourceIfNecessary(resourceFactory)); } /** * Unwrap the given resource handle if necessary; otherwise return * the given handle as-is. *...
public static boolean sameResourceFactory(ResourceTransactionManager tm, Object resourceFactory) { return unwrapResourceIfNecessary(tm.getResourceFactory()).equals(unwrapResourceIfNecessary(resourceFactory)); } /** * Unwrap the given resource handle if necessary; otherwise return * the given handle as-is. *...
public boolean checkNotModified(long lastModifiedTimestamp) { if (lastModifiedTimestamp >= 0 && !this.notModified && (this.response == null || !this.response.containsHeader(HEADER_LAST_MODIFIED))) { long ifModifiedSince = getRequest().getDateHeader(HEADER_IF_MODIFIED_SINCE); this.notModified = (ifModifiedS...
public boolean checkNotModified(long lastModifiedTimestamp) { if (lastModifiedTimestamp >= 0 && !this.notModified && (this.response == null || !this.response.containsHeader(HEADER_LAST_MODIFIED))) { long ifModifiedSince = getRequest().getDateHeader(HEADER_IF_MODIFIED_SINCE); this.notModified = (ifModifiedS...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { ServiceController<?> controller = context.getServiceRegistry(false).getService(ModClusterService.NAME); ModCluster modcluster = (ModCluster) controller.getValue();...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { ServiceController<?> controller = context.getServiceRegistry(false).getService(ModClusterService.NAME); ModCluster modcluster = (ModCluster) controller.getValue();...
public void activate(final ServiceActivatorContext context) {final BatchBuilder batchBuilder = context.getBatchBuilder(); final ScaledCount coreThreads = this.coreThreads; int coreThreadsValue = coreThreads != null ? coreThreads.getScaledCount() : 0; final ScaledCount maxThreads = getMaxThre...
public void activate(final ServiceActivatorContext context) {final BatchBuilder batchBuilder = context.getBatchBuilder(); final ScaledCount coreThreads = this.coreThreads; int coreThreadsValue = coreThreads != null ? coreThreads.getScaledCount() : 0; final ScaledCount maxThreads = getMaxThre...
public void activate(final ServiceActivatorContext context) { final BatchBuilder batchBuilder = context.getBatchBuilder(); long keepAlive = -1L; final TimeSpec keepaliveTime = getKeepaliveTime(); if(keepaliveTime != null) keepAlive = keepaliveTime.getUnit().toNanos(keepal...
public void activate(final ServiceActivatorContext context) { final BatchBuilder batchBuilder = context.getBatchBuilder(); long keepAlive = -1L; final TimeSpec keepaliveTime = getKeepaliveTime(); if(keepaliveTime != null) keepAlive = keepaliveTime.getUnit().toNanos(keepal...
public void handle(ParsingContext ctx) throws CommandFormatException { if(ctx.isEndOfContent()) { return; } if(ctx.getCharacter() == ',') { return; } getHandler(ctx.getCharacter()).handle(...
public void handle(ParsingContext ctx) throws CommandFormatException { if(ctx.isEndOfContent()) { return; } if(ctx.getCharacter() == ',' || ctx.getCharacter() == '}') { return; } getHandle...
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION); f...
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION); f...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); if (!CmpDeploymentMarker.isCmpDeployment(deploymentUnit)) { return; } final ModuleSpecification modu...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); if (!CmpDeploymentMarker.isCmpDeployment(deploymentUnit)) { return; } final ModuleSpecification modu...
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION); fi...
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION); fi...
private void addDepdenency(ModuleSpecification moduleSpecification, ModuleLoader moduleLoader, ModuleIdentifier moduleIdentifier) { moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, moduleIdentifier, false, false, true)); }
private void addDepdenency(ModuleSpecification moduleSpecification, ModuleLoader moduleLoader, ModuleIdentifier moduleIdentifier) { moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, moduleIdentifier, false, false, true, false)); }
private void addDependency(ModuleSpecification moduleSpecification, ModuleLoader moduleLoader, ModuleIdentifier moduleIdentifier) { moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, moduleIdentifier, false, false, false)); }
private void addDependency(ModuleSpecification moduleSpecification, ModuleLoader moduleLoader, ModuleIdentifier moduleIdentifier) { moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, moduleIdentifier, false, false, false, false)); }
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit unit = phaseContext.getDeploymentUnit(); final List<KernelDeploymentXmlDescriptor> kdXmlDescriptors = unit.getAttachment(KernelDeploymentXmlDescriptor.ATTACHMENT_KEY); if (...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit unit = phaseContext.getDeploymentUnit(); final List<KernelDeploymentXmlDescriptor> kdXmlDescriptors = unit.getAttachment(KernelDeploymentXmlDescriptor.ATTACHMENT_KEY); if (...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION); final JBo...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION); final JBo...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); if (deploymentUnit.getParent() != null) { return; } final List<DeploymentUnit> deploymentUnits = new Array...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); if (deploymentUnit.getParent() != null) { return; } final List<DeploymentUnit> deploymentUnits = new Array...
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION); fin...
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION); fin...
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ServiceModuleLoader deploymentModuleLoader = deploymentUnit.getAttachment(Attachments.SERVICE_MODULE_LOADER); ...
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ServiceModuleLoader deploymentModuleLoader = deploymentUnit.getAttachment(Attachments.SERVICE_MODULE_LOADER); ...
private static void parseModuleDependency(final XMLStreamReader reader, final ModuleStructureSpec specBuilder, ModuleLoader moduleLoader) throws XMLStreamException { String name = null; String slot = null; boolean export = false; boolean ...
private static void parseModuleDependency(final XMLStreamReader reader, final ModuleStructureSpec specBuilder, ModuleLoader moduleLoader) throws XMLStreamException { String name = null; String slot = null; boolean export = false; boolean ...
private static void parseModuleDependency(final XMLStreamReader reader, final ModuleStructureSpec specBuilder, ModuleLoader moduleLoader) throws XMLStreamException { String name = null; String slot = null; boolean export = false; boolean ...
private static void parseModuleDependency(final XMLStreamReader reader, final ModuleStructureSpec specBuilder, ModuleLoader moduleLoader) throws XMLStreamException { String name = null; String slot = null; boolean export = false; boolean ...
public RealMatrix multiply(final RealMatrix m) throws IllegalArgumentException { try { return multiply((OpenMapRealMatrix) m); } catch (ClassCastException cce) { // safety check MatrixUtils.checkMultiplicationCompatible(this, m); final int ou...
public RealMatrix multiply(final RealMatrix m) throws IllegalArgumentException { try { return multiply((OpenMapRealMatrix) m); } catch (ClassCastException cce) { // safety check MatrixUtils.checkMultiplicationCompatible(this, m); final int ou...
public void testMultiply() { OpenMapRealMatrix m = createSparseMatrix(testData); OpenMapRealMatrix mInv = createSparseMatrix(testDataInv); OpenMapRealMatrix identity = createSparseMatrix(id); OpenMapRealMatrix m2 = createSparseMatrix(testData2); assertClose("inverse multiply"...
public void testMultiply() { OpenMapRealMatrix m = createSparseMatrix(testData); OpenMapRealMatrix mInv = createSparseMatrix(testDataInv); OpenMapRealMatrix identity = createSparseMatrix(id); OpenMapRealMatrix m2 = createSparseMatrix(testData2); assertClose("inverse multiply"...
public void annotationMethodMessageHandler() { loadBeanDefinitions("websocket-config-broker-simple.xml"); SimpAnnotationMethodMessageHandler annotationMethodMessageHandler = this.appContext.getBean(SimpAnnotationMethodMessageHandler.class); assertNotNull(annotationMethodMessageHandler); MessageConverter ...
public void annotationMethodMessageHandler() { loadBeanDefinitions("websocket-config-broker-simple.xml"); SimpAnnotationMethodMessageHandler annotationMethodMessageHandler = this.appContext.getBean(SimpAnnotationMethodMessageHandler.class); assertNotNull(annotationMethodMessageHandler); MessageConverter ...
protected void processComponentConfig(DeploymentUnit deploymentUnit, DeploymentPhaseContext phaseContext, CompositeIndex index, ComponentDescription componentDescription) throws DeploymentUnitProcessingException { if (!(componentDescription instanceof SessionBeanComponentDescription)) { return;...
protected void processComponentConfig(DeploymentUnit deploymentUnit, DeploymentPhaseContext phaseContext, CompositeIndex index, ComponentDescription componentDescription) throws DeploymentUnitProcessingException { if (!(componentDescription instanceof SessionBeanComponentDescription)) { return;...
protected void processBeanMetaData(MessageDrivenBeanMetaData mdb, DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final EjbJarDescription ejbModuleDescription = deploymentUnit.getAttachment(EjbDeploymen...
protected void processBeanMetaData(MessageDrivenBeanMetaData mdb, DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final EjbJarDescription ejbModuleDescription = deploymentUnit.getAttachment(EjbDeploymen...
public void testISODurationFormat(){ TimeZone timeZone = TimeZone.getTimeZone("GMT-3"); Calendar cal = Calendar.getInstance(timeZone); cal.set(2002, 1, 23, 9, 11, 12); cal.set(Calendar.MILLISECOND, 1); String text; // repeat a test from testDateTimeISO to compare exte...
public void testISODurationFormat(){ TimeZone timeZone = TimeZone.getTimeZone("GMT-3"); Calendar cal = Calendar.getInstance(timeZone); cal.set(2002, 1, 23, 9, 11, 12); cal.set(Calendar.MILLISECOND, 1); String text; // repeat a test from testDateTimeISO to compare exte...
package org.springframework.context.annotation.aspectj; /* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.ap...
package org.springframework.context.annotation.aspectj; /* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.ap...
ServiceBuilder<?> build(ServiceTarget target, String connector); package org.wildfly.extension.mod_cluster; import org.jboss.msc.service.ServiceBuilder; import org.jboss.msc.service.ServiceTarget; public interface ContainerEventHandlerAdapterBuilder { ServiceBuilder<?> build(ServiceTarget target, String connecto...
ServiceBuilder<?> build(ServiceTarget target, String connector); package org.wildfly.extension.mod_cluster; import org.jboss.msc.service.ServiceBuilder; import org.jboss.msc.service.ServiceTarget; public interface ContainerEventHandlerAdapterBuilder { ServiceBuilder<?> build(ServiceTarget target, String connecto...
protected static final CustomLoadMetricDefinition INSTANCE = new CustomLoadMetricDefinition(); static final SimpleAttributeDefinition CLASS = SimpleAttributeDefinitionBuilder.create(CommonAttributes.CLASS, ModelType.STRING, false) .setAllowExpression(false) .setRestartAllServices() ...
protected static final CustomLoadMetricDefinition INSTANCE = new CustomLoadMetricDefinition(); static final SimpleAttributeDefinition CLASS = SimpleAttributeDefinitionBuilder.create(CommonAttributes.CLASS, ModelType.STRING, false) .setAllowExpression(false) .setRestartAllServices() ...
protected static final LoadMetricDefinition INSTANCE = new LoadMetricDefinition(); static final SimpleAttributeDefinition TYPE = SimpleAttributeDefinitionBuilder.create(CommonAttributes.TYPE, ModelType.STRING, false) .setAllowExpression(false) .setRestartAllServices() .setVa...
protected static final LoadMetricDefinition INSTANCE = new LoadMetricDefinition(); static final SimpleAttributeDefinition TYPE = SimpleAttributeDefinitionBuilder.create(CommonAttributes.TYPE, ModelType.STRING, false) .setAllowExpression(false) .setRestartAllServices() .setVa...
private final List<AccessConstraintDefinition> accessConstraints; static void buildTransformation(ModelVersion version, ResourceTransformationDescriptionBuilder builder) { if (ModClusterModel.VERSION_1_3_0.requiresTransformation(version)) { builder.addChildResource(PATH) ...
private final List<AccessConstraintDefinition> accessConstraints; static void buildTransformation(ModelVersion version, ResourceTransformationDescriptionBuilder builder) { if (ModClusterModel.VERSION_1_2_0.requiresTransformation(version)) { builder.addChildResource(PATH) ...
public void newUser() throws IOException { values.setExistingUser(false); values.setRoles(ROLES); DuplicateUserCheckState userCheckState = new DuplicateUserCheckState(consoleMock, values); AssertConsoleBuilder consoleBuilder = new AssertConsoleBuilder(). expectedDisp...
public void newUser() throws IOException { values.setExistingUser(false); values.setRoles(ROLES); DuplicateUserCheckState userCheckState = new DuplicateUserCheckState(consoleMock, values); AssertConsoleBuilder consoleBuilder = new AssertConsoleBuilder(). expectedDisp...
public static WebArchive deployment() { // FIXME hack to get things prepared before the deployment happens try { // create required security domains createSecurityDomain(); } catch (Exception e) { // ignore } ClassLoader tccl = Thread.curr...
public static WebArchive deployment() { // FIXME hack to get things prepared before the deployment happens try { // create required security domains createSecurityDomain(); } catch (Exception e) { throw new RuntimeException(e); } ClassLoad...
public List<Phoneme> getPhonemes() { return this.phonemes; } } /** * A minimal wrapper around the functionality of Pattern that we use, to allow for alternate implementations. */ public static interface RPattern { boolean isMatch(CharSequence input);
public List<Phoneme> getPhonemes() { return this.phonemes; } } /** * A minimal wrapper around the functionality of Pattern that we use, to allow for alternate implementations. */ public interface RPattern { boolean isMatch(CharSequence input);
protected void handleSuccessResult() { final File doDeployMarker = new File(new File(parent), deploymentFile.getName() + DO_DEPLOY); if (doDeployMarker.exists() && !doDeployMarker.delete()) { log.errorf("Failed to delete deployment marker file %s", doDeployMarker.getAbsol...
protected void handleSuccessResult() { final File doDeployMarker = new File(new File(parent), deploymentFile.getName() + DO_DEPLOY); if (doDeployMarker.exists() && !doDeployMarker.delete()) { log.errorf("Failed to delete deployment marker file %s", doDeployMarker.getAbsol...
public void initialize(NewExtensionContext context) { final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME); final ModelNodeRegistration registration = subsystem.registerSubsystemModel(NewLoggingSubsystemProviders.SUBSYSTEM); registration.registerOperationHandler(...
public void initialize(NewExtensionContext context) { final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME); final ModelNodeRegistration registration = subsystem.registerSubsystemModel(NewLoggingSubsystemProviders.SUBSYSTEM); registration.registerOperationHandler(...
void addTo(ModelNode headers) throws CommandFormatException; /* * 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 f...
void addTo(ModelNode headers) throws CommandFormatException; /* * 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 f...
public ModelNode toOperationRequest() throws CommandFormatException { ModelNode request = new ModelNode(); ModelNode addressNode = request.get("address"); if(address.isEmpty()) { addressNode.setEmptyList(); } else { Iterator<Node> iterator = address.iterator()...
public ModelNode toOperationRequest() throws CommandFormatException { ModelNode request = new ModelNode(); ModelNode addressNode = request.get("address"); if(address.isEmpty()) { addressNode.setEmptyList(); } else { Iterator<Node> iterator = address.iterator()...
public void character(ParsingContext ctx) throws CommandFormatException { if(delegate != null) { delegate.character(ctx); return; } //System.out.println(ctx.getState().getId() + " '" + ctx.getCharacter() + "'"); ...
public void character(ParsingContext ctx) throws CommandFormatException { if(delegate != null) { delegate.character(ctx); return; } //System.out.println(ctx.getState().getId() + " '" + ctx.getCharacter() + "'"); ...
protected ServiceName constructServiceName(final String name) { return UndertowService.AJP_LISTENER.append(name); }
protected ServiceName constructServiceName(final String name) { return UndertowService.LISTENER.append(name); }
protected ServiceName constructServiceName(final String name) { return UndertowService.HTTP_LISTENER.append(name); }
protected ServiceName constructServiceName(final String name) { return UndertowService.LISTENER.append(name); }
protected ServiceName constructServiceName(String name) { return UndertowService.HTTPS_LISTENER.append(name); }
protected ServiceName constructServiceName(String name) { return UndertowService.LISTENER.append(name); }
private static ModelValidationStepHandler[] getModelValidators() { return new ModelValidationStepHandler[] { new NotEmptyResourceValidationStepHandler() }; }
private static ModelValidationStepHandler[] getModelValidators() { return new ModelValidationStepHandler[] { NotEmptyResourceValidationStepHandler.INSTANCE }; }
private static ModelValidationStepHandler[] getModelValidators(SimpleAttributeDefinition[] attributes) { return new ModelValidationStepHandler[] { new NotEmptyResourceValidationStepHandler(), new RequiredChildValidationStepHandler(ModelElement.SUPPORTED_TYPES) }; }
private static ModelValidationStepHandler[] getModelValidators(SimpleAttributeDefinition[] attributes) { return new ModelValidationStepHandler[] { NotEmptyResourceValidationStepHandler.INSTANCE, new RequiredChildValidationStepHandler(ModelElement.SUPPORTED_TYPES) }; }
private static ModelValidationStepHandler[] getModelValidators() { return new ModelValidationStepHandler[] { new NotEmptyResourceValidationStepHandler(), new RequiredChildValidationStepHandler(ModelElement.SUPPORTED_TYPES) }; }
private static ModelValidationStepHandler[] getModelValidators() { return new ModelValidationStepHandler[] { NotEmptyResourceValidationStepHandler.INSTANCE, new RequiredChildValidationStepHandler(ModelElement.SUPPORTED_TYPES) }; }
public void resolveMediaTypesFromMapping() { this.servletRequest.setRequestURI("test.html"); PathExtensionContentNegotiationStrategy strategy = new PathExtensionContentNegotiationStrategy(); List<MediaType> mediaTypes = strategy.resolveMediaTypes(this.webRequest); assertEquals(Arrays.asList(new MediaType("te...
public void resolveMediaTypesFromMapping() { this.servletRequest.setRequestURI("test.html"); PathExtensionContentNegotiationStrategy strategy = new PathExtensionContentNegotiationStrategy(); List<MediaType> mediaTypes = strategy.resolveMediaTypes(this.webRequest); assertEquals(Arrays.asList(new MediaType("te...
import org.jboss.osgi.framework.spi.BundleManager; /* * 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 softwa...
import org.jboss.osgi.framework.spi.BundleManager; /* * 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 softwa...
public void setElitismRate(final double elitismRate) { if (elitismRate < 0 || elitismRate > 1) { throw new OutOfRangeException(LocalizedFormats.OUT_OF_RANGE_ELITISM_RATE, elitismRate, 0, 1); } this.elitismRate = elitismRate; }
public void setElitismRate(final double elitismRate) { if (elitismRate < 0 || elitismRate > 1) { throw new OutOfRangeException(LocalizedFormats.ELITISM_RATE, elitismRate, 0, 1); } this.elitismRate = elitismRate; }
private int findPlaceholderEndIndex(CharSequence buf, int startIndex) { int index = startIndex + this.placeholderPrefix.length(); int withinNestedPlaceholder = 0; while (index < buf.length()) { if (StringUtils.substringMatch(buf, index, this.placeholderSuffix)) { if (withinNestedPlaceholder > 0) { wi...
private int findPlaceholderEndIndex(CharSequence buf, int startIndex) { int index = startIndex + this.placeholderPrefix.length(); int withinNestedPlaceholder = 0; while (index < buf.length()) { if (StringUtils.substringMatch(buf, index, this.placeholderSuffix)) { if (withinNestedPlaceholder > 0) { wi...
private void parseContainer(XMLExtendedStreamReader reader, ModelNode subsystemAddress, List<ModelNode> operations) throws XMLStreamException { ModelNode container = Util.getEmptyOperation(ModelDescriptionConstants.ADD, null); String name = null; for (int i = 0; i < reader.getAttributeCoun...
private void parseContainer(XMLExtendedStreamReader reader, ModelNode subsystemAddress, List<ModelNode> operations) throws XMLStreamException { ModelNode container = Util.getEmptyOperation(ModelDescriptionConstants.ADD, null); String name = null; for (int i = 0; i < reader.getAttributeCoun...
public void testAttributeCSVParsingValidWithWeirdCharacters() { AbstractView v = new ConcreteView(); String fooval = "owfie fue&3[][[[2 \n\n \r \t 8�3"; // Also tests empty value String kingval = ""; v.setAttributesCSV("foo=(" + fooval + "),king={" + kingval + "},f1=[we]"); assertTrue(v.getStaticAttribu...
public void testAttributeCSVParsingValidWithWeirdCharacters() { AbstractView v = new ConcreteView(); String fooval = "owfie fue&3[][[[2 \n\n \r \t 8\ufffd3"; // Also tests empty value String kingval = ""; v.setAttributesCSV("foo=(" + fooval + "),king={" + kingval + "},f1=[we]"); assertTrue(v.getStaticAt...
public void testLexx() { // tests each constant assertArrayEquals(new DurationFormatUtils.Token[]{ new DurationFormatUtils.Token(DurationFormatUtils.y, 1), new DurationFormatUtils.Token(DurationFormatUtils.M, 1), new DurationFormatUtils.Token(DurationFormatUtils.d...
public void testLexx() { // tests each constant assertArrayEquals(new DurationFormatUtils.Token[]{ new DurationFormatUtils.Token(DurationFormatUtils.y, 1), new DurationFormatUtils.Token(DurationFormatUtils.M, 1), new DurationFormatUtils.Token(DurationFormatUtils.d...
public void handleMessage(Channel channel, MessageInputStream messageInputStream) { try { // read the first byte to see what type of a message it is final int header = messageInputStream.read(); if (logger.isTraceEnabled()) { logger.trace("Got message with...
public void handleMessage(Channel channel, MessageInputStream messageInputStream) { try { // read the first byte to see what type of a message it is final int header = messageInputStream.read(); if (logger.isTraceEnabled()) { logger.trace("Got message with...
private ComponentCommon getComponentCommon(String componentId) { for(StormTopology._Fields f: StormTopology.metaDataMap.keySet()) { Map<String, Object> componentMap = (Map<String, Object>) getRawTopology().getFieldValue(f); if(componentMap.containsKey(componentId)) { ...
public ComponentCommon getComponentCommon(String componentId) { for(StormTopology._Fields f: StormTopology.metaDataMap.keySet()) { Map<String, Object> componentMap = (Map<String, Object>) getRawTopology().getFieldValue(f); if(componentMap.containsKey(componentId)) { O...
public final void execute(final OperationContext context, final ModelNode operation) { execute(TARGET); context.completeStep(); }
public final void execute(final OperationContext context, final ModelNode operation) { execute(TARGET); context.stepCompleted(); }