Re: Illegal Reflective Access in DefaultPropertyLocator

2021-01-19 Thread Johannes Renoth
Hi Bas,

Thank you for your help, unfortunately it is not that simple (i need
write-access as well). I solved the problem anyways (see other answer)

Johannes Renoth

On 2021-01-18 18:10, Bas Gooren wrote:
> Hi!
>
> That’s actually quite easy to replace:
>
> If you have a model containing the LocalDateTime, change the call to:
>
> var model = Model.of( LocalDateTime.now() );
> model.map( LocalDateTime::toLocalDate );
>
> Since the “date” field is private final I assume your model was read-only.
>
> Met vriendelijke groet,
> Kind regards,
>
> Bas Gooren
>
> Op 18 januari 2021 bij 17:13:42, Johannes Renoth
> (johannes.ren...@gmx.de ) schreef:
>
>> Hello,
>>
>> In my project i have the following Warning since the Update to Java 11:
>>
>> The issue remains even after trying with the latest Version 9.2.0
>>
>> I am using a LocalDateTime Model Object with
>> PropertyModel(LocalDateTime, "date").
>>
>> Of course i could try to split my Model into two parts date and time
>> but it is much more convenient as it is now.
>>
>> Any suggestions what i could do?
>>


Re: Illegal Reflective Access in DefaultPropertyLocator

2021-01-19 Thread Johannes Renoth
Hi Rob,

Thanks for your help, i did split LocalDateTime Model in LocalDate and
LocalTime components, now it works properly, thanks!

On 2021-01-18 18:12, Rob Audenaerde wrote:
> java.time.LocalDateTime does not have a `getDate` / `setDate`, so what
> you did before was depending on internal implementation of
> LocalDateTime anyway (private members), and not a very nice thing to
> do :).
>
> You should write proper models for dealing with it, or write custom
> converters I guess.
>
> On Mon, Jan 18, 2021 at 5:14 PM Johannes Renoth
> mailto:johannes.ren...@gmx.de>> wrote:
>
> Hello,
>
> In my project i have the following Warning since the Update to
> Java 11:
>
> The issue remains even after trying with the latest Version 9.2.0
>
> I am using a LocalDateTime Model Object with
> PropertyModel(LocalDateTime, "date").
>
> Of course i could try to split my Model into two parts date and
> time but it is much more convenient as it is now.
>
> Any suggestions what i could do?
>


Re: Illegal Reflective Access in DefaultPropertyLocator

2021-01-18 Thread Rob Audenaerde
java.time.LocalDateTime does not have a `getDate` / `setDate`, so what you
did before was depending on internal implementation of LocalDateTime anyway
(private members), and not a very nice thing to do :).

You should write proper models for dealing with it, or write custom
converters I guess.

On Mon, Jan 18, 2021 at 5:14 PM Johannes Renoth 
wrote:

> Hello,
>
> In my project i have the following Warning since the Update to Java 11:
>
> The issue remains even after trying with the latest Version 9.2.0
>
> I am using a LocalDateTime Model Object with PropertyModel(LocalDateTime,
> "date").
>
> Of course i could try to split my Model into two parts date and time but
> it is much more convenient as it is now.
>
> Any suggestions what i could do?
>


Re: Illegal Reflective Access in DefaultPropertyLocator

2021-01-18 Thread Bas Gooren
Hi!

That’s actually quite easy to replace:

If you have a model containing the LocalDateTime, change the call to:

var model = Model.of( LocalDateTime.now() );
model.map( LocalDateTime::toLocalDate );

Since the “date” field is private final I assume your model was read-only.

Met vriendelijke groet,
Kind regards,

Bas Gooren

Op 18 januari 2021 bij 17:13:42, Johannes Renoth (johannes.ren...@gmx.de)
schreef:

Hello,

In my project i have the following Warning since the Update to Java 11:

The issue remains even after trying with the latest Version 9.2.0

I am using a LocalDateTime Model Object with PropertyModel(LocalDateTime,
"date").

Of course i could try to split my Model into two parts date and time but it
is much more convenient as it is now.

Any suggestions what i could do?


Illegal Reflective Access in DefaultPropertyLocator

2021-01-18 Thread Johannes Renoth
Hello,

In my project i have the following Warning since the Update to Java 11:

The issue remains even after trying with the latest Version 9.2.0

I am using a LocalDateTime Model Object with
PropertyModel(LocalDateTime, "date").

Of course i could try to split my Model into two parts date and time but
it is much more convenient as it is now.

Any suggestions what i could do?