Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List not empty when using getColumnValue("colName", ArrayList.class) on an empty column #140

Open
dnmd opened this issue Nov 2, 2015 · 1 comment

Comments

@dnmd
Copy link

dnmd commented Nov 2, 2015

When using entry.getColumnValue("colName", ArrayList.class) on an empty column, it does not return an empty list as one might expect. But a list with one String element.

List<String> list = entry.getColumnValue("colName", ArrayList.class);

System.out.println(list.isEmpty()); // false
System.out.println(list.size()); // == 1
  1. I don't know if this is intended or by design but I could not find any examples / known issues about it.
  2. What would be a proper way to prevent such behavior? As I would expect an empty List, my guess is that it happens somewhere around here
@the-ntf
Copy link
Contributor

the-ntf commented Nov 2, 2015

We would have to add a switch for this behavior, because the legacy API
returns a Vector with one "" in it when a column value is "empty"
just like it does with an "empty" field. There's actually no such thing as
empty in Notes.

On Mon, Nov 2, 2015 at 5:44 AM, dnmd [email protected] wrote:

When using entry.getColumnValue("colName", ArrayList.class) on an empty
column, it does not return an empty list as one might expect. But a list
with one String element.

List list = entry.getColumnValue("colName", ArrayList.class);
System.out.println(list.isEmpty()); // falseSystem.out.println(list.size()); // == 1

  1. I don't know if this is intended or by design but I could not find any
    examples / known issues about it.
  2. What would be a proper way to prevent such behavior? As I would expect
    an empty List, my guess is that it happens somewhere around here
    https://github.com/OpenNTF/org.openntf.domino/blob/master/domino/core/src/main/java/org/openntf/domino/impl/ViewEntry.java#L522


Reply to this email directly or view it on GitHub
#140.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants