Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-8114

The "Only Not Used Labels" option of the Label Manager is broken

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 16.11.01
    • Fix Version/s: 16.11.01
    • Component/s: framework/webtools
    • Labels:
      None

      Description

      This is due to the introduction of ServiceUtil.getResource() at r1757979 for OFBIZ-7912

        Issue Links

          Activity

          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          At revision: 1759457 in trunk

          I simply replaced the parenthesis in ServiceUtil.getResource() by 2 spaces when parsing files with getLabelsFromJavaFiles() and getLabelsFromFtlFiles().
          ServiceUtil.getResource() breaks the parsing
          Note: no occurrences of ServiceUtil.getResource() yet in FTL files, and only 16 in Java files.

          I also replaced script by minilang in getLabelsFromSimpleMethodFiles()

          I had to use a getResourceRegex in a new webtools.properties files. This property

          • Allow to remove this string from files when parsing with Label Manager, else it breaks
          • Moreover the string can't be in the LabelReferences.java file, to avoid side effects

          I have also increased the transaction-timeout of the screen "SearchLabels" to 600.
          Because when using the "Only Not Used Labels" option the 1st pass can be long. 10 min should plenty enough, even on old machines. Not blocking anyway, just a bad stack trace in log

          We have 5237 "Not Used Labels". I wondered if they were all real, I just checked some an indeed, they were not used.
          But there are also a huge bunch of .description. labels which certainly make sense. I'll remove them from the "Only Not Used Labels" result in another Jira I'll create

          I'll see if I can backport easily...

          Show
          jacques.le.roux Jacques Le Roux added a comment - At revision: 1759457 in trunk I simply replaced the parenthesis in ServiceUtil.getResource() by 2 spaces when parsing files with getLabelsFromJavaFiles() and getLabelsFromFtlFiles(). ServiceUtil.getResource() breaks the parsing Note: no occurrences of ServiceUtil.getResource() yet in FTL files, and only 16 in Java files. I also replaced script by minilang in getLabelsFromSimpleMethodFiles() I had to use a getResourceRegex in a new webtools.properties files. This property Allow to remove this string from files when parsing with Label Manager, else it breaks Moreover the string can't be in the LabelReferences.java file, to avoid side effects I have also increased the transaction-timeout of the screen "SearchLabels" to 600. Because when using the "Only Not Used Labels" option the 1st pass can be long. 10 min should plenty enough, even on old machines. Not blocking anyway, just a bad stack trace in log We have 5237 "Not Used Labels". I wondered if they were all real, I just checked some an indeed, they were not used. But there are also a huge bunch of .description. labels which certainly make sense. I'll remove them from the "Only Not Used Labels" result in another Jira I'll create I'll see if I can backport easily...
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          This is a pain to backport, even in R15.12, so I'll not

          BTW at r1759573 I removed webtools.properties

          Show
          jacques.le.roux Jacques Le Roux added a comment - This is a pain to backport, even in R15.12, so I'll not BTW at r1759573 I removed webtools.properties

            People

            • Assignee:
              jacques.le.roux Jacques Le Roux
              Reporter:
              jacques.le.roux Jacques Le Roux
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development