On Wed, 6 Dec 2023 11:47:03 GMT, Prasanta Sadhukhan
wrote:
>> CSS.BackgroundImage.getImage uses double-checked locking but the loadedImage
>> field isn't declared as volatile. Without the volatile modifier,
>> double-checked locking implementation is broken.
>
> Prasanta Sadhukhan has updated
On Tue, 5 Dec 2023 07:59:19 GMT, Prasanta Sadhukhan
wrote:
>> CSS.BackgroundImage.getImage uses double-checked locking but the loadedImage
>> field isn't declared as volatile. Without the volatile modifier,
>> double-checked locking implementation is broken.
>
> Prasanta Sadhukhan has updated
> CSS.BackgroundImage.getImage uses double-checked locking but the loadedImage
> field isn't declared as volatile. Without the volatile modifier,
> double-checked locking implementation is broken.
Prasanta Sadhukhan has updated the pull request incrementally with one
additional commit since the
On Tue, 5 Dec 2023 14:24:09 GMT, Prasanta Sadhukhan
wrote:
> But it can be a bug in the code that it never gave a chance second time..I
> think it should get a chance to reload the URL again in case it is invalid
> the 1st time so I guess the change should be the one where if url is invalid,
On Tue, 5 Dec 2023 14:09:42 GMT, Alexey Ivanov wrote:
> > > if the URL is invalid, the image isn't loaded
> >
> >
> > As per your change, if URL is invalid ie url = null, image is not loaded
> > but `loadedImage` is set to true so it will not give another chance to load
> > the URL again via
On Tue, 5 Dec 2023 07:59:19 GMT, Prasanta Sadhukhan
wrote:
>> CSS.BackgroundImage.getImage uses double-checked locking but the loadedImage
>> field isn't declared as volatile. Without the volatile modifier,
>> double-checked locking implementation is broken.
>
> Prasanta Sadhukhan has updated
On Tue, 5 Dec 2023 13:02:36 GMT, Alexey Ivanov wrote:
> if the URL is invalid, the image isn't loaded
if (!loadedImage) {
URL url = CSS.getURL(base, svalue);
if (url != null) {
image = new ImageIcon();
On Tue, 5 Dec 2023 07:55:22 GMT, Prasanta Sadhukhan
wrote:
> > > > It is probably easy just drop the usage of loadedImage and use the
> > > > image instead?
> > >
> > >
> > > Ideally. Yet there's a corner case: if `url` is null, there's nothing to
> > > load; and it doesn't make sense to re-
> CSS.BackgroundImage.getImage uses double-checked locking but the loadedImage
> field isn't declared as volatile. Without the volatile modifier,
> double-checked locking implementation is broken.
Prasanta Sadhukhan has updated the pull request incrementally with one
additional commit since the
On Mon, 4 Dec 2023 21:51:15 GMT, Sergey Bylokhov wrote:
> > > It is probably easy just drop the usage of loadedImage and use the image
> > > instead?
> >
> >
> > Ideally. Yet there's a corner case: if `url` is null, there's nothing to
> > load; and it doesn't make sense to re-try, the URL won
On Mon, 4 Dec 2023 21:06:04 GMT, Alexey Ivanov wrote:
> > It is probably easy just drop the usage of loadedImage and use the image
> > instead?
>
> Ideally. Yet there's a corner case: if `url` is null, there's nothing to
> load; and it doesn't make sense to re-try, the URL won't change. If it
On Mon, 4 Dec 2023 20:42:48 GMT, Sergey Bylokhov wrote:
> It is probably easy just drop the usage of loadedImage and use the image
> instead?
Ideally. Yet there's a corner case: if `url` is null, there's nothing to load;
and it doesn't make sense to re-try, the URL won't change. If it were not
On Fri, 1 Dec 2023 06:31:00 GMT, Prasanta Sadhukhan
wrote:
> CSS.BackgroundImage.getImage uses double-checked locking but the loadedImage
> field isn't declared as volatile. Without the volatile modifier,
> double-checked locking implementation is broken.
It is probably easy just drop the usa
On Mon, 4 Dec 2023 06:30:01 GMT, Prasanta Sadhukhan
wrote:
> > That code does not look like double-checked lock, it is something
> > different. It checks/init/sets one field and then returns another one. Even
> > if both will be marked as volatile the method may return null, since the
> > loa
On Fri, 1 Dec 2023 06:31:00 GMT, Prasanta Sadhukhan
wrote:
> CSS.BackgroundImage.getImage uses double-checked locking but the loadedImage
> field isn't declared as volatile. Without the volatile modifier,
> double-checked locking implementation is broken.
Based on my recent comment, the code
On Sat, 2 Dec 2023 09:07:38 GMT, Sergey Bylokhov wrote:
> That code does not look like double-checked lock, it is something different.
> It checks/init/sets one field and then returns another one. Even if both will
> be marked as volatile the method may return null, since the loadedImage is
>
On Fri, 1 Dec 2023 06:31:00 GMT, Prasanta Sadhukhan
wrote:
> CSS.BackgroundImage.getImage uses double-checked locking but the loadedImage
> field isn't declared as volatile. Without the volatile modifier,
> double-checked locking implementation is broken.
That code does not look like double-c
On Fri, 1 Dec 2023 06:31:00 GMT, Prasanta Sadhukhan
wrote:
> CSS.BackgroundImage.getImage uses double-checked locking but the loadedImage
> field isn't declared as volatile. Without the volatile modifier,
> double-checked locking implementation is broken.
Marked as reviewed by aivanov (Review
CSS.BackgroundImage.getImage uses double-checked locking but the loadedImage
field isn't declared as volatile. Without the volatile modifier, double-checked
locking implementation is broken.
-
Commit messages:
- 8319925: CSS.BackgroundImage incorrectly uses double-checked locking
19 matches
Mail list logo