You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Maxim Solodovnik <so...@gmail.com> on 2016/10/09 05:05:48 UTC
FileSystemResource inconsistency
Hello Tobias,
I believe I have found inconsistency in FileSystemResource class.
I have override newResourceResponse(Attributes attributes) method to
pass custom "path" based on the attributes.
It works as expected
But the size is being calculated based on class private variable
"path" (not "path" passed to createResourceResponse(Path path) method
I believe additional getSize(Path path) need to be added and used
inside createResourceResponse(Path path) method
WDYT? I can create PR :)
--
WBR
Maxim aka solomax
Re: FileSystemResource inconsistency
Posted by Tobias Soloschenko <to...@googlemail.com>.
Hi Maxim,
no problem :-) - good to see that it is going to be used - if there are any issues please let me know!
kind regards
Tobias
> Am 09.10.2016 um 11:07 schrieb Maxim Solodovnik <so...@gmail.com>:
>
> By bad :(
> I totally missed this line:
> https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/resource/FileSystemResource.java#L90
>
> sorry for the noise :(
>
>> On Sun, Oct 9, 2016 at 4:07 PM, Maxim Solodovnik <so...@gmail.com> wrote:
>> By bad :(
>> I totally missed this line:
>> https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/resource/FileSystemResource.java#L90
>>
>> sorry for the noise :(
>>
>> On Sun, Oct 9, 2016 at 3:50 PM, Tobias Soloschenko
>> <to...@googlemail.com> wrote:
>>> Hi Maxim,
>>>
>>> thanks! I am going to have a look at the PR! :-)
>>>
>>> kind regards
>>>
>>> Tobias
>>>
>>>> Am 09.10.2016 um 07:05 schrieb Maxim Solodovnik <so...@gmail.com>:
>>>>
>>>> Hello Tobias,
>>>>
>>>> I believe I have found inconsistency in FileSystemResource class.
>>>>
>>>> I have override newResourceResponse(Attributes attributes) method to
>>>> pass custom "path" based on the attributes.
>>>> It works as expected
>>>>
>>>> But the size is being calculated based on class private variable
>>>> "path" (not "path" passed to createResourceResponse(Path path) method
>>>>
>>>> I believe additional getSize(Path path) need to be added and used
>>>> inside createResourceResponse(Path path) method
>>>>
>>>> WDYT? I can create PR :)
>>>>
>>>>
>>>> --
>>>> WBR
>>>> Maxim aka solomax
>>
>>
>>
>> --
>> WBR
>> Maxim aka solomax
>
>
>
> --
> WBR
> Maxim aka solomax
Re: FileSystemResource inconsistency
Posted by Maxim Solodovnik <so...@gmail.com>.
By bad :(
I totally missed this line:
https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/resource/FileSystemResource.java#L90
sorry for the noise :(
On Sun, Oct 9, 2016 at 4:07 PM, Maxim Solodovnik <so...@gmail.com> wrote:
> By bad :(
> I totally missed this line:
> https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/resource/FileSystemResource.java#L90
>
> sorry for the noise :(
>
> On Sun, Oct 9, 2016 at 3:50 PM, Tobias Soloschenko
> <to...@googlemail.com> wrote:
>> Hi Maxim,
>>
>> thanks! I am going to have a look at the PR! :-)
>>
>> kind regards
>>
>> Tobias
>>
>>> Am 09.10.2016 um 07:05 schrieb Maxim Solodovnik <so...@gmail.com>:
>>>
>>> Hello Tobias,
>>>
>>> I believe I have found inconsistency in FileSystemResource class.
>>>
>>> I have override newResourceResponse(Attributes attributes) method to
>>> pass custom "path" based on the attributes.
>>> It works as expected
>>>
>>> But the size is being calculated based on class private variable
>>> "path" (not "path" passed to createResourceResponse(Path path) method
>>>
>>> I believe additional getSize(Path path) need to be added and used
>>> inside createResourceResponse(Path path) method
>>>
>>> WDYT? I can create PR :)
>>>
>>>
>>> --
>>> WBR
>>> Maxim aka solomax
>
>
>
> --
> WBR
> Maxim aka solomax
--
WBR
Maxim aka solomax