buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public CRC32VerifyingInputStream(final InputStream in, final long size, final int expectedCrc32) { super(new CRC32(), in, size, expectedCrc32); }
public CRC32VerifyingInputStream(final InputStream in, final long size, final int expectedCrc32) { this(in, size, expectedCrc32 & 0xFFFFffffl); }
void validate(String topologyName, Map topologyConf, StormTopology topology) package backtype.storm.nimbus; import backtype.storm.generated.InvalidTopologyException; import backtype.storm.generated.StormTopology; import java.util.Map; public interface ITopologyValidator { void validate(String topologyName, Map t...
void validate(String topologyName, Map topologyConf, StormTopology topology) package backtype.storm.nimbus; import backtype.storm.generated.InvalidTopologyException; import backtype.storm.generated.StormTopology; import java.util.Map; public interface ITopologyValidator { void validate(String topologyName, Map t...
public RealMatrix getQT() throws IllegalStateException { if (cachedQ == null) { checkDecomposed(); // QT is supposed to be m x m final int n = qrt.length; final int m = qrt[0].length; double[][] qT = new double[m][m]; /*...
public RealMatrix getQT() throws IllegalStateException { if (cachedQT == null) { checkDecomposed(); // QT is supposed to be m x m final int n = qrt.length; final int m = qrt[0].length; double[][] qT = new double[m][m]; /...
public void execute(OperationContext context, ModelNode operation) { ModelNode model = new ModelNode(); //Atttributes model.get("attr1").set(1); model.get("attr2").set(2); context.readResourceForUpdate(PathAddress.EMPTY_ADDRESS).getModel().set(model)...
public void execute(OperationContext context, ModelNode operation) { ModelNode model = new ModelNode(); //Atttributes model.get("attr1").set(1); model.get("attr2").set(2); context.readResourceForUpdate(PathAddress.EMPTY_ADDRESS).getModel().set(model)...
void validate(String topologyName, Map topologyConf, StormTopology topology, Map NimbusConf) package backtype.storm.nimbus; import backtype.storm.generated.InvalidTopologyException; import backtype.storm.generated.StormTopology; import java.util.Map; public interface ITopologyValidator { void validate(String top...
void validate(String topologyName, Map topologyConf, StormTopology topology, Map NimbusConf) package backtype.storm.nimbus; import backtype.storm.generated.InvalidTopologyException; import backtype.storm.generated.StormTopology; import java.util.Map; public interface ITopologyValidator { void validate(String top...
public AbstractSubsystemUpdate<LoggingSubsystemElement, ?> getCompensatingUpdate(LoggingSubsystemElement original) { return new HandlerAddUpdate(original.getHandler(name)); }
public AbstractSubsystemUpdate<LoggingSubsystemElement, ?> getCompensatingUpdate(LoggingSubsystemElement original) { return null; }
private void handleEarDeployment(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); if (!appClientContainerMode && isEarDeployment(deploymentUnit)) { int puCount = 0; // orde...
private void handleEarDeployment(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); if (isEarDeployment(deploymentUnit)) { int puCount = 0; // ordered list of PUs ...
protected static final PropertiesAttributeDefinition PROPERTIES = new PropertiesAttributeDefinition.Builder(ModelDescriptionConstants.PROPERTIES, true) .setXmlName("property") .setWrapXmlElement(false) .setAllowExpression(true) .build(); static final AttributeDe...
protected static final PropertiesAttributeDefinition PROPERTIES = new PropertiesAttributeDefinition.Builder(ModelDescriptionConstants.PROPERTIES, true) .setXmlName("property") .setWrapXmlElement(false) .setAllowExpression(true) .build(); static final AttributeDe...
public int loadBeanDefinitions(EncodedResource encodedResource) throws BeanDefinitionStoreException { Assert.notNull(encodedResource, "EncodedResource must not be null"); if (logger.isInfoEnabled()) { logger.info("Loading XML bean definitions from " + encodedResource.getResource()); } Set<EncodedResource> ...
public int loadBeanDefinitions(EncodedResource encodedResource) throws BeanDefinitionStoreException { Assert.notNull(encodedResource, "EncodedResource must not be null"); if (logger.isInfoEnabled()) { logger.info("Loading XML bean definitions from " + encodedResource.getResource()); } Set<EncodedResource> ...
public static void processDeferredClose(SessionFactory sessionFactory) { Assert.notNull(sessionFactory, "No SessionFactory specified"); Map<SessionFactory, Set<Session>> holderMap = deferredCloseHolder.get(); if (holderMap == null || !holderMap.containsKey(sessionFactory)) { throw new IllegalStateException("D...
public static void processDeferredClose(SessionFactory sessionFactory) { Assert.notNull(sessionFactory, "No SessionFactory specified"); Map<SessionFactory, Set<Session>> holderMap = deferredCloseHolder.get(); if (holderMap == null || !holderMap.containsKey(sessionFactory)) { throw new IllegalStateException("D...
public static void main(String[] args) { boolean management = true; JavaConsole javaConsole = new JavaConsole(); if (args.length >= 1) { Iterator<String> it = Arrays.asList(args).iterator(); String temp; while (it.hasNext()) { temp = it....
public static void main(String[] args) { boolean management = true; JavaConsole javaConsole = new JavaConsole(); if (args.length >= 1) { Iterator<String> it = Arrays.asList(args).iterator(); String temp; while (it.hasNext()) { temp = it....
private Process process; ManagedProcess(final ProcessManagerMaster master, final String processName, final List<String> command, final Map<String, String> env, final String workingDirectory) { this.master = master; this.processName = processName; this.command = command; this.env...
private Process process; ManagedProcess(final ProcessManagerMaster master, final String processName, final List<String> command, final Map<String, String> env, final String workingDirectory) { this.master = master; this.processName = processName; this.command = command; this.env...
public MessageDrivenComponentConfiguration(final MessageDrivenComponentDescription description, final EEModuleClassConfiguration ejbClassConfiguration) { super(description, ejbClassConfiguration); this.resourceAdapterName = description.getResourceAdapterName(); if (this.resourceAdapterName ...
public MessageDrivenComponentConfiguration(final MessageDrivenComponentDescription description, final EEModuleClassConfiguration ejbClassConfiguration) { super(description, ejbClassConfiguration); this.resourceAdapterName = description.getResourceAdapterName(); if (this.resourceAdapterName ...
public AnnotationAsyncExecutionInterceptor(Executor defaultExecutor) { this(defaultExecutor, new SimpleAsyncUncaughtExceptionHandler()); }
public AnnotationAsyncExecutionInterceptor(Executor defaultExecutor) { super(defaultExecutor); }
private static final ResourcePathLocationsResolver resourcePathLocationsResolver = new ResourcePathLocationsResolver(); private static final ClassNameLocationsResolver classNameLocationsResolver = new ClassNameLocationsResolver(); /** * Resolves the {@link ContextLoader} {@link Class} to use for the * supplied...
private static final ResourcePathLocationsResolver resourcePathLocationsResolver = new ResourcePathLocationsResolver(); private static final ClassNameLocationsResolver classNameLocationsResolver = new ClassNameLocationsResolver(); /** * Resolves the {@link ContextLoader} {@link Class} to use for the * supplied...
public interface UnivariateOptimizer /* * 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, Ve...
public interface UnivariateOptimizer /* * 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, Ve...
public XAResourceRecoveryRegistry getRecoveryRegistry() { return null; } }; AsynchronousService.addService(target, cacheServiceName, new CacheService<Object, Object>(cacheName, dependencies)) .addDependency(cacheConfigurationServiceName) ...
public XAResourceRecoveryRegistry getRecoveryRegistry() { return null; } }; AsynchronousService.addService(target, cacheServiceName, new CacheService<Object, Object>(cacheName, dependencies)) .addDependency(cacheConfigurationServiceName) ...
public static final SimpleAttributeDefinition BROADCAST_PERIOD = create("broadcast-period", LONG) .setDefaultValue(new ModelNode(HornetQDefaultConfiguration.DEFAULT_BROADCAST_PERIOD)) .setMeasurementUnit(MILLISECONDS)
public static final SimpleAttributeDefinition BROADCAST_PERIOD = create("broadcast-period", LONG) .setDefaultValue(new ModelNode(HornetQDefaultConfiguration.getDefaultBroadcastPeriod())) .setMeasurementUnit(MILLISECONDS)
public static final SimpleAttributeDefinition EXCLUSIVE = create("exclusive", BOOLEAN) .setDefaultValue(new ModelNode(HornetQDefaultConfiguration.DEFAULT_DIVERT_EXCLUSIVE)) .setAllowNull(true)
public static final SimpleAttributeDefinition EXCLUSIVE = create("exclusive", BOOLEAN) .setDefaultValue(new ModelNode(HornetQDefaultConfiguration.isDefaultDivertExclusive())) .setAllowNull(true)
public synchronized void start(final StartContext context) throws StartException { ClassLoader origTCCL = SecurityActions.getContextClassLoader(); // Validate whether the AIO native layer can be used JournalType jtype = configuration.getJournalType(); if (jtype == JournalType.ASYNCIO...
public synchronized void start(final StartContext context) throws StartException { ClassLoader origTCCL = SecurityActions.getContextClassLoader(); // Validate whether the AIO native layer can be used JournalType jtype = configuration.getJournalType(); if (jtype == JournalType.ASYNCIO...
public synchronized void stop(StopContext context) { try { final HornetQServer hornetQService = this.hornetQService.getValue(); hornetQService.destroyQueue(new SimpleString(queueConfiguration.getName()), null); } catch(Exception e) { MESSAGING_LOGGER.failedToDestr...
public synchronized void stop(StopContext context) { try { final HornetQServer hornetQService = this.hornetQService.getValue(); hornetQService.destroyQueue(new SimpleString(queueConfiguration.getName()), null, false); } catch(Exception e) { MESSAGING_LOGGER.failed...
protected PlatformMBeanTestModelControllerService() { super(ProcessType.EMBEDDED_SERVER, new RunningModeControl(RunningMode.NORMAL), new NullConfigurationPersister(), new ControlledProcessState(true), ResourceBuilder.Factory.create(PathElement.pathElement("root"),new NonResolvingResourceDescriptionR...
protected PlatformMBeanTestModelControllerService() { super(ProcessType.EMBEDDED_SERVER, new RunningModeControl(RunningMode.NORMAL), new NullConfigurationPersister(), new ControlledProcessState(true), ResourceBuilder.Factory.create(PathElement.pathElement("root"),new NonResolvingResourceDescriptionR...
package org.wildfly.clustering.ejb; /* * 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.wildfly.clustering.ejb; /* * 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...
public ToStringBuilder appendAsObjectToString(Object object) { ObjectUtils.appendIdentityToString(this.getStringBuffer(), object); return this; }
public ToStringBuilder appendAsObjectToString(Object object) { ObjectUtils.identityToString(this.getStringBuffer(), object); return this; }
protected void appendCyclicObject(StringBuffer buffer, String fieldName, Object value) { ObjectUtils.appendIdentityToString(buffer, value); }
protected void appendCyclicObject(StringBuffer buffer, String fieldName, Object value) { ObjectUtils.identityToString(buffer, value); }
public boolean execute() throws Exception { return LookupService.bean != null; } }); BeanWithSimpleInjected bean = LookupService.bean; Assert.assertNotNull(bean); Assert.assertNotNull(bean.getSimple()); Strin...
public boolean execute() throws Exception { return LookupService.bean != null; } }); BeanWithSimpleInjected bean = LookupService.bean; Assert.assertNotNull(bean); Assert.assertNotNull(bean.getSimple()); Strin...
private static final Set<Locale> AVAILABLE_LOCALE_SET; static { List<Locale> list = new ArrayList<Locale>(Arrays.asList(Locale.getAvailableLocales())); // extra safe AVAILABLE_LOCALE_LIST = Collections.unmodifiableList(list); AVAILABLE_LOCALE_SET = Collectio...
private static final Set<Locale> AVAILABLE_LOCALE_SET; static { List<Locale> list = new ArrayList<Locale>(Arrays.asList(Locale.getAvailableLocales())); // extra safe AVAILABLE_LOCALE_LIST = Collections.unmodifiableList(list); AVAILABLE_LOCALE_SET = Collectio...
protected MBeanServerConnection getMBeanServer() throws Exception { MBeanServerConnectionProvider provider = new MBeanServerConnectionProvider(InetAddress.getLocalHost(), 1090); return provider.getConnection(); }
protected MBeanServerConnection getMBeanServer() throws Exception { MBeanServerConnectionProvider provider = new MBeanServerConnectionProvider(InetAddress.getByName("127.0.0.1"), 1090); return provider.getConnection(); }
public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if (source == null) { return this.conversionService.convertNullSource(sourceType, targetType); } Collection sourceCollection = (Collection) source; TypeDescriptor sourceElementType = sourceType.getElementTypeDescrip...
public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if (source == null) { return this.conversionService.convertNullSource(sourceType, targetType); } Collection<?> sourceCollection = (Collection<?>) source; TypeDescriptor sourceElementType = sourceType.getElementTypeD...
public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if (source == null) { return this.conversionService.convertNullSource(sourceType, targetType); } Collection sourceCollection = (Collection) source; TypeDescriptor sourceElementType = sourceType.getElementTypeDescr...
public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if (source == null) { return this.conversionService.convertNullSource(sourceType, targetType); } Collection<?> sourceCollection = (Collection<?>) source; TypeDescriptor sourceElementType = sourceType.getElementTyp...
public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if (source == null) { return this.conversionService.convertNullSource(sourceType, targetType); } Collection sourceCollection = (Collection) source; if (sourceCollection.size() == 0) { if (targetType.typeEquals(St...
public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if (source == null) { return this.conversionService.convertNullSource(sourceType, targetType); } Collection<?> sourceCollection = (Collection<?>) source; if (sourceCollection.size() == 0) { if (targetType.typeEqu...
public static void createKeytab(final String principalName, final String passPhrase, final File keytabFile) throws IOException { LOGGER.info("Principal name: " + principalName); final KerberosTime timeStamp = new KerberosTime(); DataOutputStream dos = null; try { dos = n...
private void createKeytab(final String principalName, final String passPhrase, final File keytabFile) throws IOException { LOGGER.info("Principal name: " + principalName); final KerberosTime timeStamp = new KerberosTime(); DataOutputStream dos = null; try { dos = new Dat...
public static final int MANAGEMENT_MICRO_VERSION = 1; static { InputStream stream = Version.class.getClassLoader().getResourceAsStream("META-INF/MANIFEST.MF"); Manifest manifest = null; try { if (stream != null) manifest = new Manifest(stream); } catc...
public static final int MANAGEMENT_MICRO_VERSION = 0; static { InputStream stream = Version.class.getClassLoader().getResourceAsStream("META-INF/MANIFEST.MF"); Manifest manifest = null; try { if (stream != null) manifest = new Manifest(stream); } catc...
void setMaxInactiveInterval(int seconds); /* * JBoss, Home of Professional Open Source. * Copyright 2008, 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 softwa...
void setMaxInactiveInterval(int seconds); /* * JBoss, Home of Professional Open Source. * Copyright 2008, 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 softwa...
private void initMap() { // shared cache attributes sharedAttributeResolver.put(CacheResourceDefinition.BATCHING.getName(), "cache"); sharedAttributeResolver.put(CacheResourceDefinition.MODULE.getName(), "cache"); sharedAttributeResolver.put(CacheResourceDefinition.INDEXING.getName()...
private void initMap() { // shared cache attributes sharedAttributeResolver.put(CacheResourceDefinition.BATCHING.getName(), "cache"); sharedAttributeResolver.put(CacheResourceDefinition.MODULE.getName(), "cache"); sharedAttributeResolver.put(CacheResourceDefinition.INDEXING.getName()...
static final String STATISTICS_ENABLED = "statistics-enabled"; /* * JBoss, Home of Professional Open Source. * Copyright 2011, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is...
static final String STATISTICS_ENABLED = "statistics-enabled"; /* * JBoss, Home of Professional Open Source. * Copyright 2011, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is...
public Map<String, Object> getComponentConfiguration() { return new HashMap<String, Object>(); } }
public Map<String, Object> getComponentConfiguration() { return null; } }
public void tearDown(final ManagementClient managementClient, final String containerId) throws Exception { final ServerDeploymentManager manager = ServerDeploymentManager.Factory.create(managementClient.getControllerClient()); final DeploymentPlan undeployPlan = manager.newDeploymentPlan...
public void tearDown(final ManagementClient managementClient, final String containerId) throws Exception { final ServerDeploymentManager manager = ServerDeploymentManager.Factory.create(managementClient.getControllerClient()); final DeploymentPlan undeployPlan = manager.newDeploymentPlan...
private PersistenceUnitMetadata getPersistenceUnit(final DeploymentUnit deploymentUnit, final String puName) throws DeploymentUnitProcessingException { PersistenceUnitMetadata pu = PersistenceUnitSearch.resolvePersistenceUnitSupplier(deploymentUnit, puName); if (null == pu) { th...
private PersistenceUnitMetadata getPersistenceUnit(final DeploymentUnit deploymentUnit, final String puName) throws DeploymentUnitProcessingException { PersistenceUnitMetadata pu = PersistenceUnitSearch.resolvePersistenceUnitSupplier(deploymentUnit, puName); if (null == pu) { th...
private static void setupOpenListener(HttpOpenListener listener, ModelController modelController, ConsoleMode consoleMode, String consoleSlot, ControlledProcessStateService controlledProcessStateService, int securePort, SecurityRealm securityRealm, final ChannelUpgradeHandler upgradeHandler) { CanonicalPat...
private static void setupOpenListener(HttpOpenListener listener, ModelController modelController, ConsoleMode consoleMode, String consoleSlot, ControlledProcessStateService controlledProcessStateService, int securePort, SecurityRealm securityRealm, final ChannelUpgradeHandler upgradeHandler) { CanonicalPat...
public void disconnect() { try { checkNotConnected(); ctx.disconnectController(); } finally { ctx = null; } }
public void disconnect() { try { checkNotConnected(); ctx.terminateSession(); } finally { ctx = null; } }
public static long freeSpaceKb(final long timeout) throws IOException { return freeSpaceKb(new File(".").getAbsolutePath(), timeout); } //----------------------------------------------------------------------- /** * Returns the free space on a drive or volume in a cross-platform manner. ...
public static long freeSpaceKb(final long timeout) throws IOException { return freeSpaceKb(new File(".").getAbsolutePath(), timeout); } //----------------------------------------------------------------------- /** * Returns the free space on a drive or volume in a cross-platform manner. ...
public void verifyNumDefaultListenersRegistered() throws Exception { TestContextManager testContextManager = new TestContextManager(DefaultListenersExampleTestCase.class); assertEquals("Num registered TELs for DefaultListenersExampleTestCase.", 3, testContextManager.getTestExecutionListeners().size()); }
public void verifyNumDefaultListenersRegistered() throws Exception { TestContextManager testContextManager = new TestContextManager(DefaultListenersExampleTestCase.class); assertEquals("Num registered TELs for DefaultListenersExampleTestCase.", 4, testContextManager.getTestExecutionListeners().size()); }
public void buildMergedConfigWithBareAnnotations() { Class<?> testClass = BareAnnotations.class; MergedContextConfiguration mergedConfig = buildMergedContextConfiguration(testClass); assertMergedConfig( mergedConfig, testClass, new String[] { "classpath:/org/springframework/test/context/support/Abstrac...
public void buildMergedConfigWithBareAnnotations() { Class<?> testClass = BareAnnotations.class; MergedContextConfiguration mergedConfig = buildMergedContextConfiguration(testClass); assertMergedConfig( mergedConfig, testClass, new String[] { "classpath:org/springframework/test/context/support/Abstract...
ManagedReference createViewInstance(ComponentView componentView, final Map<Object, Object> contextData) throws Exception; /* * JBoss, Home of Professional Open Source * Copyright 2010, Red Hat Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * fu...
ManagedReference createViewInstance(ComponentView componentView, final Map<Object, Object> contextData) throws Exception; /* * JBoss, Home of Professional Open Source * Copyright 2010, Red Hat Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * fu...
public CSVFormat withDelimiter(char delimiter) { CSVFormat format = (CSVFormat) clone(); this.delimiter = delimiter; return format; }
public CSVFormat withDelimiter(char delimiter) { CSVFormat format = (CSVFormat) clone(); format.delimiter = delimiter; return format; }
public RemoteHomeViewInstanceFactory(final String applicationName, final String moduleName, final String distinctName, final String beanName) { this.applicationName = applicationName; this.moduleName = moduleName; this.distinctName = distinctName; this.beanName = beanName; }
public RemoteHomeViewInstanceFactory(final String applicationName, final String moduleName, final String distinctName, final String beanName) { this.applicationName = applicationName == null ? "" : applicationName; this.moduleName = moduleName; this.distinctName = distinctName; this....
public StatelessRemoteViewInstanceFactory(final String applicationName, final String moduleName, final String distinctName, final String beanName) { this.applicationName = applicationName; this.moduleName = moduleName; this.distinctName = distinctName; this.beanName = beanName; }...
public StatelessRemoteViewInstanceFactory(final String applicationName, final String moduleName, final String distinctName, final String beanName) { this.applicationName = applicationName == null ? "" : applicationName; this.moduleName = moduleName; this.distinctName = distinctName; ...
public StatefulRemoteViewInstanceFactory(final String applicationName, final String moduleName, final String distinctName, final String beanName) { this.applicationName = applicationName; this.moduleName = moduleName; this.distinctName = distinctName; this.beanName = beanName; }
public StatefulRemoteViewInstanceFactory(final String applicationName, final String moduleName, final String distinctName, final String beanName) { this.applicationName = applicationName == null ? "" : applicationName; this.moduleName = moduleName; this.distinctName = distinctName; t...
public RemoteViewManagedReferenceFactory(final String appName, final String moduleName, final String distinctName, final String beanName, final String viewClass, final boolean stateful) { this.appName = appName; this.moduleName = moduleName; this.distinctName = distinctName; this.bea...
public RemoteViewManagedReferenceFactory(final String appName, final String moduleName, final String distinctName, final String beanName, final String viewClass, final boolean stateful) { this.appName = appName == null ? "" : appName; this.moduleName = moduleName; this.distinctName = distinc...
public void parse(OperationRequestAddress initialAddress, String argsStr) throws CommandFormatException { reset(); if(initialAddress != null) { address = new DefaultOperationRequestAddress(initialAddress); } this.originalLine = argsStr; ParserUtil.parse(argsStr, t...
public void parse(OperationRequestAddress initialAddress, String argsStr) throws CommandFormatException { reset(); if(initialAddress != null) { address = new DefaultOperationRequestAddress(initialAddress); } this.originalLine = argsStr; ParserUtil.parse(argsStr, t...
public void testHelloWorldLowerCaseHex() { byte[] b = StringUtils.getBytesUtf8("Hello World"); final String expected = "48656c6c6f20576f726c64"; char[] actual; actual = Hex.encodeHex(b); assertEquals(expected, new String(actual)); actual = Hex.encodeHex(b, true); ...
public void testHelloWorldLowerCaseHex() { byte[] b = StringUtils.getBytesUtf8("Hello World"); final String expected = "48656c6c6f20576f726c64"; char[] actual; actual = Hex.encodeHex(b); assertEquals(expected, new String(actual)); actual = Hex.encodeHex(b, true); ...
public Object getAsyncResult(long timeout) { return null; } }
public Object getAsyncResult(long timeToWait) { return null; } }
protected void writeElements(final XMLExtendedStreamWriter streamWriter) throws XMLStreamException { if (levelName != null) { streamWriter.writeEmptyElement("level"); streamWriter.writeAttribute("name", levelName); } if (formatter != null) { streamWriter.w...
protected void writeElements(final XMLExtendedStreamWriter streamWriter) throws XMLStreamException { if (levelName != null) { streamWriter.writeEmptyElement("level"); streamWriter.writeAttribute("name", levelName); } if (formatter != null) { streamWriter.w...
public void setImportMetadata(AnnotationMetadata importMetadata) { enableTx = importMetadata.getAnnotationAttributes(EnableTransactionManagement.class.getName(), false); Assert.notNull(enableTx, "@EnableTransactionManagement is not present on importing class " + importMetadata.getClassName()); } @Autowi...
public void setImportMetadata(AnnotationMetadata importMetadata) { enableTx = importMetadata.getAnnotationAttributes(EnableTransactionManagement.class.getName(), false); Assert.notNull(enableTx, "@EnableTransactionManagement is not present on importing class " + importMetadata.getClassName()); } @Autowi...
PlatformTransactionManager annotationDrivenTransactionManager(); /* * Copyright 2002-2011 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...
PlatformTransactionManager annotationDrivenTransactionManager(); /* * Copyright 2002-2011 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...
public PlatformTransactionManager createTransactionManager() { return txManager2(); } } }
public PlatformTransactionManager annotationDrivenTransactionManager() { return txManager2(); } } }
public <P> void applyUpdate(UpdateContext updateContext, org.jboss.as.model.UpdateResultHandler<? super Void,P> resultHandler, P param) { bindingUpdate.applyUpdate(updateContext, resultHandler, param); };
public <P> void applyUpdate(UpdateContext updateContext, org.jboss.as.model.UpdateResultHandler<? super Void,P> resultHandler, P param) { bindingUpdate.applyUpdate(updateContext, resultHandler, param); }
public static MessageDigest getDigest(String algorithm) { try { return MessageDigest.getInstance(algorithm); } catch (NoSuchAlgorithmException e) { throw new RuntimeException(e.getMessage()); } }
public static MessageDigest getDigest(String algorithm) { try { return MessageDigest.getInstance(algorithm); } catch (NoSuchAlgorithmException e) { throw new RuntimeException(e); } }
@SecurityDomain("other") /* * 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; you can redistribu...
@SecurityDomain("other") /* * 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; you can redistribu...
@SecurityDomain("other") /* * 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; you can redistribu...
@SecurityDomain("other") /* * 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; you can redistribu...
public Integer getValue() { return new Integer(this.value); }
public Integer getValue() { return Integer.valueOf(this.value); }
public void testIdentityToString() { assertEquals(null, ObjectUtils.identityToString(null)); assertEquals( "java.lang.String@" + Integer.toHexString(System.identityHashCode(FOO)), ObjectUtils.identityToString(FOO)); Integer i = new Integer(90); String expected...
public void testIdentityToString() { assertEquals(null, ObjectUtils.identityToString(null)); assertEquals( "java.lang.String@" + Integer.toHexString(System.identityHashCode(FOO)), ObjectUtils.identityToString(FOO)); Integer i = Integer.valueOf(90); String expe...
protected void setUp() throws Exception { super.setUp(); iString = "foo"; iInteger = new Integer(7); iMap = new HashMap<Object, Object>(); iMap.put("FOO", iString); iMap.put("BAR", iInteger); }
protected void setUp() throws Exception { super.setUp(); iString = "foo"; iInteger = Integer.valueOf(7); iMap = new HashMap<Object, Object>(); iMap.put("FOO", iString); iMap.put("BAR", iInteger); }
public void testConstantFuture_Integer() throws Exception { Integer value = new Integer(5); Future<Integer> test = ConcurrentUtils.constantFuture(value); assertTrue(test.isDone()); assertSame(value, test.get()); assertSame(value, test.get(1000, TimeUnit.SECONDS)); ass...
public void testConstantFuture_Integer() throws Exception { Integer value = Integer.valueOf(5); Future<Integer> test = ConcurrentUtils.constantFuture(value); assertTrue(test.isDone()); assertSame(value, test.get()); assertSame(value, test.get(1000, TimeUnit.SECONDS)); ...
public void testEqualsTrue() { checkEquals(init, true); ConstantInitializer<Integer> init2 = new ConstantInitializer<Integer>( new Integer(VALUE.intValue())); checkEquals(init2, true); init = new ConstantInitializer<Integer>(null); init2 = new ConstantInitiali...
public void testEqualsTrue() { checkEquals(init, true); ConstantInitializer<Integer> init2 = new ConstantInitializer<Integer>( Integer.valueOf(VALUE.intValue())); checkEquals(init2, true); init = new ConstantInitializer<Integer>(null); init2 = new ConstantInit...
protected void setUp() throws Exception { exceptionContext .addContextValue("test1", null) .addContextValue("test2", "some value") .addContextValue("test Date", new Date()) .addContextValue("test Nbr", new Integer(5)) .addContextValue("test Poorly ...
protected void setUp() throws Exception { exceptionContext .addContextValue("test1", null) .addContextValue("test2", "some value") .addContextValue("test Date", new Date()) .addContextValue("test Nbr", Integer.valueOf(5)) .addContextValue("test Poo...
public void testNullExceptionPassing() { exceptionContext = new ContextedException(TEST_MESSAGE_2, new Exception(TEST_MESSAGE), null) .addContextValue("test1", null) .addContextValue("test2", "some value") .addContextValue("test Date", new Date()) .addContextValue("test Nbr",...
public void testNullExceptionPassing() { exceptionContext = new ContextedException(TEST_MESSAGE_2, new Exception(TEST_MESSAGE), null) .addContextValue("test1", null) .addContextValue("test2", "some value") .addContextValue("test Date", new Date()) .addContextValue("test Nbr",...
public void testNullExceptionPassing() { exceptionContext = new ContextedRuntimeException(TEST_MESSAGE_2, new Exception(TEST_MESSAGE), null) .addContextValue("test1", null) .addContextValue("test2", "some value") .addContextValue("test Date", new Date()) .addContextValue("tes...
public void testNullExceptionPassing() { exceptionContext = new ContextedRuntimeException(TEST_MESSAGE_2, new Exception(TEST_MESSAGE), null) .addContextValue("test1", null) .addContextValue("test2", "some value") .addContextValue("test Date", new Date()) .addContextValue("tes...
public void testConstructors() { assertEquals(null, new MutableObject<String>().getValue()); Integer i = new Integer(6); assertSame(i, new MutableObject<Integer>(i).getValue()); assertSame("HI", new MutableObject<String>("HI").getValue()); assertSame(null, new Mutabl...
public void testConstructors() { assertEquals(null, new MutableObject<String>().getValue()); Integer i = Integer.valueOf(6); assertSame(i, new MutableObject<Integer>(i).getValue()); assertSame("HI", new MutableObject<String>("HI").getValue()); assertSame(null, new Mu...
public void testAppendln_Object() { StrBuilder sb = new StrBuilder(); sb.appendln((Object) null); assertEquals("" + SEP, sb.toString()); sb.appendln(FOO); assertEquals(SEP + "foo" + SEP, sb.toString()); sb.appendln(new Integer(6)); assertEquals(SEP + "foo" +...
public void testAppendln_Object() { StrBuilder sb = new StrBuilder(); sb.appendln((Object) null); assertEquals("" + SEP, sb.toString()); sb.appendln(FOO); assertEquals(SEP + "foo" + SEP, sb.toString()); sb.appendln(Integer.valueOf(6)); assertEquals(SEP + "fo...
public void testMapLookup() { Map<String, Object> map = new HashMap<String, Object>(); map.put("key", "value"); map.put("number", new Integer(2)); assertEquals("value", StrLookup.mapLookup(map).lookup("key")); assertEquals("2", StrLookup.mapLookup(map).lookup("number")); ...
public void testMapLookup() { Map<String, Object> map = new HashMap<String, Object>(); map.put("key", "value"); map.put("number", Integer.valueOf(2)); assertEquals("value", StrLookup.mapLookup(map).lookup("key")); assertEquals("2", StrLookup.mapLookup(map).lookup("number")); ...
public void testLexx() { // tests each constant assertArrayEquals(new DurationFormatUtils.Token[]{ new DurationFormatUtils.Token(DurationFormatUtils.y, 1), new DurationFormatUtils.Token(DurationFormatUtils.M, 1), new DurationFormatUtils.Token(DurationFormatUtils.d...
public void testLexx() { // tests each constant assertArrayEquals(new DurationFormatUtils.Token[]{ new DurationFormatUtils.Token(DurationFormatUtils.y, 1), new DurationFormatUtils.Token(DurationFormatUtils.M, 1), new DurationFormatUtils.Token(DurationFormatUtils.d...
protected void executeInternal(JobExecutionContext context) throws JobExecutionException { try { this.methodInvoker.invoke(); } catch (InvocationTargetException ex) { if (ex.getTargetException() instanceof JobExecutionException) { // -> JobExecutionException, to be logged at info level by Quartz...
protected void executeInternal(JobExecutionContext context) throws JobExecutionException { try { context.setResult(this.methodInvoker.invoke()); } catch (InvocationTargetException ex) { if (ex.getTargetException() instanceof JobExecutionException) { // -> JobExecutionException, to be logged at i...
public BeanDefinitionHolder decorate(Node node, BeanDefinitionHolder definition, ParserContext parserContext) { if (node instanceof Attr) { Attr attr = (Attr) node; String propertyName = attr.getLocalName(); String propertyValue = attr.getValue(); MutablePropertyValues pvs = definition.getBeanDefinition(...
public BeanDefinitionHolder decorate(Node node, BeanDefinitionHolder definition, ParserContext parserContext) { if (node instanceof Attr) { Attr attr = (Attr) node; String propertyName = parserContext.getDelegate().getLocalName(attr); String propertyValue = attr.getValue(); MutablePropertyValues pvs = de...
public BeanDefinition parse(Element element, ParserContext parserContext) { CompositeComponentDefinition compositeDef = new CompositeComponentDefinition(element.getTagName(), parserContext.extractSource(element)); parserContext.pushContainingComponent(compositeDef); NodeList childNodes = element.getChildNode...
public BeanDefinition parse(Element element, ParserContext parserContext) { CompositeComponentDefinition compositeDef = new CompositeComponentDefinition(element.getTagName(), parserContext.extractSource(element)); parserContext.pushContainingComponent(compositeDef); NodeList childNodes = element.getChildNode...
protected static int calculateShift(int minimumValue, int maximumValue) { int shift = 0; int value = 1; while (value < minimumValue && value < minimumValue) { value <<= 1; shift++; } return shift; }
protected static int calculateShift(int minimumValue, int maximumValue) { int shift = 0; int value = 1; while (value < minimumValue && value < maximumValue) { value <<= 1; shift++; } return shift; }
public Void invoke(Cache<SessionAttributeCacheKey, MarshalledValue<Object, MarshallingContext>> cache) { for (String attribute: entry.getAttributes()) { cache.remove(new SessionAttributeCacheKey(id, attribute)); } return null; }...
public Void invoke(Cache<SessionAttributeCacheKey, MarshalledValue<Object, MarshallingContext>> cache) { for (String attribute: entry.getAttributes()) { cache.remove(new SessionAttributeCacheKey(id, attribute)); } return null; }...
public void testMessageNumber() { Assert.assertEquals(311, LocalizedFormats.values().length); }
public void testMessageNumber() { Assert.assertEquals(312, LocalizedFormats.values().length); }
public Predicate<? super T>[] getPredicates() { return FunctorUtils.copy(iPredicates); }
public Predicate<? super T>[] getPredicates() { return FunctorUtils.<T>copy(iPredicates); }
public Closure<? super E>[] getClosures() { return FunctorUtils.copy(iClosures); }
public Closure<? super E>[] getClosures() { return FunctorUtils.<E>copy(iClosures); }
public Transformer<? super T, ? extends T>[] getTransformers() { return FunctorUtils.copy(iTransformers); }
public Transformer<? super T, ? extends T>[] getTransformers() { return FunctorUtils.<T, T>copy(iTransformers); }
package org.jboss.as.test.integration.deployment.structure.jar; /* * JBoss, Home of Professional Open Source. * Copyright 2011, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This i...
package org.jboss.as.test.integration.deployment.structure.jar; /* * JBoss, Home of Professional Open Source. * Copyright 2011, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This i...
package org.jboss.as.test.integration.deployment.structure.war; /* * JBoss, Home of Professional Open Source. * Copyright 2011, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This i...
package org.jboss.as.test.integration.deployment.structure.war; /* * JBoss, Home of Professional Open Source. * Copyright 2011, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This i...
package org.jboss.as.test.integration.deployment.structure.war; /* * JBoss, Home of Professional Open Source. * Copyright 2011, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This i...
package org.jboss.as.test.integration.deployment.structure.war; /* * JBoss, Home of Professional Open Source. * Copyright 2011, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This i...
T map(S source, T target); /* * 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://www.apache.org/licenses/LICENSE-2.0...
T map(S source, T target); /* * 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://www.apache.org/licenses/LICENSE-2.0...
public Context getJNDIContext(final Endpoint ep) throws NamingException { throw new UnsupportedOperationException(); // final EJBContainer ejb3Container = (EJBContainer) getEjb3Container(); // return (Context) ejb3Container.getEnc().lookup(EJB3_JNDI_PREFIX); }
public Context getJNDIContext(final Endpoint ep) throws NamingException { return null; // TODO: implement // final EJBContainer ejb3Container = (EJBContainer) getEjb3Container(); // return (Context) ejb3Container.getEnc().lookup(EJB3_JNDI_PREFIX); }
public void setDatabasePopulator(DatabasePopulator populator) { Assert.notNull(populator, "The TestDatabasePopulator is required"); databasePopulator = populator; }
public void setDatabasePopulator(DatabasePopulator populator) { Assert.notNull(populator, "The DatabasePopulator is required"); databasePopulator = populator; }
public boolean isReverse() { return false; }
public boolean isReverse() { return true; }
public boolean isWritable() { return true; } }
public boolean isWritable() { return this.ref.isWritableProperty(this.ref.name, this.contextObject, this.evalContext); } }
public void handleRollback(OperationContext context, ModelNode operation) { timer.suspend(); } }); } else { throw EjbLogger.ROOT_LOGGER.timerIsActive(timer.getId()); } ...
public void handleRollback(OperationContext context, ModelNode operation) { timer.suspend(); } }); } else { throw EjbLogger.ROOT_LOGGER.timerIsActive(timer); } ...
private HandlerAddHandler() { } static void launchServices(final OperationContext context, final PathAddress pathAddress , final ModelNode model, final ServiceVerificationHandler verificationHandler, final List<ServiceController<?>> newControllers) throws OperationFailedException { Handler newHand...
private HandlerAddHandler() { } static void launchServices(final OperationContext context, final PathAddress pathAddress , final ModelNode model, final ServiceVerificationHandler verificationHandler, final List<ServiceController<?>> newControllers) throws OperationFailedException { Handler newHand...
protected static jline.ConsoleReader initConsoleReader() { final String bindingsName; final String osName = SecurityActions.getSystemProperty("os.name").toLowerCase(); if(osName.indexOf("windows") >= 0) { bindingsName = "keybindings/jline-windows-bindings.properties"; } ...
protected static jline.ConsoleReader initConsoleReader() { final String bindingsName; final String osName = SecurityActions.getSystemProperty("os.name").toLowerCase(); if(osName.indexOf("windows") >= 0) { bindingsName = "keybindings/jline-windows-bindings.properties"; } ...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { ServiceController<?> service = context.getServiceRegistry(true).getRequiredService(Services.JBOSS_AS); ByteArrayOutputStream out = new ByteArrayOutputStream(); ...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { ServiceController<?> service = context.getServiceRegistry(false).getRequiredService(Services.JBOSS_AS); ByteArrayOutputStream out = new ByteArrayOutputStream(); ...
public static byte[] readFileToByteArray(File file) throws IOException { InputStream in = null; try { in = openInputStream(file); return IOUtils.toByteArray(in); } finally { IOUtils.closeQuietly(in); } }
public static byte[] readFileToByteArray(File file) throws IOException { InputStream in = null; try { in = openInputStream(file); return IOUtils.toByteArray(in, file.length()); } finally { IOUtils.closeQuietly(in); } }
public String getName() { return getDescription().getComponentName(); }
public String getName() { return getComponentName(); }
public ComponentInjector createInjector(AbstractComponentConfiguration component) { final ServiceName serviceName = deploymentUnit.getServiceName().append("component",component.getDescription().getComponentName(),"weldinjector"); WeldComponentInjectionService service = new WeldComponentInjectionServ...
public ComponentInjector createInjector(AbstractComponentConfiguration component) { final ServiceName serviceName = deploymentUnit.getServiceName().append("component",component.getComponentName(),"weldinjector"); WeldComponentInjectionService service = new WeldComponentInjectionService(serviceName,c...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { ArquillianConfig arqConfig = phaseContext.getAttachment(ArquillianConfig.KEY); if (arqConfig == null) return; ServiceTarget serviceTarget = phaseContext.getServiceTarget(); ...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { ArquillianConfig arqConfig = phaseContext.getDeploymentUnit().getAttachment(ArquillianConfig.KEY); if (arqConfig == null) return; ServiceTarget serviceTarget = phaseContext.getSer...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final Index index = phaseContext.getAttachment(Attachments.ANNOTATION_INDEX); if (index == null) return; // Skip if there is no annotation index final DotName runWithName = DotNam...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final Index index = phaseContext.getDeploymentUnit().getAttachment(Attachments.ANNOTATION_INDEX); if (index == null) return; // Skip if there is no annotation index final DotName ...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ConnectorXmlDescriptor connectorXmlDescriptor = deploymentUnit.getAttachment(ConnectorXmlDescriptor.ATTACHMENT_KEY); ...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ConnectorXmlDescriptor connectorXmlDescriptor = deploymentUnit.getAttachment(ConnectorXmlDescriptor.ATTACHMENT_KEY); ...