Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

jdk8 stream doc bug

piscesAug 20 2018

location:

"java.util.stream.Collectors#toMap(java.util.function.Function<? super T,? extends K>, java.util.function.Function<? super T,? extends U>)",

there is bug in the doc of this jdk method,

origin:

"* Map<String, Student> studentIdToStudent
* students.stream().collect(toMap(Student::getId,
* Functions.identity());",

correct use:

"* Map<String, Student> studentIdToStudent
* students.stream().collect(toMap(Student::getId,
* Function.identity());"

Comments

Christine Lei-Oracle

Have you tried to wrap the child data the other way around as

const bufferingDP = new BufferingDataProvider(childArrayDataProvider);
this.childDataProvider(new ListDataProviderView(bufferingDP));

Hopefully in this way, ListDataProviderView would apply filter on all buffered data.

DaveArch

Thanks for your reply Christine.
Unfortunately that doesn’t work because wrapping it the other way around means that the functions specific to BufferingDataProvider are not available i.e. getSubmittableItems()
node.js:3173 Uncaught TypeError: this.childDataProvider(...).getSubmittableItems is not a function
Any other ideas?
Is there a way of altering the filterCriterion on ListDataProviderView without replacing the whole data provider which is wrapping it? I was wondering whether this would work so that they next time the data is fetched it will use the new filter?

Christine Lei-Oracle

The original wrapping order will use original data without buffered data information. Don't seem to have a way better than your current one although it's not that 'automatic' unfortunately.

1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 17 2018
Added on Aug 20 2018
0 comments
303 views