Author: nbelaevski
Date: 2007-08-31 12:30:28 -0400 (Fri, 31 Aug 2007)
New Revision: 2666
Modified:
trunk/framework/api/src/main/java/org/richfaces/model/SequenceDataModel.java
Log:
Handling for single object in SequenceDataModel
Modified: trunk/framework/api/src/main/java/org/richfaces/model/SequenceDataModel.java
===================================================================
---
trunk/framework/api/src/main/java/org/richfaces/model/SequenceDataModel.java 2007-08-31
16:23:02 UTC (rev 2665)
+++
trunk/framework/api/src/main/java/org/richfaces/model/SequenceDataModel.java 2007-08-31
16:30:28 UTC (rev 2666)
@@ -6,6 +6,7 @@
import java.io.IOException;
import java.util.AbstractList;
import java.util.Arrays;
+import java.util.Collections;
import java.util.Iterator;
import java.util.List;
@@ -120,8 +121,10 @@
}
};
+ } else if (data instanceof Object[]) {
+ this.list = Arrays.asList((Object[]) data);
} else if (data != null) {
- this.list = Arrays.asList((Object[]) data);
+ this.list = Collections.singletonList(data);
} else {
this.list = null;
}