Dos Moonen [Wed, 19 Jul 2017 06:24:07 +0000 (08:24 +0200)]
More user friendly fail message (was NullPointerException) (#9665)
Yes, I should never have created "D:\eclipse workspaces" in the first
place.
No, I am not replacing "%20" with spaces, or creating an URI instance.
"D:\eclipse%20workspaces" is a valid folder and I'm not willing to go
down the rabbit hole and see what that turns into.
Tim Ward [Wed, 19 Jul 2017 06:17:46 +0000 (07:17 +0100)]
Tidy up the Vaadin OSGi whiteboard component (#9648)
The Vaadin OSGi integration component uses Declarative Services, but it does some odd things:
* It uses the whiteboard service's own bundle context to get hold of the service instance
* It has an asymmetric get/release for the whiteboard service, which could leak instances over time
* It releases service instances that it is still actively using
This change tidies up the service lifecycle by delegating the get/release to the Service Component Runtime managing the container (specifically by injecting the service instance). Using this injection also ensures that the Vaadin whiteboard service is obtained using this component's bundle context.
This change also simplifies the code a little by using the reference as the key to track the registrations. Different references for the same service are required to be equal so there is no issue with doing this.
This change does not alter the fact that the whiteboard service's bundle context is used to register the Http Whiteboard servlet, as this may be the intended behaviour. As a result the component should be prepared for an IllegalStateException when unregistering the service whiteboard service, which may already have been unregistered by the OSGi framework if the target bundle is stopping.
Andrew Spear [Mon, 17 Jul 2017 11:03:07 +0000 (06:03 -0500)]
Change sendMessage access modifier to protected. (#9622)
This allows extending AtmospherePushConnection, and then doing overriding sendMessage. One use case is to correlate the IP address and the message in the logs.
Use ZoneId rather than ZoneOffset for conversion (#9620)
Use ZoneId rather than ZoneOffset for conversion between model (Date) and presentation of LocalDateTime.
LocalDateToDateConverter (correctly) uses ZoneId, whereas LocalDateTimeToDateConverter (incorrectly) used a ZoneOffset. This fix aligns the two Converter implementations and makes the latter one more robust.
A ZoneOffset is a fixed time difference, e.g., +07:00, whereas a time zone - represented by a ZoneId - is more dynamic, including features like Daylight-Savings Time. A ZoneId returns one or more ZoneOffsets via its ZoneRules method. (ZoneOffsets have trivial ZoneRules that simply return the ZoneOffset.)
Since the date/time being displayed may be from any date on the calendar, the ZoneOffset imposes a negative limitation. Using ZoneId instead gets us past that limitation and allows a more robust set of conversion rules.
Pekka Hyvönen [Thu, 29 Jun 2017 07:01:05 +0000 (10:01 +0300)]
Fix invalid index in drop target Grid (#9604)
Was using length - 1 and 0 for getting the row element,
which caused client side exception when dragging over header or footer when the grid had enough rows.
This had no effect on UX, only exceptions thrown. Now using visible range instead.
This patch changes Grid Columns, so they can have different value and presentation types. A presentation provider can be given when setting the renderer for a column. This provider takes the value of the column on a row and chooses what to present for this value. Using this approach it is easier to have an editor for the actual backing data instead of the presentation of it.
Leif Åstrand [Wed, 21 Jun 2017 08:02:46 +0000 (11:02 +0300)]
Load the debug window implementation asynchronously (#9026)
Reduces the gzipped DefaultWidgetset eager bundle size from 345kb to
325kb. The relative impact is greater optimized widgetsets that might
have down to around 150kb in the eager bundle.
Added constructor to Grid for compatibility with 8.0.7 (#9206) (#9209)
Constructor Grid(Class, DataCommunicator) was added to 8.0.7 and ported
to master to maintain backward compatibility.
Also fixed javadocs of constructors Grid(DataCommunicator) and
Grid(PropertySet, DataCommunicator) to reflect that constructors were
backported to 8.0.x and available since 8.0.7
Henri Sara [Fri, 26 May 2017 05:48:40 +0000 (08:48 +0300)]
Make dirty connector handling more deterministic (#9396)
Changes in connector tracking and cleaning (#9305) changed the
behavior so that the framework runs beforeClientResponse methods in
a non-deterministic and possibly different order than before.
This change makes the framework call beforeClientResponse methods in
a more deterministic order (parents before children) and checks that
the connector tracker knows the connector.