Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 53146 - Change Method Parameters does not work with HttpServletRequest & HttpServletResponse args
Change Method Parameters does not work with HttpServletRequest & HttpServletR...
Status: RESOLVED DUPLICATE of bug 54652
Product: editor
Classification: Unclassified
Component: Refactoring
4.x
PC Windows ME/2000
: P3 (vote)
: 6.x
Assigned To: Ralph Ruijs
issues@java
:
Depends on:
Blocks: 65780
  Show dependency treegraph
 
Reported: 2005-01-09 20:54 UTC by Charlie Hunt
Modified: 2011-06-06 12:32 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments
Full copy of the source code (5.07 KB, text/plain)
2005-01-09 20:55 UTC, Charlie Hunt
Details
Display of Help > About > Detail information in a bmp file. (542.19 KB, application/octet-stream)
2005-01-09 20:57 UTC, Charlie Hunt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Charlie Hunt 2005-01-09 20:54:20 UTC
This is an isse I have found with NetBeans 4.1
Build 20041222-1722.

I have a method in a servlet called
dispatchToWorker(HttpServletRequest theRequest,
HttpServletResponse theResponse). As you can see,
it has two args, theRequest and theResponse. This
method is called from the servlet's
processRequest(..) method.

I wanted to refactor the dispatchToWorker() method
to change HttpServletResponse theResponse to
PrintWriter thePrintWriter. But, the Change Method
Parameters dialog will not let me change that
parameter or remove it. BTW: It also won't let me
change HttpServletRequest theRequest either.

Here's what the source looks like:

protected void 
   dispatchToWorker(HttpServletRequest theRequest,
                 HttpServletResponse theResponse)
   throws IOException {
   ....
}

protected void 
      processRequest(HttpServletRequest request, 
      HttpServletResponse response)
           throws ServletException, IOException {
 
   response.setContentType("text/html");
   dispatchToWorker(request, response);

}
Comment 1 Charlie Hunt 2005-01-09 20:55:20 UTC
Created attachment 19572 [details]
Full copy of the source code
Comment 2 Charlie Hunt 2005-01-09 20:57:05 UTC
Created attachment 19573 [details]
Display of Help > About > Detail information in a bmp file.
Comment 3 Martin Matula 2005-01-10 08:47:51 UTC
Sorry, but this is currently as designed. Change method parameters
will let you add new parameters or remove the ones that are not used
by the method. You cannot change types of parameters since the
refactoring would not know what to do with the usages of that method.
Comment 4 Charlie Hunt 2005-01-10 15:40:47 UTC
If this is the way it is currently designed, then the defect is in the
name of given to the type of refactoring. The name given to the type
of refactoring should be "Add / Remove Method Parameters", not "Change
Method Parameters".

The latter implies a sort of operation as I described in addition to
Add / Remove.

Comment 5 Charlie Hunt 2005-01-10 15:48:58 UTC
Forgot to re-open issue on last commit.
Comment 6 Martin Matula 2005-01-10 16:17:13 UTC
This is definitely not a P1. My personal opinion is that it is better
to call this feature Change Method Parameters than Add/Remove/Reorder
Method Parameters. Anyway, we will discuss this with our UI engineer.
Comment 7 Jan Becicka 2005-01-20 15:44:43 UTC
Reassigning to UI team. Rudolfe, please make a decision.
Comment 8 Jan Becicka 2005-02-14 10:11:52 UTC
This is implemented accroding to ui spec. Changing issue type to
enhancement.
Comment 9 Ralph Ruijs 2011-06-06 12:32:52 UTC

*** This bug has been marked as a duplicate of bug 54652 ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo