Class StringArray

  • All Implemented Interfaces:

    public class StringArray
    extends Object
    implements Serializable
    A class that holds a string array.

    MOXy, a JSON processor, had a critical bug. It could not process multidimensional arrays. The bug was reported as "Bug 389815 - Enhancement Request - JSON specific multidimensional array support" on September 18, 2012. The PR which fixed the bug was PR 417. The PR was merged on June 14, 2019.

    Because MOXy was adopted as the default JSON processor for GrassFish 4 ("MOXy is the New Default JSON-Binding Provider in GlassFish 4"), the range of influence of the bug expanded. Developers had to avoid using multidimensional arrays when they used GlassFish.

    The PR for the bug was merged in June 2019 (about two years and five months ago as of this writing), but it is not an easy task to clean up dependencies on the old buggy MOXy implementation. We still have to avoid using multidimensional arrays.

    See Also:
    Serialized Form
    • Constructor Detail

      • StringArray

        public StringArray()
        The default constructor.
      • StringArray

        public StringArray​(String[] array)
        A constructor with the initial value of string array this instance holds.
        array - A string array.
    • Method Detail

      • getArray

        public String[] getArray()
        Get the string array this instance holds.
        The string array.
      • setArray

        public StringArray setArray​(String[] array)
        Set a string array to let this instance hold.
        array - A string array.
        this object.