Fixed some bogus null checks and assignments.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2353 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -515,12 +515,12 @@ public abstract class BuildVisitor implements ExpressionVisitor
|
|||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
DepotMarshaller<?> dm = _types.getMarshaller(type);
|
DepotMarshaller<?> dm = _types.getMarshaller(type);
|
||||||
FieldMarshaller<?> fm = dm.getFieldMarshaller(field);
|
|
||||||
if (dm == null) {
|
if (dm == null) {
|
||||||
throw new IllegalArgumentException(
|
throw new IllegalArgumentException(
|
||||||
"Unknown field on persistent record [record=" + type + ", field=" + field + "]");
|
"Unknown field on persistent record [record=" + type + ", field=" + field + "]");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FieldMarshaller<?> fm = dm.getFieldMarshaller(field);
|
||||||
appendIdentifier(fm.getColumnName());
|
appendIdentifier(fm.getColumnName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -530,12 +530,12 @@ public abstract class BuildVisitor implements ExpressionVisitor
|
|||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
DepotMarshaller<?> dm = _types.getMarshaller(type);
|
DepotMarshaller<?> dm = _types.getMarshaller(type);
|
||||||
FieldMarshaller<?> fm = dm.getFieldMarshaller(field);
|
|
||||||
if (dm == null) {
|
if (dm == null) {
|
||||||
throw new IllegalArgumentException(
|
throw new IllegalArgumentException(
|
||||||
"Unknown field on persistent record [record=" + type + ", field=" + field + "]");
|
"Unknown field on persistent record [record=" + type + ", field=" + field + "]");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FieldMarshaller<?> fm = dm.getFieldMarshaller(field);
|
||||||
Map<String, FieldDefinition> fieldOverrides = _definitions.get(type);
|
Map<String, FieldDefinition> fieldOverrides = _definitions.get(type);
|
||||||
if (fieldOverrides != null) {
|
if (fieldOverrides != null) {
|
||||||
// first, see if there's a field override
|
// first, see if there's a field override
|
||||||
|
|||||||
@@ -187,8 +187,6 @@ public class ClassUtil
|
|||||||
// an override. Check implemented interfaces.
|
// an override. Check implemented interfaces.
|
||||||
Class<?>[] interfaces = clazz.getInterfaces();
|
Class<?>[] interfaces = clazz.getInterfaces();
|
||||||
for (int i = 0; i < interfaces.length; ++i) {
|
for (int i = 0; i < interfaces.length; ++i) {
|
||||||
overriddenMethod = null;
|
|
||||||
|
|
||||||
if (classIsAccessible(interfaces[i])) {
|
if (classIsAccessible(interfaces[i])) {
|
||||||
try {
|
try {
|
||||||
overriddenMethod = interfaces[i].getMethod(methodName, parameterTypes);
|
overriddenMethod = interfaces[i].getMethod(methodName, parameterTypes);
|
||||||
@@ -201,8 +199,6 @@ public class ClassUtil
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
overriddenMethod = null;
|
|
||||||
|
|
||||||
// Try superclass's superclass and implemented interfaces.
|
// Try superclass's superclass and implemented interfaces.
|
||||||
if (superclass != null) {
|
if (superclass != null) {
|
||||||
overriddenMethod = getAccessibleMethodFrom(superclass, methodName, parameterTypes);
|
overriddenMethod = getAccessibleMethodFrom(superclass, methodName, parameterTypes);
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ public class IntListUtil
|
|||||||
public static int removeAt (int[] list, int index)
|
public static int removeAt (int[] list, int index)
|
||||||
{
|
{
|
||||||
int llength = list.length;
|
int llength = list.length;
|
||||||
if (list == null || llength <= index) {
|
if (llength <= index) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user