You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Jacques Le Roux (JIRA)" <ji...@apache.org> on 2014/11/29 13:45:12 UTC

[jira] [Closed] (OFBIZ-5658) checkExistsImage method in ImageManagementServices

     [ https://issues.apache.org/jira/browse/OFBIZ-5658?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-5658.
----------------------------------
       Resolution: Fixed
    Fix Version/s: 13.07.02
                   12.04.06
                   Upcoming Branch

There is nothing missing there. I will also close OFBIZ-5501 after fixing it.

> checkExistsImage method in ImageManagementServices 
> ---------------------------------------------------
>
>                 Key: OFBIZ-5658
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5658
>             Project: OFBiz
>          Issue Type: Bug
>          Components: product
>    Affects Versions: Release Branch 13.07
>         Environment: any
>            Reporter: chunlinyao
>            Assignee: Jacques Le Roux
>            Priority: Trivial
>             Fix For: Upcoming Branch, 12.04.06, 13.07.02
>
>
> I think indexOf(".") in these code should be lastIndexOf(".")
> public static File checkExistsImage(File file) {
>         if (!file.exists()) {
>             imageCount = 0;
>             imagePath = null;
>             return file;
>         }
>         imageCount++;
>         String filePath = imagePath.substring(0, imagePath.indexOf("."));
>         String type = imagePath.substring(imagePath.indexOf(".") + 1);
>         file = new File(filePath + "(" + imageCount + ")." + type);
>         return checkExistsImage(file);
>     }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)