src/main/java/com/sourcesense/confluence/servlets/CMISProxyServlet.java
@SuppressWarnings({"unchecked", "ToArrayCallWithZeroLengthArrayArgument"})
  private void handleStandardPost(PostMethod postMethodProxyRequest, HttpServletRequest httpServletRequest) {
    // Get the client POST data as a Map
    Map<String, String[]> mapPostParameters = (Map<String, String[]>) httpServletRequest.getParameterMap();
    // Create a List to hold the NameValuePairs to be passed to the PostMethod
    List<NameValuePair> listNameValuePairs = new ArrayList<NameValuePair>();
    // Iterate the parameter names
    for (String stringParameterName : mapPostParameters.keySet()) {
      // Iterate the values for each parameter name
      String[] stringArrayParameterValues = mapPostParameters.get(stringParameterName);
      for (String stringParamterValue : stringArrayParameterValues) {
        // Create a NameValuePair and store in list
        NameValuePair nameValuePair = new NameValuePair(stringParameterName, stringParamterValue);
        listNameValuePairs.add(nameValuePair);
      }
    }
    // Set the proxy request POST data
    postMethodProxyRequest.setRequestBody(listNameValuePairs.toArray(new NameValuePair[]{}));
  }
/**
   * Sets up the given {@link PostMethod} to send the same standard POST
   * data as was sent in the given {@link HttpServletRequest}
   *
   * @param postMethodProxyRequest The {@link PostMethod} that we are
   *                               configuring to send a standard POST request
   * @param httpServletRequest     The {@link HttpServletRequest} that contains
   *                               the POST data to be sent via the {@link PostMethod}
   */
Sets up the given  PostMethod to send the same standard POST
data as was sent in the given  HttpServletRequest

@param postMethodProxyRequest The  PostMethod that we are
configuring to send a standard POST request
@param httpServletRequest     The  HttpServletRequest that contains
the POST data to be sent via the  PostMethod
Sets up the given PostMethod to send the same standard POST data as was sent in the given HttpServletRequest @param postMethodProxyRequest The PostMethod that we are configuring to send a standard POST request @param httpServletRequest The HttpServletRequest that contains the POST data to be sent via the PostMethod
@SuppressWarnings({"unchecked", "ToArrayCallWithZeroLengthArrayArgument"})
  private void handleStandardPost(PostMethod postMethodProxyRequest, HttpServletRequest httpServletRequest) {
    Map<String, String[]> mapPostParameters = (Map<String, String[]>) httpServletRequest.getParameterMap();
    List<NameValuePair> listNameValuePairs = new ArrayList<NameValuePair>();
    for (String stringParameterName : mapPostParameters.keySet()) {
      String[] stringArrayParameterValues = mapPostParameters.get(stringParameterName);
      for (String stringParamterValue : stringArrayParameterValues) {
        NameValuePair nameValuePair = new NameValuePair(stringParameterName, stringParamterValue);
        listNameValuePairs.add(nameValuePair);
      }
    }
    postMethodProxyRequest.setRequestBody(listNameValuePairs.toArray(new NameValuePair[]{}));
  }
@ SuppressWarnings ( { "unchecked" , "ToArrayCallWithZeroLengthArrayArgument" } ) private void handleStandardPost ( PostMethod postMethodProxyRequest , HttpServletRequest httpServletRequest ) { Map < String , String [ ] > mapPostParameters = ( Map < String , String [ ] > ) httpServletRequest . getParameterMap ( ) ; List < NameValuePair > listNameValuePairs = new ArrayList < NameValuePair > ( ) ; for ( String stringParameterName : mapPostParameters . keySet ( ) ) { String [ ] stringArrayParameterValues = mapPostParameters . get ( stringParameterName ) ; for ( String stringParamterValue : stringArrayParameterValues ) { NameValuePair nameValuePair = new NameValuePair ( stringParameterName , stringParamterValue ) ; listNameValuePairs . add ( nameValuePair ) ; } } postMethodProxyRequest . setRequestBody ( listNameValuePairs . toArray ( new NameValuePair [ ] { } ) ) ; }
Sets up the given {@link PostMethod} to send the same standard POST
 data as was sent in the given {@link HttpServletRequest}
Sets up the given { @link PostMethod } to send the same standard POST data as was sent in the given { @link HttpServletRequest }
// Get the client POST data as a Map
 // Create a List to hold the NameValuePairs to be passed to the PostMethod
 // Iterate the parameter names
 // Iterate the values for each parameter name
 // Create a NameValuePair and store in list
 // Set the proxy request POST data
