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

Replace anonymous types with lambda expressions

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Implemented
    • Trunk
    • None
    • ALL COMPONENTS
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: