Uploaded image for project: 'PUBLIC - Liferay Faces'
  1. PUBLIC - Liferay Faces
  2. FACES-2557

Incorrect code in method append of NamespacedParameterMap class

    Details

      Description

      The code of append method generate a java.lang.ArrayIndexOutOfBoundsException because of those two lines :

      values = Arrays.copyOf(values, values.length + 1);
      values[values.length] = value;

      The correct code for this method should be :

      public String[] append(String key, String value) {

      String[] values = get(key);

      if (values == null) {
      values = new String[]

      { value }

      ;
      }
      else

      { values = Arrays.copyOf(values, values.length + 1); values[values.length - 1] = value; }

      return super.put(key, values);
      }

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package
                liferay-faces-3.2.5-ga6
                liferay-faces-4.2.5-ga6