Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358369 - BeanArrayHolder is limited to Serializable objects
Summary: BeanArrayHolder is limited to Serializable objects
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Scout (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-21 04:22 EDT by Ivan Motsch CLA
Modified: 2021-08-19 11:08 EDT (History)
3 users (show)

See Also:


Attachments
Patch to solve issue (1.07 KB, patch)
2011-09-21 04:22 EDT, Ivan Motsch CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Motsch CLA 2011-09-21 04:22:02 EDT
BeanArrayHolder is itself serializable.
However, it only accepts generics of type serializable for beans it wraps.
This limitation is not optimal, since it often makes sense to use the bean array holder as a transport wrapping tool only. Without serialiazation.

Solution: Release the limitation and allow for any object.
Comment 1 Ivan Motsch CLA 2011-09-21 04:22:30 EDT
Created attachment 203733 [details]
Patch to solve issue
Comment 2 Ivan Motsch CLA 2011-09-21 04:51:54 EDT
Applied patch.
Comment 3 Matthias Zimmermann CLA 2011-10-11 02:59:55 EDT
shipped with 3.7.1
Comment 4 Lukas Huser CLA 2011-11-29 15:22:22 EST
The patch for this ticket makes the BeanArrayHolder itself non-Serializable (removes Serializable from the implements clause).

This effectively breaks our code, as we are using BeanArrayHolder as the return type of a service call. 

Letting BeanArrayHolder implement Serializable, but not imposing this restriction on the wrapped type would be consistent with the Holder<T> class and would fix the issue. I think this was the intended fix in this ticket anyway?

Affected is Eclipse Scout branch 3.7.1 and Eclipse Scout trunk.
Comment 5 Daniel Wiehl CLA 2011-11-29 17:53:31 EST
29.11.2011 dwi/imo
Bugzilla: 358369 (bug-fix)
Problem: BeanArrayHolder should implement Serializable to be used as transfer object in client-server communication.
However, the wrapped type must not necessarily be serializable to also be used as holder for any beans (e.g. beans of a webservice stub)
Solution: Changed BeanArrayHolder to implement Serializable. This only applies to the holder, not the wrapped type.
Migration: None
Release: 3.7.1
Comment 6 Daniel Wiehl CLA 2011-11-29 18:01:42 EST
(In reply to comment #5)
> 29.11.2011 dwi/imo
> Bugzilla: 358369 (bug-fix)
> Problem: BeanArrayHolder should implement Serializable to be used as transfer
> object in client-server communication.
> However, the wrapped type must not necessarily be serializable to also be used
> as holder for any beans (e.g. beans of a webservice stub)
> Solution: Changed BeanArrayHolder to implement Serializable. This only applies
> to the holder, not the wrapped type.
> Migration: None
> Release: 3.7.1

Fixed on Eclipse Scout branch 3.7.1 and Eclipse Scout trunk.
Comment 7 Lukas Huser CLA 2011-11-30 06:20:22 EST
Thank you very much for the fast reaction!
Successfully tested on Eclipse Scout branch 3.7.1.
Comment 8 Matthias Zimmermann CLA 2011-11-30 06:26:24 EST
assigned correct target milestone (3.7.2 instaed of 3.7.1). will update status to resolved verified
Comment 9 Matthias Zimmermann CLA 2011-11-30 06:27:00 EST
just trying to set proper status ...
Comment 10 Matthias Zimmermann CLA 2012-02-29 07:07:59 EST
shipped with eclipse scout 3.7.2 (indigo sr2)