Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
pmuir committed Jan 13, 2010
1 parent 746a6aa commit cd79c18
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 172 deletions.
4 changes: 2 additions & 2 deletions impl/src/main/java/org/jboss/weld/bean/AbstractClassBean.java
Expand Up @@ -29,6 +29,7 @@
import static org.jboss.weld.logging.messages.BeanMessage.USING_DEFAULT_SCOPE;
import static org.jboss.weld.logging.messages.BeanMessage.USING_SCOPE;

import java.beans.Introspector;
import java.lang.annotation.Annotation;
import java.util.ArrayList;
import java.util.Collections;
Expand Down Expand Up @@ -74,7 +75,6 @@
import org.jboss.weld.serialization.spi.helpers.SerializableContextualInstance;
import org.jboss.weld.util.Beans;
import org.jboss.weld.util.Proxies;
import org.jboss.weld.util.Strings;
import org.jboss.weld.util.Proxies.TypeInfo;
import org.jboss.weld.util.reflection.SecureReflections;
import org.slf4j.cal10n.LocLogger;
Expand Down Expand Up @@ -392,7 +392,7 @@ public WeldClass<T> getWeldAnnotated()
@Override
protected String getDefaultName()
{
String name = Strings.decapitalize(getWeldAnnotated().getSimpleName());
String name = Introspector.decapitalize(getWeldAnnotated().getSimpleName());
return name;
}

Expand Down
36 changes: 0 additions & 36 deletions impl/src/main/java/org/jboss/weld/util/Proxies.java
Expand Up @@ -33,7 +33,6 @@
import javassist.util.proxy.ProxyObject;

import org.jboss.weld.exceptions.ForbiddenArgumentException;
import org.jboss.weld.exceptions.WeldException;
import org.jboss.weld.util.reflection.Reflections;
import org.jboss.weld.util.reflection.SecureReflections;

Expand Down Expand Up @@ -278,17 +277,6 @@ else if (Reflections.isArrayType(clazz))
}
}
}

/**
* Indicates if an instance is a Javassist proxy
*
* @param instance The instance to examine
* @return True if proxy, false otherwise
*/
public static boolean isProxy(Object instance)
{
return instance.getClass().getName().indexOf("_$$_javassist_") > 0;
}

public static ProxyFactory attachMethodHandler(ProxyFactory proxyFactory, MethodHandler methodHandler)
{
Expand All @@ -315,30 +303,6 @@ public static <T> T attachMethodHandler(T instance, MethodHandler methodHandler)
}

}

public static void clean(Class<?> clazz)
{
if (!ProxyObject.class.isAssignableFrom(clazz))
{
throw new ForbiddenArgumentException(INSTANCE_NOT_A_PROXY, clazz);
}
else
{
// Clear the default handler
try
{
SecureReflections.getDeclaredField(clazz, DEFAULT_INTERCEPTOR).set(null, null);
}
catch (IllegalAccessException e)
{
throw new WeldException(e);
}
catch (NoSuchFieldException e)
{
throw new WeldException(e);
}
}
}


}
133 changes: 0 additions & 133 deletions impl/src/main/java/org/jboss/weld/util/Strings.java

This file was deleted.

2 changes: 1 addition & 1 deletion impl/src/main/java/org/jboss/weld/util/Types.java
Expand Up @@ -34,7 +34,7 @@ public class Types
*/
public static Type boxedType(Type type)
{
if (type instanceof Class)
if (type instanceof Class<?>)
{
return boxedClass((Class<?>) type);
}
Expand Down

0 comments on commit cd79c18

Please sign in to comment.