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

Replace anonymous types with lambda expressions

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Implemented
    • Affects Version/s: Trunk
    • Fix Version/s: Upcoming Branch
    • Component/s: ALL COMPONENTS
    • Labels:
      None

      Description

      Generally, something like that:

      new PrivilegedAction<ClassLoader>() {
       @Override
       public ClassLoader run() {
       ClassLoader cl = null;
       try
      { cl = Thread.currentThread().getContextClassLoader(); }
      catch (SecurityException e) {
       Debug.logError(e, e.getMessage(), MODULE);
       }
       return cl;
       }
       });
      

      is replaced with

      (PrivilegedAction<ClassLoader>) () -> {
       ClassLoader cl = null;
       try
      { cl = Thread.currentThread().getContextClassLoader(); }
      catch (SecurityException e) {
       Debug.logError(e, e.getMessage(), MODULE);
       }
       return cl;
       });
      

       

        Attachments

        1. OFBIZ-11833.patch
          13 kB
          Pawan Verma
        2. OFBIZ-11833-plugins.patch
          3 kB
          Pawan Verma

          Activity

            People

            • Assignee:
              pawan Pawan Verma
              Reporter:
              pawan Pawan Verma
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: