Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.glorb.com!postnews.google.com!15g2000vbw.googlegroups.com!not-for-mail From: Thomas Lehmann Newsgroups: comp.lang.java.programmer Subject: Getter/Setter - Serialization Date: Sun, 24 Jul 2011 08:07:06 -0700 (PDT) Organization: http://groups.google.com Lines: 16 Message-ID: NNTP-Posting-Host: 217.224.48.39 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1311520471 23413 127.0.0.1 (24 Jul 2011 15:14:31 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 24 Jul 2011 15:14:31 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: 15g2000vbw.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:6503 Hi, probably a silly question. I have a class and some members will be initialized only when calling a 'create' method. I'm using Eclipse and there I get a warning "Found non-transient, non-static member. Please mark as transient or provide accessors." My question is now how to handle it correct. When I provide a setter (assume a creation date) then I could set the creation date to another as initialized when calling 'create'. That's why I wouldn't provide a setter for this member. But obviously the warning want to tell me that I might have problems with the serialization then obviously requiring that the setter exists (and yes I'm intending to do serialization - probably XML). Could you please give some helpful comments on this?