buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public void undeploy(final DeploymentUnit context) { } /** * Process a single index. * * @param index the annotation index * @param classLoader the module classloader * @throws DeploymentUnitProcessingException */ protected WebMetaData processAnnotations(Index index, Class...
public void undeploy(final DeploymentUnit context) { } /** * Process a single index. * * @param index the annotation index * @param classLoader the module classloader * @throws DeploymentUnitProcessingException */ protected WebMetaData processAnnotations(Index index, Class...
public void validate(String topologyName, Map topologyConf, StormTopology topology) throws InvalidTopologyException { } }
public void validate(String topologyName, Map topologyConf, StormTopology topology, Map NimbusConf) throws InvalidTopologyException { } }
public State makeState(Map conf, IMetricsContext metrics, int partitionIndex, int numPartitions) { return new LRUMemoryMapState(_maxSize, _id + partitionIndex); } }
public State makeState(Map conf, IMetricsContext metrics, int partitionIndex, int numPartitions) { return new LRUMemoryMapState(_maxSize, _id); } }
public State makeState(Map conf, IMetricsContext metrics, int partitionIndex, int numPartitions) { return new MemoryMapState(_id + partitionIndex); } }
public State makeState(Map conf, IMetricsContext metrics, int partitionIndex, int numPartitions) { return new MemoryMapState(_id); } }
public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) { List<TaskMessage> msgs = (List<TaskMessage>) e.getMessage(); if (msgs == null) { return; } try { server.enqueue(msgs, e.getRemoteAddress().toString()); } catch (InterruptedException e1) { ...
public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) { List<TaskMessage> msgs = (List<TaskMessage>) e.getMessage(); if (msgs == null) { return; } try { server.enqueue(msgs); } catch (InterruptedException e1) { LOG.info("failed to enqueue...
public void processDeployment(DeploymentUnitContext context) throws DeploymentUnitProcessingException { final JBossServiceXmlDescriptor serviceXmlDescriptor = context.getAttachment(JBossServiceXmlDescriptor.ATTACHMENT_KEY); if(serviceXmlDescriptor == null) return; final Module m...
public void processDeployment(DeploymentUnitContext context) throws DeploymentUnitProcessingException { final JBossServiceXmlDescriptor serviceXmlDescriptor = context.getAttachment(JBossServiceXmlDescriptor.ATTACHMENT_KEY); if(serviceXmlDescriptor == null) return; final Module m...
public void activate(final ServiceActivatorContext context) { final String deploymentName = key.getName() + ":" + key.getSha1HashAsHexString(); log.info("Activating server group deployment: " + deploymentName); final VirtualFile deploymentRoot = VFS.getChild(getFullyQualifiedDeploymentPath(...
public void activate(final ServiceActivatorContext context) { final String deploymentName = key.getName().replace('.', '_'); log.info("Activating server group deployment: " + deploymentName); final VirtualFile deploymentRoot = VFS.getChild(getFullyQualifiedDeploymentPath(key.getName())); ...
protected EachTestNotifier makeNotifier(FrameworkMethod method, RunNotifier notifier) { System.err.println("\n===== Test " + getTestClass().getJavaClass().getSimpleName() + "." + testName(method) + " ==========="); return super.makeNotifier(method, notifier); }
protected EachTestNotifier makeNotifier(FrameworkMethod method, RunNotifier notifier) { System.err.println("===== Test " + getTestClass().getJavaClass().getSimpleName() + "." + testName(method) + " ==========="); return super.makeNotifier(method, notifier); }
public ServerCommunicationHandler getServerCommunicationHandler(ServerEnvironment environment, MessageHandler handler) { return new ServerCommunicationHandler(environment.getProcessName(), environment.getProcessManagerAddress(), environment.getProcessManagerPort(), handler); }
public ServerCommunicationHandler getServerCommunicationHandler(ServerEnvironment environment, MessageHandler handler) { return new ServerCommunicationHandler(environment.getStdin(), environment.getStdout(), handler); }
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION); fin...
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION); fin...
public static BigFraction getReducedFraction(final int numerator, final int denominator) { if (numerator == 0) { return ZERO; // normalize zero. } return new BigFraction(numerator, denominator).reduce(); }
public static BigFraction getReducedFraction(final int numerator, final int denominator) { if (numerator == 0) { return ZERO; // normalize zero. } return new BigFraction(numerator, denominator); }
public boolean isTransactionActive() { try { final int status = injectedTransaction.getValue().getStatus(); return status == Status.STATUS_ACTIVE || status == Status.STATUS_COMMITTING || status == Status.STATUS_MARKED_ROLLBACK || ...
public boolean isTransactionActive() { try { final int status = injectedTransactionManager.getValue().getStatus(); return status == Status.STATUS_ACTIVE || status == Status.STATUS_COMMITTING || status == Status.STATUS_MARKED_ROLLBACK || ...
public static Formatter append(CharSequence seq, Formatter formatter, int flags, int width, int precision, char padChar, CharSequence ellipsis) { Validate.isTrue(ellipsis == null || precision < 0 || ellipsis.length() <= precision, "Specified ellipsis '%1$s' exceeds precision of %...
public static Formatter append(CharSequence seq, Formatter formatter, int flags, int width, int precision, char padChar, CharSequence ellipsis) { Validate.isTrue(ellipsis == null || precision < 0 || ellipsis.length() <= precision, "Specified ellipsis '%1$s' exceeds precision of %...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final Module module = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.MODULE); if (module == nul...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final Module module = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.MODULE); if (module == nul...
public InputStream openStream() { ManifestBuilder builder = ManifestBuilder.newInstance(); builder.addManifestHeader("Dependencies", "org.osgi.core,deployment.ejb3-osgi-target:0.0.0"); return builder.openStream(); } }); return archi...
public InputStream openStream() { ManifestBuilder builder = ManifestBuilder.newInstance(); builder.addManifestHeader("Dependencies", "org.osgi.core,deployment.ejb3-osgi-target"); return builder.openStream(); } }); return archive; ...
public InputStream openStream() { ManifestBuilder builder = ManifestBuilder.newInstance(); builder.addManifestHeader("Dependencies", "org.osgi.core,deployment.jaxrs-osgi-target:0.0.0"); return builder.openStream(); } }, JarFile.MANIFEST_NAM...
public InputStream openStream() { ManifestBuilder builder = ManifestBuilder.newInstance(); builder.addManifestHeader("Dependencies", "org.osgi.core,deployment.jaxrs-osgi-target"); return builder.openStream(); } }, JarFile.MANIFEST_NAME); ...
public InputStream openStream() { ManifestBuilder builder = ManifestBuilder.newInstance(); builder.addManifestHeader("Dependencies", "org.osgi.core,org.jboss.modules,org.jboss.logging,org.jboss.osgi.framework,deployment.example-xservice-mab-target-bundle:0.0.0"); ...
public InputStream openStream() { ManifestBuilder builder = ManifestBuilder.newInstance(); builder.addManifestHeader("Dependencies", "org.osgi.core,org.jboss.modules,org.jboss.logging,org.jboss.osgi.framework,deployment.example-xservice-mab-target-bundle"); re...
public boolean configuredToCreateCollectionOrMap() { return (configuration & SpelExpressionParserConfiguration.CreateObjectIfAttemptToReferenceNull)!=0; } }
public boolean configuredToDynamicallyCreateNullObjects() { return (configuration & SpelExpressionParserConfiguration.CreateObjectIfAttemptToReferenceNull)!=0; } }
public TypedValue getValueInternal(ExpressionState state) throws EvaluationException { TypedValue result = readProperty(state, this.name); TypeDescriptor resultDescriptor = result.getTypeDescriptor(); // Dynamically create the objects if the user has requested that optional behaviour if (result.getValue()==nul...
public TypedValue getValueInternal(ExpressionState state) throws EvaluationException { TypedValue result = readProperty(state, this.name); TypeDescriptor resultDescriptor = result.getTypeDescriptor(); // Dynamically create the objects if the user has requested that optional behaviour if (result.getValue()==nul...
private int x; /** * Default constructor: lineLength is 76, and the lineSeparator is CRLF * when encoding, and all forms can be decoded. */ Base64() { this(CHUNK_SIZE, CHUNK_SEPARATOR); } /** * <p> * Consumer can use this constructor to choose a different lineLeng...
private int x; /** * Default constructor: lineLength is 76, and the lineSeparator is CRLF * when encoding, and all forms can be decoded. */ Base64() { this(CHUNK_SIZE, CHUNK_SEPARATOR); } /** * <p> * Consumer can use this constructor to choose a different lineLeng...
public void execute(Tuple tuple) { byte[] rowKey = this.mapper.rowKey(tuple); Get get = hBaseClient.constructGetRequests(rowKey, projectionCriteria); try { Result result = hBaseClient.batchGet(Lists.newArrayList(get))[0]; for(Values values : rowToTupleMapper.toValues...
public void execute(Tuple tuple) { byte[] rowKey = this.mapper.rowKey(tuple); Get get = hBaseClient.constructGetRequests(rowKey, projectionCriteria); try { Result result = hBaseClient.batchGet(Lists.newArrayList(get))[0]; for(Values values : rowToTupleMapper.toValues...
private LinkedBlockingQueue<TaskMessage> message_queue; final ChannelGroup allChannels = new DefaultChannelGroup("storm-server"); final ChannelFactory factory; final ServerBootstrap bootstrap; @SuppressWarnings("rawtypes") Server(Map storm_conf, int port) { this.storm_conf = storm_conf;...
private LinkedBlockingQueue<TaskMessage> message_queue; final ChannelGroup allChannels = new DefaultChannelGroup("storm-server"); final ChannelFactory factory; final ServerBootstrap bootstrap; @SuppressWarnings("rawtypes") Server(Map storm_conf, int port) { this.storm_conf = storm_conf;...
public void resourceRequest() throws Exception { this.mockMvc.perform(get("/resources/Spring.js")) .andExpect(content().mimeType("text/javascript")) .andExpect(content().string(containsString("Spring={};"))); }
public void resourceRequest() throws Exception { this.mockMvc.perform(get("/resources/Spring.js")) .andExpect(content().contentType("text/javascript")) .andExpect(content().string(containsString("Spring={};"))); }
public void queryParameter() throws Exception { standaloneSetup(new PersonController()).build() .perform(get("/search?name=George").accept(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()) .andExpect(content().mimeType("application/json;charset=UTF-8")) .andExpect(jsonPath("$.name").value("Geo...
public void queryParameter() throws Exception { standaloneSetup(new PersonController()).build() .perform(get("/search?name=George").accept(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()) .andExpect(content().contentType("application/json;charset=UTF-8")) .andExpect(jsonPath("$.name").value("...
public void json() throws Exception { standaloneSetup(new PersonController()).build() .perform(get("/person/Lee").accept(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()) .andExpect(content().mimeType("application/json;charset=UTF-8")) .andExpect(jsonPath("$.name").value("Lee")); }
public void json() throws Exception { standaloneSetup(new PersonController()).build() .perform(get("/person/Lee").accept(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()) .andExpect(content().contentType("application/json;charset=UTF-8")) .andExpect(jsonPath("$.name").value("Lee")); }
public void setup() { this.mockMvc = standaloneSetup(new MusicController()) .defaultRequest(get("/").accept(MediaType.APPLICATION_JSON)) .alwaysExpect(status().isOk()) .alwaysExpect(content().mimeType("application/json;charset=UTF-8")) .build(); }
public void setup() { this.mockMvc = standaloneSetup(new MusicController()) .defaultRequest(get("/").accept(MediaType.APPLICATION_JSON)) .alwaysExpect(status().isOk()) .alwaysExpect(content().contentType("application/json;charset=UTF-8")) .build(); }
public void setup() { this.mockMvc = standaloneSetup(new MusicController()) .defaultRequest(get("/").accept(MediaType.APPLICATION_XML)) .alwaysExpect(status().isOk()) .alwaysExpect(content().mimeType(MediaType.APPLICATION_XML)) .build(); }
public void setup() { this.mockMvc = standaloneSetup(new MusicController()) .defaultRequest(get("/").accept(MediaType.APPLICATION_XML)) .alwaysExpect(status().isOk()) .alwaysExpect(content().contentType(MediaType.APPLICATION_XML)) .build(); }
public void setup() throws Exception { this.mockMvc = standaloneSetup(new MusicController()) .defaultRequest(get("/").accept(MediaType.APPLICATION_XML)) .alwaysExpect(status().isOk()) .alwaysExpect(content().mimeType(MediaType.APPLICATION_XML)) .build(); }
public void setup() throws Exception { this.mockMvc = standaloneSetup(new MusicController()) .defaultRequest(get("/").accept(MediaType.APPLICATION_XML)) .alwaysExpect(status().isOk()) .alwaysExpect(content().contentType(MediaType.APPLICATION_XML)) .build(); }
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnitContext = phaseContext.getDeploymentUnit(); // Check if we already have an OSGi deployment Deployment deployment = OSGiDeploymentAttachment.getAttachme...
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnitContext = phaseContext.getDeploymentUnit(); // Check if we already have an OSGi deployment Deployment deployment = OSGiDeploymentAttachment.getAttachme...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); if(!isWarDeployment(deploymentUnit)) { return; // Skip non web deployments } final VirtualFile deploy...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); if(!isWarDeployment(deploymentUnit)) { return; // Skip non web deployments } final VirtualFile deploy...
private static int getErrorResponseCode(String failureMsg) { // WFLY-2037. This is very hacky; better would be something like an internal failure-http-code that // is set on the response from the OperationFailedException and stripped from non-HTTP interfaces. // But this will do for now. ...
private static int getErrorResponseCode(String failureMsg) { // WFLY-2037. This is very hacky; better would be something like an internal failure-http-code that // is set on the response from the OperationFailedException and stripped from non-HTTP interfaces. // But this will do for now. ...
public static boolean exists(PathAddress address, ModelControllerClient client) throws IOException, MgmtOperationException { final PathElement element = address.getLastElement(); final PathAddress subAddress = address.subAddress(0, address.size() -1); final boolean checkType = element.isWild...
public static boolean exists(PathAddress address, ModelControllerClient client) throws IOException, MgmtOperationException { final PathElement element = address.getLastElement(); final PathAddress subAddress = address.subAddress(0, address.size() -1); final boolean checkType = element.isWild...
public static final PatchOperationTarget createLocal(final File jbossHome) throws IOException { final PatchTool tool = PatchTool.Factory.create(jbossHome); return new LocalPatchOperationTarget(tool); }
public static final PatchOperationTarget createLocal(final File jbossHome) throws IOException { final PatchTool tool = PatchTool.Factory.loadFromRoot(jbossHome); return new LocalPatchOperationTarget(tool); }
private SpringPersistenceUnitInfo buildDefaultPersistenceUnitInfo() { SpringPersistenceUnitInfo scannedUnit = new SpringPersistenceUnitInfo(); scannedUnit.setPersistenceUnitName(this.defaultPersistenceUnitName); scannedUnit.excludeUnlistedClasses(); if (this.packagesToScan != null) { for (String pkg : this....
private SpringPersistenceUnitInfo buildDefaultPersistenceUnitInfo() { SpringPersistenceUnitInfo scannedUnit = new SpringPersistenceUnitInfo(); scannedUnit.setPersistenceUnitName(this.defaultPersistenceUnitName); scannedUnit.setExcludeUnlistedClasses(true); if (this.packagesToScan != null) { for (String pkg ...
public boolean isInMemory() { return (!isThresholdExceeded()); }
public boolean isInMemory() { return !isThresholdExceeded(); }
public static void main(String[] args) throws Exception { System.out.println("Creating client"); StandaloneClient client = StandaloneClient.Factory.create(InetAddress.getByName("localhost"), 9999); System.out.println("Created client, getting model..."); ServerModel model = client.get...
public static void main(String[] args) throws Exception { System.out.println("Creating client"); StandaloneClient client = StandaloneClient.Factory.create(InetAddress.getByName("localhost"), 9999); System.out.println("Created client, getting model..."); ServerModel model = client.get...
public void testDeployedService() throws Exception { MBeanServer mbeanServer = ManagementFactory.getPlatformMBeanServer(); ObjectName objectName = new ObjectName("jboss:name=test,type=config"); //FIXME should have some notification happening when the deployment has been installed for client...
public void testDeployedService() throws Exception { MBeanServer mbeanServer = ManagementFactory.getPlatformMBeanServer(); ObjectName objectName = new ObjectName("jboss:name=test,type=config"); //FIXME should have some notification happening when the deployment has been installed for client...
public synchronized void deploy() throws DuplicateDeploymentNameException, IOException, ExecutionException, InterruptedException, TimeoutException { DeploymentPlanBuilder builder = manager.newDeploymentPlan().withRollback(); for (AbstractDeployment deployment : deployments) { builder =...
public synchronized void deploy() throws DuplicateDeploymentNameException, IOException, ExecutionException, InterruptedException, TimeoutException { DeploymentPlanBuilder builder = manager.newDeploymentPlan(); for (AbstractDeployment deployment : deployments) { builder = deployment.add...
ServiceName SERVICE_NAME_BASE = ConfigAdminService.SERVICE_NAME.append("listener"); /* * 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 contri...
ServiceName SERVICE_NAME_BASE = ConfigAdminService.SERVICE_NAME.append("listener"); /* * 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 contri...
public void execute(final OperationContext context, ModelNode operation) throws OperationFailedException { final String jndiName = Util.getJndiName(model); final ServiceRegistry registry = context.getServiceRegistry(true); final ServiceName ...
public void execute(final OperationContext context, ModelNode operation) throws OperationFailedException { final String jndiName = Util.getJndiName(model); final ServiceRegistry registry = context.getServiceRegistry(true); final ServiceName ...
public Context getInitialContext(Hashtable<?, ?> environment) throws NamingException { return new NamingContext((Hashtable<String, Object>) environment); }
public Context getInitialContext(Hashtable<?, ?> environment) throws NamingException { return new InitialContext((Hashtable<String, Object>) environment); }
public void testJNDIAccess() throws Exception { bundle.start(); InitialContext iniCtx = getInitialContext(bundle.getBundleContext()); Object lookup = iniCtx.lookup("jboss"); assertNotNull("Lookup not null", lookup); // Naming context is read-only try { in...
public void testJNDIAccess() throws Exception { bundle.start(); InitialContext iniCtx = getInitialContext(bundle.getBundleContext()); Object lookup = iniCtx.lookup("java:jboss"); assertNotNull("Lookup not null", lookup); // Naming context is read-only try { ...
public void testExtensionIsLoaded() throws NamingException { SomeInterface bean = (SomeInterface) new InitialContext().lookup("java:/global/testExtensions/testWar/WarSLSB"); bean.testInjectionWorked(); }
public void testExtensionIsLoaded() throws NamingException { SomeInterface bean = (SomeInterface) new InitialContext().lookup("java:global/testExtensions/testWar/WarSLSB"); bean.testInjectionWorked(); }
public void testSendMessage() throws JMSException, NamingException { final InitialContext ctx = new InitialContext(); final QueueConnectionFactory factory = (QueueConnectionFactory) ctx.lookup("java:/JmsXA"); final QueueConnection connection = factory.createQueueConnection(); connect...
public void testSendMessage() throws JMSException, NamingException { final InitialContext ctx = new InitialContext(); final QueueConnectionFactory factory = (QueueConnectionFactory) ctx.lookup("java:/JmsXA"); final QueueConnection connection = factory.createQueueConnection(); connect...
public ChannelPipeline getPipeline() throws Exception { // Create a default pipeline implementation. ChannelPipeline pipeline = Channels.pipeline(); // Decoder pipeline.addLast("decoder", new MessageDecoder()); // Encoder pipeline.addLast("encoder", new MessageEncode...
public ChannelPipeline getPipeline() throws Exception { // Create a default pipeline implementation. ChannelPipeline pipeline = Channels.pipeline(); // Decoder pipeline.addLast("decoder", new MessageDecoder()); // Encoder pipeline.addLast("encoder", new MessageEncode...
public void setTlsClientCertStoreKeyPassword(String tlsClientCertStoreKeyPassword) { this.tlsClientCertStoreKeyPassword = tlsClientCertStoreKeyPassword; } @Override void initialize() { try { if (handler != null) { return; } final Proto...
public void setTlsClientCertStoreKeyPassword(String tlsClientCertStoreKeyPassword) { this.tlsClientCertStoreKeyPassword = tlsClientCertStoreKeyPassword; } @Override void initialize() { try { if (handler != null) { return; } final Proto...
protected final BlockingQueue<byte[]> receivedData = new LinkedBlockingQueue<byte[]>(); SimpleSyslogServer(){ } static SimpleSyslogServer createUdp(int port) throws IOException { SimpleSyslogServer server = new Udp(port); Thread t = new Thread(server); t.start(); return...
protected final BlockingQueue<byte[]> receivedData = new LinkedBlockingQueue<byte[]>(); SimpleSyslogServer(){ } static SimpleSyslogServer createUdp(int port) throws IOException { SimpleSyslogServer server = new Udp(port); Thread t = new Thread(server); t.start(); return...
package org.springframework.model.binder; /* * Copyright 2004-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/licen...
package org.springframework.model.binder; /* * Copyright 2004-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/licen...
package org.springframework.model.binder; /* * Copyright 2004-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/licen...
package org.springframework.model.binder; /* * Copyright 2004-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/licen...
package org.springframework.model.ui; /* * Copyright 2004-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/...
package org.springframework.model.ui; /* * Copyright 2004-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/...
package org.springframework.model.ui.format; /* * Copyright 2004-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/...
package org.springframework.model.ui.format; /* * Copyright 2004-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/...
package org.springframework.model.ui.format; /* * Copyright 2004-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/li...
package org.springframework.model.ui.format; /* * Copyright 2004-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/li...
package org.springframework.model.ui.format; /* * Copyright 2004-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/...
package org.springframework.model.ui.format; /* * Copyright 2004-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/...
package org.springframework.model.ui.format.number; /* * Copyright 2004-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.apac...
package org.springframework.model.ui.format.number; /* * Copyright 2004-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.apac...
package org.springframework.model.ui.support; /* * Copyright 2004-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/l...
package org.springframework.model.ui.support; /* * Copyright 2004-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/l...
package org.springframework.model.validation; /* * Copyright 2004-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/l...
package org.springframework.model.validation; /* * Copyright 2004-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/l...
package org.springframework.model.validation; /* * Copyright 2004-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/l...
package org.springframework.model.validation; /* * Copyright 2004-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/l...
public double[][] getCovariances(EstimationProblem problem) throws EstimationException { // set up the jacobian updateJacobian(); // compute transpose(J).J, avoiding building big intermediate matrices final int rows = problem.getMeasurements().length; final int cols ...
public double[][] getCovariances(EstimationProblem problem) throws EstimationException { // set up the jacobian updateJacobian(); // compute transpose(J).J, avoiding building big intermediate matrices final int rows = problem.getMeasurements().length; final int cols ...
public void estimate(EstimationProblem problem) throws EstimationException { initializeEstimate(problem); // work matrices double[] grad = new double[parameters.length]; RealVectorImpl bDecrement = new RealVectorImpl(parameters.length); double[] bDecrementDa...
public void estimate(EstimationProblem problem) throws EstimationException { initializeEstimate(problem); // work matrices double[] grad = new double[parameters.length]; RealVectorImpl bDecrement = new RealVectorImpl(parameters.length); double[] bDecrementDa...
public void setInterpolatedTime(final double time) { try { // initialize the search with the complete steps table int iMin = 0; final StepInterpolator sMin = steps.get(iMin); double tMin = 0.5 * (sMin.getPreviousTime() + sMin.getCurrentTime()); int iMax = steps.size() - 1; fi...
public void setInterpolatedTime(final double time) { try { // initialize the search with the complete steps table int iMin = 0; final StepInterpolator sMin = steps.get(iMin); double tMin = 0.5 * (sMin.getPreviousTime() + sMin.getCurrentTime()); int iMax = steps.size() - 1; fi...
public PointCostPair minimize(CostFunction f, int maxEvaluations, ConvergenceChecker checker, double[][] vertices, int starts, long seed) throws NotPositiveDefiniteMatrixException, CostException, Convergenc...
public PointCostPair minimize(CostFunction f, int maxEvaluations, ConvergenceChecker checker, double[][] vertices, int starts, long seed) throws NotPositiveDefiniteMatrixException, CostException, Convergenc...
public double transform(Object o) throws MathException{ if (o == null) { throw new MathException("Conversion Exception in Transformation, Object is null", new Object[0]); } if (o instanceof Number) { return ((Number)o).doubleValue(); } t...
public double transform(Object o) throws MathException{ if (o == null) { throw new MathException("Conversion Exception in Transformation, Object is null", null); } if (o instanceof Number) { return ((Number)o).doubleValue(); } try { ...
public Double getZ() { throw new MathRuntimeException(); }
public Double getZ() { throw new MathRuntimeException("?", null); }
protected void handleNewSession(ServerHttpRequest request, ServerHttpResponse response, AbstractHttpServerSockJsSession session) throws Exception { logger.debug("Opening " + getTransportType() + " connection"); session.setFrameFormat(getFrameFormat(request)); session.writeFrame(response, SockJsFrame.openFram...
protected void handleNewSession(ServerHttpRequest request, ServerHttpResponse response, AbstractHttpServerSockJsSession session) throws Exception { logger.debug("Opening " + getTransportType() + " connection"); session.setFrameFormat(getFrameFormat(request)); session.writeFrame(response, SockJsFrame.openFram...
protected abstract void upgradeInternal(ServerHttpRequest request, ServerHttpResponse response, String protocol, Endpoint endpoint) throws Exception;
protected abstract void upgradeInternal(ServerHttpRequest request, ServerHttpResponse response, String selectedProtocol, Endpoint endpoint) throws Exception;
protected final MutablePersistenceUnitInfo getPersistenceUnitInfo(String persistenceUnitName) { PersistenceUnitInfo pui = this.persistenceUnitInfos.get(persistenceUnitName); if (Proxy.isProxyClass(pui.getClass())) { // JPA 2.0 PersistenceUnitInfo decorator with a SpringPersistenceUnitInfo as target Jpa2Persi...
protected final MutablePersistenceUnitInfo getPersistenceUnitInfo(String persistenceUnitName) { PersistenceUnitInfo pui = this.persistenceUnitInfos.get(persistenceUnitName); if (pui != null && Proxy.isProxyClass(pui.getClass())) { // JPA 2.0 PersistenceUnitInfo decorator with a SpringPersistenceUnitInfo as targ...
public String format(long millis) { return format(new Date(millis)); }
public String format(long millis) { return printer.format(millis); }
public ModelControllerClientOperationHandler(final ModelController controller, final ManagementChannelAssociation channelAssociation) { this(controller, channelAssociation, null); }
public ModelControllerClientOperationHandler(final ModelController controller, final ManagementChannelAssociation channelAssociation) { this(controller, channelAssociation, new Subject()); }
private File getResourceFile(String resource) { File file = new File(resource); if (file.exists()) return file; String testResourcesDir = "target/test-classes"; file = new File(testResourcesDir + "/" + resource); if (file.exists()) return file; ...
private File getResourceFile(String resource) { File file = new File(resource); if (file.exists()) return file; String testResourcesDir = System.getProperty("jbossas.ts.submodule.dir") + "/target/test-classes"; file = new File(testResourcesDir + "/" + resource); ...
public int compare(String pattern1, String pattern2) { if (pattern1 == null && pattern2 == null) { return 0; } else if (pattern1 == null) { return 1; } else if (pattern2 == null) { return -1; } boolean pattern1EqualsPath = pattern1.equals(path); boolean pattern2EqualsPath = pattern...
public int compare(String pattern1, String pattern2) { if (pattern1 == null && pattern2 == null) { return 0; } else if (pattern1 == null) { return 1; } else if (pattern2 == null) { return -1; } boolean pattern1EqualsPath = pattern1.equals(path); boolean pattern2EqualsPath = pattern...
public String validate(ModelNode currentNode, String descriptor) { if (currentNode.hasDefined(descriptor)) { List<ModelNode> list; try { list = currentNode.asList(); } catch (Exception e) { return "'" + descripto...
public String validate(ModelNode currentNode, String descriptor) { if (currentNode.hasDefined(descriptor)) { List<ModelNode> list; try { list = currentNode.asList(); } catch (Exception e) { return "'" + descripto...
public Map<String, String> putIn(final Map<String, String> map) { for (final Entry<String, Integer> entry : mapping.entrySet()) { map.put(entry.getKey(), values[entry.getValue().intValue()]); } return map; }
public Iterator<String> iterator() { return Arrays.asList(values).iterator(); } /** * Puts all values of this record into the given Map. * * @param map The Map to populate. * @return the given map. */ Map<String, String> putIn(final Map<String, String> map) { f...
private ObjectTypeAttributeDefinition(final String name, final String xmlName, final String suffix, final AttributeDefinition[] valueTypes, final boolean allowNull, final ParameterCorrector corrector, final String[] alternatives, final String[] requires, final AttributeAccess.Flag... flags) { super(name, xm...
private ObjectTypeAttributeDefinition(final String name, final String xmlName, final String suffix, final AttributeDefinition[] valueTypes, final boolean allowNull, final ParameterCorrector corrector, final String[] alternatives, final String[] requires, final AttributeAccess.Flag... flags) { super(name, xm...
public static List<ClientMapping> parseClientMappings(ModelNode mappings) throws OperationFailedException { List<ClientMapping> clientMappings = new ArrayList<ClientMapping>(); for (ModelNode mappingNode : mappings.asList()) { ModelNode sourceNode = mappingNode.get(SOURCE_NETWORK); ...
public static List<ClientMapping> parseClientMappings(ModelNode mappings) throws OperationFailedException { List<ClientMapping> clientMappings = new ArrayList<ClientMapping>(); for (ModelNode mappingNode : mappings.asList()) { ModelNode sourceNode = mappingNode.get(SOURCE_NETWORK); ...
protected AsyncFuture<ModelNode> executeRequest(final ManagementRequest<ModelNode, OperationExecutionContext> request, final OperationExecutionContext attachment) throws IOException { final ActiveOperation<ModelNode, OperationExecutionContext> support = getChannelAssociation().executeRequest(request, attach...
protected AsyncFuture<ModelNode> executeRequest(final ManagementRequest<ModelNode, OperationExecutionContext> request, final OperationExecutionContext attachment) throws IOException { final ActiveOperation<ModelNode, OperationExecutionContext> support = getChannelAssociation().executeRequest(request, attach...
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final Module module = deploymentUnit.getAttachment(Attachments.MODULE); final ServicesAttachment servicesAttachment...
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final Module module = deploymentUnit.getAttachment(Attachments.MODULE); final ServicesAttachment servicesAttachment...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { nameValidator.validate(operation); final String attributeName = operation.require(NAME).asString(); final ModelNode submodel = context.readResource(PathAddress.EMPTY_ADDRESS).getModel(); ...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { nameValidator.validate(operation); final String attributeName = operation.require(NAME).asString(); final ModelNode submodel = context.readResource(PathAddress.EMPTY_ADDRESS).getModel(); ...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { ModelNode result = context.getResult(); PathAddress rootAddress = PathAddress.pathAddress(PathAddress.pathAddress(operation.require(ModelDescriptionConstants.OP_ADDR)).getLastElement()); Mod...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { ModelNode result = context.getResult(); PathAddress rootAddress = PathAddress.pathAddress(PathAddress.pathAddress(operation.require(ModelDescriptionConstants.OP_ADDR)).getLastElement()); Mod...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final ModelNode result = new ModelNode(); final PathAddress rootAddress = PathAddress.pathAddress(PathAddress.pathAddress(operation.require(ModelDescriptionConstants.OP_ADDR)).getLastElement()); ...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final ModelNode result = new ModelNode(); final PathAddress rootAddress = PathAddress.pathAddress(PathAddress.pathAddress(operation.require(ModelDescriptionConstants.OP_ADDR)).getLastElement()); ...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final String parameterName = operation.require(NAME).asString(); final ModelNode submodel = context.readModel(PathAddress.EMPTY_ADDRESS); final ModelNode currentValue = submo...
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final String parameterName = operation.require(NAME).asString(); final ModelNode submodel = context.readModel(PathAddress.EMPTY_ADDRESS); final ModelNode currentValue = submo...
public void handleRollback(OperationContext context, ModelNode operation) { rollbackRuntime(context, operation, model, controllers); } }); } }, OperationContext.Stage.RUNTIME); } c...
public void handleRollback(OperationContext context, ModelNode operation) { rollbackRuntime(context, operation, model, controllers); } }); } }, OperationContext.Stage.RUNTIME); } c...
protected void executeRuntimeStep(OperationContext context, ModelNode operation) throws OperationFailedException { String opName = operation.require(ModelDescriptionConstants.OP).asString(); PathAddress address = PathAddress.pathAddress(operation.require(ModelDescriptionConstants.OP_ADDR)); ...
protected void executeRuntimeStep(OperationContext context, ModelNode operation) throws OperationFailedException { String opName = operation.require(ModelDescriptionConstants.OP).asString(); PathAddress address = PathAddress.pathAddress(operation.require(ModelDescriptionConstants.OP_ADDR)); ...
public void initialize(ExtensionContext context) { final boolean registerRuntimeOnly = context.isRuntimeOnlyRegistrationValid(); final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, MANAGEMENT_API_MAJOR_VERSION, MANAGEMENT_API_MINOR_VERSION, MANAGEMENT_...
public void initialize(ExtensionContext context) { final boolean registerRuntimeOnly = context.isRuntimeOnlyRegistrationValid(); final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, MANAGEMENT_API_MAJOR_VERSION, MANAGEMENT_API_MINOR_VERSION, MANAGEMENT_...
public static Archive<?> deploy() throws Exception { EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, ARCHIVE_NAME + ".ear"); // add required jars as manifest dependencies ear.addAsManifestResource(new StringAsset("Dependencies: org.hibernate\n"), "MANIFEST.MF"); ...
public static Archive<?> deploy() throws Exception { EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, ARCHIVE_NAME + ".ear"); // add required jars as manifest dependencies ear.addAsManifestResource(new StringAsset("Dependencies: org.hibernate.envers export,org.hibernate\n"...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); if (isEarDeployment(deploymentUnit)) { return; } final ServiceTarget serviceTarget = phaseContext.get...
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); if (isEarDeployment(deploymentUnit)) { return; } final ServiceTarget serviceTarget = phaseContext.get...
private void doHttpStream(InputStream is, String httpContentType, boolean lenient) throws IOException { BOMInputStream bom = new BOMInputStream(new BufferedInputStream(is, BUFFER_SIZE), false, BOMS); BOMInputStream pis = new BOMInputStream(bom, true, XML_GUESS_BYTES); String bomE...
private void doHttpStream(InputStream is, String httpContentType, boolean lenient) throws IOException { BOMInputStream bom = new BOMInputStream(new BufferedInputStream(is, BUFFER_SIZE), false, BOMS); BOMInputStream pis = new BOMInputStream(bom, true, XML_GUESS_BYTES); String bomE...
ModelNode getDomainModel(); /* * 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 redistribut...
ModelNode getDomainModel(); /* * 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 redistribut...
public void serviceFailed(final ServiceController<?> serviceController, final StartException reason) { log.errorf(reason, "Service [%s] failed.", serviceController.getName()); } }); // Get the raw model final ModelNode rawModel = hostModel.getModel(); ...
public void serviceFailed(final ServiceController<?> serviceController, final StartException reason) { log.errorf(reason, "Service [%s] failed.", serviceController.getName()); } }); // Get the raw model final ModelNode rawModel = hostModel.getHostModel(); ...
public synchronized ModelNode register(final NewHostController hostController) { assert hostController != null : "null HC"; final NewDomainController domainController = this.domainController.getValue(); this.name = hostController.getName(); final NewHostControllerClient client = new ...
public synchronized ModelNode register(final NewHostController hostController) { assert hostController != null : "null HC"; final NewDomainController domainController = this.domainController.getValue(); this.name = hostController.getName(); final NewHostControllerClient client = new ...
public void activate(final ServiceActivatorContext context) { final String deploymentName = key.getName().replace('.', '_') + '_' + key.getSha1HashAsHexString(); log.info("Activating server group deployment: " + deploymentName); final VirtualFile deploymentRoot = VFS.getChild(getFullyQualif...
public void activate(final ServiceActivatorContext context) { final String deploymentName = key.getName() + ":" + key.getSha1HashAsHexString(); log.info("Activating server group deployment: " + deploymentName); final VirtualFile deploymentRoot = VFS.getChild(getFullyQualifiedDeploymentPath(...
public static void main(final String[] params) { appClientSingletonRemote.makeAppClientCall(); }
public static void main(final String[] params) { appClientSingletonRemote.makeAppClientCall(params[0]); }
package org.wildfly.clustering.ee; /* * 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 redi...
package org.wildfly.clustering.ee; /* * 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 redi...
package org.wildfly.clustering.ee; /* * 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 listing of individual contributors. * * This is free software; you can redi...
package org.wildfly.clustering.ee; /* * 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 listing of individual contributors. * * This is free software; you can redi...
private static <T> void addDependency(ServiceBuilder<?> builder, Dependency<T> dependency) { final ServiceName name = dependency.getName(); final Injector<T> injector = dependency.getInjector(); if (injector != null) { builder.addDependency(name, dependency.getType(), injector); ...
private static <T> void addDependency(ServiceBuilder<?> builder, Dependency<T> dependency) { final ServiceName name = dependency.getName(); final Injector<T> injector = dependency.getInjector(); if (injector != null) { builder.addDependency(name, dependency.getType(), injector); ...
protected static final Set<String> RESTRICTED_PATHS; static { final HashSet<String> set = new HashSet<String>(10); // Define the restricted path names. set.add("jboss.home"); set.add("jboss.home.dir"); set.add("user.home"); set.add("user.dir"); set.add("...
protected static final Set<String> RESTRICTED_PATHS; static { final HashSet<String> set = new HashSet<String>(10); // Define the restricted path names. set.add("jboss.home"); set.add("jboss.home.dir"); set.add("user.home"); set.add("user.dir"); set.add("...
private static String processResponse(HttpURLConnection conn) throws IOException { int responseCode = conn.getResponseCode(); if (responseCode != HttpURLConnection.HTTP_OK) { final InputStream err = conn.getErrorStream(); try { throw new IOException(read(err))...
private static String processResponse(HttpURLConnection conn) throws IOException { int responseCode = conn.getResponseCode(); if (responseCode != HttpURLConnection.HTTP_OK) { final InputStream err = conn.getErrorStream(); try { throw new IOException("HTTP Stat...
public void onWebSocketBinary(byte[] payload, int offset, int len) { BinaryMessage message = new BinaryMessage(payload, offset, len); try { this.webSocketHandler.handleMessage(this.wsSession, message); } catch (Throwable t) { ExceptionWebSocketHandlerDecorator.tryCloseWithError(this.wsSession, t, logger)...
public void onWebSocketBinary(byte[] payload, int offset, int len) { BinaryMessage message = new BinaryMessage(payload, offset, len, true); try { this.webSocketHandler.handleMessage(this.wsSession, message); } catch (Throwable t) { ExceptionWebSocketHandlerDecorator.tryCloseWithError(this.wsSession, t, l...
public static <T> void notNull(T parameter, String parameterName) { if (parameter == null) { throw new IllegalArgumentException("Parameter '" + parameterName + "' must not be null!"); } } }
public static void notNull(Object parameter, String parameterName) { if (parameter == null) { throw new IllegalArgumentException("Parameter '" + parameterName + "' must not be null!"); } } }
public void initialize(ExtensionContext context) { SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME); subsystem.registerXMLElementWriter(InfinispanSubsystemParser_1_0.getInstance()); ManagementResourceRegistration registration = subsystem.registerSubsystemModel(thi...
public void initialize(ExtensionContext context) { SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME); subsystem.registerXMLElementWriter(InfinispanSubsystemParser_1_0.getInstance()); ManagementResourceRegistration registration = subsystem.registerSubsystemModel(thi...
public void testParseSubsystem() throws Exception { // Parse the subsystem xml into operations List<ModelNode> operations = super.parse(getSubsystemXml()); /* // print the operations System.out.println("List of operations"); for (ModelNode op : operations) { Sy...
public void testParseSubsystem() throws Exception { // Parse the subsystem xml into operations List<ModelNode> operations = super.parse(getSubsystemXml()); /* // print the operations System.out.println("List of operations"); for (ModelNode op : operations) { Sy...