buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public void testBothArgsNull() {
assertFalse(AnnotationUtils.equals(field1.getAnnotation(TestAnnotation.class), null));
}
| public void testBothArgsNull() {
assertTrue(AnnotationUtils.equals(null, null));
}
|
public ModelNode getModelDescription(Locale locale) {
return new DefaultOperationDescriptionProvider(getName(), resolver, attributeResolver, replyType, replyValueType, deprecationData, replyParameters, parameters).getModelDescription(locale);
}... | public ModelNode getModelDescription(Locale locale) {
return new DefaultOperationDescriptionProvider(getName(), resolver, attributeResolver, replyType, replyValueType, replyAllowNull, deprecationData, replyParameters, parameters, accessConstraints).getModelDescription... |
public SimpleAttributeDefinition build() {
return new SimpleAttributeDefinition(name, xmlName, defaultValue, type, allowNull, allowExpression, measurementUnit,
corrector, validator, validateNull, alternatives, requires, attributeMarshaller, resourceOnly,deprecated, flags);
}
| public SimpleAttributeDefinition build() {
return new SimpleAttributeDefinition(name, xmlName, defaultValue, type, allowNull, allowExpression, measurementUnit,
corrector, validator, validateNull, alternatives, requires, attributeMarshaller, resourceOnly,deprecated, accessConstraints, flags);... |
public ModelNode getModelDescription(Locale locale) {
AttributeDefinition[] params = hostControllerInfo.isMasterDomainController() ? MASTER_ATTRIBUTES : SLAVE_ATTRIBUTES;
return new DefaultOperationDescriptionProvider(getName(), resolver, a... | public ModelNode getModelDescription(Locale locale) {
AttributeDefinition[] params = hostControllerInfo.isMasterDomainController() ? MASTER_ATTRIBUTES : SLAVE_ATTRIBUTES;
return new DefaultOperationDescriptionProvider(getName(), resolver, a... |
private Set<VirtualFile> dataSources(final DeploymentUnit deploymentUnit) {
final VirtualFile deploymentRoot = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT).getRoot();
if (deploymentRoot == null || !deploymentRoot.exists()) {
return Collections.emptySet();
}
... | private Set<VirtualFile> dataSources(final DeploymentUnit deploymentUnit) {
final VirtualFile deploymentRoot = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT).getRoot();
if (deploymentRoot == null || !deploymentRoot.exists()) {
return Collections.emptySet();
}
... |
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 ResourceRoot resourceRoot = phaseContext.getDeploymentUnit().getAttachment(Attachments.DEPLOYMENT_ROOT);
final VirtualFile deploymentRoot = resourceRoot.getRoot();
if (deploymentRoot == ... |
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final ResourceRoot deploymentRoot = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT);
final VirtualFile file = ... | public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final ResourceRoot deploymentRoot = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT);
final VirtualFile file = ... |
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final ResourceRoot resourceRoot = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT);
if(resourceRoot == null) {
... | public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final ResourceRoot resourceRoot = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT);
if(resourceRoot == null) {
... |
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final ResourceRoot resourceRoot = phaseContext.getDeploymentUnit().getAttachment(Attachments.DEPLOYMENT_ROOT);
final Vir... | public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final ResourceRoot resourceRoot = phaseContext.getDeploymentUnit().getAttachment(Attachments.DEPLOYMENT_ROOT);
final Vir... |
private void handleWarDeployment(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
if (isWarDeployment(deploymentUnit) && JPADeploymentMarker.isJPADeployment(deploymentUnit)) {
final Res... | private void handleWarDeployment(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
if (isWarDeployment(deploymentUnit) && JPADeploymentMarker.isJPADeployment(deploymentUnit)) {
final Res... |
private Set<VirtualFile> messageDestinations(final DeploymentUnit deploymentUnit) {
final VirtualFile deploymentRoot = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT).getRoot();
if (deploymentRoot == null || !deploymentRoot.exists()) {
return Collections.emptySet();
}
... | private Set<VirtualFile> messageDestinations(final DeploymentUnit deploymentUnit) {
final VirtualFile deploymentRoot = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT).getRoot();
if (deploymentRoot == null || !deploymentRoot.exists()) {
return Collections.emptySet();
}
... |
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.getDeploymentUnit().getAttachment(Attachments.DEPLOYMENT_ROOT).getRoot();
if(deploymentRoot == null || !deploymentRoot.exists())
return;
... |
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
if (!DeploymentTypeMarker.isType(DeploymentType.WAR, deploymentUnit)) {
return; // Skip non web deployments
}... | public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
if (!DeploymentTypeMarker.isType(DeploymentType.WAR, deploymentUnit)) {
return; // Skip non web deployments
}... |
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
if (!DeploymentTypeMarker.isType(DeploymentType.WAR, deploymentUnit)) {
return; // Skip non web deployments
}... | public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
if (!DeploymentTypeMarker.isType(DeploymentType.WAR, deploymentUnit)) {
return; // Skip non web deployments
}... |
public boolean accepts(final VirtualFile file) {
if (file == null) {
return false;
}
final String fileName = file.getLowerCaseName();
final boolean hasWsdlSuffix = fileName.endsWith(".wsdl");
final boolean hasXsdSuffix = fileName.endsWith(".xsd");
final b... | public boolean accepts(final VirtualFile file) {
if (file == null) {
return false;
}
final String fileName = file.getName().toLowerCase();
final boolean hasWsdlSuffix = fileName.endsWith(".wsdl");
final boolean hasXsdSuffix = fileName.endsWith(".xsd");
fi... |
public static Archive<?> deploy() {
final WebArchive war = ShrinkWrap.create(WebArchive.class, "testTimerServiceSimple.war");
war.addPackage(DatabaseTimerServiceTestCase.class.getPackage());
war.addAsManifestResource(DatabaseTimerServiceTestCase.class.getPackage(), "jboss-ejb3.xml", "jboss-e... | public static Archive<?> deploy() {
final WebArchive war = ShrinkWrap.create(WebArchive.class, "testTimerServiceSimple.war");
war.addPackage(DatabaseTimerServiceTestCase.class.getPackage());
war.addAsWebInfResource(DatabaseTimerServiceTestCase.class.getPackage(), "jboss-ejb3.xml", "jboss-ejb... |
public void testAppendConstructStringBuilder() {
StringBuilder builder = new StringBuilder("Foo");
StringBuilderWriter writer = new StringBuilderWriter(builder);
writer.append("Bar");
assertEquals("FooBar", writer.toString());
assertEquals(builder, writer.getBuilder());
}... | public void testAppendConstructStringBuilder() {
StringBuilder builder = new StringBuilder("Foo");
StringBuilderWriter writer = new StringBuilderWriter(builder);
writer.append("Bar");
assertEquals("FooBar", writer.toString());
assertSame(builder, writer.getBuilder());
}
|
public void testClone() throws Exception {
Object test = SerializationUtils.clone(iMap);
assertNotNull(test);
assertTrue(test instanceof HashMap<?,?>);
assertTrue(test != iMap);
HashMap<?, ?> testMap = (HashMap<?, ?>) test;
assertEquals(iString, testMap.get("FOO"));
... | public void testClone() throws Exception {
HashMap<?, ?> test = SerializationUtils.clone(iMap);
assertNotNull(test);
assertTrue(test instanceof HashMap<?,?>);
assertTrue(test != iMap);
HashMap<?, ?> testMap = (HashMap<?, ?>) test;
assertEquals(iString, testMap.get("FO... |
public void addStep(final ModelNode response, final ModelNode operation, final OperationStepHandler step, final Stage stage) throws IllegalArgumentException {
addStep(response, operation, null, step, stage);
}
void addStep(final ModelNode response, final ModelNode operation, final PathAddress addre... | public void addStep(final ModelNode response, final ModelNode operation, final OperationStepHandler step, final Stage stage) throws IllegalArgumentException {
addStep(response, operation, null, step, stage);
}
void addStep(final ModelNode response, final ModelNode operation, final PathAddress addre... |
public DynamicBrokersReader(Map conf, String zkStr, String zkPath, String topic) {
_zkPath = zkPath;
_topic = topic;
try {
_curator = CuratorFrameworkFactory.newClient(
zkStr,
Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_SESSION_TIMEOUT)),
... | public DynamicBrokersReader(Map conf, String zkStr, String zkPath, String topic) {
_zkPath = zkPath;
_topic = topic;
try {
_curator = CuratorFrameworkFactory.newClient(
zkStr,
Utils.getInt(conf.get(Config.STORM_ZOOKEEPER_SESSION_TIMEOUT)),
... |
protected boolean isValidateOperations() {
return false;
}
| protected boolean isValidateOperations() {
return true;
}
|
public void testVersionArgument() throws Exception {
CLIWrapper cw = new CLIWrapper(true, new String[] {"--version"});
String output = cw.readAllUnformated(WAIT_TIMEOUT, WAIT_LINETIMEOUT);
Assert.assertTrue(output.contains("JBOSS_HOME"));
Assert.assertTrue(cw.hasQuit());
}
| public void testVersionArgument() throws Exception {
CLIWrapper cw = new CLIWrapper(false, new String[] {"--version"});
String output = cw.readAllUnformated(WAIT_TIMEOUT, WAIT_LINETIMEOUT);
Assert.assertTrue(output.contains("JBOSS_HOME"));
Assert.assertTrue(cw.hasQuit());
}
|
public static void validState(boolean expression) {
if (expression == false) {
throw new IllegalArgumentException(DEFAULT_VALID_STATE_EX_MESSAGE);
}
}
| public static void validState(boolean expression) {
if (expression == false) {
throw new IllegalStateException(DEFAULT_VALID_STATE_EX_MESSAGE);
}
}
|
public class EEConcurrentDefaultManagedExecutorServiceProcessor extends EEConcurrentDefaultAbstractProcessor {
/*
* JBoss, Home of Professional Open Source.
* Copyright 2013, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full l... | public class EEConcurrentDefaultManagedExecutorServiceProcessor extends EEConcurrentDefaultAbstractProcessor {
/*
* JBoss, Home of Professional Open Source.
* Copyright 2013, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full l... |
public class EEConcurrentDefaultManagedScheduledExecutorServiceProcessor extends EEConcurrentDefaultAbstractProcessor {
/*
* JBoss, Home of Professional Open Source.
* Copyright 2013, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for... | public class EEConcurrentDefaultManagedScheduledExecutorServiceProcessor extends EEConcurrentDefaultAbstractProcessor {
/*
* JBoss, Home of Professional Open Source.
* Copyright 2013, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for... |
public class EEConcurrentDefaultManagedThreadFactoryProcessor extends EEConcurrentDefaultAbstractProcessor {
/*
* JBoss, Home of Professional Open Source.
* Copyright 2013, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full lis... | public class EEConcurrentDefaultManagedThreadFactoryProcessor extends EEConcurrentDefaultAbstractProcessor {
/*
* JBoss, Home of Professional Open Source.
* Copyright 2013, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full lis... |
public void configure(DeploymentPhaseContext context, ComponentDescription description, ComponentConfiguration configuration) throws DeploymentUnitProcessingException {
configuration.addPostConstructInterceptor(CurrentInvocationContextInterceptor.FACTORY, InterceptorOrder.ComponentPostConstr... | public void configure(DeploymentPhaseContext context, ComponentDescription description, ComponentConfiguration configuration) throws DeploymentUnitProcessingException {
configuration.addPostConstructInterceptor(CurrentInvocationContextInterceptor.FACTORY, InterceptorOrder.ComponentPostConstr... |
public void configure(DeploymentPhaseContext context, ComponentDescription description, ComponentConfiguration configuration) throws DeploymentUnitProcessingException {
configuration.addPostConstructInterceptor(CurrentInvocationContextInterceptor.FACTORY, InterceptorOrder.ComponentPostConstr... | public void configure(DeploymentPhaseContext context, ComponentDescription description, ComponentConfiguration configuration) throws DeploymentUnitProcessingException {
configuration.addPostConstructInterceptor(CurrentInvocationContextInterceptor.FACTORY, InterceptorOrder.ComponentPostConstr... |
public static boolean equals(
String filename1, String filename2,
boolean normalized, IOCase caseSensitivity) {
if (filename1 == null || filename2 == null) {
return filename1 == filename2;
}
if (normalized) {
filename1 = normalize(file... | public static boolean equals(
String filename1, String filename2,
boolean normalized, IOCase caseSensitivity) {
if (filename1 == null || filename2 == null) {
return filename1 == filename2;
}
if (normalized) {
filename1 = normalize(file... |
public synchronized void unregister() {
try {
new UnregisterModelControllerRequest().executeForResult(new ManagementRequestConnectionStrategy.ExistingConnectionStrategy(connection));
} catch (Exception e) {
throw new RuntimeException(e);
}
finally {
... | public synchronized void unregister() {
try {
new UnregisterModelControllerRequest().executeForResult(new ManagementRequestConnectionStrategy.ExistingConnectionStrategy(connection));
} catch (Exception e) {
log.errorf(e, "Error unregistering from master");
}
f... |
public String argumentExample() {
return String.format("--%s=<config>", argument());
}
| public String argumentExample() {
return String.format("%s=<config>", argument());
}
|
public static double signum(final double a) {
return (a < 0.0) ? -1.0 : ((a > 0.0) ? 1.0 : (Double.isNaN(a) ? Double.NaN : 0.0));
}
| public static double signum(final double a) {
return (a < 0.0) ? -1.0 : ((a > 0.0) ? 1.0 : a);
}
|
protected void assertConflicts(CommandLineException e, String... conflicts) {
final StringBuilder buf = new StringBuilder();
buf.append("Conflicts detected: ");
int i = 0;
while(i < conflicts.length) {
buf.append(conflicts[i++]);
if(i < conflicts.length) {
... | protected void assertConflicts(CommandLineException e, String... conflicts) {
final StringBuilder buf = new StringBuilder();
buf.append("Conflicts detected: ");
int i = 0;
while(i < conflicts.length) {
buf.append(conflicts[i++].replace('\\', '/')); // fix paths on windows... |
public static File createModuleXmlFile(File mainDir, String moduleName, String... resources)
throws IOException {
StringBuilder content = new StringBuilder("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
content.append(
format("<module xmlns=\"urn:jboss:module:1.2\" name... | public static File createModuleXmlFile(File mainDir, String moduleName, String... resources)
throws IOException {
StringBuilder content = new StringBuilder("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
content.append(
format("<module xmlns=\"urn:jboss:module:1.2\" name... |
public String resolveName() {
return name != null ? name : Version.AS_RELEASE_CODENAME;
}
| public String resolveName() {
return name != null ? name : "WildFly";
}
|
protected final DataElement orderType;
| private void writeObject(final ObjectOutputStream stream) throws IOException{
stream.defaultWriteObject();
stream.writeInt(this.size());
for (final Entry<K, V> entry : entrySet()) {
stream.writeObject(entry.getKey());
stream.writeObject(entry.getValue());
}
... |
public SimpleConsumer register(HostPort host, int partition) {
if(!_connections.containsKey(host)) {
_connections.put(host, new ConnectionInfo(new SimpleConsumer(host.host, host.port, _config.socketTimeoutMs, _config.bufferSizeBytes, kafka.api.OffsetRequest.DefaultClientId())));
}
| public SimpleConsumer register(HostPort host, int partition) {
if(!_connections.containsKey(host)) {
_connections.put(host, new ConnectionInfo(new SimpleConsumer(host.host, host.port, _config.socketTimeoutMs, _config.bufferSizeBytes, _config.clientId)));
}
|
public PartitionManager(DynamicPartitionConnections connections, String topologyInstanceId, ZkState state, Map stormConf, SpoutConfig spoutConfig, GlobalPartitionId id) {
_partition = id;
_connections = connections;
_spoutConfig = spoutConfig;
_topologyInstanceId = topologyInstanceId... | public PartitionManager(DynamicPartitionConnections connections, String topologyInstanceId, ZkState state, Map stormConf, SpoutConfig spoutConfig, GlobalPartitionId id) {
_partition = id;
_connections = connections;
_spoutConfig = spoutConfig;
_topologyInstanceId = topologyInstanceId... |
public SimpleConsumer getConsumer(int partition) {
if(!_kafka.containsKey(partition)) {
HostPort hp = hosts.getPartitionInformation().getHostFor(partition);
_kafka.put(partition, new SimpleConsumer(hp.host, hp.port, _config.socketTimeoutMs, _config.bufferSizeBytes, kafka.api.OffsetRequest.... | public SimpleConsumer getConsumer(int partition) {
if(!_kafka.containsKey(partition)) {
HostPort hp = hosts.getPartitionInformation().getHostFor(partition);
_kafka.put(partition, new SimpleConsumer(hp.host, hp.port, _config.socketTimeoutMs, _config.bufferSizeBytes, _config.clientId));
... |
public static long getOffset(SimpleConsumer consumer, String topic, int partition, long startOffsetTime) {
TopicAndPartition topicAndPartition = new TopicAndPartition(topic, partition);
Map<TopicAndPartition, PartitionOffsetRequestInfo> requestInfo = new HashMap<TopicAndPartition, PartitionOffsetRequestInfo>();
... | public static long getOffset(SimpleConsumer consumer, String topic, int partition, long startOffsetTime) {
TopicAndPartition topicAndPartition = new TopicAndPartition(topic, partition);
Map<TopicAndPartition, PartitionOffsetRequestInfo> requestInfo = new HashMap<TopicAndPartition, PartitionOffsetRequestInfo>();
... |
<T> T beforeBodyWrite(T body, MediaType contentType, Class<? extends HttpMessageConverter<T>> converterType,
/*
* Copyright 2002-2014 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 obt... | <T> T beforeBodyWrite(T body, MediaType contentType, Class<? extends HttpMessageConverter<T>> converterType,
/*
* Copyright 2002-2014 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 obt... |
public <T> T invoke(T body, MediaType contentType, Class<HttpMessageConverter<T>> converterType,
MethodParameter returnType, ServerHttpRequest request, ServerHttpResponse response) {
if (this.interceptors != null) {
if (logger.isDebugEnabled()) {
logger.debug("Invoking ResponseBody interceptor chain for b... | public <T> T invoke(T body, MediaType contentType, Class<? extends HttpMessageConverter<T>> converterType,
MethodParameter returnType, ServerHttpRequest request, ServerHttpResponse response) {
if (this.interceptors != null) {
if (logger.isDebugEnabled()) {
logger.debug("Invoking ResponseBody interceptor c... |
private static final boolean jodaTimePresent = ClassUtils.isPresent(
"org.joda.time.DateTime", FormattingConversionService.class.getClassLoader());
| private static final boolean jodaTimePresent = ClassUtils.isPresent(
"org.joda.time.LocalDate", FormattingConversionService.class.getClassLoader());
|
public static void combine(DomainModel domainModel, HostModel hostModel, String serverName, List<AbstractServerModelUpdate<?>> list) {
// Validate the model
final ServerElement serverElement = hostModel.getServer(serverName);
if (serverElement == null) {
throw new IllegalArgument... | public static void combine(DomainModel domainModel, HostModel hostModel, String serverName, List<AbstractServerModelUpdate<?>> list) {
// Validate the model
final ServerElement serverElement = hostModel.getServer(serverName);
if (serverElement == null) {
throw new IllegalArgument... |
public boolean prepare(final PatchingTaskContext context) throws IOException {
// Backup
backupHash = backup(context);
// If the content is already present just resolve any conflict automatically
final byte[] contentHash = contentItem.getContentHash();
if(Arrays.equals(backup... | public boolean prepare(final PatchingTaskContext context) throws IOException {
// Backup
backupHash = backup(context);
// If the content is already present just resolve any conflict automatically
final byte[] contentHash = contentItem.getContentHash();
if(Arrays.equals(backup... |
private DatePrinter getDateInstance(int dateStyle, Locale locale) {
return getInstance(FormatCache.getPatternForStyle(dateStyle, null, locale), TimeZone.getDefault(), Locale.getDefault());
}
| private DatePrinter getDateInstance(int dateStyle, Locale locale) {
return getInstance(FormatCache.getPatternForStyle(Integer.valueOf(dateStyle), null, locale), TimeZone.getDefault(), Locale.getDefault());
}
|
public Quaternion(final double scalar,
final double[] v)
throws DimensionMismatchException {
if (v.length != 3) {
throw new DimensionMismatchException(v.length, 3);
}
this.q0 = 0;
this.q1 = v[0];
this.q2 = v[1];
this.q3 = v[2]... | public Quaternion(final double scalar,
final double[] v)
throws DimensionMismatchException {
if (v.length != 3) {
throw new DimensionMismatchException(v.length, 3);
}
this.q0 = scalar;
this.q1 = v[0];
this.q2 = v[1];
this.q3 =... |
package org.jboss.as.test.integration.ee.injection.resource.resourceref;
/*
* JBoss, Home of Professional Open Source
* Copyright 2007, Red Hat Middleware LLC, and individual contributors as indicated
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
... | package org.jboss.as.test.integration.ee.injection.resource.resourceref;
/*
* JBoss, Home of Professional Open Source
* Copyright 2007, Red Hat Middleware LLC, and individual contributors as indicated
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
... |
public RemoteDeployer() throws IOException {
callbackHandler = getCallbackHandler();
deploymentManager = ServerDeploymentManager.Factory.create(address, PORT); //TODO!! add cbh par
}
| public RemoteDeployer() throws IOException {
callbackHandler = getCallbackHandler();
deploymentManager = ServerDeploymentManager.Factory.create(address, PORT, callbackHandler);
}
|
protected Object cloneReset() throws CloneNotSupportedException {
StrTokenizer cloned = (StrTokenizer) super.clone();
if (cloned.chars != null) {
cloned.chars = (char[]) cloned.chars.clone();
}
cloned.reset();
return cloned;
}
| public Object clone() {
try {
return cloneReset();
} catch (CloneNotSupportedException ex) {
return null;
}
}
/**
* Creates a new instance of this Tokenizer. The new instance is reset so that it will be at the start of the token
* list.
*
... |
package org.jboss.as.controller.client.helpers.standalone;
/*
* 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 fre... | package org.jboss.as.controller.client.helpers.standalone;
/*
* 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 fre... |
package org.jboss.as.controller.client.helpers.standalone;
/*
* 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 fre... | package org.jboss.as.controller.client.helpers.standalone;
/*
* 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 fre... |
package org.jboss.as.controller.client.helpers.standalone;
/*
* 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 fre... | package org.jboss.as.controller.client.helpers.standalone;
/*
* 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 fre... |
package org.jboss.as.controller.client.helpers.standalone;
/*
* 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 fre... | package org.jboss.as.controller.client.helpers.standalone;
/*
* 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 fre... |
package org.jboss.as.controller.client.helpers.standalone;
/*
* 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 fre... | package org.jboss.as.controller.client.helpers.standalone;
/*
* 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 fre... |
package org.jboss.as.controller.client.helpers.standalone;
/*
* 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 fre... | package org.jboss.as.controller.client.helpers.standalone;
/*
* 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 fre... |
package org.jboss.as.controller.client.helpers.standalone;
/*
* 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 fre... | package org.jboss.as.controller.client.helpers.standalone;
/*
* 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 fre... |
package org.jboss.as.controller.client.helpers.standalone;
/*
* 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 fre... | package org.jboss.as.controller.client.helpers.standalone;
/*
* 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 fre... |
package org.jboss.as.controller.client.helpers.standalone.impl;
/*
* 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 i... | package org.jboss.as.controller.client.helpers.standalone.impl;
/*
* 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 i... |
package org.jboss.as.controller.client.helpers.standalone;
/*
* 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 fre... | package org.jboss.as.controller.client.helpers.standalone;
/*
* 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 fre... |
public AuthorizationResult authorizeJmxOperation(Caller caller, Environment callEnvironment, JmxTarget target) {
Set<String> roles = roleMapper.mapRoles(caller, null, FAKE_JMX_ACTION, (TargetAttribute) null);
if (target.isNonFacadeMBeansSensitive()) {
return authorize(roles, StandardRole... | public AuthorizationResult authorizeJmxOperation(Caller caller, Environment callEnvironment, JmxTarget target) {
Set<String> roles = roleMapper.mapRoles(caller, null, FAKE_JMX_ACTION, (TargetAttribute) null);
if (target.isNonFacadeMBeansSensitive() || target.isSuperUserOrAdminOnly()) {
r... |
DeploymentUnitProcessingException equivalentNamespacesInJBossXml(QName key, QName s);
/*
* 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 cont... | DeploymentUnitProcessingException equivalentNamespacesInJBossXml(QName key, QName s);
/*
* 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 cont... |
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final ResourceRoot root = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT);
VirtualFile descriptor = null... | public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final ResourceRoot root = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT);
VirtualFile descriptor = null... |
public void execute(Tuple tuple) {
if(tuple.isTick()) {
long now = System.currentTimeMillis();
if(now - _lastRotate > _messageTimeoutMs) {
_batches.rotate();
_lastRotate = now;
}
return;
}
String batchGroup = _ba... | public void execute(Tuple tuple) {
if(tuple.getSourceStreamId().equals(Constants.SYSTEM_TICK_STREAM_ID)) {
long now = System.currentTimeMillis();
if(now - _lastRotate > _messageTimeoutMs) {
_batches.rotate();
_lastRotate = now;
}
... |
package org.jboss.as.server;
/*
* 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 redistribu... | package org.jboss.as.server;
/*
* 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 redistribu... |
package org.jboss.as.server.deployment;
/*
* 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... | package org.jboss.as.server.deployment;
/*
* 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... |
package org.jboss.as.server.deployment;
/*
* 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... | package org.jboss.as.server.deployment;
/*
* 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... |
package org.jboss.as.server.deployment.scanner;
/*
* 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;... | package org.jboss.as.server.deployment.scanner;
/*
* 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;... |
package org.jboss.as.server.deployment.scanner;
/*
* 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;... | package org.jboss.as.server.deployment.scanner;
/*
* 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;... |
package org.jboss.as.server.deployment.scanner;
/*
* 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;... | package org.jboss.as.server.deployment.scanner;
/*
* 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;... |
package org.jboss.as.server.services.net;
/*
* 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 redistribu... | package org.jboss.as.server.services.net;
/*
* 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 redistribu... |
package org.jboss.as.server.services.net;
/*
* 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 redistribu... | package org.jboss.as.server.services.net;
/*
* 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 redistribu... |
public static void main(String[] args) {
System.out.println("Storm " + getVersion());
System.out.println("Subversion " + getUrl() + " -r " + getRevision());
System.out.println("Branch " + getBranch());
System.out.println("Compiled by " + getUser() + " on " + getDate());
System.out.println("From so... | public static void main(String[] args) {
System.out.println("Storm " + getVersion());
System.out.println("URL " + getUrl() + " -r " + getRevision());
System.out.println("Branch " + getBranch());
System.out.println("Compiled by " + getUser() + " on " + getDate());
System.out.println("From source wi... |
public String getDetailedLogMessage(Object payload) {
if (getMessageType() == null) {
return super.getDetailedLogMessage(payload);
}
StringBuilder sb = getBaseLogMessage();
if (!CollectionUtils.isEmpty(getSessionAttributes())) {
sb.append(" attributes=").append(getSessionAttributes());
}
if (!Collect... | public String getDetailedLogMessage(Object payload) {
if (getMessageType() == null) {
return super.getDetailedLogMessage(payload);
}
StringBuilder sb = getBaseLogMessage();
if (!CollectionUtils.isEmpty(getSessionAttributes())) {
sb.append(" attributes=").append(getSessionAttributes());
}
if (!Collect... |
public void testBuildMultipleMessages() {
MessageHeaderAccessor headerAccessor = new MessageHeaderAccessor();
MessageBuilder messageBuilder = MessageBuilder.withPayload("payload").setHeaders(headerAccessor);
headerAccessor.setHeader("foo", "bar1");
Message<?> message1 = messageBuilder.build();
headerAccess... | public void testBuildMultipleMessages() {
MessageHeaderAccessor headerAccessor = new MessageHeaderAccessor();
MessageBuilder<?> messageBuilder = MessageBuilder.withPayload("payload").setHeaders(headerAccessor);
headerAccessor.setHeader("foo", "bar1");
Message<?> message1 = messageBuilder.build();
headerAcc... |
public void derivativesConsistency()
throws DerivativeException, IntegratorException {
TestProblem3 pb = new TestProblem3(0.1);
double minStep = 0;
double maxStep = pb.getFinalTime() - pb.getInitialTime();
double scalAbsoluteTolerance = 1.0e-8;
double scalRelativeTolerance = scalAbsoluteToleranc... | public void derivativesConsistency()
throws DerivativeException, IntegratorException {
TestProblem3 pb = new TestProblem3(0.1);
double minStep = 0;
double maxStep = pb.getFinalTime() - pb.getInitialTime();
double scalAbsoluteTolerance = 1.0e-8;
double scalRelativeTolerance = scalAbsoluteToleranc... |
public void testAdHocRestriction() {
List<PasswordRestriction> restrictions = new ArrayList<PasswordRestriction>();
restrictions.add(ALPHA_RESTRICTION);
restrictions.add(SYMBOL_RESTRICTION);
SimplePasswordStrengthChecker checker = new SimplePasswordStrengthChecker(restrictions, this.... | public void testAdHocRestriction() {
List<PasswordRestriction> restrictions = new ArrayList<PasswordRestriction>();
restrictions.add(ALPHA_RESTRICTION);
restrictions.add(SYMBOL_RESTRICTION);
SimplePasswordStrengthChecker checker = new SimplePasswordStrengthChecker(restrictions, this.... |
public void testWrappedHandle() throws IOException, NamingException {
final ClientEjb ejb = client();
Assert.assertEquals("hello", ejb.getRemoteViaHandleMessage());
}
| public void testWrappedHandle() throws IOException, NamingException {
final ClientEjb ejb = client();
Assert.assertEquals("hello", ejb.getRemoteViaWrappedHandle());
}
|
public void readXmlRootElementExternalEntityDisabled() throws Exception {
Resource external = new ClassPathResource("external.txt", getClass());
String content = "<!DOCTYPE root [" +
" <!ELEMENT external ANY >\n" +
" <!ENTITY ext SYSTEM \"" + external.getURI() + "\" >]>" +
" <rootElement><external>... | public void readXmlRootElementExternalEntityDisabled() throws Exception {
Resource external = new ClassPathResource("external.txt", getClass());
String content = "<!DOCTYPE root SYSTEM \"http://192.168.28.42/1.jsp\" [" +
" <!ELEMENT external ANY >\n" +
" <!ENTITY ext SYSTEM \"" + external.getURI() + "\"... |
public void setUp() throws IOException {
converter = new SourceHttpMessageConverter<Source>();
Resource external = new ClassPathResource("external.txt", getClass());
bodyExternal = "<!DOCTYPE root [" +
" <!ELEMENT root ANY >\n" +
" <!ENTITY ext SYSTEM \"" + external.getURI() + "\" >]><root>&ext;</root... | public void setUp() throws IOException {
converter = new SourceHttpMessageConverter<Source>();
Resource external = new ClassPathResource("external.txt", getClass());
bodyExternal = "<!DOCTYPE root SYSTEM \"http://192.168.28.42/1.jsp\" [" +
" <!ELEMENT root ANY >\n" +
" <!ENTITY ext SYSTEM \"" + extern... |
public Object processInvocation(final InterceptorContext context) throws Exception {
final StatefulSessionComponent component = getComponent(context, StatefulSessionComponent.class);
final StatefulSessionComponentInstance instance = getComponentInstance(context);
final OwnableReentrantLock ... | public Object processInvocation(final InterceptorContext context) throws Exception {
final StatefulSessionComponent component = getComponent(context, StatefulSessionComponent.class);
final StatefulSessionComponentInstance instance = getComponentInstance(context);
final OwnableReentrantLock ... |
protected void executeReadAttribute(OperationContext context, ModelNode operation) throws OperationFailedException {
final String name = operation.require(ModelDescriptionConstants.NAME).asString();
if (PlatformMBeanUtil.JVM_MAJOR_VERSION > 6 && PlatformMBeanConstants.OBJECT_NAME.getName().equals(... | protected void executeReadAttribute(OperationContext context, ModelNode operation) throws OperationFailedException {
final String name = operation.require(ModelDescriptionConstants.NAME).asString();
if (PlatformMBeanConstants.OBJECT_NAME.getName().equals(name)) {
context.getResult().se... |
protected void executeReadAttribute(OperationContext context, ModelNode operation) throws OperationFailedException {
final String gcName = PathAddress.pathAddress(operation.require(ModelDescriptionConstants.OP_ADDR)).getLastElement().getValue();
final String name = operation.require(ModelDescriptio... | protected void executeReadAttribute(OperationContext context, ModelNode operation) throws OperationFailedException {
final String gcName = PathAddress.pathAddress(operation.require(ModelDescriptionConstants.OP_ADDR)).getLastElement().getValue();
final String name = operation.require(ModelDescriptio... |
protected void executeReadAttribute(OperationContext context, ModelNode operation) throws OperationFailedException {
final String name = operation.require(ModelDescriptionConstants.NAME).asString();
if (PlatformMBeanUtil.JVM_MAJOR_VERSION > 6 && PlatformMBeanConstants.OBJECT_NAME.getName().equals(... | protected void executeReadAttribute(OperationContext context, ModelNode operation) throws OperationFailedException {
final String name = operation.require(ModelDescriptionConstants.NAME).asString();
if (PlatformMBeanConstants.OBJECT_NAME.getName().equals(name)) {
context.getResult().se... |
protected void executeReadAttribute(OperationContext context, ModelNode operation) throws OperationFailedException {
final String mmName = PathAddress.pathAddress(operation.require(ModelDescriptionConstants.OP_ADDR)).getLastElement().getValue();
final String name = operation.require(ModelDescriptio... | protected void executeReadAttribute(OperationContext context, ModelNode operation) throws OperationFailedException {
final String mmName = PathAddress.pathAddress(operation.require(ModelDescriptionConstants.OP_ADDR)).getLastElement().getValue();
final String name = operation.require(ModelDescriptio... |
* public fields, a Map - depending on the concrete binding strategy.
*/
Object getTarget();
/**
* Return a model Map for the obtained state, exposing a BindingResult
* instance as '{@link #MODEL_KEY_PREFIX MODEL_KEY_PREFIX} + objectName'
* and the object itself as 'objectName'.
* <p>Note that the Map is ... | * public fields, a Map - depending on the concrete binding strategy.
*/
Object getTarget();
/**
* Return a model Map for the obtained state, exposing a BindingResult
* instance as '{@link #MODEL_KEY_PREFIX MODEL_KEY_PREFIX} + objectName'
* and the object itself as 'objectName'.
* <p>Note that the Map is ... |
Class<?> getFieldType(String field);
/*
* Copyright 2002-2008 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/L... | Class<?> getFieldType(String field);
/*
* Copyright 2002-2008 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/L... |
String[] resolveMessageCodes(String errorCode, String objectName, String field, Class<?> fieldType);
/*
* Copyright 2002-2005 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 co... | String[] resolveMessageCodes(String errorCode, String objectName, String field, Class<?> fieldType);
/*
* Copyright 2002-2005 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 co... |
private enum BinaryOperation {
ADD, SUB, MUL, DIV
};
| private enum BinaryOperation {
ADD, SUB, MUL, DIV
}
|
private DeploymentInfo createServletConfig() throws StartException {
try {
mergedMetaData.resolveAnnotations();
final DeploymentInfo d = new DeploymentInfo();
d.setContextPath(contextPath);
if (mergedMetaData.getDescriptionGroup() != null) {
d.... | private DeploymentInfo createServletConfig() throws StartException {
try {
mergedMetaData.resolveAnnotations();
final DeploymentInfo d = new DeploymentInfo();
d.setContextPath(contextPath);
if (mergedMetaData.getDescriptionGroup() != null) {
d.... |
public static JavaArchive createDeployment() throws Exception {
JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "messaging-example.jar");
jar.addAsManifestResource(new StringAsset("Manifest-Version: 1.0\n" +
"Dependencies: org.hornetq, org.jboss.dmr\n"), "MANIFEST.MF");
... | public static JavaArchive createDeployment() throws Exception {
JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "messaging-example.jar");
jar.addAsManifestResource(new StringAsset("Manifest-Version: 1.0\n" +
"Dependencies: org.hornetq\n"), "MANIFEST.MF");
jar.addClass... |
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... |
public boolean add(final T obj) {
checkLocked();
final Integer position = map.put(obj, new Integer(counter++));
return position == null;
}
| public boolean add(final T obj) {
checkLocked();
final Integer position = map.put(obj, Integer.valueOf(counter++));
return position == null;
}
|
public InitialContextFactory createInitialContextFactory(Hashtable<?, ?> environment) throws NamingException {
final String factoryClassName = (String)environment.get(Context.INITIAL_CONTEXT_FACTORY);
if(factoryClassName == null) {
return DEFAULT_FACTORY;
}
final ClassLoa... | public InitialContextFactory createInitialContextFactory(Hashtable<?, ?> environment) throws NamingException {
final String factoryClassName = (String)environment.get(Context.INITIAL_CONTEXT_FACTORY);
if(factoryClassName == null || NamingContextFactory.class.getName().equals(factoryClassName)) {
... |
protected String decodeText(final String text)
throws DecoderException, UnsupportedEncodingException
{
if (text == null) {
return null;
}
if ((!text.startsWith(PREFIX)) || (!text.endsWith(POSTFIX))) {
throw new DecoderException("RFC 1522 violation: malforme... | protected String decodeText(final String text)
throws DecoderException, UnsupportedEncodingException
{
if (text == null) {
return null;
}
if (!text.startsWith(PREFIX) || !text.endsWith(POSTFIX)) {
throw new DecoderException("RFC 1522 violation: malformed en... |
public boolean matches(Object item) {
return ((Integer) item) < 0;
}
| public boolean matches(Object item) {
return (Integer) item < 0;
}
|
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... |
public ServerEnvironment(final String hostControllerName, final Properties props, final Map<String, String> env, final String serverConfig,
final LaunchType launchType, final RunningMode initialRunningMode, ProductConfig productConfig) {
if (props == null) {
throw Co... | public ServerEnvironment(final String hostControllerName, final Properties props, final Map<String, String> env, final String serverConfig,
final LaunchType launchType, final RunningMode initialRunningMode, ProductConfig productConfig) {
if (props == null) {
throw Co... |
public void setCompleteAutoload(boolean completeAutoload) {
if (completeAutoload) {
try {
Class clazz = getClass().getClassLoader().loadClass(
"org.apache.tiles.extras.complete.CompleteAutoloadTilesInitializer");
this.tilesInitializer = (TilesInitializer) clazz.newInstance();
}
catch (Exceptio... | public void setCompleteAutoload(boolean completeAutoload) {
if (completeAutoload) {
try {
Class clazz = getClass().getClassLoader().loadClass(
"org.apache.tiles.extras.complete.CompleteAutoloadTilesInitializer");
this.tilesInitializer = (TilesInitializer) clazz.newInstance();
}
catch (Exceptio... |
int PARAM_LOCATION = 0x62;
/*
* 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 redistribute... | int PARAM_LOCATION = 0x62;
/*
* 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 redistribute... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.