buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
private Strategy getLocaleSpecificStrategy(final int field, final Calendar definingCalendar) {
final ConcurrentMap<Locale,Strategy> cache = getCache(field);
Strategy strategy= cache.get(Integer.valueOf(field));
if(strategy==null) {
strategy= field==Calendar.ZONE_OFFSET
... | private Strategy getLocaleSpecificStrategy(final int field, final Calendar definingCalendar) {
final ConcurrentMap<Locale,Strategy> cache = getCache(field);
Strategy strategy= cache.get(locale);
if(strategy==null) {
strategy= field==Calendar.ZONE_OFFSET
? new ... |
public int compare(KeyValue left, KeyValue right) {
return left.key.compareToIgnoreCase(right.key);
}
};
/**
* Get the short and long values displayed for a field
* @param field The field of interest
* @return A sorted array of the field key / value pairs
... | public int compare(KeyValue left, KeyValue right) {
return left.key.compareToIgnoreCase(right.key);
}
};
/**
* Get the short and long values displayed for a field
* @param field The field of interest
* @return A sorted array of the field key / value pairs
... |
public StandaloneClient create(final InetAddress address, int port) {
return new StandaloneClientImpl(address, port);
}
}
} | public static StandaloneClient create(final InetAddress address, int port) {
return new StandaloneClientImpl(address, port);
}
}
} |
package org.springframework.mock.staticmock;
package org.springframework.mock.static_mock;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Annotation to indicate a test class for whose @Test method... | package org.springframework.mock.staticmock;
package org.springframework.mock.staticmock;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Annotation to indicate a test class for whose @Test methods... |
package org.springframework.mock.staticmock;
package org.springframework.mock.static_mock;
import javax.persistence.Entity;
@Entity
public class Person {
}
| package org.springframework.mock.staticmock;
package org.springframework.mock.staticmock;
import javax.persistence.Entity;
@Entity
public class Person {
}
|
public double[] getStateEstimation() {
return stateEstimation.getData();
}
| public double[] getStateEstimation() {
return stateEstimation.toArray();
}
|
public double[] solve(final double[] b) {
if (b.length != getRowDimension()) {
throw new DimensionMismatchException(b.length,
getRowDimension());
}
final RealVector x = solve(new ArrayRealVector(b, false));
if (x instanceof... | public double[] solve(final double[] b) {
if (b.length != getRowDimension()) {
throw new DimensionMismatchException(b.length,
getRowDimension());
}
final RealVector x = solve(new ArrayRealVector(b, false));
if (x instanceof... |
public static final double bcorr(final double p, final double q) {
if (p < 10.0) {
throw new NumberIsTooSmallException(p, 10.0, true);
}
if (q < 10.0) {
throw new NumberIsTooSmallException(q, 10.0, true);
}
final double a = FastMath.min(p, q);
... | public static double logBeta(double a, double b,
double epsilon,
int maxIterations) {
double ret;
if (Double.isNaN(a) ||
Double.isNaN(b) ||
a <= 0.0 ||
b <= 0.0) {
ret = Double.NaN;
... |
public <T> T convertIfNecessary(String propertyName, Object oldValue, Object newValue,
Class<T> requiredType, TypeDescriptor typeDescriptor) throws IllegalArgumentException {
Object convertedValue = newValue;
// Custom editor for this type?
PropertyEditor editor = this.propertyEditorRegistry.findCustomEdito... | public <T> T convertIfNecessary(String propertyName, Object oldValue, Object newValue,
Class<T> requiredType, TypeDescriptor typeDescriptor) throws IllegalArgumentException {
Object convertedValue = newValue;
// Custom editor for this type?
PropertyEditor editor = this.propertyEditorRegistry.findCustomEdito... |
void encode(byte[] in, int inPos, int inAvail, Context context) { // package protected for access from I/O streams
if (context.eof) {
return;
}
// inAvail < 0 is how we're informed of EOF in the underlying data we're
// encoding.
if (inAvail < 0) {
con... | void encode(byte[] in, int inPos, int inAvail, Context context) { // package protected for access from I/O streams
if (context.eof) {
return;
}
// inAvail < 0 is how we're informed of EOF in the underlying data we're
// encoding.
if (inAvail < 0) {
con... |
public void isMutable() {
assertTrue(CacheMutator.isMutable(new Object()));
assertTrue(CacheMutator.isMutable(new Date()));
assertFalse(CacheMutator.isMutable(Boolean.TRUE));
assertFalse(CacheMutator.isMutable(Character.valueOf('a')));
assertFalse(CacheMutator.isMutable(Curre... | public void isMutable() {
assertTrue(CacheMutator.isMutable(new Object()));
assertTrue(CacheMutator.isMutable(new Date()));
assertFalse(CacheMutator.isMutable(Boolean.TRUE));
assertFalse(CacheMutator.isMutable(Character.valueOf('a')));
assertFalse(CacheMutator.isMutable(Curre... |
public Object processInvocation(final InterceptorContext context) throws Exception {
final CmpEntityBeanComponent component = getComponent(context, CmpEntityBeanComponent.class);
final Object primaryKey = context.getPrivateData(EntityBeanComponent.PRIMARY_KEY_CONTEXT_KEY);
... | public Object processInvocation(final InterceptorContext context) throws Exception {
final CmpEntityBeanComponent component = getComponent(context, CmpEntityBeanComponent.class);
final Object primaryKey = context.getPrivateData(EntityBeanComponent.PRIMARY_KEY_CONTEXT_KEY);
... |
private int binarySearch(int key) {
int low = 0;
int high = size - 1;
while (low <= high) {
int mid = (low + high) >> 1;
int midVal = values[mid];
if (midVal < key) {
| private int binarySearch(int key) {
int low = 0;
int high = size - 1;
while (low <= high) {
int mid = (low + high) >>> 1;
int midVal = values[mid];
if (midVal < key) {
|
public void start(StartContext context) throws StartException {
UndertowLogger.ROOT_LOGGER.startedHttpHandler(httpHandler);
}
| public void start(StartContext context) throws StartException {
UndertowLogger.ROOT_LOGGER.tracef("starting handler: %s", httpHandler);
}
|
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
if (DeploymentTypeMarker.isType(DeploymentType.EAR, deploymentUnit)) {
return;
}
EEModuleDescription ... | public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
if (DeploymentTypeMarker.isType(DeploymentType.EAR, deploymentUnit)) {
return;
}
EEModuleDescription ... |
public void handleCancellation() {
if (count.decrementAndGet() == 0) {
// some action
}
}
};
for (ModelNode update : updates) {
count.incrementAndGet();
controller.execute(ExecutionContextBuilder.Factory.... | public void handleCancellation() {
if (count.decrementAndGet() == 0) {
// some action
}
}
};
for (ModelNode update : updates) {
count.incrementAndGet();
domainModel.execute(ExecutionContextBuilder.Factory... |
public void configure(DeploymentPhaseContext context, ComponentConfiguration componentConfiguration, ViewDescription description, ViewConfiguration configuration) throws DeploymentUnitProcessingException {
final Method TO_STRING_METHOD;
try {
TO_STRING_MET... | public void configure(DeploymentPhaseContext context, ComponentConfiguration componentConfiguration, ViewDescription description, ViewConfiguration configuration) throws DeploymentUnitProcessingException {
final Method TO_STRING_METHOD;
try {
TO_STRING_MET... |
protected MessageDrivenComponentInstanceContext() {
super(MessageDrivenComponentInstance.this.getComponent(), MessageDrivenComponentInstance.this);
}
};
| protected MessageDrivenComponentInstanceContext() {
super(MessageDrivenComponentInstance.this.getComponent(), MessageDrivenComponentInstance.this);
}
}
|
private static Map<Class<?>, Class<?>> primitives = new HashMap<Class<?>, Class<?>>();
/**
* @see Class#isPrimitive()
* @see Boolean#TYPE
* @see Character#TYPE
* @see Byte#TYPE
* @see Short#TYPE
* @see Integer#TYPE
* @see Long#TYPE
* @see ... | private static final Map<Class<?>, Class<?>> primitives = new HashMap<Class<?>, Class<?>>();
/**
* @see Class#isPrimitive()
* @see Boolean#TYPE
* @see Character#TYPE
* @see Byte#TYPE
* @see Short#TYPE
* @see Integer#TYPE
* @see Long#TYPE
* @se... |
private SortedSet<Integer> getEligibleDaysOfMonth(Calendar cal) {
if (this.hasRelativeDayOfMonth() == false) {
return this.absoluteValues;
}
SortedSet<Integer> eligibleDaysOfMonth = new TreeSet<Integer>(this.absoluteValues);
for (ScheduleValue relativeValue : this.relativ... | private SortedSet<Integer> getEligibleDaysOfMonth(Calendar cal) {
if (this.hasRelativeDayOfMonth() == false) {
return this.absoluteValues;
}
SortedSet<Integer> eligibleDaysOfMonth = new TreeSet<Integer>(this.absoluteValues);
for (ScheduleValue relativeValue : this.relativ... |
public void testParseSubsystem() throws Exception {
// Parse the subsystem xml into operations
List<ModelNode> operations = super.parse(getSubsystemXml());
/*
// print the operations
System.out.println("List of operations");
for (ModelNode op : operations) {
Sy... | public void testParseSubsystem() throws Exception {
// Parse the subsystem xml into operations
List<ModelNode> operations = super.parse(getSubsystemXml());
/*
// print the operations
System.out.println("List of operations");
for (ModelNode op : operations) {
Sy... |
public static final SimpleAttributeDefinition ORB_GIOP_MINOR_VERSION = new SimpleAttributeDefinitionBuilder(
JacORBSubsystemConstants.ORB_GIOP_MINOR_VERSION, ModelType.INT, true)
.setDefaultValue(new ModelNode().set(2))
.setValidator(new IntRangeValidator(1, 2, true, false))
... | public static final SimpleAttributeDefinition ORB_GIOP_MINOR_VERSION = new SimpleAttributeDefinitionBuilder(
JacORBSubsystemConstants.ORB_GIOP_MINOR_VERSION, ModelType.INT, true)
.setDefaultValue(new ModelNode().set(2))
.setValidator(new IntRangeValidator(0, 2, true, false))
... |
private EntityBeanComponentInstance createInstance(final Object pk) {
final EntityBeanComponentInstance instance = component.acquireUnAssociatedInstance();
instance.associate(pk);
return instance;
}
| private EntityBeanComponentInstance createInstance(final Object pk) {
final EntityBeanComponentInstance instance = component.acquireUnAssociatedInstance();
instance.activate(pk);
return instance;
}
|
private EntityBeanComponentInstance createInstance(Object pk) {
final EntityBeanComponentInstance instance = component.acquireUnAssociatedInstance();
instance.associate(pk);
return instance;
}
| private EntityBeanComponentInstance createInstance(Object pk) {
final EntityBeanComponentInstance instance = component.acquireUnAssociatedInstance();
instance.activate(pk);
return instance;
}
|
public static final SimpleAttributeDefinition KEYSTORE_PASSWORD = new SimpleAttributeDefinitionBuilder(ModelDescriptionConstants.KEYSTORE_PASSWORD, ModelType.STRING, false)
.setXmlName(ModelDescriptionConstants.KEYSTORE_PASSWORD).setValidator(new StringLengthValidator(1, Integer.MAX_VALUE, false, false)... | public static final SimpleAttributeDefinition KEYSTORE_PASSWORD = new SimpleAttributeDefinitionBuilder(ModelDescriptionConstants.KEYSTORE_PASSWORD, ModelType.STRING, false)
.setXmlName(ModelDescriptionConstants.KEYSTORE_PASSWORD).setValidator(new StringLengthValidator(1, Integer.MAX_VALUE, false, true))... |
public void testMultipleBasePackagesWithDefaultsOnly() {
GenericApplicationContext singlePackageContext = new GenericApplicationContext();
ClassPathBeanDefinitionScanner singlePackageScanner = new ClassPathBeanDefinitionScanner(singlePackageContext);
GenericApplicationContext multiPackageContext = new GenericApp... | public void testMultipleBasePackagesWithDefaultsOnly() {
GenericApplicationContext singlePackageContext = new GenericApplicationContext();
ClassPathBeanDefinitionScanner singlePackageScanner = new ClassPathBeanDefinitionScanner(singlePackageContext);
GenericApplicationContext multiPackageContext = new GenericApp... |
protected Patch createProcessedPatch(final Patch original) {
// Process elements
final List<PatchElement> elements = new ArrayList<PatchElement>();
// Process layers
for (final PatchEntry entry : getLayers()) {
final PatchElement element = createPatchElement(entry, entry... | protected Patch createProcessedPatch(final Patch original) {
// Process elements
final List<PatchElement> elements = new ArrayList<PatchElement>();
// Process layers
for (final PatchEntry entry : getLayers()) {
final PatchElement element = createPatchElement(entry, entry... |
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final DeploymentUnit topLevelDeployment = deploymentUnit.getParent() == null ? deploymentUnit : deploymentUnit.getParent();
... | public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final DeploymentUnit topLevelDeployment = deploymentUnit.getParent() == null ? deploymentUnit : deploymentUnit.getParent();
... |
private void processSessionBeans(final DeploymentUnit deploymentUnit, final List<AnnotationInstance> sessionBeanAnnotations, final SessionBeanComponentDescription.SessionBeanType annotatedSessionBeanType) {
final EjbJarDescription ejbJarDescription = getEjbJarDescription(deploymentUnit);
final Serv... | private void processSessionBeans(final DeploymentUnit deploymentUnit, final List<AnnotationInstance> sessionBeanAnnotations, final SessionBeanComponentDescription.SessionBeanType annotatedSessionBeanType) {
final EjbJarDescription ejbJarDescription = getEjbJarDescription(deploymentUnit);
final Serv... |
protected ProtocolConnectionManager(final ConnectTask initial) {
if(initial == null) {
ProtocolMessages.MESSAGES.nullVar("connectTask");
}
this.connectTask = initial;
}
| protected ProtocolConnectionManager(final ConnectTask initial) {
if(initial == null) {
throw ProtocolMessages.MESSAGES.nullVar("connectTask");
}
this.connectTask = initial;
}
|
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 static ServiceName moduleSpecServiceName(ModuleIdentifier identifier, int phase) {
if (!ServiceModuleLoader.isDynamicModule(identifier)) {
ServerMessages.MESSAGES.missingModulePrefix(identifier, ServiceModuleLoader.MODULE_PREFIX);
}
return SERVICE_NAME.append(identifier.ge... | public static ServiceName moduleSpecServiceName(ModuleIdentifier identifier, int phase) {
if (!ServiceModuleLoader.isDynamicModule(identifier)) {
throw ServerMessages.MESSAGES.missingModulePrefix(identifier, ServiceModuleLoader.MODULE_PREFIX);
}
return SERVICE_NAME.append(identif... |
public void readElement(XMLExtendedStreamReader reader, List<ModelNode> list) throws XMLStreamException {
// no attributes
if (reader.getAttributeCount() > 0) {
throw unexpectedAttribute(reader, 0);
}
final ModelNode address = new ModelNode();
address.add(ModelDe... | public void readElement(XMLExtendedStreamReader reader, List<ModelNode> list) throws XMLStreamException {
// no attributes
if (reader.getAttributeCount() > 0) {
throw unexpectedAttribute(reader, 0);
}
final ModelNode address = new ModelNode();
address.add(ModelDe... |
protected void parseRecoveryEnvironmentElement(final XMLExtendedStreamReader reader, final ModelNode operation) throws XMLStreamException {
Set<Attribute> required = EnumSet.of(Attribute.BINDING, Attribute.STATUS_BINDING);
final int count = reader.getAttributeCount();
for (int i = 0; i < co... | protected void parseRecoveryEnvironmentElement(final XMLExtendedStreamReader reader, final ModelNode operation) throws XMLStreamException {
Set<Attribute> required = EnumSet.of(Attribute.BINDING, Attribute.STATUS_BINDING);
final int count = reader.getAttributeCount();
for (int i = 0; i < co... |
public void reset();
| void reset();
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "Lice... |
public <T> T getProperty(String key, Class<T> targetValueType) {
boolean debugEnabled = logger.isDebugEnabled();
if (logger.isTraceEnabled()) {
logger.trace(format("getProperty(\"%s\", %s)", key, targetValueType.getSimpleName()));
}
for (PropertySource<?> propertySource : this.propertySources) {
if (deb... | public <T> T getProperty(String key, Class<T> targetValueType) {
boolean debugEnabled = logger.isDebugEnabled();
if (logger.isTraceEnabled()) {
logger.trace(format("getProperty(\"%s\", %s)", key, targetValueType.getSimpleName()));
}
for (PropertySource<?> propertySource : this.propertySources) {
if (deb... |
public void doOneRandom(final CSVFormat format) throws Exception {
final Random r = new Random();
final int nLines = r.nextInt(4) + 1;
final int nCol = r.nextInt(3) + 1;
// nLines=1;nCol=2;
final String[][] lines = new String[nLines][];
for (int i = 0; i < nLines; i+... | public void doOneRandom(final CSVFormat format) throws Exception {
final Random r = new Random();
final int nLines = r.nextInt(4) + 1;
final int nCol = r.nextInt(3) + 1;
// nLines=1;nCol=2;
final String[][] lines = new String[nLines][];
for (int i = 0; i < nLines; i+... |
private <T> T convertIfNecessary(String propertyName, Object oldValue, Object newValue,
Class<T> requiredType, TypeDescriptor typeDescriptor) throws IllegalArgumentException {
Object convertedValue = newValue;
// Custom editor for this type?
PropertyEditor editor = this.propertyEditorRegistry.findCustomEdit... | private <T> T convertIfNecessary(String propertyName, Object oldValue, Object newValue,
Class<T> requiredType, TypeDescriptor typeDescriptor) throws IllegalArgumentException {
Object convertedValue = newValue;
// Custom editor for this type?
PropertyEditor editor = this.propertyEditorRegistry.findCustomEdit... |
public synchronized void start(final StartContext context) {
if (started) {
throw WeldMessages.MESSAGES.alreadyRunning("WeldContainer");
}
started = true;
WeldLogger.DEPLOYMENT_LOGGER.startingWeldService(deploymentName);
// set up injected services
addWel... | public synchronized void start(final StartContext context) {
if (started) {
throw WeldMessages.MESSAGES.alreadyRunning("WeldContainer");
}
started = true;
WeldLogger.DEPLOYMENT_LOGGER.startingWeldService(deploymentName);
// set up injected services
addWel... |
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... |
private void parseResourceAdapter(final XMLExtendedStreamReader reader, final List<ModelNode> list, ModelNode parentAddress) throws XMLStreamException, ParserException,
ValidateException {
final ModelNode raAddress = parentAddress.clone();
final ModelNode operation = new ModelNode();
... | private void parseResourceAdapter(final XMLExtendedStreamReader reader, final List<ModelNode> list, ModelNode parentAddress) throws XMLStreamException, ParserException,
ValidateException {
final ModelNode raAddress = parentAddress.clone();
final ModelNode operation = new ModelNode();
... |
private Set<String> getCacheRegionNames() {
final Statistics stats = getStatistics();
if (stats == null) {
return Collections.emptySet();
} else {
Set<String> result = new HashSet<String>();
String[] cacheRegionNames = stats.getSecondLevelCacheRegionNames(... | private Set<String> getCacheRegionNames() {
final Statistics stats = getStatistics();
if (stats == null) {
return Collections.emptySet();
} else {
Set<String> result = new HashSet<String>();
String[] cacheRegionNames = stats.getSecondLevelCacheRegionNames(... |
public void testHttpServletRequestFromPolicyContext(@ArquillianResource URL webAppURL) throws Exception {
String externalFormURL = webAppURL.toExternalForm();
String servletURL = externalFormURL.substring(0, externalFormURL.length() - 1) + ".war" + PolicyContextTestServlet.SERVLET_PATH;
LOGG... | public void testHttpServletRequestFromPolicyContext(@ArquillianResource URL webAppURL) throws Exception {
String externalFormURL = webAppURL.toExternalForm();
String servletURL = externalFormURL.substring(0, externalFormURL.length() - 1) + PolicyContextTestServlet.SERVLET_PATH;
LOGGER.info("... |
public static final char[] US_ENGLISH_MAPPING = US_ENGLISH_MAPPING_STRING.toCharArray();
| public static final String US_ENGLISH_MAPPING_STRING = "01360240043788015936020505";
/**
* RefinedSoundex is *refined* for a number of reasons one being that the
* mappings have been altered. This implementation contains default
* mappings for US English.
*/
static final char[] US_ENGLIS... |
private static Image jbossIcon;
static {
URL iconURL = GuiMain.class.getResource("/icon/as7_logo_32x32x32.png");
jbossIcon = Toolkit.getDefaultToolkit().getImage(iconURL);
ToolTipManager.sharedInstance().setDismissDelay(15000);
}
| private static Image jbossIcon;
static {
URL iconURL = GuiMain.class.getResource("/icon/wildfly.png");
jbossIcon = Toolkit.getDefaultToolkit().getImage(iconURL);
ToolTipManager.sharedInstance().setDismissDelay(15000);
}
|
protected String getSubsystemXml() throws IOException {
return readResource("undertow-1.1.xml");
}
| protected String getSubsystemXml() throws IOException {
return readResource("undertow-2.0.xml");
}
|
private void writeProcessId(final XMLExtendedStreamWriter writer, final ModelNode value) throws XMLStreamException {
writer.writeStartElement(Element.PROCESS_ID.getLocalName());
if (value.get(TransactionSubsystemRootResourceDefinition.PROCESS_ID_UUID.getName()).asBoolean()) {
writer.writ... | private void writeProcessId(final XMLExtendedStreamWriter writer, final ModelNode value) throws XMLStreamException {
writer.writeStartElement(Element.PROCESS_ID.getLocalName());
if (value.get(TransactionSubsystemRootResourceDefinition.PROCESS_ID_UUID.getName()).asBoolean(false)) {
writer... |
private ObjectFactory factoryFromModularReference(ModularReference modularReference) throws NamingException {
try {
final Module module = Module.getModule(ModuleIdentifier.fromString(modularReference.getModuleName()));
final Class<?> factoryClass = module.getClassLoader().loadClass(m... | private ObjectFactory factoryFromModularReference(ModularReference modularReference) throws NamingException {
try {
final Module module = Module.getModule(modularReference.getModuleIdentifier());
final Class<?> factoryClass = module.getClassLoader().loadClass(modularReference.getFact... |
package org.apache.commons.collections4.sequence;
/*
* 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 Apach... | package org.apache.commons.collections4.sequence;
/*
* 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 Apach... |
static final String WRAP_XA_RESOURCE = "wrap-xa-resource";
/*
* 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... | static final String WRAP_XA_RESOURCE = "wrap-xa-resource";
/*
* 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... |
static final String WRAP_XA_RESOURCE = "wrap-xa-resource";
/*
* 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... | static final String WRAP_XA_RESOURCE = "wrap-xa-resource";
/*
* 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... |
private void setResponseStatus(ServletWebRequest webRequest) throws IOException {
if (this.responseStatus != null) {
if (StringUtils.hasText(this.responseReason)) {
webRequest.getResponse().sendError(this.responseStatus.value(), this.responseReason);
}
else {
webRequest.getResponse().sendError(this.... | private void setResponseStatus(ServletWebRequest webRequest) throws IOException {
if (this.responseStatus != null) {
if (StringUtils.hasText(this.responseReason)) {
webRequest.getResponse().sendError(this.responseStatus.value(), this.responseReason);
}
else {
webRequest.getResponse().setStatus(this.... |
public ProtobufHttpMessageConverter(ExtensionRegistryInitializer registryInitializer) {
super(PROTOBUF, MediaType.TEXT_PLAIN, MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON);
if (registryInitializer != null) {
registryInitializer.initializeExtensionRegistry(this.extensionRegistry);
}
}
| public ProtobufHttpMessageConverter(ExtensionRegistryInitializer registryInitializer) {
super(PROTOBUF, MediaType.TEXT_PLAIN, MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON);
if (this.extensionRegistry != null) {
registryInitializer.initializeExtensionRegistry(this.extensionRegistry);
}
}
|
protected void doHandle(CommandContext ctx) throws CommandFormatException {
BatchManager batchManager = ctx.getBatchManager();
if(!batchManager.isBatchActive()) {
ctx.printLine("No active batch.");
return;
}
Batch batch = batchManager.getActiveBatch();
... | protected void doHandle(CommandContext ctx) throws CommandFormatException {
BatchManager batchManager = ctx.getBatchManager();
if(!batchManager.isBatchActive()) {
ctx.printLine("No active batch.");
return;
}
Batch batch = batchManager.getActiveBatch();
... |
protected void doHandle(CommandContext ctx) throws CommandFormatException {
BatchManager batchManager = ctx.getBatchManager();
if(!batchManager.isBatchActive()) {
ctx.printLine("No active batch.");
return;
}
Batch batch = batchManager.getActiveBatch();
... | protected void doHandle(CommandContext ctx) throws CommandFormatException {
BatchManager batchManager = ctx.getBatchManager();
if(!batchManager.isBatchActive()) {
ctx.printLine("No active batch.");
return;
}
Batch batch = batchManager.getActiveBatch();
... |
public ModelNode buildRequest(CommandContext ctx) throws OperationFormatException {
try {
if(!ctx.getParsedArguments().hasArguments()) {
throw new OperationFormatException("Arguments are missing");
}
} catch (CommandFormatException e) {
throw new ... | public ModelNode buildRequest(CommandContext ctx) throws OperationFormatException {
try {
if(!ctx.getParsedArguments().hasProperties()) {
throw new OperationFormatException("Arguments are missing");
}
} catch (CommandFormatException e) {
throw new... |
public ModelNode buildRequest(CommandContext ctx)
throws OperationFormatException {
try {
if(!ctx.getParsedArguments().hasArguments()) {
throw new OperationFormatException("Arguments are missing");
}
} catch (CommandFormatException e) {
... | public ModelNode buildRequest(CommandContext ctx)
throws OperationFormatException {
try {
if(!ctx.getParsedArguments().hasProperties()) {
throw new OperationFormatException("Arguments are missing");
}
} catch (CommandFormatException e) {
... |
public ServerStartTask(final String hostControllerName, final String serverName, final int portOffset, final List<ServiceActivator> startServices, final List<ModelNode> updates) {
if (serverName == null || serverName.length() == 0) {
throw new IllegalArgumentException("Server name \"" + serverNa... | public ServerStartTask(final String hostControllerName, final String serverName, final int portOffset, final List<ServiceActivator> startServices, final List<ModelNode> updates) {
if (serverName == null || serverName.length() == 0) {
throw new IllegalArgumentException("Server name \"" + serverNa... |
private void setupBundlePath(final String bundlePath) {
if (bundlePath == null || bundlePath.isEmpty()) {
throw new IllegalStateException("Bundle path must be defined in the configuration");
}
final File bundlesDir = new File(bundlePath);
if (!bundlesDir.isDirectory()) {... | private void setupBundlePath(final String bundlePath) {
if (bundlePath == null || bundlePath.isEmpty()) {
throw new IllegalStateException("Bundle path must be defined in the configuration");
}
final File bundlesDir = new File(bundlePath);
if (!bundlesDir.isDirectory()) {... |
public void createStatusCodes() {
statusCodes.put(100, "CONTINUE");
statusCodes.put(101, "SWITCHING_PROTOCOLS");
statusCodes.put(102, "PROCESSING");
statusCodes.put(103, "CHECKPOINT");
statusCodes.put(200, "OK");
statusCodes.put(201, "CREATED");
statusCodes.put(202, "ACCEPTED");
statusCodes.put(203, "... | public void createStatusCodes() {
statusCodes.put(100, "CONTINUE");
statusCodes.put(101, "SWITCHING_PROTOCOLS");
statusCodes.put(102, "PROCESSING");
statusCodes.put(103, "CHECKPOINT");
statusCodes.put(200, "OK");
statusCodes.put(201, "CREATED");
statusCodes.put(202, "ACCEPTED");
statusCodes.put(203, "... |
public void testContentType() throws Exception {
this.mockMvc.perform(get("/handle").accept(MediaType.TEXT_PLAIN))
.andExpect(content().contentType(MediaType.TEXT_PLAIN))
.andExpect(content().contentType("text/plain"));
this.mockMvc.perform(get("/handleUtf8"))
.andExpect(content().contentType(MediaType.v... | public void testContentType() throws Exception {
this.mockMvc.perform(get("/handle").accept(MediaType.TEXT_PLAIN))
.andExpect(content().contentType(MediaType.TEXT_PLAIN))
.andExpect(content().contentType("text/plain"));
this.mockMvc.perform(get("/handleUtf8"))
.andExpect(content().contentType(MediaType.v... |
Class<?>[] value();
/*
* 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/licenses/LICENSE-2.0
*
* ... | Class<?>[] value();
/*
* 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/licenses/LICENSE-2.0
*
* ... |
public static final SimpleAttributeDefinition PROCESS_ID_UUID = new SimpleAttributeDefinitionBuilder("process-id-uuid", ModelType.BOOLEAN, false)
.setAlternatives("process-id-socket-binding")
.setFlags(AttributeAccess.Flag.RESTART_ALL_SERVICES)
.setAllowExpression(true).build();
... | public static final SimpleAttributeDefinition PROCESS_ID_UUID = new SimpleAttributeDefinitionBuilder("process-id-uuid", ModelType.BOOLEAN, false)
.setAlternatives("process-id-socket-binding")
.setFlags(AttributeAccess.Flag.RESTART_ALL_SERVICES)
.build();
|
public ModuleClassLoader run() throws ModuleLoadException {
ModuleLoader loader = Module.getCurrentModuleLoader();
ModuleIdentifier identifier = ModuleIdentifier.create("org.jboss.as.security", "main");
return loader.loadModule(identifier).getC... | public ModuleClassLoader run() throws ModuleLoadException {
ModuleLoader loader = Module.getCallerModuleLoader();
ModuleIdentifier identifier = ModuleIdentifier.create("org.jboss.as.security", "main");
return loader.loadModule(identifier).getCl... |
public ModuleClassLoader run() throws ModuleLoadException {
ModuleLoader loader = Module.getCurrentModuleLoader();
ModuleIdentifier identifier = ModuleIdentifier.fromString(moduleSpec);
return loader.loadModule(identifier).getClassLoader();
... | public ModuleClassLoader run() throws ModuleLoadException {
ModuleLoader loader = Module.getCallerModuleLoader();
ModuleIdentifier identifier = ModuleIdentifier.fromString(moduleSpec);
return loader.loadModule(identifier).getClassLoader();
... |
private static final long serialVersionUID = 2238421096712364033L;
public static final AttachmentKey<BeansXmlDescriptor> BEANS_XML = AttachmentKey.create(BeansXmlDescriptor.class);
} | private static final long serialVersionUID = 2238421096712364033L;
public static final AttachmentKey<BeansXmlDescriptor> BEANS_XML = new AttachmentKey<BeansXmlDescriptor>(BeansXmlDescriptor.class);
} |
private static final long serialVersionUID = 5844905201567666811L;
public static final AttachmentKey<JBossWebXmlDescriptor> WEB_XML = AttachmentKey.create(JBossWebXmlDescriptor.class);
| private static final long serialVersionUID = 5844905201567666811L;
public static final AttachmentKey<JBossWebXmlDescriptor> WEB_XML = new AttachmentKey<JBossWebXmlDescriptor>(JBossWebXmlDescriptor.class);
|
private static final long serialVersionUID = 5844905201567666811L;
public static final AttachmentKey<WebXmlDescriptor> WEB_XML = AttachmentKey.create(WebXmlDescriptor.class);
} | private static final long serialVersionUID = 5844905201567666811L;
public static final AttachmentKey<WebXmlDescriptor> WEB_XML = new AttachmentKey<WebXmlDescriptor>(WebXmlDescriptor.class);
} |
public void install(final DeploymentItemContext context) {
// add services
}
} | public void install(final BatchBuilder builder) {
// add services
}
} |
public void install(final DeploymentItemContext context) {
// builder.addService(JBOSS_MANAGEDBEAN.append("module-name-here").append(BINDING).append(name), new JNDIBindingService(name));
}
protected static abstract class Resource {
}
} | public void install(final BatchBuilder builder) {
// builder.addService(JBOSS_MANAGEDBEAN.append("module-name-here").append(BINDING).append(name), new JNDIBindingService(name));
}
protected static abstract class Resource {
}
} |
public void install(final DeploymentItemContext context) {
}
} | public void install(final BatchBuilder builder) {
}
} |
protected void execute(DeploymentProcessorTarget processorTarget) {
//DUP's that are used even for app client deployments
processorTarget.addDeploymentProcessor(Phase.PARSE, Phase.PARSE_EJB_CONTEXT_BINDING, new EjbContextJndiBindingProcessor());
processorTarg... | protected void execute(DeploymentProcessorTarget processorTarget) {
//DUP's that are used even for app client deployments
processorTarget.addDeploymentProcessor(Phase.PARSE, Phase.PARSE_EJB_CONTEXT_BINDING, new EjbContextJndiBindingProcessor());
processorTarg... |
public ClassLoader getThrowawayClassLoader() {
try {
ClassLoader loader = (ClassLoader) cloneConstructor.newInstance(getClassLoader());
// clear out the transformers (copied as well)
List<?> list = (List<?>) transformerList.get(loader);
list.clear();
return loader;
}
catch (InvocationTargetExcepti... | public ClassLoader getThrowawayClassLoader() {
try {
ClassLoader loader = cloneConstructor.newInstance(getClassLoader());
// clear out the transformers (copied as well)
List<?> list = (List<?>) transformerList.get(loader);
list.clear();
return loader;
}
catch (InvocationTargetException ex) {
th... |
public <T> Class<? extends T> getClass(String attributeName) {
return (Class<T>)doGet(attributeName, Class.class);
}
| public <T> Class<? extends T> getClass(String attributeName) {
return doGet(attributeName, Class.class);
}
|
private void doTestAnnotationInfo(AnnotationMetadata metadata) {
assertThat(metadata.getClassName(), is(AnnotatedComponent.class.getName()));
assertThat(metadata.isInterface(), is(false));
assertThat(metadata.isAbstract(), is(false));
assertThat(metadata.isConcrete(), is(true));
assertThat(metadata.hasSuperC... | private void doTestAnnotationInfo(AnnotationMetadata metadata) {
assertThat(metadata.getClassName(), is(AnnotatedComponent.class.getName()));
assertThat(metadata.isInterface(), is(false));
assertThat(metadata.isAbstract(), is(false));
assertThat(metadata.isConcrete(), is(true));
assertThat(metadata.hasSuperC... |
public void match(MvcResult result) throws Exception {
assertEquals("Flash attribute", value, (T) result.getFlashMap().get(name));
}
};
}
| public void match(MvcResult result) throws Exception {
assertEquals("Flash attribute", value, result.getFlashMap().get(name));
}
};
}
|
private boolean supports(Class<?> beanClass) {
for (Method method : beanClass.getMethods()) {
if (ExtendedBeanInfo.isCandidateWriteMethod(method)) {
return true;
}
}
return false;
}
| private boolean supports(Class<?> beanClass) {
for (Method method : beanClass.getMethods()) {
if (ExtendedBeanInfo.isNonVoidWriteMethod(method)) {
return true;
}
}
return false;
}
|
public ClassLoader getThrowawayClassLoader() {
try {
ClassLoader loader = cloneConstructor.newInstance(getClassLoader());
// clear out the transformers (copied as well)
List<?> list = (List<?>) transformerList.get(loader);
list.clear();
return loader;
}
catch (InvocationTargetException ex) {
th... | public ClassLoader getThrowawayClassLoader() {
try {
ClassLoader loader = (ClassLoader) cloneConstructor.newInstance(getClassLoader());
// clear out the transformers (copied as well)
List<?> list = (List<?>) transformerList.get(loader);
list.clear();
return loader;
}
catch (InvocationTargetExcepti... |
public <T> Class<? extends T> getClass(String attributeName) {
return doGet(attributeName, Class.class);
}
| public <T> Class<? extends T> getClass(String attributeName) {
return (Class<T>)doGet(attributeName, Class.class);
}
|
private void doTestAnnotationInfo(AnnotationMetadata metadata) {
assertThat(metadata.getClassName(), is(AnnotatedComponent.class.getName()));
assertThat(metadata.isInterface(), is(false));
assertThat(metadata.isAbstract(), is(false));
assertThat(metadata.isConcrete(), is(true));
assertThat(metadata.hasSuperC... | private void doTestAnnotationInfo(AnnotationMetadata metadata) {
assertThat(metadata.getClassName(), is(AnnotatedComponent.class.getName()));
assertThat(metadata.isInterface(), is(false));
assertThat(metadata.isAbstract(), is(false));
assertThat(metadata.isConcrete(), is(true));
assertThat(metadata.hasSuperC... |
public void match(MvcResult result) throws Exception {
assertEquals("Flash attribute", value, result.getFlashMap().get(name));
}
};
}
| public void match(MvcResult result) throws Exception {
assertEquals("Flash attribute", value, (T) result.getFlashMap().get(name));
}
};
}
|
protected ModelNode convertParameterExpressions(final ModelNode parameter) {
if (isAllowExpression() && COMPLEX_TYPES.contains(type) && ParseUtils.containExpression(parameter.asString())) {
// They need to subclass and override
if (!Boolean.getBoolean("jboss.as.test.transformation.ha... | protected ModelNode convertParameterExpressions(final ModelNode parameter) {
if (isAllowExpression() && COMPLEX_TYPES.contains(type)) {
// They need to subclass and override
if (!Boolean.getBoolean("jboss.as.test.transformation.hack")) {
throw new IllegalStateExceptio... |
private static final long serialVersionUID = 3148478338698997486L;
public static final AttachmentKey<JBossServiceXmlDescriptor> ATTACHMENT_KEY = new AttachmentKey<JBossServiceXmlDescriptor>(JBossServiceXmlDescriptor.class);
| private static final long serialVersionUID = 3148478338698997486L;
public static final AttachmentKey<JBossServiceXmlDescriptor> ATTACHMENT_KEY = AttachmentKey.create(JBossServiceXmlDescriptor.class);
|
public Injector<Executor> getExecutorInjector() {
return executor;
}
| public synchronized Endpoint getValue() throws IllegalStateException {
final Endpoint endpoint = this.endpoint;
if (endpoint == null) throw new IllegalStateException();
return endpoint;
}
/**
* Get the injector for the executor dependency.
*
* @return the injector
... |
public Simple8BitZipEncoding(char[] highChars) {
this.highChars = (char[]) highChars.clone();
List<Simple8BitChar> temp =
| public Simple8BitZipEncoding(char[] highChars) {
this.highChars = highChars.clone();
List<Simple8BitChar> temp =
|
public void testArchive() throws Exception {
@SuppressWarnings("unchecked")
ArrayList<String> expected = (ArrayList<String>) fileList.clone();
String name = file.getName();
if ("minotaur.jar".equals(name) || "minotaur-0.jar".equals(name)){
expected.add("META-INF/");
... | public void testArchive() throws Exception {
@SuppressWarnings("unchecked")
ArrayList<String> expected = (ArrayList<String>) fileList.clone();
String name = file.getName();
if ("minotaur.jar".equals(name) || "minotaur-0.jar".equals(name)){
expected.add("META-INF/");
... |
private static void assertEntryName(ArrayList<ZipArchiveEntry> entries,
int index,
String expectedName) {
ZipArchiveEntry ze = (ZipArchiveEntry) entries.get(index);
assertEquals("src/main/java/org/apache/commons/compress... | private static void assertEntryName(ArrayList<ZipArchiveEntry> entries,
int index,
String expectedName) {
ZipArchiveEntry ze = entries.get(index);
assertEquals("src/main/java/org/apache/commons/compress/archivers/zip/"
... |
protected SubjectFactory getSubjectFactory(String securityDomain) throws DeployException {
/* TODO: We need security context service to implement it! */
throw new DeployException("TODO: We need security context service to implement it!");
}
}
| protected SubjectFactory getSubjectFactory(String securityDomain) throws DeployException {
/* TODO: We need security context service to implement it! */
return null;//throw new DeployException("TODO: We need security context service to implement it!");
}
}
|
public static final SimpleAttributeDefinition PARTITION =
new SimpleAttributeDefinitionBuilder(EJB3SubsystemModel.PARTITION, ModelType.STRING, true)
.setAllowExpression(true)
.setFlags(AttributeAccess.Flag.RESTART_RESOURCE_SERVICES)
.setDefault... | public static final SimpleAttributeDefinition PARTITION =
new SimpleAttributeDefinitionBuilder(EJB3SubsystemModel.PARTITION, ModelType.STRING, true)
.setAllowExpression(true)
.setFlags(AttributeAccess.Flag.RESTART_RESOURCE_SERVICES)
.setDefault... |
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((name == null) ? 0 : name.hashCode());
return result;
}
| public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + (name == null ? 0 : name.hashCode());
return result;
}
|
public int read(byte[] b, final int off, final int len) throws IOException {
int toRead = len;
if (currentEntry != null) {
final long entryEnd = entryOffset + currentEntry.getLength();
if (len > 0 && entryEnd > offset) {
toRead = (int) Math.min(len, entryEnd -... | public int read(byte[] b, final int off, final int len) throws IOException {
int toRead = len;
if (currentEntry != null) {
final long entryEnd = entryOffset + currentEntry.getLength();
if (len > 0 && entryEnd > offset) {
toRead = (int) Math.min(len, entryEnd -... |
public Date getLastModifiedDate() {
long ts = isHostOsUnix() ? (localFileHeader.dateTimeModified * 1000l)
: ZipUtil.dosToJavaTime(0xFFFFFFFFL & localFileHeader.dateTimeModified);
return new Date(ts);
}
| public Date getLastModifiedDate() {
long ts = isHostOsUnix() ? localFileHeader.dateTimeModified * 1000l
: ZipUtil.dosToJavaTime(0xFFFFFFFFL & localFileHeader.dateTimeModified);
return new Date(ts);
}
|
private static long parseBinaryLong(final byte[] buffer, final int offset,
final int length,
final boolean negative) {
if (length >= 9) {
throw new IllegalArgumentException("At offset " + offset + ", "
... | private static long parseBinaryLong(final byte[] buffer, final int offset,
final int length,
final boolean negative) {
if (length >= 9) {
throw new IllegalArgumentException("At offset " + offset + ", "
... |
public int hashCode() {
int hc = (-1234567 * version);
// Since most UID's and GID's are below 65,536, this is (hopefully!)
// a nice way to make sure typical UID and GID values impact the hash
// as much as possible.
hc ^= Integer.rotateLeft(uid.hashCode(), 16);
hc ^... | public int hashCode() {
int hc = -1234567 * version;
// Since most UID's and GID's are below 65,536, this is (hopefully!)
// a nice way to make sure typical UID and GID values impact the hash
// as much as possible.
hc ^= Integer.rotateLeft(uid.hashCode(), 16);
hc ^= ... |
public static String toString(ArchiveEntry entry){
StringBuilder sb = new StringBuilder();
sb.append(entry.isDirectory()? 'd' : '-');// c.f. "ls -l" output
String size = Long.toString((entry.getSize()));
sb.append(' ');
// Pad output to 7 places, leading spaces
for(in... | public static String toString(ArchiveEntry entry){
StringBuilder sb = new StringBuilder();
sb.append(entry.isDirectory()? 'd' : '-');// c.f. "ls -l" output
String size = Long.toString(entry.getSize());
sb.append(' ');
// Pad output to 7 places, leading spaces
for(int ... |
public void testListAllFilesWithNestedArchive() throws Exception {
final File input = getFile("OSX_ArchiveWithNestedArchive.zip");
List<String> results = new ArrayList<String>();
final InputStream is = new FileInputStream(input);
ArchiveInputStream in = null;
try {
... | public void testListAllFilesWithNestedArchive() throws Exception {
final File input = getFile("OSX_ArchiveWithNestedArchive.zip");
List<String> results = new ArrayList<String>();
final InputStream is = new FileInputStream(input);
ArchiveInputStream in = null;
try {
... |
public void testXZCreation() throws Exception {
long max = ManagementFactory.getMemoryMXBean().getHeapMemoryUsage().getMax();
System.out.println("XZTestCase: HeapMax="+max+" bytes "+((double)max/(1024*1024))+" MB");
final File input = getFile("test1.xml");
final File output = new Fi... | public void testXZCreation() throws Exception {
long max = ManagementFactory.getMemoryMXBean().getHeapMemoryUsage().getMax();
System.out.println("XZTestCase: HeapMax="+max+" bytes "+(double)max/(1024*1024)+" MB");
final File input = getFile("test1.xml");
final File output = new File... |
public String[] getRequires() {
return alternatives;
}
| public String[] getRequires() {
return requires;
}
|
public void execute(final OperationContext context, final ModelNode operation) throws OperationFailedException {
context.acquireControllerLock();
// Setup
final PatchInfoService service = (PatchInfoService) context.getServiceRegistry(false).getRequiredService(PatchInfoService.NAME).getValue(... | public void execute(final OperationContext context, final ModelNode operation) throws OperationFailedException {
context.acquireControllerLock();
// Setup
final PatchInfoService service = (PatchInfoService) context.getServiceRegistry(false).getRequiredService(PatchInfoService.NAME).getValue(... |
public void addValue(double v) {
DynaProperty[] props = new DynaProperty[] {
new DynaProperty(propertyName, Double.class)
};
BasicDynaClass dynaClass = new BasicDynaClass(null, null, props);
DynaBean dynaBean = null;
try {
dynaBean = dynaClass.newInstance();
} catch... | public void addValue(double v) {
DynaProperty[] props = new DynaProperty[] {
new DynaProperty(propertyName, Double.class)
};
BasicDynaClass dynaClass = new BasicDynaClass(null, null, props);
DynaBean dynaBean = null;
try {
dynaBean = dynaClass.newInstance();
} catch... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.