Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!nntpfeed.proxad.net!proxad.net!feeder1-1.proxad.net!feeder.news-service.com!postnews.google.com!m18g2000vbl.googlegroups.com!not-for-mail From: Thomas Lehmann Newsgroups: comp.lang.java.programmer Subject: Re: Getter/Setter - Serialization Date: Sun, 24 Jul 2011 09:33:53 -0700 (PDT) Organization: http://groups.google.com Lines: 29 Message-ID: <1aaf12f8-e9da-4767-8d40-36a585e13cfe@m18g2000vbl.googlegroups.com> References: NNTP-Posting-Host: 217.224.48.39 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1311525233 7763 127.0.0.1 (24 Jul 2011 16:33:53 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 24 Jul 2011 16:33:53 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: m18g2000vbl.googlegroups.com; posting-host=217.224.48.39; posting-account=9eyAowoAAADxZ2nqkXe_TQw63yeWUL6U User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESNKRC X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0,gzip(gfe) Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:6510 The warning message comes with PMD (plugin). I'm intending to use XStream for XML serialization and so far I can see there is no need to provide getter and setter. I know that article (URL) but reading also "Effective Java" you will be warned about the problem with using "Serializable". On 24 Jul., 17:30, markspace <-@.> wrote: > On 7/24/2011 8:07 AM, Thomas Lehmann wrote: > > > I might have problems with the serialization then obviously requiring > > that the setter exists > > Yeah, I think the setter/getter might be required for XML style > serialization, but not in the general case. > > What are you doing that Eclipse says you need to mark a field as > transient? =A0This doesn't make sense to me, because general serializatio= n > will handle this just fine. =A0I think I need some context here. > > Here's a good article on serialization: > >