XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Trunk
    • 16.11.01
    • framework
    • None
    • Community Day 2 - 2016, OFBiz Community Day (May 2020)

    Description

      • Make class as final.
      • Add a private constructor.
      • Make the following public static variables as private
            public static final int CHAR_BUFFER_SIZE = 4096;
        
      • Make the following protected variable as private and move it and static block to top of class.
            protected static Map<String, Integer> fieldTypeMap = new HashMap<String, Integer>();
            static {
                fieldTypeMap.put("java.lang.String", 1);
                fieldTypeMap.put("String", 1);
                fieldTypeMap.put("java.sql.Timestamp", 2);
                fieldTypeMap.put("Timestamp", 2);
                fieldTypeMap.put("java.sql.Time", 3);
                fieldTypeMap.put("Time", 3);
                fieldTypeMap.put("java.sql.Date", 4);
                fieldTypeMap.put("Date", 4);
                fieldTypeMap.put("java.lang.Integer", 5);
                fieldTypeMap.put("Integer", 5);
                fieldTypeMap.put("java.lang.Long", 6);
                fieldTypeMap.put("Long", 6);
                fieldTypeMap.put("java.lang.Float", 7);
                fieldTypeMap.put("Float", 7);
                fieldTypeMap.put("java.lang.Double", 8);
                fieldTypeMap.put("Double", 8);
                fieldTypeMap.put("java.math.BigDecimal", 9);
                fieldTypeMap.put("BigDecimal", 9);
                fieldTypeMap.put("java.lang.Boolean", 10);
                fieldTypeMap.put("Boolean", 10);
        
                fieldTypeMap.put("java.lang.Object", 11);
                fieldTypeMap.put("Object", 11);
        
                fieldTypeMap.put("java.sql.Blob", 12);
                fieldTypeMap.put("Blob", 12);
                fieldTypeMap.put("byte[]", 12);
                fieldTypeMap.put("java.nio.ByteBuffer", 12);
                fieldTypeMap.put("java.nio.HeapByteBuffer", 12);
        
                fieldTypeMap.put("java.sql.Clob", 13);
                fieldTypeMap.put("Clob", 13);
        
                fieldTypeMap.put("java.util.Date", 14);
        
                // all of these treated as Collection
                fieldTypeMap.put("java.util.ArrayList", 15);
                fieldTypeMap.put("java.util.HashSet", 15);
                fieldTypeMap.put("java.util.LinkedHashSet", 15);
                fieldTypeMap.put("java.util.LinkedList", 15);
            }
        
        

      Attachments

        1. OFBIZ-7715.patch
          5 kB
          Rohit Koushal

        Activity

          People

            arunpati Arun Patidar
            rishisolankii Rishi Solanki
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: