• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Making AjaxFlexibleFileUpload serializable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Making AjaxFlexibleFileUpload serializable


  • Subject: Making AjaxFlexibleFileUpload serializable
  • From: Paul Hoadley <email@hidden>
  • Date: Thu, 21 May 2015 20:18:11 +0930

Hello,

This is just a heads-up.  I want to make AjaxFlexibleFileUpload serializable.  To do this, I need to change this:

> protected final Logger log = Logger.getLogger(getClass());


to something more like this:

> private static final Logger log = Logger.getLogger(AjaxFlexibleFileUpload.class);


See the pull request:

https://github.com/wocommunity/wonder/pull/654

Johann Werner pointed out that this will affect anyone who is (a) using a subclass of AjaxFlexibleFileUpload, (b) using the Logger in AjaxFlexibleFileUpload from that subclass, and (c) expecting the class name emitted by that Logger to reflect their subclass.

While this is true, my argument is that AjaxFlexibleFileUpload implements Serializable (by inheritance), but it’s not serializable (because Logger is not serializable).  So this Logger field pattern is a bug (admittedly only if you’re interested in serializing it, which I am).  We could change it to ‘protected static final’, but then we couldn’t call getClass() to initialise it anyway, so if we’re going to change it, we may as well make it ‘private static final’.

Does anyone care about this?  In the absence of anyone that does, Johann is going to merge the pull request in a day or two, so speak up!


--
Paul Hoadley
http://logicsquad.net/



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Prev by Date: Re: strange SELECT results in postgresql slave
  • Next by Date: Java 8 optionals
  • Previous by thread: Re: strange SELECT results in postgresql slave
  • Next by thread: Java 8 optionals
  • Index(es):
    • Date
    • Thread