Skip to Main Content

Integration

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!

12.2.1 migration - new generics introduce compile time errors

Jean-Philippe LarocheFeb 1 2016 — edited Feb 2 2016

I am currently migrating Coherence projects to 12.2.1 (from 12.1.2.x) and the code is not compiling anymore.

I see that a few Coherence types were changed to generics and this introduces type checking errors or type mismatches.

The following Live Event interceptor code used to work:

public abstract class MyInterceptor implements EventInterceptor<EntryEvent> {

public void onEvent(EntryEvent evt) {

     for(BinaryEntry be : evt.getEntrySet()) {

          . . .

     }

}

}

Now it seems to have to be changed to:

public abstract class MyInterceptor implements EventInterceptor<EntryEvent<?, ?>> {

public void onEvent(EntryEvent evt) {

     for(BinaryEntry be : ((Set<BinaryEntry<?, ?>>)) evt.getEntrySet()) {

          . . .

     }

}

}

Any more elegant way to adjust this code?

Is this documented somewhere in Coherence 12.2.1 release notes?

This post has been answered by Brian Oliver-Oracle on Feb 2 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 1 2016
Added on Feb 1 2016
3 comments
1,059 views