buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public static String initials(String str, char... delimiters) { if (str == null || str.length() == 0) { return str; } if (delimiters != null && delimiters.length == 0) { return ""; } int strLen = str.length(); char[] buf = new char[strLen / 2 +...
public static String initials(String str, char... delimiters) { if (str == null || str.length() == 0) { return str; } if (delimiters != null && delimiters.length == 0) { return ""; } int strLen = str.length(); char[] buf = new char[strLen / 2 +...
public static NetworkInterfaceBinding createBinding(String name, ParsedInterfaceCriteria criteria) throws SocketException, UnknownHostException { return createBinding(name, criteria.isAnyLocalV4(), criteria.isAnyLocalV6(), criteria.isAnyLocal(), new OverallInterfaceCriteria(crite...
public static NetworkInterfaceBinding createBinding(String name, ParsedInterfaceCriteria criteria) throws SocketException, UnknownHostException { return createBinding(name, criteria.isAnyLocalV4(), criteria.isAnyLocalV6(), criteria.isAnyLocal(), new OverallInterfaceCriteria(crite...
private boolean handleSSLFailure() throws CommandLineException { Certificate[] lastChain; if (trustManager == null || (lastChain = trustManager.getLastFailedCertificateChain()) == null) { return false; } error("Unable to connect due to unrecognised server certificate"); ...
private boolean handleSSLFailure() throws CommandLineException { Certificate[] lastChain; if (trustManager == null || (lastChain = trustManager.getLastFailedCertificateChain()) == null) { return false; } printLine("Unable to connect due to unrecognised server certificate"...
private RequestOptions createRequestOptions() { return new RequestOptions(ResponseMode.GET_ALL, this.timeout, false, FILTER, Message.Flag.DONT_BUNDLE, Message.Flag.OOB); }
private RequestOptions createRequestOptions() { return new RequestOptions(ResponseMode.GET_ALL, this.timeout, false, FILTER, Message.Flag.DONT_BUNDLE); }
public CSVRecord nextRecord() throws IOException { CSVRecord result = null; this.record.clear(); StringBuilder sb = null; do { this.reusableToken.reset(); this.lexer.nextToken(this.reusableToken); switch (this.reusableToken.type) { case...
public void remove() { throw new UnsupportedOperationException(); } }; } /** * Parses the next record from the current point in the stream. * * @return the record as an array of values, or <tt>null</tt> if the end of the stream has been reached ...
package org.jboss.as.deployment.scanner; /* * JBoss, Home of Professional Open Source. * Copyright 2010, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you ca...
package org.jboss.as.deployment.scanner; /* * JBoss, Home of Professional Open Source. * Copyright 2010, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you ca...
package org.jboss.as.standalone.client.api.deployment; /* * JBoss, Home of Professional Open Source. * Copyright 2010, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free so...
package org.jboss.as.standalone.client.api.deployment; /* * JBoss, Home of Professional Open Source. * Copyright 2010, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free so...
package org.jboss.as.standalone.client.api.deployment; /* * JBoss, Home of Professional Open Source. * Copyright 2010, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free so...
package org.jboss.as.standalone.client.api.deployment; /* * JBoss, Home of Professional Open Source. * Copyright 2010, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free so...
package org.jboss.as.standalone.client.api.deployment; /* * JBoss, Home of Professional Open Source. * Copyright 2010, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free so...
package org.jboss.as.standalone.client.api.deployment; /* * JBoss, Home of Professional Open Source. * Copyright 2010, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free so...
package org.jboss.as.standalone.client.api.deployment; /* * JBoss, Home of Professional Open Source. * Copyright 2010, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free so...
package org.jboss.as.standalone.client.api.deployment; /* * JBoss, Home of Professional Open Source. * Copyright 2010, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free so...
package org.jboss.as.standalone.client.api.deployment; /* * JBoss, Home of Professional Open Source. * Copyright 2010, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free so...
package org.jboss.as.standalone.client.api.deployment; /* * JBoss, Home of Professional Open Source. * Copyright 2010, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free so...
package org.jboss.as.standalone.client.impl.deployment; /* * JBoss, Home of Professional Open Source. * Copyright 2010, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free s...
package org.jboss.as.standalone.client.impl.deployment; /* * JBoss, Home of Professional Open Source. * Copyright 2010, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free s...
private TimerImpl timerFromResult(final ResultSet resultSet, final TimerServiceImpl timerService) throws SQLException { boolean calendarTimer = resultSet.getBoolean(24); TimerImpl.Builder builder = null; if (calendarTimer) { CalendarTimer.Builder cb = CalendarTimer.builder(); ...
private TimerImpl timerFromResult(final ResultSet resultSet, final TimerServiceImpl timerService) throws SQLException { boolean calendarTimer = resultSet.getBoolean(24); TimerImpl.Builder builder = null; if (calendarTimer) { CalendarTimer.Builder cb = CalendarTimer.builder(); ...
protected OpenListener createOpenListener() { AjpOpenListener ajpOpenListener = new AjpOpenListener(getBufferPool().getValue(), OptionMap.builder().addAll(commonOptions).addAll(listenerOptions).set(UndertowOptions.ENABLE_CONNECTOR_STATISTICS, getUndertowService().isStatisticsEnabled()).getMap()); aj...
protected OpenListener createOpenListener() { AjpOpenListener ajpOpenListener = new AjpOpenListener(getBufferPool().getValue(), OptionMap.builder().addAll(commonOptions).addAll(listenerOptions).set(UndertowOptions.ENABLE_CONNECTOR_STATISTICS, getUndertowService().isStatisticsEnabled()).getMap(), getBufferSi...
protected OpenListener createOpenListener() { return new HttpOpenListener(getBufferPool().getValue(), OptionMap.builder().addAll(commonOptions).addAll(listenerOptions).set(UndertowOptions.ENABLE_CONNECTOR_STATISTICS, getUndertowService().isStatisticsEnabled()).getMap()); }
protected OpenListener createOpenListener() { return new HttpOpenListener(getBufferPool().getValue(), OptionMap.builder().addAll(commonOptions).addAll(listenerOptions).set(UndertowOptions.ENABLE_CONNECTOR_STATISTICS, getUndertowService().isStatisticsEnabled()).getMap(), getBufferSize()); }
public static List<AuthMethodConfig> parse(final String methods, final Map<String, String> replacements) { try { if (methods == null || methods.isEmpty()) { return Collections.emptyList(); } final List<AuthMethodConfig> ret = new ArrayList<AuthMethodConfig...
public static List<AuthMethodConfig> parse(final String methods, final Map<String, String> replacements) { try { if (methods == null || methods.isEmpty()) { return Collections.emptyList(); } final List<AuthMethodConfig> ret = new ArrayList<AuthMethodConfig...
public Map<String, String> getSessionIds() { Map<String, String> result = new HashMap<String, String>(); for (String sessionId: this.cache.keySet()) { result.put(sessionId, null); } return result; }
public Map<String, String> getSessionIds() { Map<String, String> result = new HashMap<String, String>(); for (String sessionId: this.cache.getAdvancedCache().withFlags(Flag.SKIP_LOCKING, Flag.SKIP_REMOTE_LOOKUP, Flag.SKIP_CACHE_LOAD).keySet()) { result.put(sessionId, null); } ...
private void registerServletContextService(ServletContext servletContext, BundleContext bundleContext) { Bundle bundle = bundleContext.getBundle(); Dictionary<String, Object> props = new Hashtable<String, Object>(); props.put("osgi.web.symbolicname", bundle.getSymbolicName()); Dictio...
private void registerServletContextService(ServletContext servletContext, BundleContext bundleContext) { Bundle bundle = bundleContext.getBundle(); Dictionary<String, Object> props = new Hashtable<String, Object>(); props.put("osgi.web.symbolicname", bundle.getSymbolicName()); Dictio...
public void testWarDeployment() throws Exception { Manifest manifest = WebBundleURIParser.parse("webbundle://foo?Bundle-SymbolicName=com.example"); OSGiMetaData metadata = OSGiMetaDataBuilder.load(manifest); Assert.assertEquals("com.example", metadata.getBundleSymbolicName()); Asse...
public void testWarDeployment() throws Exception { Manifest manifest = WebBundleURIParser.parse("webbundle://foo?Bundle-SymbolicName=com.example"); OSGiMetaData metadata = OSGiMetaDataBuilder.load(manifest); Assert.assertEquals("com.example", metadata.getBundleSymbolicName()); Asse...
public void testCommentsAndEmptyLines() throws IOException { final String code = "1,2,3,\n"+ // 1 "\n"+ // 1b "\n"+ // 1c "a,b x,c#no-comment\n"+ // 2 "#foo\n"+ ...
public void testCommentsAndEmptyLines() throws IOException { final String code = "1,2,3,\n"+ // 1 "\n"+ // 1b "\n"+ // 1c "a,b x,c#no-comment\n"+ // 2 "#foo\n"+ ...
public static HornetQServerControlHandler INSTANCE = new HornetQServerControlHandler();
private HornetQServerControl getServerControl(final OperationContext context, ModelNode operation) throws OperationFailedException { final ServiceName hqServiceName = MessagingServices.getHornetQServiceName(PathAddress.pathAddress(operation.get(ModelDescriptionConstants.OP_ADDR))); ServiceController...
public JMSFactoryType getType() { return type; } public static ParameterValidator VALIDATOR = new EnumValidator<ConnectionFactoryType>(ConnectionFactoryType.class, true, false); }
public JMSFactoryType getType() { return type; } public static final ParameterValidator VALIDATOR = new EnumValidator<ConnectionFactoryType>(ConnectionFactoryType.class, true, false); }
public static <E> BoundedCollection<E> decorateUsing(Collection<? super E> coll) { if (coll == null) { throw new IllegalArgumentException("The collection must not be null"); } // handle decorators for (int i = 0; i < 1000; i++) { // counter to prevent infinite looping ...
public static <E> BoundedCollection<E> decorateUsing(Collection<? super E> coll) { if (coll == null) { throw new IllegalArgumentException("The collection must not be null"); } // handle decorators for (int i = 0; i < 1000; i++) { // counter to prevent infinite looping ...
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode recoveryEnvModel, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> serviceControllers) throws OperationFailedException { final...
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode recoveryEnvModel, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> serviceControllers) throws OperationFailedException { final...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final ServiceTarget serviceTarget = context.getServiceTarget(); final ServiceVerificationHandler verificationHandler = new ServiceVerificationHandler(); ...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final ServiceTarget serviceTarget = context.getServiceTarget(); final ServiceVerificationHandler verificationHandler = new ServiceVerificationHandler(); ...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); if (deploymentUnit.getParent() == null) { return; } final List<DeploymentUnit> deploymentUnits = new Array...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); if (deploymentUnit.getParent() != null) { return; } final List<DeploymentUnit> deploymentUnits = new Array...
public static Class<?> makeStubClass(final Class<?> myClass) { final String stubClassName = myClass + "_Stub"; ClassLoader cl = SecurityActions.getContextClassLoader(); if (cl == null) { cl = myClass.getClassLoader(); } if (cl == null) { throw EjbMessa...
public static Class<?> makeStubClass(final Class<?> myClass) { final String stubClassName = myClass + "_Stub"; ClassLoader cl = SecurityActions.getContextClassLoader(); if (cl == null) { cl = myClass.getClassLoader(); } if (cl == null) { throw EjbMessa...
public int compareTo(final Chromosome another) { return ((Double)this.getFitness()).compareTo(another.getFitness()); }
public int compareTo(final Chromosome another) { return Double.compare(getFitness(), another.getFitness()); }
private static ConnectionFactoryAttribute[] define(ConnectionFactoryAttribute[] common, ConnectionFactoryAttribute... specific) { int size = common.length + specific.length; ConnectionFactoryAttribute[] result = new ConnectionFactoryAttribute[size]; arraycopy(common, 0, result, 0, common.len...
private static ConnectionFactoryAttribute[] define(ConnectionFactoryAttribute[] common, ConnectionFactoryAttribute... specific) { int size = common.length + specific.length; ConnectionFactoryAttribute[] result = new ConnectionFactoryAttribute[size]; arraycopy(common, 0, result, 0, common.len...
protected TimerImpl(Builder builder, TimerServiceImpl service) { assert builder.id != null : "id is null"; this.id = builder.id; this.timedObjectId = builder.timedObjectId; this.info = builder.info; this.persistent = builder.persistent; this.initialExpiration = build...
protected TimerImpl(Builder builder, TimerServiceImpl service) { assert builder.id != null : "id is null"; this.id = builder.id; this.timedObjectId = builder.timedObjectId; this.info = builder.info; this.persistent = builder.persistent; this.initialExpiration = build...
public void initBinder(WebDataBinder binder, NativeWebRequest request) throws Exception { for (InvocableHandlerMethod binderMethod : this.binderMethods) { if (!isBinderMethodApplicable(binderMethod, binder)) { continue; } Object returnValue = binderMethod.invokeForRequest(request, null, binder); if (...
public void initBinder(WebDataBinder binder, NativeWebRequest request) throws Exception { for (InvocableHandlerMethod binderMethod : this.binderMethods) { if (!isBinderMethodApplicable(binderMethod, binder)) { continue; } Object returnValue = binderMethod.invokeForRequest(request, null, binder); if (...
protected void handleMissingValue(String name, MethodParameter parameter) throws ServletException { throw new UnsupportedOperationException("Did not expect to handle a missing value: an @Value is never required"); }
protected void handleMissingValue(String name, MethodParameter parameter) throws ServletException { throw new UnsupportedOperationException("@Value is never required: " + parameter.getMethod()); }
public static Archive<?> deployJpa() { return ShrinkWrap.create(JavaArchive.class, JPA_DEPLOYMENT_NAME + ".jar") .addClasses(Employee.class, JpaRemoteBean.class, JpaRemote.class, DeployedXmlJpaDataSourceTestCase.class) .addAsManifestResource(DeployedXm...
public static Archive<?> deployJpa() { return ShrinkWrap.create(JavaArchive.class, JPA_DEPLOYMENT_NAME + ".jar") .addClasses(Employee.class, JpaRemoteBean.class, JpaRemote.class, DeployedXmlJpaDataSourceTestCase.class) .addAsManifestResource(DeployedXm...
public void start(StartContext startContext) throws StartException { realmAuthenticationProvider = new RealmAuthenticationProvider(securityRealmInjectedValue.getValue(), serverCallbackValue.getValue()); }
public void start(StartContext startContext) throws StartException { realmAuthenticationProvider = new RealmAuthenticationProvider(securityRealmInjectedValue.getValue(), serverCallbackValue.getOptionalValue()); }
@Message(id = 14858, value="Path '%s' cannot be removed, since the following paths depend on it: %s") /* * JBoss, Home of Professional Open Source. * Copyright 2011, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of...
@Message(id = 14858, value="Path '%s' cannot be removed, since the following paths depend on it: %s") /* * JBoss, Home of Professional Open Source. * Copyright 2011, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of...
public final List<TestExecutionListener> getTestExecutionListeners() { Class<?> clazz = getBootstrapContext().getTestClass(); Class<TestExecutionListeners> annotationType = TestExecutionListeners.class; List<Class<? extends TestExecutionListener>> classesList = new ArrayList<Class<? extends TestExecutionListener...
public final List<TestExecutionListener> getTestExecutionListeners() { Class<?> clazz = getBootstrapContext().getTestClass(); Class<TestExecutionListeners> annotationType = TestExecutionListeners.class; List<Class<? extends TestExecutionListener>> classesList = new ArrayList<Class<? extends TestExecutionListener...
public interface Constants { /* * JBoss, Home of Professional Open Source. * Copyright 2011, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribu...
public interface Constants { /* * JBoss, Home of Professional Open Source. * Copyright 2011, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribu...
package org.jboss.as.domain.http.server.security; /* * JBoss, Home of Professional Open Source. * Copyright 2011, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free softwar...
package org.jboss.as.domain.http.server.security; /* * JBoss, Home of Professional Open Source. * Copyright 2011, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free softwar...
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 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...
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...
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 int complete(CommandContext ctx, final String buffer, int cursor, List<String> candidates) { int firstCharIndex = 0; while(firstCharIndex < buffer.length()) { if(!Character.isWhitespace(buffer.charAt(firstCharIndex))) { break; } ++firstChar...
public int complete(CommandContext ctx, final String buffer, int cursor, List<String> candidates) { int firstCharIndex = 0; while(firstCharIndex < buffer.length()) { if(!Character.isWhitespace(buffer.charAt(firstCharIndex))) { break; } ++firstChar...
public LsHandler(String command) { super(command, true); l = new ArgumentWithoutValue(this, "-l"); nodePath = new ArgumentWithValue(this, OperationRequestCompleter.INSTANCE, 0, "--node-path"); }
public LsHandler(String command) { super(command, true); l = new ArgumentWithoutValue(this, "-l"); nodePath = new ArgumentWithValue(this, OperationRequestCompleter.ARG_VALUE_COMPLETER, 0, "--node-path"); }
package org.jboss.as.testsuite.integration.jaxrs.integration.cdi; /* * JBoss, Home of Professional Open Source * Copyright 2010, Red Hat Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is fre...
package org.jboss.as.testsuite.integration.jaxrs.integration.cdi; /* * JBoss, Home of Professional Open Source * Copyright 2010, Red Hat Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is fre...
ServiceBuilder<SessionIdentifierCodec> build(ServiceTarget target, ServiceName name, String deploymentName); /* * JBoss, Home of Professional Open Source. * Copyright 2014, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full lis...
ServiceBuilder<SessionIdentifierCodec> build(ServiceTarget target, ServiceName name, String deploymentName); /* * JBoss, Home of Professional Open Source. * Copyright 2014, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full lis...
public ModelNode buildRequest(CommandContext ctx) throws CommandFormatException { return ((DefaultCallbackHandler)ctx.getParsedCommandLine()).toOperationRequest(); }
public ModelNode buildRequest(CommandContext ctx) throws CommandFormatException { return ((DefaultCallbackHandler)ctx.getParsedCommandLine()).toOperationRequest(ctx); }
public void testParseSubsystemWithConnector() throws Exception { //Parse the subsystem xml into operations String subsystemXml = "<subsystem xmlns=\"" + Namespace.CURRENT.getUriString() + "\">" + " <remoting-connector />" + "</subsystem>"; L...
public void testParseSubsystemWithConnector() throws Exception { //Parse the subsystem xml into operations String subsystemXml = "<subsystem xmlns=\"" + Namespace.CURRENT.getUriString() + "\">" + " <remoting-connector use-management-endpoint=\"false\" />" + ...
public void testSinFunction() throws MathException { UnivariateRealFunction f = new SinFunction(); UnivariateRealIntegrator integrator = new LegendreGaussIntegrator(5, 64); integrator.setAbsoluteAccuracy(1.0e-10); integrator.setRelativeAccuracy(1.0e-14); integrator.setMinimal...
public void testSinFunction() throws MathException { UnivariateRealFunction f = new SinFunction(); UnivariateRealIntegratorImpl integrator = new LegendreGaussIntegrator(5, 64); integrator.setAbsoluteAccuracy(1.0e-10); integrator.setRelativeAccuracy(1.0e-14); integrator.setMin...
protected DirectoryWalker(IOFileFilter directoryFilter, IOFileFilter fileFilter, int depthLimit) { if (directoryFilter == null && fileFilter == null) { this.filter = null; } else { directoryFilter = (directoryFilter != null ? directoryFilter : TrueFileFilter.TRUE); ...
protected DirectoryWalker(IOFileFilter directoryFilter, IOFileFilter fileFilter, int depthLimit) { if (directoryFilter == null && fileFilter == null) { this.filter = null; } else { directoryFilter = (directoryFilter != null ? directoryFilter : TrueFileFilter.TRUE); ...
public void testAnnotationInjection() throws Exception { SimpleEjb bean = lookup(SimpleEjb.class.getSimpleName(), SimpleEjb.class); Assert.assertEquals("hello", bean.hello()); } protected <T> T lookupEjb(String beanName, Class<T> interfaceType) throws NamingException { return inter...
public void testAnnotationInjection() throws Exception { SimpleEjb bean = lookup(SimpleEjb.class.getSimpleName(), SimpleEjb.class); Assert.assertEquals("hello", bean.hello()); } protected <T> T lookupEjb(String beanName, Class<T> interfaceType) throws NamingException { return inter...
private static boolean deploymentHasPersistenceProvider(DeploymentUnit deploymentUnit) { deploymentUnit = DeploymentUtils.getTopDeploymentUnit(deploymentUnit); PersistenceProviderDeploymentHolder persistenceProviderDeploymentHolder = deploymentUnit.getAttachment(JpaAttachments.DEPLOYED_PERSISTENCE_...
private static boolean deploymentHasPersistenceProvider(DeploymentUnit deploymentUnit) { deploymentUnit = DeploymentUtils.getTopDeploymentUnit(deploymentUnit); PersistenceProviderDeploymentHolder persistenceProviderDeploymentHolder = deploymentUnit.getAttachment(JpaAttachments.DEPLOYED_PERSISTENCE_...
public Object processInvocation(final InterceptorContext context) throws Exception { final EntityBeanComponentInstance instance = (EntityBeanComponentInstance) context.getPrivateData(ComponentInstance.class); instance.setupContext(); return context.proceed(); } })...
public Object processInvocation(final InterceptorContext context) throws Exception { final EntityBeanComponentInstance instance = (EntityBeanComponentInstance) context.getPrivateData(ComponentInstance.class); instance.setupContext(context); return context.proceed(); }...
@Message(id = Message.NONE, value = "Password of the user, this will be checked against the password requirements defined within the add-user.properties configuration") /* * JBoss, Home of Professional Open Source. * Copyright 2011, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See ...
@Message(id = Message.NONE, value = "Password of the user, this will be checked against the password requirements defined within the add-user.properties configuration") /* * JBoss, Home of Professional Open Source. * Copyright 2011, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See ...
public SimpleImmutableSessionAttributes(ImmutableSessionAttributes attributes) { Map<String, Object> map = new HashMap<>(); for (String name: attributes.getAttributeNames()) { map.put(name, attributes.getAttribute(name)); } this.attributes = Collections.unmodifiableMap(ma...
public SimpleImmutableSessionAttributes(ImmutableSessionAttributes attributes) { Map<String, Object> map = new HashMap<>(); for (String name: attributes.getAttributeNames()) { this.attributes.put(name, attributes.getAttribute(name)); } this.attributes = Collections.unmodi...
public void testShutdown() throws Exception { Session session = null; MessageProducer sender = null; MessageConsumer receiver = null; Connection connection = null; try { deployer.deploy("mdb"); Queue queue = new HornetQQueue(QUEUE...
public void testShutdown() throws Exception { Session session = null; MessageProducer sender = null; MessageConsumer receiver = null; Connection connection = null; try { deployer.deploy("mdb"); Queue queue = new HornetQQueue(QUEUE...
public void testMDBLifecycle() throws Exception { deployer.deploy("mdb"); SecurityClient client = this.login(); ITestResultsSingleton results = this.getResultsSingleton(); MessageProducer producer = null; MessageConsumer consumer = null; QueueConnection conn = null; ...
public void testMDBLifecycle() throws Exception { deployer.deploy("mdb"); SecurityClient client = this.login(); ITestResultsSingleton results = this.getResultsSingleton(); MessageProducer producer = null; MessageConsumer consumer = null; QueueConnection conn = null; ...
public static void setup() throws Exception { adminSupport = new JMSAdminOperations(); count++; TransportConfiguration transportConfiguration = new TransportConfiguration(NettyConnectorFactory.class.getName()); ServerLocator locator = HornetQClient.createServer...
public static void setup() throws Exception { adminSupport = new JMSAdminOperations(); count++; TransportConfiguration transportConfiguration = new TransportConfiguration(NettyConnectorFactory.class.getName()); ServerLocator locator = HornetQClient.createServer...
public synchronized void start(StartContext context) throws StartException { ServiceController<?> controller = context.getController(); LOGGER.tracef("Starting: %s in mode %s", controller.getName(), controller.getMode()); try { ServiceContainer serviceContainer = context.getContr...
public synchronized void start(StartContext context) throws StartException { ServiceController<?> controller = context.getController(); LOGGER.tracef("Starting: %s in mode %s", controller.getName(), controller.getMode()); try { ServiceContainer serviceContainer = context.getContr...
public void testJoin_Objectarray() { // assertNull(StringUtils.join(null)); // generates warning assertNull(StringUtils.join((Object[]) null)); // equivalent explicit cast // test additional varargs calls assertEquals("", StringUtils.join()); // empty array assertEquals("", St...
public void testJoin_Objectarray() { // assertNull(StringUtils.join(null)); // generates warning assertNull(StringUtils.join((Object[]) null)); // equivalent explicit cast // test additional varargs calls assertEquals("", StringUtils.join(new Object[0])); // empty array assert...
public void testJpa2ExcludeUnlisted() throws Exception { PersistenceUnitReader reader = new PersistenceUnitReader( new PathMatchingResourcePatternResolver(), new JndiDataSourceLookup()); String resource = "/org/springframework/orm/jpa/persistence-exclude-2.0.xml"; PersistenceUnitInfo[] info = reader.readPers...
public void testJpa2ExcludeUnlisted() throws Exception { PersistenceUnitReader reader = new PersistenceUnitReader( new PathMatchingResourcePatternResolver(), new JndiDataSourceLookup()); String resource = "/org/springframework/orm/jpa/persistence-exclude-2.0.xml"; PersistenceUnitInfo[] info = reader.readPers...
private ServiceRegistry getServiceRegistry() { return getDeploymentUnitInjector().getValue().getServiceRegistry(); } ServiceName getResourceAdapterServiceName() { final Collection<ServiceName> serviceNames = ConnectorServices.getResourceAdapteServiceName(this.resourceAdapterName); i...
private ServiceRegistry getServiceRegistry() { return getDeploymentUnitInjector().getValue().getServiceRegistry(); } ServiceName getResourceAdapterServiceName() { final Collection<ServiceName> serviceNames = ConnectorServices.getResourceAdapterServiceNames(this.resourceAdapterName); ...
public void init(JDBCStoreManager manager) { super.init(manager); ClassLoader loader = GetTCLAction.getContextClassLoader(); try { Class psClass = loader.loadClass(className); method = psClass.getMethod(methodName); } catch (ClassNotFoundException e) { ...
public void init(JDBCStoreManager manager) { super.init(manager); ClassLoader loader = GetTCLAction.getContextClassLoader(); try { Class psClass = loader.loadClass(className); method = psClass.getMethod(methodName); } catch (ClassNotFoundException e) { ...
public void beanMethodOverloadingWithoutInheritance() { @SuppressWarnings({ "hiding" }) @Configuration class Config { @Bean String aString() { return "na"; } @Bean String aString(Integer dependency) { return "na"; } } try { new AnnotationConfigApplicationContext(Config.class); fail("expected bean m...
public void beanMethodOverloadingWithoutInheritance() { @SuppressWarnings({ "unused", "hiding" }) @Configuration class Config { @Bean String aString() { return "na"; } @Bean String aString(Integer dependency) { return "na"; } } try { new AnnotationConfigApplicationContext(Config.class); fail("expec...
public void testCannotCommitTransaction() throws Exception { TransactionAttribute txatt = new DefaultTransactionAttribute(); Method m = setNameMethod; MapTransactionAttributeSource tas = new MapTransactionAttributeSource(); tas.register(m, txatt); // Method m2 = getNameMethod; // No attributes for m2 M...
public void testCannotCommitTransaction() throws Exception { TransactionAttribute txatt = new DefaultTransactionAttribute(); Method m = setNameMethod; MapTransactionAttributeSource tas = new MapTransactionAttributeSource(); tas.register(m, txatt); Method m2 = getNameMethod; // No attributes for m2 Mock...
public void statusCodeAndReasonMessage() { Locale locale = Locale.CHINESE; LocaleContextHolder.setLocale(locale); try { StaticMessageSource messageSource = new StaticMessageSource(); messageSource.addMessage("gone.reason", locale, "Gone reason message"); exceptionResolver.setMessageSource(messageSource)...
public void statusCodeAndReasonMessage() { Locale locale = Locale.CHINESE; LocaleContextHolder.setLocale(locale); try { StaticMessageSource messageSource = new StaticMessageSource(); messageSource.addMessage("gone.reason", locale, "Gone reason message"); exceptionResolver.setMessageSource(messageSource)...
public Interceptor getInterceptor(final Method method) throws IllegalStateException { Interceptor interceptor = methodMap.get(method); if (interceptor == null) { throw new IllegalStateException("Method does not exist"); } return interceptor; }
public Interceptor getInterceptor(final Method method) throws IllegalStateException { Interceptor interceptor = methodMap.get(method); if (interceptor == null) { throw new IllegalStateException("Method does not exist " + method); } return interceptor; }
protected void recoverServices(final OperationContext context, final ModelNode operation, final ModelNode model) throws OperationFailedException { GenericOutboundConnectionAdd.INSTANCE.installRuntimeService(context, operation, null); }
protected void recoverServices(final OperationContext context, final ModelNode operation, final ModelNode model) throws OperationFailedException { GenericOutboundConnectionAdd.INSTANCE.installRuntimeService(context, operation, model, null); }
protected void recoverServices(final OperationContext context, final ModelNode operation, final ModelNode model) throws OperationFailedException { RemoteOutboundConnectionAdd.INSTANCE.installRuntimeService(context, model, null); }
protected void recoverServices(final OperationContext context, final ModelNode operation, final ModelNode model) throws OperationFailedException { RemoteOutboundConnectionAdd.INSTANCE.installRuntimeService(context, operation, model, null); }
public final String resolveRelativePathEntry(String path, String relativeTo) { if (relativeTo == null) { return AbsolutePathService.convertPath(path); } else { PathEntry pathEntry; synchronized (pathEntries) { pathEntry = pathEntries.get(relativeTo...
public final String resolveRelativePathEntry(String path, String relativeTo) { if (relativeTo == null) { return AbsolutePathService.convertPath(path); } else { PathEntry pathEntry; synchronized (pathEntries) { pathEntry = pathEntries.get(relativeTo...
public static Archive<?> getDeployment() { JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "dummy.jar"); ja.addClass(ArchiveTestCase.class); return ja; }
public static Archive<?> getDeployment() { JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "dummy.jar"); ja.addClass(DeployTestCase.class); return ja; }
private void restoreStorageState(final DeploymentPhaseContext phaseContext, final Deployment deployment) { ServiceRegistry serviceRegistry = phaseContext.getServiceRegistry(); BundleStorage storageProvider = (BundleStorage) serviceRegistry.getRequiredService(IntegrationServices.BUNDLE_STORAGE).getVa...
private void restoreStorageState(final DeploymentPhaseContext phaseContext, final Deployment deployment) { ServiceRegistry serviceRegistry = phaseContext.getServiceRegistry(); BundleStorage storageProvider = (BundleStorage) serviceRegistry.getRequiredService(IntegrationServices.BUNDLE_STORAGE_PLUGIN...
protected void addServiceDependencies(ServiceBuilder<Void> builder) { super.addServiceDependencies(builder); builder.addDependency(ServerEnvironmentService.SERVICE_NAME, ServerEnvironment.class, injectedServerEnvironment); builder.addDependency(OSGiConstants.SUBSYSTEM_STATE_SERVICE_NAME, Sub...
protected void addServiceDependencies(ServiceBuilder<Void> builder) { super.addServiceDependencies(builder); builder.addDependency(ServerEnvironmentService.SERVICE_NAME, ServerEnvironment.class, injectedServerEnvironment); builder.addDependency(OSGiConstants.SUBSYSTEM_STATE_SERVICE_NAME, Sub...
public static void register(final ManagementResourceRegistration registration, final boolean server) { registration.registerOperationHandler(JVMAddHandler.OPERATION_NAME, JVMAddHandler.INSTANCE, JVMAddHandler.INSTANCE, false); registration.registerOperationHandler(JVMRemoveHandler.OPERATION_NAME, J...
public static void register(final ManagementResourceRegistration registration, final boolean server) { registration.registerOperationHandler(JVMAddHandler.OPERATION_NAME, JVMAddHandler.INSTANCE, JVMAddHandler.INSTANCE, false); registration.registerOperationHandler(JVMRemoveHandler.OPERATION_NAME, J...
public void patchBase() throws Exception { InstalledIdentity installedIdentity = loadInstalledIdentity(); // build a one-off patch for the base layer with 1 added module // and 1 add file String patchID = randomString(); File patchDir = mkdir(tempDir, patchID); Strin...
public void patchBase() throws Exception { InstalledIdentity installedIdentity = loadInstalledIdentity(); // build a one-off patch for the base layer with 1 added module // and 1 add file String patchID = randomString(); File patchDir = mkdir(tempDir, patchID); Strin...
public void testApplyCumulativePatchAndRollback() throws Exception { // start from a base installation // create an existing file in the AS7 installation File binDir = mkdir(env.getInstalledImage().getJbossHome(), "bin"); String fileName = "standalone.sh"; File standaloneShel...
public void testApplyCumulativePatchAndRollback() throws Exception { // start from a base installation // create an existing file in the AS7 installation File binDir = mkdir(env.getInstalledImage().getJbossHome(), "bin"); String fileName = "standalone.sh"; File standaloneShel...
public static void main(String[] args) throws Exception { final ModelControllerClient client = ModelControllerClient.Factory.create("localhost", 9999); try { final ModelNode domainOp = new ModelNode(); domainOp.get(OP).set(READ_RESOURCE_OPERATION); domainOp.get(O...
public static void main(String[] args) throws Exception { final ModelControllerClient client = ModelControllerClient.Factory.create("localhost", 9999); try { final ModelNode domainOp = new ModelNode(); domainOp.get(OP).set(READ_RESOURCE_OPERATION); domainOp.get(O...
public ModelNode getModelDescription(Locale locale) { return ExtensionDescription.getExtensionAddOperation(locale); } void initializeExtension(String module) throws OperationFailedException { try { for (Extension extension : Module.loadServiceFromCallerModuleLoader(ModuleIdentif...
public ModelNode getModelDescription(Locale locale) { return ExtensionDescription.getExtensionAddOperation(locale); } void initializeExtension(String module) throws OperationFailedException { try { for (Extension extension : Module.loadServiceFromCallerModuleLoader(ModuleIdentif...
protected void initializeExtension(String module) { try { for (final Extension extension : Module.loadServiceFromCallerModuleLoader(ModuleIdentifier.fromString(module), Extension.class)) { ClassLoader oldTccl = SecurityActions.setThreadContextClassLoader(extension.getClass()); ...
protected void initializeExtension(String module) { try { for (final Extension extension : Module.loadServiceFromCallerModuleLoader(ModuleIdentifier.fromString(module), Extension.class)) { ClassLoader oldTccl = SecurityActions.setThreadContextClassLoader(extension.getClass()); ...
private void parseServerDeployments(final XMLExtendedStreamReader reader, final ModelNode address, final List<ModelNode> list) throws XMLStreamException { requireNoAttributes(reader); final Set<String> names = new HashSet<String>(); while (reader.nextTag() != END_ELEMENT) { // ...
private void parseServerDeployments(final XMLExtendedStreamReader reader, final ModelNode address, final List<ModelNode> list) throws XMLStreamException { requireNoAttributes(reader); final Set<String> names = new HashSet<String>(); while (reader.nextTag() != END_ELEMENT) { // ...
public void setCacheDefinitionSources(CacheDefinitionSource... cacheDefinitionSources) { this.cachingInterceptor.setCacheDefinitionSources(cacheDefinitionSources); } }
public void setCacheDefinitionSources(CacheOperationSource... cacheDefinitionSources) { this.cachingInterceptor.setCacheDefinitionSources(cacheDefinitionSources); } }
protected boolean isEqualKey(final Object key1, Object key2) { key2 = keyType == ReferenceStrength.HARD ? key2 : ((Reference<?>) key2).get(); return key1 == key2; }
protected boolean isEqualKey(final Object key1, Object key2) { key2 = isKeyType(ReferenceStrength.HARD) ? key2 : ((Reference<?>) key2).get(); return key1 == key2; }
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final DeploymentUnit parent = Utils.getRootDeploymentUnit(deploymentUnit); final ServiceTarget serviceTarget = phaseConte...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final DeploymentUnit parent = Utils.getRootDeploymentUnit(deploymentUnit); final ServiceTarget serviceTarget = phaseConte...
public FieldVector<T> preMultiply(final FieldVector<T> v) { try { return new ArrayFieldVector<T>(preMultiply(((ArrayFieldVector<T>) v).getDataRef()), false); } catch (ClassCastException cce) { final int nRows = getRowDimension(); final int nCols = getColumnDimensi...
public FieldVector<T> preMultiply(final FieldVector<T> v) { try { return new ArrayFieldVector<T>(preMultiply(((ArrayFieldVector<T>) v).getDataRef()), false); } catch (ClassCastException cce) { final int nRows = getRowDimension(); final int nCols = getColumnDimensi...
public RealVector preMultiply(final RealVector v) { try { return new ArrayRealVector(preMultiply(((ArrayRealVector) v).getDataRef()), false); } catch (ClassCastException cce) { final int nRows = getRowDimension(); final int nCols = getColumnDimension(); ...
public RealVector preMultiply(final RealVector v) { try { return new ArrayRealVector(preMultiply(((ArrayRealVector) v).getDataRef()), false); } catch (ClassCastException cce) { final int nRows = getRowDimension(); final int nCols = getColumnDimension(); ...
<G, I> BeanManagerFactoryBuilder<G, I> getBeanManagerFactoryBuilder(String name, BeanManagerFactoryBuilderConfiguration config); /* * 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 * distrib...
<G, I> BeanManagerFactoryBuilder<G, I> getBeanManagerFactoryBuilder(String name, BeanManagerFactoryBuilderConfiguration config); /* * 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 * distrib...
public static ServiceName getServiceName(ServiceName deploymentUnitServiceName) { return deploymentUnitServiceName.append("marshalling-configuration"); }
public static ServiceName getServiceName(ServiceName deploymentUnitServiceName) { return deploymentUnitServiceName.append("marshalling"); }
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> serviceControllers) throws OperationFailedException { // add this to the service controllers serviceControllers.addAll(this.install...
protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model, ServiceVerificationHandler verificationHandler, List<ServiceController<?>> serviceControllers) throws OperationFailedException { // add this to the service controllers serviceControllers.addAll(this.install...
public void testStatementDefaultProperties()throws Exception { setModel("statement-properties.xml"); assertEquals("\"NOWARN\"",readAttribute(baseAddress,"track-statements").asString()); assertFalse(readAttribute(baseAddress,"share-prepared-statements").asBoolean()); removeDs(); }
public void testStatementDefaultProperties()throws Exception { setModel("statement-properties.xml"); assertEquals("NOWARN",readAttribute(baseAddress,"track-statements").asString()); assertFalse(readAttribute(baseAddress,"share-prepared-statements").asBoolean()); removeDs(); }
public void execute(final OperationContext context, final ModelNode operation) throws OperationFailedException { // Add the log store resource final ModelNode model = resource.getModel(); for (final SimpleAttributeDefinition attribute : LogStoreProviders.LOG_STORE_ATTRIBUTE) { i...
public void execute(final OperationContext context, final ModelNode operation) throws OperationFailedException { // Add the log store resource final ModelNode model = resource.getModel(); for (final SimpleAttributeDefinition attribute : LogStoreDefinition.LOG_STORE_ATTRIBUTE) { ...
public static GlobalConfiguration adapt(org.infinispan.config.GlobalConfiguration legacy) { // Handle the case that null is passed in if (legacy == null) return null; GlobalConfigurationBuilder builder = new GlobalConfigurationBuilder(); if (legacy.getTransportClass() != null) { ...
public static GlobalConfiguration adapt(org.infinispan.config.GlobalConfiguration legacy) { // Handle the case that null is passed in if (legacy == null) return null; GlobalConfigurationBuilder builder = new GlobalConfigurationBuilder(); if (legacy.getTransportClass() != null) { ...
protected void populateModel(final ModelNode operation, final ModelNode model) throws OperationFailedException { for(AttributeDefinition attr : ContentDefinition.attributes()) { attr.validateAndSet(operation, model); } final byte[] hash = operation.get(ContentDefinition.CONTENT.g...
protected void populateModel(final ModelNode operation, final ModelNode model) throws OperationFailedException { for(AttributeDefinition attr : ContentDefinition.attributes()) { attr.validateAndSet(operation, model); } final byte[] hash = operation.get(ContentDefinition.CONTENT.g...
private void writeConnectionFactories(final XMLExtendedStreamWriter writer, final ModelNode node) throws XMLStreamException { for (Property prop : node.asPropertyList()) { final String name = prop.getName(); final ModelNode factory = prop.getValue(); if (factory.isDefined...
private void writeConnectionFactories(final XMLExtendedStreamWriter writer, final ModelNode node) throws XMLStreamException { for (Property prop : node.asPropertyList()) { final String name = prop.getName(); final ModelNode factory = prop.getValue(); if (factory.isDefined...
public ModelNode getModelDescription(Locale locale) { final ModelNode node = new ModelNode(); ResourceBundle resbundle = getResourceBundle(locale); node.get(DESCRIPTION).set(resbundle.getString("capability")); node.get(ATTRIBUTES, ModelConstants.STARTLEVEL, ModelD...
public ModelNode getModelDescription(Locale locale) { final ModelNode node = new ModelNode(); ResourceBundle resbundle = getResourceBundle(locale); node.get(DESCRIPTION).set(resbundle.getString("capability")); node.get(ATTRIBUTES, ModelConstants.STARTLEVEL, ModelD...
private void parseStateTransfer(XMLExtendedStreamReader reader, ModelNode cache, List<ModelNode> operations) throws XMLStreamException { // ModelNode for the state transfer add operation ModelNode stateTransferAddress = cache.get(ModelDescriptionConstants.OP_ADDR).clone(); stateTransferAddre...
private void parseStateTransfer(XMLExtendedStreamReader reader, ModelNode cache, List<ModelNode> operations) throws XMLStreamException { // ModelNode for the state transfer add operation ModelNode stateTransferAddress = cache.get(ModelDescriptionConstants.OP_ADDR).clone(); stateTransferAddre...
private static void setupOpenListener(HttpOpenListener listener, ModelControllerClient modelControllerClient, ConsoleMode consoleMode, String consoleSlot, ControlledProcessStateService controlledProcessStateService, int securePort, SecurityRealm securityRealm) { CanonicalPathHandler canonicalPathHandler = n...
private static void setupOpenListener(HttpOpenListener listener, ModelControllerClient modelControllerClient, ConsoleMode consoleMode, String consoleSlot, ControlledProcessStateService controlledProcessStateService, int securePort, SecurityRealm securityRealm) { CanonicalPathHandler canonicalPathHandler = n...
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 void main(String[] args) throws Exception { Config config = new Config(); Map<String, Object> hbConf = new HashMap<String, Object>(); if(args.length > 0){ hbConf.put("hbase.rootdir", args[0]); } config.put("hbase.conf", hbConf); WordSpout s...
public static void main(String[] args) throws Exception { Config config = new Config(); Map<String, Object> hbConf = new HashMap<String, Object>(); if(args.length > 0){ hbConf.put("hbase.rootdir", args[0]); } config.put("hbase.conf", hbConf); WordSpout s...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); if (!DeploymentTypeMarker.isType(DeploymentType.WAR, deploymentUnit)) { return; // Skip non web deployments }...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); if (!DeploymentTypeMarker.isType(DeploymentType.WAR, deploymentUnit)) { return; // Skip non web deployments }...
public void transformManifest() throws Exception { VersionResourceResolver versionResourceResolver = new VersionResourceResolver(); versionResourceResolver .setVersionStrategyMap(Collections.singletonMap("/**", new ContentBasedVersionStrategy())); List<ResourceResolver> resolvers = new ArrayList<ResourceRe...
public void transformManifest() throws Exception { VersionResourceResolver versionResourceResolver = new VersionResourceResolver(); versionResourceResolver .setStrategyMap(Collections.singletonMap("/**", new ContentVersionStrategy())); List<ResourceResolver> resolvers = new ArrayList<ResourceResolver>(); ...
public void testBackslashEscaping() throws IOException { // To avoid confusion over the need for escaping chars in java code, // We will test with a forward slash as the escape char, and a single // quote as the encapsulator. final String code = "one,two,three\n" //...
public void testBackslashEscaping() throws IOException { // To avoid confusion over the need for escaping chars in java code, // We will test with a forward slash as the escape char, and a single // quote as the encapsulator. final String code = "one,two,three\n" //...
protected void addExtraServices(final ServiceTarget target) { ManagementRemotingServices.installRemotingEndpoint(target, ManagementRemotingServices.MANAGEMENT_ENDPOINT, "localhost", EndpointService.EndpointType.MANAGEMENT, null, null); ServiceName tmpDirPath = ServiceName.JBOSS.append("s...
protected void addExtraServices(final ServiceTarget target) { ManagementRemotingServices.installRemotingEndpoint(target, ManagementRemotingServices.MANAGEMENT_ENDPOINT, "loaclhost", EndpointService.EndpointType.MANAGEMENT, null, null); ServiceName tmpDirPath = ServiceName.JBOSS.append("s...