Hi Marco,

Please be wary of how you deal with the "unused variable" warnings, simply 
commenting out the code or removing the variable declaration and assignment 
merely hides the warning instead of dealing with it properly.  I feel like 
these warnings really require a deeper investigation in order to figure out 
*why* the variable is unused, it could quite possibly be indicative of an 
actual bug or it could just be junk left over from someone not cleaning up 
their code changes properly.  

Taking the easy route of hiding the warning does nothing to clean up the code, 
it just hides the need to do so.

Thanks
Scott

HotWax Media
http://www.hotwaxmedia.com

On 5/02/2011, at 8:48 AM, [email protected] wrote:

> Author: mrisaliti
> Date: Fri Feb  4 19:48:18 2011
> New Revision: 1067267
> 
> URL: http://svn.apache.org/viewvc?rev=1067267&view=rev
> Log:
> Remove of compilation warnings of CheckOutEvents (OFBIZ-4102)
> 
> Modified:
>    
> ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java
> 
> Modified: 
> ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java
> URL: 
> http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java?rev=1067267&r1=1067266&r2=1067267&view=diff
> ==============================================================================
> --- 
> ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java
>  (original)
> +++ 
> ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java
>  Fri Feb  4 19:48:18 2011

[snip]

> @@ -263,7 +264,7 @@ public class CheckOutEvents {
>     }
> 
>     public static String setPartialCheckOutOptions(HttpServletRequest 
> request, HttpServletResponse response) {
> -        String resp = setCheckOutOptions(request, response);
> +        setCheckOutOptions(request, response);
>         request.setAttribute("_ERROR_MESSAGE_", null);
>         return "success";
>     }

[snip]

> @@ -701,8 +700,8 @@ public class CheckOutEvents {
>         String isGift = null;
>         String internalCode = null;
>         String methodType = null;
> -        String singleUsePayment = null;
> -        String appendPayment = null;
> +        // String singleUsePayment = null;
> +        // String appendPayment = null;
>         String shipBeforeDate = null;
>         String shipAfterDate = null;
>         String internalOrderNotes = null;
> @@ -865,18 +864,18 @@ public class CheckOutEvents {
>             Debug.log("Changing mode from->to: " + mode + "->payment", 
> module);
>             mode = "payment";
>         }
> -        singleUsePayment = request.getParameter("singleUsePayment");
> -        appendPayment = request.getParameter("appendPayment");
> -        boolean isSingleUsePayment = singleUsePayment != null && 
> "Y".equalsIgnoreCase(singleUsePayment) ? true : false;
> -        boolean doAppendPayment = appendPayment != null && 
> "Y".equalsIgnoreCase(appendPayment) ? true : false;
> +        // singleUsePayment = request.getParameter("singleUsePayment");
> +        // appendPayment = request.getParameter("appendPayment");
> +        // boolean isSingleUsePayment = singleUsePayment != null && 
> "Y".equalsIgnoreCase(singleUsePayment) ? true : false;
> +        // boolean doAppendPayment = appendPayment != null && 
> "Y".equalsIgnoreCase(appendPayment) ? true : false;

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to