private static String [ ] getAllowedMethods ( String [ ] existingMethods ) { int listCapacity = existingMethods . length + 1 ; List < String > allowedMethods = new ArrayList <> ( listCapacity ) ; allowedMethods . addAll ( Arrays . asList ( existingMethods ) ) ; allowedMethods . add ( METHOD_PATCH ) ; return allowedMethods . toArray ( new String [ 0 ] ) ; }
Appends PATCH to the provided array .