Skip to content

Commit

Permalink
how did this typo get past unnoticed
Browse files Browse the repository at this point in the history
git-svn-id: http://anonsvn.jboss.org/repos/weld/ri/trunk@3796 1c488680-804c-0410-94cd-c6b725194a0e
  • Loading branch information
sbryzak committed Sep 29, 2009
1 parent ed386e8 commit 0248527
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 38 deletions.
Expand Up @@ -24,7 +24,7 @@
import javax.enterprise.context.spi.CreationalContext;

import org.jboss.webbeans.context.api.BeanStore;
import org.jboss.webbeans.context.api.ContexutalInstance;
import org.jboss.webbeans.context.api.ContextualInstance;
import org.jboss.webbeans.log.LogProvider;
import org.jboss.webbeans.log.Logging;

Expand Down Expand Up @@ -75,7 +75,7 @@ public <T> T get(Contextual<T> contextual, CreationalContext<T> creationalContex
{
throw new IllegalStateException("No bean store available for " + toString());
}
ContexutalInstance<T> beanInstance = getBeanStore().get(contextual);
ContextualInstance<T> beanInstance = getBeanStore().get(contextual);
if (beanInstance != null)
{
return beanInstance.getInstance();
Expand Down Expand Up @@ -128,7 +128,7 @@ private <T> void destroy(Contextual<T> contextual)
{
throw new IllegalStateException("No bean store available for " + toString());
}
ContexutalInstance<T> beanInstance = getBeanStore().get(contextual);
ContextualInstance<T> beanInstance = getBeanStore().get(contextual);
contextual.destroy(beanInstance.getInstance(), beanInstance.getCreationalContext());
}

Expand Down
Expand Up @@ -19,9 +19,9 @@
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;

import org.jboss.webbeans.context.api.ContexutalInstance;
import org.jboss.webbeans.context.api.ContextualInstance;

public class BeanInstanceImpl<T> implements ContexutalInstance<T>
public class BeanInstanceImpl<T> implements ContextualInstance<T>
{

private final Contextual<T> contextual;
Expand Down
Expand Up @@ -27,7 +27,7 @@
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;

import org.jboss.webbeans.context.api.ContexutalInstance;
import org.jboss.webbeans.context.api.ContextualInstance;

/**
* The dependent context
Expand Down Expand Up @@ -63,7 +63,7 @@ public <T> T get(Contextual<T> contextual, CreationalContext<T> creationalContex
if (creationalContext instanceof WBCreationalContext<?>)
{
WBCreationalContext<T> creationalContextImpl = (WBCreationalContext<T>) creationalContext;
ContexutalInstance<T> beanInstance = new BeanInstanceImpl<T>(contextual, instance, creationalContext);
ContextualInstance<T> beanInstance = new BeanInstanceImpl<T>(contextual, instance, creationalContext);
creationalContextImpl.getParentDependentInstancesStore().addDependentInstance(beanInstance);
}
return instance;
Expand Down
Expand Up @@ -20,7 +20,7 @@
import java.util.Collections;
import java.util.List;

import org.jboss.webbeans.context.api.ContexutalInstance;
import org.jboss.webbeans.context.api.ContextualInstance;
import org.jboss.webbeans.log.Log;
import org.jboss.webbeans.log.Logging;

Expand All @@ -34,14 +34,14 @@ public class DependentInstancesStore
private static Log log = Logging.getLog(DependentInstancesStore.class);

// A object -> List of contextual instances mapping
private List<ContexutalInstance<?>> dependentInstances;
private List<ContextualInstance<?>> dependentInstances;

/**
* Creates a new DependentInstancesStore
*/
public DependentInstancesStore()
{
dependentInstances = Collections.synchronizedList(new ArrayList<ContexutalInstance<?>>());
dependentInstances = Collections.synchronizedList(new ArrayList<ContextualInstance<?>>());
}

/**
Expand All @@ -50,7 +50,7 @@ public DependentInstancesStore()
* @param key The key to store the instance under
* @param contextualInstance The instance to store
*/
public <T> void addDependentInstance(ContexutalInstance<T> contextualInstance)
public <T> void addDependentInstance(ContextualInstance<T> contextualInstance)
{
log.trace("Registered dependent instance #0", contextualInstance);
dependentInstances.add(contextualInstance);
Expand All @@ -64,13 +64,13 @@ public <T> void addDependentInstance(ContexutalInstance<T> contextualInstance)
public void destroyDependentInstances()
{
log.trace("Destroying dependent instances");
for (ContexutalInstance<?> injectedInstance : dependentInstances)
for (ContextualInstance<?> injectedInstance : dependentInstances)
{
destroy(injectedInstance);
}
}

private static <T> void destroy(ContexutalInstance<T> beanInstance)
private static <T> void destroy(ContextualInstance<T> beanInstance)
{
beanInstance.getContextual().destroy(beanInstance.getInstance(), beanInstance.getCreationalContext());
}
Expand Down
Expand Up @@ -26,7 +26,7 @@
import org.jboss.webbeans.Container;
import org.jboss.webbeans.ContextualIdStore;
import org.jboss.webbeans.context.api.BeanStore;
import org.jboss.webbeans.context.api.ContexutalInstance;
import org.jboss.webbeans.context.api.ContextualInstance;
import org.jboss.webbeans.log.LogProvider;
import org.jboss.webbeans.log.Logging;
import org.jboss.webbeans.util.Names;
Expand All @@ -50,11 +50,11 @@ public abstract class AbstractAttributeBackedBeanStore implements BeanStore
* @return The instance
*/
@SuppressWarnings("unchecked")
public <T> ContexutalInstance<T> get(Contextual<? extends T> contextual)
public <T> ContextualInstance<T> get(Contextual<? extends T> contextual)
{
Integer contextualId = Container.instance().deploymentServices().get(ContextualIdStore.class).getId(contextual);
String key = getNamingScheme().getKeyFromId(contextualId);
ContexutalInstance<T> instance = (ContexutalInstance<T>) getAttribute(key);
ContextualInstance<T> instance = (ContextualInstance<T>) getAttribute(key);
log.trace("Looked for " + key + " and got " + instance);
return instance;
}
Expand Down Expand Up @@ -131,7 +131,7 @@ private List<String> getFilteredAttributeNames()
* @param instance The instance
* @return The instance added
*/
public <T> void put(ContexutalInstance<T> beanInstance)
public <T> void put(ContextualInstance<T> beanInstance)
{
Integer contextualId = Container.instance().deploymentServices().get(ContextualIdStore.class).getId(beanInstance.getContextual());
String key = getNamingScheme().getKeyFromId(contextualId);
Expand Down
Expand Up @@ -23,7 +23,7 @@

import javax.enterprise.context.spi.Contextual;

import org.jboss.webbeans.context.api.ContexutalInstance;
import org.jboss.webbeans.context.api.ContextualInstance;
import org.jboss.webbeans.context.api.helpers.AbstractMapBackedBeanStore;

/**
Expand All @@ -37,14 +37,14 @@ public class HashMapBeanStore extends AbstractMapBackedBeanStore implements Seri
private static final long serialVersionUID = 4770689245633688471L;

// The backing map
protected Map<Contextual<? extends Object>, ContexutalInstance<? extends Object>> delegate;
protected Map<Contextual<? extends Object>, ContextualInstance<? extends Object>> delegate;

/**
* Constructor
*/
public HashMapBeanStore()
{
delegate = new HashMap<Contextual<? extends Object>, ContexutalInstance<? extends Object>>();
delegate = new HashMap<Contextual<? extends Object>, ContextualInstance<? extends Object>>();
}

/**
Expand All @@ -53,7 +53,7 @@ public HashMapBeanStore()
* @return The delegate
*/
@Override
public Map<Contextual<? extends Object>, ContexutalInstance<? extends Object>> delegate()
public Map<Contextual<? extends Object>, ContextualInstance<? extends Object>> delegate()
{
return delegate;
}
Expand Down
2 changes: 1 addition & 1 deletion jboss-as/build.properties
@@ -1,5 +1,5 @@
# Container a number of properties associated with installing Web Beans into JBoss AS and running the TCK in JBoss AS
#jboss.home=/Applications/jboss-5.2.0.Beta1
jboss.home=/home/shane/apps/jboss
org.jboss.testharness.container.javaOpts=-Xms128m -Xmx384m -XX:MaxPermSize=128m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000

# time to allow before attempting to restart JBoss AS
Expand Down
Expand Up @@ -36,7 +36,7 @@ public interface BeanStore
* @param contextual The contextual whose instance is to be return
* @return The instance. Null if not found
*/
public abstract <T> ContexutalInstance<T> get(Contextual<? extends T> contextual);
public abstract <T> ContextualInstance<T> get(Contextual<? extends T> contextual);

/**
* Clears the store of contextual instances
Expand All @@ -56,5 +56,5 @@ public interface BeanStore
* @param contextualInstance the contextual instance
* @return The instance added
*/
public abstract <T> void put(ContexutalInstance<T> contextualInstance);
public abstract <T> void put(ContextualInstance<T> contextualInstance);
}
Expand Up @@ -3,13 +3,12 @@
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;

public interface ContexutalInstance<T>
public interface ContextualInstance<T>
{

public T getInstance();

public CreationalContext<T> getCreationalContext();

public Contextual<T> getContextual();

}
Expand Up @@ -5,7 +5,7 @@

import javax.enterprise.context.spi.Contextual;

import org.jboss.webbeans.context.api.ContexutalInstance;
import org.jboss.webbeans.context.api.ContextualInstance;
import org.jboss.webbeans.context.api.BeanStore;

public abstract class AbstractMapBackedBeanStore implements BeanStore
Expand All @@ -16,7 +16,7 @@ public AbstractMapBackedBeanStore()
super();
}

public abstract Map<Contextual<? extends Object>, ContexutalInstance<? extends Object>> delegate();
public abstract Map<Contextual<? extends Object>, ContextualInstance<? extends Object>> delegate();

/**
* Gets an instance from the store
Expand All @@ -26,10 +26,10 @@ public AbstractMapBackedBeanStore()
*
* @see org.jboss.webbeans.context.api.BeanStore#get(BaseBean)
*/
public <T extends Object> ContexutalInstance<T> get(Contextual<? extends T> bean)
public <T extends Object> ContextualInstance<T> get(Contextual<? extends T> bean)
{
@SuppressWarnings("unchecked")
ContexutalInstance<T> instance = (ContexutalInstance<T>) delegate().get(bean);
ContextualInstance<T> instance = (ContextualInstance<T>) delegate().get(bean);
return instance;
}

Expand Down Expand Up @@ -63,7 +63,7 @@ public Set<Contextual<? extends Object>> getContextuals()
*
* @see org.jboss.webbeans.context.api.BeanStore#put(Contextual, Object)
*/
public <T> void put(ContexutalInstance<T> beanInstance)
public <T> void put(ContextualInstance<T> beanInstance)
{
delegate().put(beanInstance.getContextual(), beanInstance);
}
Expand Down
Expand Up @@ -23,7 +23,7 @@

import javax.enterprise.context.spi.Contextual;

import org.jboss.webbeans.context.api.ContexutalInstance;
import org.jboss.webbeans.context.api.ContextualInstance;

/**
* A BeanStore that uses a HashMap as backing storage
Expand All @@ -36,14 +36,14 @@ public class ConcurrentHashMapBeanStore extends AbstractMapBackedBeanStore imple
private static final long serialVersionUID = 4770689245633688471L;

// The backing map
protected Map<Contextual<? extends Object>, ContexutalInstance<? extends Object>> delegate;
protected Map<Contextual<? extends Object>, ContextualInstance<? extends Object>> delegate;

/**
* Constructor
*/
public ConcurrentHashMapBeanStore()
{
delegate = new ConcurrentHashMap<Contextual<? extends Object>, ContexutalInstance<? extends Object>>();
delegate = new ConcurrentHashMap<Contextual<? extends Object>, ContextualInstance<? extends Object>>();
}

/**
Expand All @@ -52,7 +52,7 @@ public ConcurrentHashMapBeanStore()
* @return The delegate
*/
@Override
public Map<Contextual<? extends Object>, ContexutalInstance<? extends Object>> delegate()
public Map<Contextual<? extends Object>, ContextualInstance<? extends Object>> delegate()
{
return delegate;
}
Expand Down
Expand Up @@ -5,7 +5,7 @@
import javax.enterprise.context.spi.Contextual;

import org.jboss.webbeans.context.api.BeanStore;
import org.jboss.webbeans.context.api.ContexutalInstance;
import org.jboss.webbeans.context.api.ContextualInstance;

public abstract class ForwardingBeanStore implements BeanStore
{
Expand All @@ -17,7 +17,7 @@ public void clear()
delegate().clear();
}

public <T> ContexutalInstance<T> get(Contextual<? extends T> bean)
public <T> ContextualInstance<T> get(Contextual<? extends T> bean)
{
return delegate().get(bean);
}
Expand All @@ -27,7 +27,7 @@ public Collection<Contextual<? extends Object>> getContextuals()
return delegate().getContextuals();
}

public <T> void put(ContexutalInstance<T> beanInstance)
public <T> void put(ContextualInstance<T> beanInstance)
{
delegate().put(beanInstance);
}
Expand Down

0 comments on commit 0248527

Please sign in to comment.