buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
protected void applyUpdateBootAction(final BootUpdateContext updateContext) { updateContext.addDeploymentProcessor(Phase.STRUCTURE, Phase.STRUCTURE_SAR_DEPLOY_CHECK, new SarSubDeploymentProcessor()); updateContext.addDeploymentProcessor(Phase.DEPENDENCIES, Phase.DEPENDENCIES_SAR_MODULE, new SarModul...
protected void applyUpdateBootAction(final BootUpdateContext updateContext) { updateContext.addDeploymentProcessor(Phase.STRUCTURE, Phase.STRUCTURE_SAR_SUB_DEPLOY_CHECK, new SarSubDeploymentProcessor()); updateContext.addDeploymentProcessor(Phase.DEPENDENCIES, Phase.DEPENDENCIES_SAR_MODULE, new SarM...
updateContext.addDeploymentProcessor(Phase.STRUCTURE, Phase.STRUCTURE_WAR, new WarStructureDeploymentProcessor(sharedWebBuilder.create(), sharedTldsBuilder.create())); /* * JBoss, Home of Professional Open Source. * Copyright 2010, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See t...
updateContext.addDeploymentProcessor(Phase.STRUCTURE, Phase.STRUCTURE_WAR, new WarStructureDeploymentProcessor(sharedWebBuilder.create(), sharedTldsBuilder.create())); /* * JBoss, Home of Professional Open Source. * Copyright 2010, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See t...
protected boolean requiresRuntime(OperationContext context) { return context.getType() == OperationContext.Type.SERVER && !context.isBooting(); }
protected boolean requiresRuntime(OperationContext context) { return context.getProcessType().isServer() && !context.isBooting(); }
protected boolean requiresRuntime(OperationContext context) { return context.getType() == OperationContext.Type.SERVER && !context.isBooting(); }
protected boolean requiresRuntime(OperationContext context) { return context.getProcessType().isServer() && !context.isBooting(); }
AttributeDefinition[] CACHE_CONTAINER_ATTRIBUTES = { DEFAULT_CACHE, ALIASES, JNDI_NAME, START, LISTENER_EXECUTOR, EVICTION_EXECUTOR, REPLICATION_QUEUE_EXECUTOR }; package org.jboss.as.clustering.infinispan.subsystem; import org.jboss.as.controller.AttributeDefinition; import org.jboss.as.controller.SimpleAttributeDef...
AttributeDefinition[] CACHE_CONTAINER_ATTRIBUTES = { DEFAULT_CACHE, ALIASES, JNDI_NAME, START, LISTENER_EXECUTOR, EVICTION_EXECUTOR, REPLICATION_QUEUE_EXECUTOR }; package org.jboss.as.clustering.infinispan.subsystem; import org.jboss.as.controller.AttributeDefinition; import org.jboss.as.controller.SimpleAttributeDef...
public void testAddModule() throws Exception { // start from a base installation PatchInfo info = new LocalPatchInfo(randomString(), PatchInfo.BASE, Collections.<String>emptyList(), env); // build a one-off patch for the base installation // with 1 added module String patch...
public void testAddModule() throws Exception { // start from a base installation PatchInfo info = new LocalPatchInfo(randomString(), PatchInfo.BASE, Collections.<String>emptyList(), env); // build a one-off patch for the base installation // with 1 added module String patch...
public interface BeanGroupFactory<G, I, T> extends Creator<G, BeanGroupEntry<I, T>>, Locator<G, BeanGroupEntry<I, T>>, Evictor<G>, Remover<G> { /* * 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...
public interface BeanGroupFactory<G, I, T> extends Creator<G, BeanGroupEntry<I, T>>, Locator<G, BeanGroupEntry<I, T>>, Evictor<G>, Remover<G> { /* * 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...
public Bean<G, I, T> createBean(I id, G groupId, T bean) { InfinispanEjbLogger.ROOT_LOGGER.tracef("Creating bean %s associated with group %s", id, groupId); BeanGroup<G, I, T> group = this.groupFactory.createGroup(groupId, this.groupFactory.createValue(groupId, null)); group.addBean(id, bean...
public Bean<G, I, T> createBean(I id, G groupId, T bean) { InfinispanEjbLogger.ROOT_LOGGER.tracef("Creating bean %s associated with group %s", id, groupId); BeanGroup<G, I, T> group = this.groupFactory.createGroup(groupId, this.groupFactory.createValue(groupId)); group.addBean(id, bean); ...
public Session<L> createSession(String id) { Session<L> session = this.factory.createSession(id, this.factory.createValue(id, null)); final Time time = this.defaultMaxInactiveInterval; session.getMetaData().setMaxInactiveInterval(time.getValue(), time.getUnit()); return new Schedulab...
public Session<L> createSession(String id) { Session<L> session = this.factory.createSession(id, this.factory.createValue(id)); final Time time = this.defaultMaxInactiveInterval; session.getMetaData().setMaxInactiveInterval(time.getValue(), time.getUnit()); return new SchedulableSess...
public interface SessionFactory<V, L> extends Creator<String, V>, Locator<String, V>, Remover<String>, Evictor<String> { /* * 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 fo...
public interface SessionFactory<V, L> extends Creator<String, V>, Locator<String, V>, Remover<String>, Evictor<String> { /* * 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 fo...
public CoarseSessionsKey readObject(ObjectInput input) throws IOException { return new CoarseSessionsKey(input.readUTF()); } }
public CoarseSessionsKey readObject(ObjectInput input) throws IOException, ClassNotFoundException { return new CoarseSessionsKey(input.readUTF()); } }
private void updateContentTypeHeader() { if (this.contentType != null) { StringBuilder sb = new StringBuilder(this.contentType); if (this.contentType.toLowerCase().indexOf(CHARSET_PREFIX) == -1 && this.characterEncoding != null) { sb.append(";").append(CHARSET_PREFIX).append(this.characterEncoding); } ...
private void updateContentTypeHeader() { if (this.contentType != null) { StringBuilder sb = new StringBuilder(this.contentType); if (!this.contentType.toLowerCase().contains(CHARSET_PREFIX) && this.characterEncoding != null) { sb.append(";").append(CHARSET_PREFIX).append(this.characterEncoding); } do...
public void testParseAndMarshalModel() throws Exception { //Parse the subsystem xml and install into the first controller String subsystemXml = readResource("subsystem.xml"); AdditionalInitialization additionalInit = AdditionalInitialization.MANAGEMENT; KernelServices servicesA = s...
public void testParseAndMarshalModel() throws Exception { //Parse the subsystem xml and install into the first controller String subsystemXml = readResource("subsystem.xml"); AdditionalInitialization additionalInit = AdditionalInitialization.MANAGEMENT; KernelServices servicesA = s...
public void testParseAndMarshalModel() throws Exception { //Parse the subsystem xml and install into the first controller String subsystemXml = readResource("securitysubsystemv12.xml"); KernelServices servicesA = super.installInController(AdditionalInitialization.MANAGEMENT, subsystemXml); ...
public void testParseAndMarshalModel() throws Exception { //Parse the subsystem xml and install into the first controller String subsystemXml = readResource("securitysubsystemv12.xml"); KernelServices servicesA = super.installInController(AdditionalInitialization.MANAGEMENT, subsystemXml); ...
public void testParseAndMarshalModelWithJASPI() throws Exception { //Parse the subsystem xml and install into the first controller String subsystemXml = readResource("securitysubsystemJASPIv1.xml"); KernelServices servicesA = super.installInController(AdditionalInitialization.MANAGEMENT, su...
public void testParseAndMarshalModelWithJASPI() throws Exception { //Parse the subsystem xml and install into the first controller String subsystemXml = readResource("securitysubsystemJASPIv1.xml"); KernelServices servicesA = super.installInController(AdditionalInitialization.MANAGEMENT, su...
public void testRemove() { List filters = new ArrayList(); ConditionalFileFilter fileFilter = this.getConditionalFileFilter(); filters.add(new TesterTrueFileFilter()); filters.add(new TesterTrueFileFilter()); filters.add(new TesterTrueFileFilter()); filters.add(new TesterTrueFileFilter()); ...
public void testRemove() { List filters = new ArrayList(); ConditionalFileFilter fileFilter = this.getConditionalFileFilter(); filters.add(new TesterTrueFileFilter()); filters.add(new TesterTrueFileFilter()); filters.add(new TesterTrueFileFilter()); filters.add(new TesterTrueFileFilter()); ...
public void remove(K key) { this.trace("remove(%s)", key); this.cancelExpirationPassivation(key); E entry = store.remove(key); if (entry == null) throw new NoSuchEJBException(String.valueOf(key)); entry.lock(); try { if (entry.isInUse()) { ...
public void remove(K key) { this.trace("remove(%s)", key); this.cancelExpirationPassivation(key); E entry = store.remove(key); if (entry == null) throw EjbMessages.MESSAGES.couldNotFindEjb(String.valueOf(key)); entry.lock(); try { if (entry...
public void processMessage(ChannelAssociation channelAssociation, MessageInputStream messageInputStream) throws IOException { if (messageInputStream == null) { throw new IllegalArgumentException("Cannot read from null message inputstream"); } final DataInputStream dataInputStream...
public void processMessage(ChannelAssociation channelAssociation, MessageInputStream messageInputStream) throws IOException { if (messageInputStream == null) { throw EjbMessages.MESSAGES.messageInputStreamCannotBeNull(); } final DataInputStream dataInputStream = new DataInputStre...
public void handleError(Channel channel, IOException error) { try { channel.close(); } catch (IOException e) { throw new RuntimeException(e); } finally { this.cleanupOnChannelDown(); } }
public void handleError(Channel channel, IOException error) { try { channel.close(); } catch (IOException e) { throw EjbMessages.MESSAGES.couldNotCloseChannel(e); } finally { this.cleanupOnChannelDown(); } }
private static ExtensionContext initializeDomainRegistry(final ManagementResourceRegistration root, final ExtensibleConfigurationPersister configurationPersister, final ContentRepository contentRepo, final FileRepository fileRepository, final boolean isMa...
private static ExtensionContext initializeDomainRegistry(final ManagementResourceRegistration root, final ExtensibleConfigurationPersister configurationPersister, final ContentRepository contentRepo, final FileRepository fileRepository, final boolean isMa...
public static int formatNameBytes(String name, byte[] buf, final int offset, final int length, final ZipEncoding encoding) throws IOException { int len = name.length(); ByteBuffer b = encoding.encode(name); w...
public static int formatNameBytes(String name, byte[] buf, final int offset, final int length, final ZipEncoding encoding) throws IOException { int len = name.length(); ByteBuffer b = encoding.encode(name); w...
public BeanDefinition parse(Element element, ParserContext parserContext) { Object source = parserContext.extractSource(element); // Register component for the surrounding <jms:annotation-driven> element. CompositeComponentDefinition compDefinition = new CompositeComponentDefinition(element.getTagName(), source...
public BeanDefinition parse(Element element, ParserContext parserContext) { Object source = parserContext.extractSource(element); // Register component for the surrounding <jms:annotation-driven> element. CompositeComponentDefinition compDefinition = new CompositeComponentDefinition(element.getTagName(), source...
private static boolean exposeWebAppRoot(ServletContext servletContext) { String exposeWebAppRootParam = servletContext.getInitParameter(EXPOSE_WEB_APP_ROOT_PARAM); return (exposeWebAppRootParam == null || Boolean.valueOf(exposeWebAppRootParam).booleanValue()); }
private static boolean exposeWebAppRoot(ServletContext servletContext) { String exposeWebAppRootParam = servletContext.getInitParameter(EXPOSE_WEB_APP_ROOT_PARAM); return (exposeWebAppRootParam == null || Boolean.valueOf(exposeWebAppRootParam)); }
private void testRejectExpressions1_1_0(ModelTestControllerVersion controllerVersion) throws Exception { final ModelVersion modelVersion = ModelVersion.create(1, 1, 0); final KernelServicesBuilder builder = createKernelServicesBuilder(LoggingTestEnvironment.getManagementInstance()); // Crea...
private void testRejectExpressions1_1_0(ModelTestControllerVersion controllerVersion) throws Exception { final ModelVersion modelVersion = ModelVersion.create(1, 1, 0); final KernelServicesBuilder builder = createKernelServicesBuilder(LoggingTestEnvironment.getManagementInstance()); // Crea...
public void execute(RuntimeTaskContext context) throws OperationFailedException { ServiceTarget target = context.getServiceTarget(); target.addService(ProtocolDefaultsService.SERVICE_NAME, new ProtocolDefaultsService()) .setInitialMode(Serv...
public void execute(RuntimeTaskContext context) throws OperationFailedException { ServiceTarget target = context.getServiceTarget(); target.addService(ProtocolDefaultsService.SERVICE_NAME, new ProtocolDefaultsService()) .setInitialMode(Serv...
public EjbHomeViewDescription(final ComponentDescription componentDescription, final String viewClassName, final MethodIntf methodIntf) { super(componentDescription, viewClassName, methodIntf); }
public EjbHomeViewDescription(final ComponentDescription componentDescription, final String viewClassName, final MethodIntf methodIntf) { super(componentDescription, viewClassName, methodIntf, false); }
public ExpressionEvaluator getExpressionEvaluator() { return new MockExpressionEvaluator(this); }
public ExpressionEvaluator getExpressionEvaluator() { throw new UnsupportedOperationException(); }
void setPropertyValues(Map<?, ?> map) throws BeansException; /* * Copyright 2002-2009 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://w...
void setPropertyValues(Map<?, ?> map) throws BeansException; /* * Copyright 2002-2009 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://w...
public static ParsedOptions determineEnvironment(String[] args, Properties systemProperties, Map<String, String> systemEnvironment, ServerEnvironment.LaunchType launchType) { List<String> clientArguments = new ArrayList<String>(); ParsedOptions ret = new ParsedOptions(); ret.clientArguments ...
public static ParsedOptions determineEnvironment(String[] args, Properties systemProperties, Map<String, String> systemEnvironment, ServerEnvironment.LaunchType launchType) { List<String> clientArguments = new ArrayList<String>(); ParsedOptions ret = new ParsedOptions(); ret.clientArguments ...
protected boolean requiresRuntime(OperationContext context) { return context.getType() == OperationContext.Type.SERVER || context.getType() == OperationContext.Type.HOST; }
protected boolean requiresRuntime(OperationContext context) { return true; }
public void initialize(ExtensionContext context) { // Register the remoting subsystem final SubsystemRegistration registration = context.registerSubsystem(SUBSYSTEM_NAME); registration.registerXMLElementWriter(RemotingSubsystem11Parser.INSTANCE); final ManagementResourceRegistratio...
public void initialize(ExtensionContext context) { // Register the remoting subsystem final SubsystemRegistration registration = context.registerSubsystem(SUBSYSTEM_NAME); registration.registerXMLElementWriter(RemotingSubsystem11Parser.INSTANCE); final ManagementResourceRegistratio...
public void setup(Resource resource, ManagementResourceRegistration rootRegistration) { ServerControllerModelUtil.updateCoreModel(model); ServerControllerModelUtil.initOperations(rootRegistration, null, persister, null, null, null, false); } }); f...
public void setup(Resource resource, ManagementResourceRegistration rootRegistration) { ServerControllerModelUtil.updateCoreModel(model); ServerControllerModelUtil.initOperations(rootRegistration, null, persister, null, null, null, null, false); } }); ...
public static int getLevenshteinDistance(CharSequence s, CharSequence t, final int threshold) { if (s == null || t == null) { throw new IllegalArgumentException("Strings must not be null"); } if (threshold < 0) { throw new IllegalArgumentException("Threshold must not ...
public static int getLevenshteinDistance(CharSequence s, CharSequence t, final int threshold) { if (s == null || t == null) { throw new IllegalArgumentException("Strings must not be null"); } if (threshold < 0) { throw new IllegalArgumentException("Threshold must not ...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { for (AttributeDefinition def : DeploymentAttributes.FULL_REPLACE_DEPLOYMENT_ATTRIBUTES.values()) { def.validateOperation(operation); } String name = DeploymentAttributes.FULL_RE...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { for (AttributeDefinition def : DeploymentAttributes.FULL_REPLACE_DEPLOYMENT_ATTRIBUTES.values()) { def.validateOperation(operation); } String name = DeploymentAttributes.FULL_RE...
protected AccessLogHandler configureAccessLogHandler(HttpHandler handler) { return new AccessLogHandler(handler, logReceiver, pattern, AccessLogHandler.class.getClassLoader()); }
protected AccessLogHandler configureAccessLogHandler(HttpHandler handler) { return new AccessLogHandler(handler, logReceiver, pattern, AccessLogService.class.getClassLoader()); }
public RealVector preMultiply(final RealVector v) throws DimensionMismatchException { double[] vectorData = null; if (v instanceof ArrayRealVector) { vectorData = ((ArrayRealVector) v).getDataRef(); } else { vectorData = v.toArray(); } return MatrixUti...
public RealVector preMultiply(final RealVector v) throws DimensionMismatchException { final double[] vectorData; if (v instanceof ArrayRealVector) { vectorData = ((ArrayRealVector) v).getDataRef(); } else { vectorData = v.toArray(); } return MatrixUtil...
private boolean supports(Class<?> beanClass) { for (Method method : beanClass.getMethods()) { if (ExtendedBeanInfo.isNonVoidWriteMethod(method)) { return true; } } return false; }
private boolean supports(Class<?> beanClass) { for (Method method : beanClass.getMethods()) { if (ExtendedBeanInfo.isCandidateWriteMethod(method)) { return true; } } return false; }
private void validateState(URLCodec urlCodec) { assertEquals(urlCodec.getEncoding(), urlCodec.getDefaultCharset()); }
private void validateState(URLCodec urlCodec) { // no tests for now. }
package org.jboss.as.core.security; /* * 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 listing of individual contributors. * * This is free software; you can red...
package org.jboss.as.core.security; /* * 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 listing of individual contributors. * * This is free software; you can red...
package org.jboss.as.core.security; /* * 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 listing of individual contributors. * * This is free software; you can red...
package org.jboss.as.core.security; /* * 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 listing of individual contributors. * * This is free software; you can red...
package org.jboss.as.core.security; /* * 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 listing of individual contributors. * * This is free software; you can red...
package org.jboss.as.core.security; /* * 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 listing of individual contributors. * * This is free software; you can red...
package org.jboss.as.core.security; /* * 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 listing of individual contributors. * * This is free software; you can red...
package org.jboss.as.core.security; /* * 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 listing of individual contributors. * * This is free software; you can red...
package org.jboss.as.core.security; /* * JBoss, Home of Professional Open Source. * Copyright 2012, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can red...
package org.jboss.as.core.security; /* * JBoss, Home of Professional Open Source. * Copyright 2012, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can red...
package org.jboss.as.core.security; /* * JBoss, Home of Professional Open Source. * Copyright 2012, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can red...
package org.jboss.as.core.security; /* * JBoss, Home of Professional Open Source. * Copyright 2012, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can red...
package org.jboss.as.core.security; /* * JBoss, Home of Professional Open Source. * Copyright 2012, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can red...
package org.jboss.as.core.security; /* * JBoss, Home of Professional Open Source. * Copyright 2012, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can red...
import org.jboss.as.core.security.SubjectUserInfo; /* * JBoss, Home of Professional Open Source. * Copyright 2012, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free softwa...
import org.jboss.as.core.security.SubjectUserInfo; /* * JBoss, Home of Professional Open Source. * Copyright 2012, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free softwa...
public interface RealmPrincipal extends org.jboss.as.core.security.RealmPrincipal { /* * 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 listing of individual contri...
public interface RealmPrincipal extends org.jboss.as.core.security.RealmPrincipal { /* * 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 listing of individual contri...
private static String VERSION; static { try { Properties props = new Properties(); props.load(ModelTestControllerVersion.class.getResourceAsStream("version.properties")); VERSION = props.getProperty("as.version"); } catch (Exceptio...
private static String VERSION; static { try { Properties props = new Properties(); props.load(ModelTestControllerVersion.class.getResourceAsStream("version.properties")); VERSION = props.getProperty("as.version"); } catch (Exceptio...
public static JavaArchive createDeployment() throws IOException { final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, EJBUtil.APPLICATION_NAME + ".jar"); jar.addClasses(GuestDelegationLoginModule.class, EJBUtil.class, Manage.class, BridgeBean.class, TargetBean.class, Current...
public static JavaArchive createDeployment() throws IOException { final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, EJBUtil.APPLICATION_NAME + ".jar"); jar.addClasses(GuestDelegationLoginModule.class, EJBUtil.class, Manage.class, BridgeBean.class, TargetBean.class, Current...
public int compare(File file1, File file2) { return file1.compareTo(file2); } }
public int compare(final File file1, final File file2) { return file1.compareTo(file2); } }
public boolean accept(File file) { return file.canRead(); } }
public boolean accept(final File file) { return file.canRead(); } }
public boolean accept(File file) { return file.canWrite(); } }
public boolean accept(final File file) { return file.canWrite(); } }
public boolean accept(File file) { return file.isDirectory(); } }
public boolean accept(final File file) { return file.isDirectory(); } }
public boolean accept(File file) { return file.isFile(); } }
public boolean accept(final File file) { return file.isFile(); } }
public boolean accept(File file) { return file.isHidden(); } }
public boolean accept(final File file) { return file.isHidden(); } }
public void write(int b) throws IOException { throw new IOException("write(" + b + ") failed: stream is closed"); } }
public void write(final int b) throws IOException { throw new IOException("write(" + b + ") failed: stream is closed"); } }
public FileCleanerTestCase(String name) { super(name); } }
public FileCleanerTestCase(final String name) { super(name); } }
public void testClose() throws IOException { shielded.close(); assertFalse("closed", closed); try { shielded.write('x'); fail("write(b)"); } catch (IOException e) { // expected } original.write('y'); assertEquals(1, original...
public void testClose() throws IOException { shielded.close(); assertFalse("closed", closed); try { shielded.write('x'); fail("write(b)"); } catch (final IOException e) { // expected } original.write('y'); assertEquals(1, or...
public void testRead() { try { new ClosedOutputStream().write('x'); fail("write(b)"); } catch (IOException e) { // expected } }
public void testRead() { try { new ClosedOutputStream().write('x'); fail("write(b)"); } catch (final IOException e) { // expected } }
public void parseTarHeader(byte[] header) { int offset = 0; name = TarUtils.parseName(header, offset, NAMELEN); offset += NAMELEN; mode = (int) TarUtils.parseOctal(header, offset, MODELEN); offset += MODELEN; userId = (int) TarUtils.parseOctal(header, offset, UIDLEN)...
public void parseTarHeader(byte[] header) { int offset = 0; name = TarUtils.parseName(header, offset, NAMELEN); offset += NAMELEN; mode = (int) TarUtils.parseOctal(header, offset, MODELEN); offset += MODELEN; userId = (int) TarUtils.parseOctal(header, offset, UIDLEN)...
protected final Set<TransportHandler> getDefaultTransportHandlers() { Set<TransportHandler> result = new HashSet<TransportHandler>(); result.add(new XhrPollingTransportHandler()); result.add(new XhrReceivingTransportHandler()); result.add(new JsonpPollingTransportHandler()); result.add(new JsonpReceivingTran...
protected final Set<TransportHandler> getDefaultTransportHandlers() { Set<TransportHandler> result = new HashSet<TransportHandler>(); result.add(new XhrPollingTransportHandler()); result.add(new XhrReceivingTransportHandler()); result.add(new JsonpPollingTransportHandler()); result.add(new JsonpReceivingTran...
private void writeDiscoveryGroups(final XMLExtendedStreamWriter writer, final ModelNode node) throws XMLStreamException { List<Property> properties = node.asPropertyList(); if (!properties.isEmpty()) { writer.writeStartElement(Element.DISCOVERY_GROUPS.getLocalName()); for(fin...
private void writeDiscoveryGroups(final XMLExtendedStreamWriter writer, final ModelNode node) throws XMLStreamException { List<Property> properties = node.asPropertyList(); if (!properties.isEmpty()) { writer.writeStartElement(Element.DISCOVERY_GROUPS.getLocalName()); for(fin...
public void testRollback() throws Exception { final File binDir = createInstalledImage(env, "consoleSlot", productConfig.getProductName(), productConfig.getProductVersion()); // build a one-off patch for the base installation // with 1 updated file String patchID = randomString(); ...
public void testRollback() throws Exception { final File binDir = createInstalledImage(env, "consoleSlot", productConfig.getProductName(), productConfig.getProductVersion()); // build a one-off patch for the base installation // with 1 updated file String patchID = randomString(); ...
public ProtobufHttpMessageConverter(ExtensionRegistryInitializer registryInitializer) { super(PROTOBUF, MediaType.TEXT_PLAIN, MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON); if (this.extensionRegistry != null) { registryInitializer.initializeExtensionRegistry(this.extensionRegistry); } }
public ProtobufHttpMessageConverter(ExtensionRegistryInitializer registryInitializer) { super(PROTOBUF, MediaType.TEXT_PLAIN, MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON); if (registryInitializer != null) { registryInitializer.initializeExtensionRegistry(this.extensionRegistry); } }
public TransactionalTopologyBuilder(String id, String spoutId, ITransactionalSpout spout, Number spoutParallelism) { _id = id; _spoutId = spoutId; _spout = spout; _spoutParallelism = spoutParallelism.intValue(); }
public TransactionalTopologyBuilder(String id, String spoutId, ITransactionalSpout spout, Number spoutParallelism) { _id = id; _spoutId = spoutId; _spout = spout; _spoutParallelism = (spoutParallelism == null) ? null : spoutParallelism.intValue(); }
public DomainClient create(final InetAddress address, int port) { /* * 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...
public DomainClient create(final InetAddress address, int port) { return new DomainClientImpl(address, port); } } }
package org.jboss.as.test.smoke.ejb3.dd; /* * 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 ca...
package org.jboss.as.test.smoke.ejb3.dd; /* * 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 ca...
package org.jboss.as.test.smoke.ejb3.jndi; /* * 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 ...
package org.jboss.as.test.smoke.ejb3.jndi; /* * 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 ...
package org.jboss.as.test.smoke.ejb3.jndi; /* * 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 ...
package org.jboss.as.test.smoke.ejb3.jndi; /* * 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 ...
package org.jboss.as.test.smoke.managedbean; /* * 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; yo...
package org.jboss.as.test.smoke.managedbean; /* * 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; yo...
package org.jboss.as.test.smoke.mgmt.servermodule.archive.sar; /* * JBoss, Home of Professional Open Source. * Copyright 2006, Red Hat Middleware LLC, 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...
package org.jboss.as.test.smoke.mgmt.servermodule.archive.sar; /* * JBoss, Home of Professional Open Source. * Copyright 2006, Red Hat Middleware LLC, 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...
package org.jboss.as.test.smoke.mgmt.servermodule.archive.sar; /* * JBoss, Home of Professional Open Source. * Copyright 2006, Red Hat Middleware LLC, 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...
package org.jboss.as.test.smoke.mgmt.servermodule.archive.sar; /* * JBoss, Home of Professional Open Source. * Copyright 2006, Red Hat Middleware LLC, 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...
package org.jboss.as.test.smoke.rar; /* * JBoss, Home of Professional Open Source. * Copyright 2010, Red Hat Middleware LLC, 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; y...
package org.jboss.as.test.smoke.rar; /* * JBoss, Home of Professional Open Source. * Copyright 2010, Red Hat Middleware LLC, 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; y...
package org.jboss.as.test.smoke.rar; /* * JBoss, Home of Professional Open Source. * Copyright 2010, Red Hat Middleware LLC, 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; y...
package org.jboss.as.test.smoke.rar; /* * JBoss, Home of Professional Open Source. * Copyright 2010, Red Hat Middleware LLC, 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; y...
package org.jboss.as.test.smoke.sar; /* * 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 re...
package org.jboss.as.test.smoke.sar; /* * 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 re...
package org.jboss.as.test.smoke.sar; /* * 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 re...
package org.jboss.as.test.smoke.sar; /* * 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 re...
package org.jboss.as.test.smoke.serviceloader; /* * 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.test.smoke.serviceloader; /* * 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.test.smoke.webservices; /* * JBoss, Home of Professional Open Source. * Copyright 2011, Red Hat Middleware LLC, 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 sof...
package org.jboss.as.test.smoke.webservices; /* * JBoss, Home of Professional Open Source. * Copyright 2011, Red Hat Middleware LLC, 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 sof...
package org.jboss.as.test.smoke.webservices; /* * JBoss, Home of Professional Open Source. * Copyright (c) 2011, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software...
package org.jboss.as.test.smoke.webservices; /* * JBoss, Home of Professional Open Source. * Copyright (c) 2011, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software...
public Notifier(Class listener) { if(listener == null) { throw new IllegalArgumentException("Illegal to have a null listener Class. "); } this.clss = clss; // now we check methods, if only one of them, then // let's set it Method[] meths = clss.g...
public Notifier(Class listener) { if(listener == null) { throw new IllegalArgumentException("Illegal to have a null listener Class. "); } this.clss = listener; // now we check methods, if only one of them, then // let's set it Method[] meths = cl...
protected String getSubsystemXml() throws IOException { return readResource("ws-subsystem12.xml"); //for default test }
protected String getSubsystemXml() throws IOException { return readResource("ws-subsystem20.xml"); //for default test }
private String getSockJsPath(ServerHttpRequest request) { String path = request.getURI().getPath(); // Try SockJS prefix hints if (!this.validSockJsPrefixes.isEmpty()) { for (String prefix : this.validSockJsPrefixes) { int index = path.indexOf(prefix); if (index != -1) { this.knownSockJsPrefixe...
private String getSockJsPath(ServerHttpRequest request) { String path = request.getURI().getPath(); // Try SockJS prefix hints if (!this.validSockJsPrefixes.isEmpty()) { for (String prefix : this.validSockJsPrefixes) { int index = path.lastIndexOf(prefix); if (index != -1) { this.knownSockJsPre...
private ResourceReferenceFactory<Object> handleServiceLookup(ViewDescription viewDescription, InjectionPoint injectionPoint) { /* * Try to obtain ComponentView eagerly and validate the resource type */ final ComponentView view = getComponentView(viewDescription); if (view !...
private ResourceReferenceFactory<Object> handleServiceLookup(ViewDescription viewDescription, InjectionPoint injectionPoint) { /* * Try to obtain ComponentView eagerly and validate the resource type */ final ComponentView view = getComponentView(viewDescription); if (view !...
private boolean isWhitespace(int c) { return Character.isWhitespace((char) c) && (c != format.getDelimiter()); }
private boolean isWhitespace(int c) { return (c != format.getDelimiter()) && Character.isWhitespace((char) c); }
protected Class<ThreadsSubsystemElement> getElementClass() { return null; }
protected Class<ThreadsSubsystemElement> getElementClass() { return ThreadsSubsystemElement.class; }
public void testTransformedCollection_decorateTransform() { final Collection originalCollection = new ArrayList(); final Object[] els = getFullElements();
public void testTransformedCollection_decorateTransform() { final Collection<Object> originalCollection = new ArrayList<Object>(); final Object[] els = getFullElements();
public boolean login() throws LoginException { if (super.login() == true) { log.debug("super.login()==true"); return true; } Connection con = RemotingContext.getConnection(); if (con != null) { UserPrincipal up = null; for (Principal c...
public boolean login() throws LoginException { if (super.login() == true) { log.debug("super.login()==true"); return true; } Connection con = SecurityActions.remotingContextGetConnection(); if (con != null) { UserPrincipal up = null; f...
protected void populateModel(ModelNode operation, ModelNode model) throws OperationFailedException { AlternativeAttributeCheckHandler.checkAlternatives(operation, ConnectorAttribute.CONNECTOR.getName(), Common.DISCOVERY_GROUP_NAME.getName()); for (final AttributeDefinition attribute : ConnectionFa...
protected void populateModel(ModelNode operation, ModelNode model) throws OperationFailedException { AlternativeAttributeCheckHandler.checkAlternatives(operation, Common.CONNECTOR.getName(), Common.DISCOVERY_GROUP_NAME.getName()); for (final AttributeDefinition attribute : ConnectionFactoryDefinit...
protected void populateModel(ModelNode operation, ModelNode model) throws OperationFailedException { AlternativeAttributeCheckHandler.checkAlternatives(operation, ConnectorAttribute.CONNECTOR.getName(), Common.DISCOVERY_GROUP_NAME.getName()); for(final AttributeDefinition attribute : getDefinition...
protected void populateModel(ModelNode operation, ModelNode model) throws OperationFailedException { AlternativeAttributeCheckHandler.checkAlternatives(operation, Common.CONNECTOR.getName(), Common.DISCOVERY_GROUP_NAME.getName()); for(final AttributeDefinition attribute : getDefinitions(PooledConn...
private void createConnectionFactory(String cfName, String cfJndiName) { final ModelNode createConnectionFactoryOp = new ModelNode(); createConnectionFactoryOp.get(ClientConstants.OP).set(ClientConstants.ADD); createConnectionFactoryOp.get(ClientConstants.OP_ADDR).add("subsystem", "messaging...
private void createConnectionFactory(String cfName, String cfJndiName) { final ModelNode createConnectionFactoryOp = new ModelNode(); createConnectionFactoryOp.get(ClientConstants.OP).set(ClientConstants.ADD); createConnectionFactoryOp.get(ClientConstants.OP_ADDR).add("subsystem", "messaging...
private static void validateListFilesParameters(File directory, IOFileFilter fileFilter) { if (!directory.isDirectory()) { throw new IllegalArgumentException("Parameter 'directory' is not a directory"); } if (fileFilter == null) { throw new NullPointerException("Param...
private static void validateListFilesParameters(File directory, IOFileFilter fileFilter) { if (!directory.isDirectory()) { throw new IllegalArgumentException("Parameter 'directory' is not a directory: " + directory); } if (fileFilter == null) { throw new NullPointerEx...
public void testMath283() { // fails because MultiDirectional.iterateSimplex is looping forever // the while(true) should be replaced with a convergence check SimplexOptimizer optimizer = new SimplexOptimizer(); optimizer.setSimplex(new MultiDirectionalSimplex(2)); final Gaus...
public void testMath283() { // fails because MultiDirectional.iterateSimplex is looping forever // the while(true) should be replaced with a convergence check SimplexOptimizer optimizer = new SimplexOptimizer(1e-14, 1e-14); optimizer.setSimplex(new MultiDirectionalSimplex(2)); ...
public void cacheResolver() { ConfigurableApplicationContext context = new GenericXmlApplicationContext( "/org/springframework/cache/jcache/config/jCacheNamespaceDriven-resolver.xml"); DefaultJCacheOperationSource ci = context.getBean(DefaultJCacheOperationSource.class); assertSame(context.getBean("cacheRes...
public void cacheResolver() { ConfigurableApplicationContext context = new GenericXmlApplicationContext( "/org/springframework/cache/jcache/config/jCacheNamespaceDriven-resolver.xml"); DefaultJCacheOperationSource ci = context.getBean(DefaultJCacheOperationSource.class); assertSame(context.getBean("cacheRes...
public interface BasicOperation { /* * 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 obtain a copy of the License at * * http://www.apache.org/licenses/LICE...
public interface BasicOperation { /* * 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 obtain a copy of the License at * * http://www.apache.org/licenses/LICE...
public interface CacheOperationInvocationContext<O extends BasicOperation> { /* * 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 obtain a copy of the License at * ...
public interface CacheOperationInvocationContext<O extends BasicOperation> { /* * 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 obtain a copy of the License at * ...
public void setTaskExecutor(Executor executor) { this.advice = buildAdvice(executor, exceptionHandler); }
public void setTaskExecutor(Executor executor) { this.advice = buildAdvice(executor, this.exceptionHandler); }
public String toString() { return "overridden"; } }; } } @Configuration static class ConfigWithOverloading { @Bean String aString() { return "regular"; } @Bean String aString(Integer dependency) { return "overloaded" + dependency; } } @Configuration static class ConfigWit...
public String toString() { return "overridden"; } }; } } @Configuration static class ConfigWithOverloading { @Bean String aString() { return "regular"; } @Bean String aString(Integer dependency) { return "overloaded" + dependency; } } @Configuration static class ConfigWit...
C createListenerContainer(JmsListenerEndpoint endpoint); /* * 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 obtain a copy of the License at * * http://www.a...
C createListenerContainer(JmsListenerEndpoint endpoint); /* * 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 obtain a copy of the License at * * http://www.a...
public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/resources/**") .addResourceLocations("classpath:org/springframework/web/servlet/resource/test/") .setResourceResolvers(new FingerprintResourceResolver(), new PathResourceResolver()); } }
public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/resources/**") .addResourceLocations("classpath:org/springframework/web/servlet/resource/test/") .addVersionHash("/**"); } }
* public WebSocketHandler echoWebSocketHandler() { * return new EchoWebSocketHandler(); * } * } * </pre> * * @author Rossen Stoyanchev * @since 4.0 */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) @Documented @Import({DelegatingWebSocketConfiguration.class, WebSocketScopeConfiguration.class}) ...
* public WebSocketHandler echoWebSocketHandler() { * return new EchoWebSocketHandler(); * } * } * </pre> * * @author Rossen Stoyanchev * @since 4.0 */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) @Documented @Import(DelegatingWebSocketConfiguration.class) public @interface EnableWebSocket {