You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rg...@apache.org on 2014/04/28 17:51:10 UTC
svn commit: r1590689 -
/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AttributeValueConverter.java
Author: rgodfrey
Date: Mon Apr 28 15:51:09 2014
New Revision: 1590689
URL: http://svn.apache.org/r1590689
Log:
QPID-5686 : Address review comments from Alex Rudyy
Modified:
qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AttributeValueConverter.java
Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AttributeValueConverter.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AttributeValueConverter.java?rev=1590689&r1=1590688&r2=1590689&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AttributeValueConverter.java (original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AttributeValueConverter.java Mon Apr 28 15:51:09 2014
@@ -423,27 +423,6 @@ abstract class AttributeValueConverter<T
_memberConverter = getConverter(getRawType(genericType), genericType);
}
- private static Class getRawType(Type t)
- {
- if(t instanceof Class)
- {
- return (Class)t;
- }
- else if(t instanceof ParameterizedType)
- {
- return (Class)((ParameterizedType)t).getRawType();
- }
- else if(t instanceof TypeVariable)
- {
- Type[] bounds = ((TypeVariable)t).getBounds();
- if(bounds.length == 1)
- {
- return getRawType(bounds[0]);
- }
- }
- throw new ServerScopedRuntimeException("Unable to process type when constructing configuration model: " + t);
- }
-
@Override
public List convert(final Object value, final ConfiguredObject object)
{
@@ -495,27 +474,6 @@ abstract class AttributeValueConverter<T
_memberConverter = getConverter(getRawType(genericType), genericType);
}
- private static Class getRawType(Type t)
- {
- if(t instanceof Class)
- {
- return (Class)t;
- }
- else if(t instanceof ParameterizedType)
- {
- return (Class)((ParameterizedType)t).getRawType();
- }
- else if(t instanceof TypeVariable)
- {
- Type[] bounds = ((TypeVariable)t).getBounds();
- if(bounds.length == 1)
- {
- return getRawType(bounds[0]);
- }
- }
- throw new ServerScopedRuntimeException("Unable to process type when constructing configuration model: " + t);
- }
-
@Override
public Set convert(final Object value, final ConfiguredObject object)
{
@@ -567,26 +525,6 @@ abstract class AttributeValueConverter<T
_memberConverter = getConverter(getRawType(genericType), genericType);
}
- private static Class getRawType(Type t)
- {
- if(t instanceof Class)
- {
- return (Class)t;
- }
- else if(t instanceof ParameterizedType)
- {
- return (Class)((ParameterizedType)t).getRawType();
- }
- else if(t instanceof TypeVariable)
- {
- Type[] bounds = ((TypeVariable)t).getBounds();
- if(bounds.length == 1)
- {
- return getRawType(bounds[0]);
- }
- }
- throw new ServerScopedRuntimeException("Unable to process type when constructing configuration model: " + t);
- }
@Override
public Collection convert(final Object value, final ConfiguredObject object)
@@ -719,4 +657,26 @@ abstract class AttributeValueConverter<T
}
}
}
+
+ private static Class getRawType(Type t)
+ {
+ if(t instanceof Class)
+ {
+ return (Class)t;
+ }
+ else if(t instanceof ParameterizedType)
+ {
+ return (Class)((ParameterizedType)t).getRawType();
+ }
+ else if(t instanceof TypeVariable)
+ {
+ Type[] bounds = ((TypeVariable)t).getBounds();
+ if(bounds.length == 1)
+ {
+ return getRawType(bounds[0]);
+ }
+ }
+ throw new ServerScopedRuntimeException("Unable to process type when constructing configuration model: " + t);
+ }
+
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org