Revision: 1153
http://stripes.svn.sourceforge.net/stripes/?rev=1153&view=rev
Author: fdaoud
Date: 2009-09-27 11:48:33 +0000 (Sun, 27 Sep 2009)
Log Message:
-----------
Fix for STS-694
Modified Paths:
--------------
trunk/stripes/src/net/sourceforge/stripes/ajax/JavaScriptBuilder.java
trunk/stripes/src/net/sourceforge/stripes/config/DefaultConfiguration.java
trunk/stripes/src/net/sourceforge/stripes/config/RuntimeConfiguration.java
trunk/stripes/src/net/sourceforge/stripes/format/DateFormatter.java
trunk/stripes/src/net/sourceforge/stripes/tag/InputTagSupport.java
trunk/stripes/src/net/sourceforge/stripes/util/CollectionUtil.java
trunk/stripes/src/net/sourceforge/stripes/util/bean/PropertyExpressionEvaluation.java
Modified: trunk/stripes/src/net/sourceforge/stripes/ajax/JavaScriptBuilder.java
===================================================================
--- trunk/stripes/src/net/sourceforge/stripes/ajax/JavaScriptBuilder.java
2009-09-27 11:28:21 UTC (rev 1152)
+++ trunk/stripes/src/net/sourceforge/stripes/ajax/JavaScriptBuilder.java
2009-09-27 11:48:33 UTC (rev 1153)
@@ -103,7 +103,7 @@
this.excludeProperties = new HashSet<String>();
for (Object object : objectsToExclude) {
- if (object instanceof Class)
+ if (object instanceof Class<?>)
addClassExclusion((Class<?>) object);
else if (object instanceof String)
addPropertyExclusion((String) object);
Modified:
trunk/stripes/src/net/sourceforge/stripes/config/DefaultConfiguration.java
===================================================================
--- trunk/stripes/src/net/sourceforge/stripes/config/DefaultConfiguration.java
2009-09-27 11:28:21 UTC (rev 1152)
+++ trunk/stripes/src/net/sourceforge/stripes/config/DefaultConfiguration.java
2009-09-27 11:48:33 UTC (rev 1153)
@@ -111,6 +111,7 @@
* Creates and stores instances of the objects of the type that the
Configuration is
* responsible for providing, except where subclasses have already
provided instances.
*/
+ @SuppressWarnings("unchecked")
public void init() {
try {
Boolean debugMode = initDebugMode();
Modified:
trunk/stripes/src/net/sourceforge/stripes/config/RuntimeConfiguration.java
===================================================================
--- trunk/stripes/src/net/sourceforge/stripes/config/RuntimeConfiguration.java
2009-09-27 11:28:21 UTC (rev 1152)
+++ trunk/stripes/src/net/sourceforge/stripes/config/RuntimeConfiguration.java
2009-09-27 11:48:33 UTC (rev 1153)
@@ -15,7 +15,6 @@
package net.sourceforge.stripes.config;
import java.lang.reflect.Type;
-import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
@@ -24,7 +23,6 @@
import net.sourceforge.stripes.controller.ActionBeanContextFactory;
import net.sourceforge.stripes.controller.ActionBeanPropertyBinder;
import net.sourceforge.stripes.controller.ActionResolver;
-import net.sourceforge.stripes.controller.DefaultObjectFactory;
import net.sourceforge.stripes.controller.Interceptor;
import net.sourceforge.stripes.controller.LifecycleStage;
import net.sourceforge.stripes.controller.ObjectFactory;
Modified: trunk/stripes/src/net/sourceforge/stripes/format/DateFormatter.java
===================================================================
--- trunk/stripes/src/net/sourceforge/stripes/format/DateFormatter.java
2009-09-27 11:28:21 UTC (rev 1152)
+++ trunk/stripes/src/net/sourceforge/stripes/format/DateFormatter.java
2009-09-27 11:48:33 UTC (rev 1153)
@@ -153,7 +153,7 @@
* should override init() and then set the date format object.
*/
public void setDateFormat(DateFormat dateFormat) {
- this.format = format;
+ this.format = dateFormat;
}
/** Formats a Date as a String using the rules supplied when the formatter
was built. */
Modified: trunk/stripes/src/net/sourceforge/stripes/tag/InputTagSupport.java
===================================================================
--- trunk/stripes/src/net/sourceforge/stripes/tag/InputTagSupport.java
2009-09-27 11:28:21 UTC (rev 1152)
+++ trunk/stripes/src/net/sourceforge/stripes/tag/InputTagSupport.java
2009-09-27 11:48:33 UTC (rev 1153)
@@ -108,7 +108,7 @@
returnValue = Array.get(unknown, 0);
}
}
- else if (unknown != null && unknown instanceof Collection) {
+ else if (unknown != null && unknown instanceof Collection<?>) {
Collection<?> collection = (Collection<?>) unknown;
if (collection.size() > 0) {
returnValue = collection.iterator().next();
@@ -206,7 +206,7 @@
}
}
}
- else if (selected instanceof Collection) {
+ else if (selected instanceof Collection<?>) {
Collection<?> selectedIf = (Collection<?>) selected;
for (Object item : selectedIf) {
if ( (format(item, false).equals(stringValue)) ) {
Modified: trunk/stripes/src/net/sourceforge/stripes/util/CollectionUtil.java
===================================================================
--- trunk/stripes/src/net/sourceforge/stripes/util/CollectionUtil.java
2009-09-27 11:28:21 UTC (rev 1152)
+++ trunk/stripes/src/net/sourceforge/stripes/util/CollectionUtil.java
2009-09-27 11:48:33 UTC (rev 1153)
@@ -149,7 +149,7 @@
* @return either the Iterable itself if it is a List, or a new List with
the same elements
*/
public static <T> List<T> asList(Iterable<T> in) {
- if (in instanceof List) return (List<T>) in;
+ if (in instanceof List<?>) return (List<T>) in;
else {
LinkedList<T> list = new LinkedList<T>();
for (T item : in) {
Modified:
trunk/stripes/src/net/sourceforge/stripes/util/bean/PropertyExpressionEvaluation.java
===================================================================
---
trunk/stripes/src/net/sourceforge/stripes/util/bean/PropertyExpressionEvaluation.java
2009-09-27 11:28:21 UTC (rev 1152)
+++
trunk/stripes/src/net/sourceforge/stripes/util/bean/PropertyExpressionEvaluation.java
2009-09-27 11:48:33 UTC (rev 1153)
@@ -111,7 +111,7 @@
for (NodeEvaluation current = this.root; current != null; current =
current.getNext()) {
// Firstly if the current type is a wildcard type of a type
variable try and
// figure out what the real value to use is
- while (type instanceof WildcardType || type instanceof
TypeVariable) {
+ while (type instanceof WildcardType || type instanceof
TypeVariable<?>) {
if (type instanceof WildcardType) {
type = getWildcardTypeBound((WildcardType) type);
}
@@ -128,7 +128,7 @@
current.setType(NodeType.ArrayEntry);
continue;
}
- else if (type instanceof Class && ((Class<?>) type).isArray()) {
+ else if (type instanceof Class<?> && ((Class<?>) type).isArray()) {
type = ((Class<?>) type).getComponentType();
current.setValueType(type);
current.setKeyType(Integer.class);
@@ -141,7 +141,7 @@
ParameterizedType ptype = (ParameterizedType) type;
Type rawType = convertToClass(type, current);
- if (rawType instanceof Class) {
+ if (rawType instanceof Class<?>) {
Class<?> rawClass = (Class<?>) rawType;
if (List.class.isAssignableFrom(rawClass)) {
type = ptype.getActualTypeArguments()[0];
@@ -172,7 +172,7 @@
// Else if it's just a regular class we can try looking for a
property on it. If
// no property exists, just bail out and return null immediately
- if (type instanceof Class) {
+ if (type instanceof Class<?>) {
Class<?> clazz = (Class<?>) type;
String property = current.getNode().getStringValue();
type = getBeanPropertyType(clazz, property);
@@ -369,17 +369,17 @@
type = ((ParameterizedType) type).getRawType();
}
- while (type instanceof WildcardType || type instanceof TypeVariable) {
+ while (type instanceof WildcardType || type instanceof
TypeVariable<?>) {
if (type instanceof WildcardType) {
type = getWildcardTypeBound((WildcardType) type);
}
- else if (type instanceof TypeVariable) {
+ else if (type instanceof TypeVariable<?>) {
type = getTypeVariableValue(evaluation, (TypeVariable<?>)
type);
}
}
// And now that we should have a single type, try and get a Class
- if (type instanceof Class) {
+ if (type instanceof Class<?>) {
return (Class<?>) type;
}
else {
@@ -411,7 +411,7 @@
Type type = n.getValueType();
// Bean class found? Stop searching.
- if (type instanceof Class) {
+ if (type instanceof Class<?>) {
lastBean = (Class<?>) n.getValueType();
break;
}
@@ -424,7 +424,7 @@
// Now find the parent of the ptype and see if it's a
ptype too!
Type rawtype = ptype.getRawType();
- if (rawtype instanceof Class) {
+ if (rawtype instanceof Class<?>) {
Class<?> superclass = (Class<?>) rawtype;
Type supertype = superclass.getGenericSuperclass();
ptype = (supertype instanceof ParameterizedType) ?
(ParameterizedType) supertype : null;
@@ -451,8 +451,8 @@
// Map the type variable to a type.
if ((type = typemap1.get(i).get(typeVar)) != null) {
// Reached a real class? Done.
- if (type instanceof Class) { return type; }
- else if (type instanceof TypeVariable) {
+ if (type instanceof Class<?>) { return type; }
+ else if (type instanceof TypeVariable<?>) {
typeVar = (TypeVariable<?>) type;
}
}
@@ -465,8 +465,8 @@
// Map the type variable to a type.
if ((type = typemap2.get(i).get(typeVar)) != null) {
// Reached a real class? Done.
- if (type instanceof Class) { return type; }
- else if (type instanceof TypeVariable) {
+ if (type instanceof Class<?>) { return type; }
+ else if (type instanceof TypeVariable<?>) {
typeVar = (TypeVariable<?>) type;
}
}
@@ -486,7 +486,7 @@
*/
private void addTypeMappings(List<HashMap<TypeVariable<?>, Type>> typemap,
ParameterizedType paramType) {
Type rawType = paramType.getRawType();
- if (rawType instanceof Class) {
+ if (rawType instanceof Class<?>) {
Class<?> rawClass = (Class<?>) rawType;
TypeVariable<?>[] vars = rawClass.getTypeParameters();
Type[] args = paramType.getActualTypeArguments();
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development