You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rampart-dev@ws.apache.org by "Vy Ho (JIRA)" <ji...@apache.org> on 2010/03/01 19:03:05 UTC

[jira] Created: (AXIS2-4640) WSDL2Java Generated Non-sensible Code

WSDL2Java Generated Non-sensible Code
-------------------------------------

                 Key: AXIS2-4640
                 URL: https://issues.apache.org/jira/browse/AXIS2-4640
             Project: Axis2
          Issue Type: Bug
          Components: kernel
    Affects Versions: 1.5.1
         Environment: OpenSuse 11.2, JDk 1.6.0
            Reporter: Vy Ho


Java classes that are generated from Web service Parameters (types) have non-sensible code block (please excuse me for using the term).
These happens setter methods:

Take the following example generated code:

    public void setBarcode(java.lang.String param) {
        if (param != null) {
            //update the setting tracker
            localBarcodeTracker = true;
        } else {
            localBarcodeTracker = true;
        }
        this.localBarcode = param;
    }

localBarcodeTracker is always set to true in either case.  This either is a bug, or it's redundant check.  This happens to every other property setters that I have seen so far.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Resolved: (AXIS2-4640) WSDL2Java Generated Non-sensible Code

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIS2-4640.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.6

Changed the templates to generate more optimized code.

> WSDL2Java Generated Non-sensible Code
> -------------------------------------
>
>                 Key: AXIS2-4640
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4640
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.5.1
>         Environment: OpenSuse 11.2, JDk 1.6.0
>            Reporter: Vy Ho
>            Assignee: Andreas Veithen
>            Priority: Minor
>             Fix For: 1.6
>
>
> Java classes that are generated from Web service Parameters (types) have non-sensible code block (please excuse me for using the term).
> These happens setter methods:
> Take the following example generated code:
>     public void setBarcode(java.lang.String param) {
>         if (param != null) {
>             //update the setting tracker
>             localBarcodeTracker = true;
>         } else {
>             localBarcodeTracker = true;
>         }
>         this.localBarcode = param;
>     }
> localBarcodeTracker is always set to true in either case.  This either is a bug, or it's redundant check.  This happens to every other property setters that I have seen so far.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Resolved: (AXIS2-4640) WSDL2Java Generated Non-sensible Code

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIS2-4640.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.6

Changed the templates to generate more optimized code.

> WSDL2Java Generated Non-sensible Code
> -------------------------------------
>
>                 Key: AXIS2-4640
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4640
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.5.1
>         Environment: OpenSuse 11.2, JDk 1.6.0
>            Reporter: Vy Ho
>            Assignee: Andreas Veithen
>            Priority: Minor
>             Fix For: 1.6
>
>
> Java classes that are generated from Web service Parameters (types) have non-sensible code block (please excuse me for using the term).
> These happens setter methods:
> Take the following example generated code:
>     public void setBarcode(java.lang.String param) {
>         if (param != null) {
>             //update the setting tracker
>             localBarcodeTracker = true;
>         } else {
>             localBarcodeTracker = true;
>         }
>         this.localBarcode = param;
>     }
> localBarcodeTracker is always set to true in either case.  This either is a bug, or it's redundant check.  This happens to every other property setters that I have seen so far.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Resolved: (AXIS2-4640) WSDL2Java Generated Non-sensible Code

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIS2-4640.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.6

Changed the templates to generate more optimized code.

> WSDL2Java Generated Non-sensible Code
> -------------------------------------
>
>                 Key: AXIS2-4640
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4640
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.5.1
>         Environment: OpenSuse 11.2, JDk 1.6.0
>            Reporter: Vy Ho
>            Assignee: Andreas Veithen
>            Priority: Minor
>             Fix For: 1.6
>
>
> Java classes that are generated from Web service Parameters (types) have non-sensible code block (please excuse me for using the term).
> These happens setter methods:
> Take the following example generated code:
>     public void setBarcode(java.lang.String param) {
>         if (param != null) {
>             //update the setting tracker
>             localBarcodeTracker = true;
>         } else {
>             localBarcodeTracker = true;
>         }
>         this.localBarcode = param;
>     }
> localBarcodeTracker is always set to true in either case.  This either is a bug, or it's redundant check.  This happens to every other property setters that I have seen so far.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Assigned: (AXIS2-4640) WSDL2Java Generated Non-sensible Code

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen reassigned AXIS2-4640:
--------------------------------------

    Assignee: Andreas Veithen

> WSDL2Java Generated Non-sensible Code
> -------------------------------------
>
>                 Key: AXIS2-4640
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4640
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.5.1
>         Environment: OpenSuse 11.2, JDk 1.6.0
>            Reporter: Vy Ho
>            Assignee: Andreas Veithen
>
> Java classes that are generated from Web service Parameters (types) have non-sensible code block (please excuse me for using the term).
> These happens setter methods:
> Take the following example generated code:
>     public void setBarcode(java.lang.String param) {
>         if (param != null) {
>             //update the setting tracker
>             localBarcodeTracker = true;
>         } else {
>             localBarcodeTracker = true;
>         }
>         this.localBarcode = param;
>     }
> localBarcodeTracker is always set to true in either case.  This either is a bug, or it's redundant check.  This happens to every other property setters that I have seen so far.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Commented: (AXIS2-4640) WSDL2Java Generated Non-sensible Code

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845591#action_12845591 ] 

Andreas Veithen commented on AXIS2-4640:
----------------------------------------

Added the necessary unit tests (see r923503).

> WSDL2Java Generated Non-sensible Code
> -------------------------------------
>
>                 Key: AXIS2-4640
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4640
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.5.1
>         Environment: OpenSuse 11.2, JDk 1.6.0
>            Reporter: Vy Ho
>            Assignee: Andreas Veithen
>            Priority: Minor
>
> Java classes that are generated from Web service Parameters (types) have non-sensible code block (please excuse me for using the term).
> These happens setter methods:
> Take the following example generated code:
>     public void setBarcode(java.lang.String param) {
>         if (param != null) {
>             //update the setting tracker
>             localBarcodeTracker = true;
>         } else {
>             localBarcodeTracker = true;
>         }
>         this.localBarcode = param;
>     }
> localBarcodeTracker is always set to true in either case.  This either is a bug, or it's redundant check.  This happens to every other property setters that I have seen so far.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Commented: (AXIS2-4640) WSDL2Java Generated Non-sensible Code

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845591#action_12845591 ] 

Andreas Veithen commented on AXIS2-4640:
----------------------------------------

Added the necessary unit tests (see r923503).

> WSDL2Java Generated Non-sensible Code
> -------------------------------------
>
>                 Key: AXIS2-4640
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4640
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.5.1
>         Environment: OpenSuse 11.2, JDk 1.6.0
>            Reporter: Vy Ho
>            Assignee: Andreas Veithen
>            Priority: Minor
>
> Java classes that are generated from Web service Parameters (types) have non-sensible code block (please excuse me for using the term).
> These happens setter methods:
> Take the following example generated code:
>     public void setBarcode(java.lang.String param) {
>         if (param != null) {
>             //update the setting tracker
>             localBarcodeTracker = true;
>         } else {
>             localBarcodeTracker = true;
>         }
>         this.localBarcode = param;
>     }
> localBarcodeTracker is always set to true in either case.  This either is a bug, or it's redundant check.  This happens to every other property setters that I have seen so far.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Resolved: (AXIS2-4640) WSDL2Java Generated Non-sensible Code

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIS2-4640.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.6

Changed the templates to generate more optimized code.

> WSDL2Java Generated Non-sensible Code
> -------------------------------------
>
>                 Key: AXIS2-4640
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4640
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.5.1
>         Environment: OpenSuse 11.2, JDk 1.6.0
>            Reporter: Vy Ho
>            Assignee: Andreas Veithen
>            Priority: Minor
>             Fix For: 1.6
>
>
> Java classes that are generated from Web service Parameters (types) have non-sensible code block (please excuse me for using the term).
> These happens setter methods:
> Take the following example generated code:
>     public void setBarcode(java.lang.String param) {
>         if (param != null) {
>             //update the setting tracker
>             localBarcodeTracker = true;
>         } else {
>             localBarcodeTracker = true;
>         }
>         this.localBarcode = param;
>     }
> localBarcodeTracker is always set to true in either case.  This either is a bug, or it's redundant check.  This happens to every other property setters that I have seen so far.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Updated: (AXIS2-4640) WSDL2Java Generated Non-sensible Code

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen updated AXIS2-4640:
-----------------------------------

    Priority: Minor  (was: Major)

This is not a bug. This code is generated for nillable elements. The rationale is that when setting a property for a nillable element to null, the property is still set and an element must be generated. For non nillable elements the generated code is different. Obviously the generated code is suboptimal (in both cases actually, since for non nillable elements the code could be simplified to localBarcodeTracker = param != null). However, it looks like that part of the code generator is not covered by unit tests. Before changing the generator, such unit tests should be added.

> WSDL2Java Generated Non-sensible Code
> -------------------------------------
>
>                 Key: AXIS2-4640
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4640
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.5.1
>         Environment: OpenSuse 11.2, JDk 1.6.0
>            Reporter: Vy Ho
>            Assignee: Andreas Veithen
>            Priority: Minor
>
> Java classes that are generated from Web service Parameters (types) have non-sensible code block (please excuse me for using the term).
> These happens setter methods:
> Take the following example generated code:
>     public void setBarcode(java.lang.String param) {
>         if (param != null) {
>             //update the setting tracker
>             localBarcodeTracker = true;
>         } else {
>             localBarcodeTracker = true;
>         }
>         this.localBarcode = param;
>     }
> localBarcodeTracker is always set to true in either case.  This either is a bug, or it's redundant check.  This happens to every other property setters that I have seen so far.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Assigned: (AXIS2-4640) WSDL2Java Generated Non-sensible Code

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen reassigned AXIS2-4640:
--------------------------------------

    Assignee: Andreas Veithen

> WSDL2Java Generated Non-sensible Code
> -------------------------------------
>
>                 Key: AXIS2-4640
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4640
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.5.1
>         Environment: OpenSuse 11.2, JDk 1.6.0
>            Reporter: Vy Ho
>            Assignee: Andreas Veithen
>
> Java classes that are generated from Web service Parameters (types) have non-sensible code block (please excuse me for using the term).
> These happens setter methods:
> Take the following example generated code:
>     public void setBarcode(java.lang.String param) {
>         if (param != null) {
>             //update the setting tracker
>             localBarcodeTracker = true;
>         } else {
>             localBarcodeTracker = true;
>         }
>         this.localBarcode = param;
>     }
> localBarcodeTracker is always set to true in either case.  This either is a bug, or it's redundant check.  This happens to every other property setters that I have seen so far.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Commented: (AXIS2-4640) WSDL2Java Generated Non-sensible Code

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845591#action_12845591 ] 

Andreas Veithen commented on AXIS2-4640:
----------------------------------------

Added the necessary unit tests (see r923503).

> WSDL2Java Generated Non-sensible Code
> -------------------------------------
>
>                 Key: AXIS2-4640
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4640
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.5.1
>         Environment: OpenSuse 11.2, JDk 1.6.0
>            Reporter: Vy Ho
>            Assignee: Andreas Veithen
>            Priority: Minor
>
> Java classes that are generated from Web service Parameters (types) have non-sensible code block (please excuse me for using the term).
> These happens setter methods:
> Take the following example generated code:
>     public void setBarcode(java.lang.String param) {
>         if (param != null) {
>             //update the setting tracker
>             localBarcodeTracker = true;
>         } else {
>             localBarcodeTracker = true;
>         }
>         this.localBarcode = param;
>     }
> localBarcodeTracker is always set to true in either case.  This either is a bug, or it's redundant check.  This happens to every other property setters that I have seen so far.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Updated: (AXIS2-4640) WSDL2Java Generated Non-sensible Code

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen updated AXIS2-4640:
-----------------------------------

    Priority: Minor  (was: Major)

This is not a bug. This code is generated for nillable elements. The rationale is that when setting a property for a nillable element to null, the property is still set and an element must be generated. For non nillable elements the generated code is different. Obviously the generated code is suboptimal (in both cases actually, since for non nillable elements the code could be simplified to localBarcodeTracker = param != null). However, it looks like that part of the code generator is not covered by unit tests. Before changing the generator, such unit tests should be added.

> WSDL2Java Generated Non-sensible Code
> -------------------------------------
>
>                 Key: AXIS2-4640
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4640
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.5.1
>         Environment: OpenSuse 11.2, JDk 1.6.0
>            Reporter: Vy Ho
>            Assignee: Andreas Veithen
>            Priority: Minor
>
> Java classes that are generated from Web service Parameters (types) have non-sensible code block (please excuse me for using the term).
> These happens setter methods:
> Take the following example generated code:
>     public void setBarcode(java.lang.String param) {
>         if (param != null) {
>             //update the setting tracker
>             localBarcodeTracker = true;
>         } else {
>             localBarcodeTracker = true;
>         }
>         this.localBarcode = param;
>     }
> localBarcodeTracker is always set to true in either case.  This either is a bug, or it's redundant check.  This happens to every other property setters that I have seen so far.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Assigned: (AXIS2-4640) WSDL2Java Generated Non-sensible Code

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen reassigned AXIS2-4640:
--------------------------------------

    Assignee: Andreas Veithen

> WSDL2Java Generated Non-sensible Code
> -------------------------------------
>
>                 Key: AXIS2-4640
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4640
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.5.1
>         Environment: OpenSuse 11.2, JDk 1.6.0
>            Reporter: Vy Ho
>            Assignee: Andreas Veithen
>
> Java classes that are generated from Web service Parameters (types) have non-sensible code block (please excuse me for using the term).
> These happens setter methods:
> Take the following example generated code:
>     public void setBarcode(java.lang.String param) {
>         if (param != null) {
>             //update the setting tracker
>             localBarcodeTracker = true;
>         } else {
>             localBarcodeTracker = true;
>         }
>         this.localBarcode = param;
>     }
> localBarcodeTracker is always set to true in either case.  This either is a bug, or it's redundant check.  This happens to every other property setters that I have seen so far.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Commented: (AXIS2-4640) WSDL2Java Generated Non-sensible Code

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845591#action_12845591 ] 

Andreas Veithen commented on AXIS2-4640:
----------------------------------------

Added the necessary unit tests (see r923503).

> WSDL2Java Generated Non-sensible Code
> -------------------------------------
>
>                 Key: AXIS2-4640
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4640
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.5.1
>         Environment: OpenSuse 11.2, JDk 1.6.0
>            Reporter: Vy Ho
>            Assignee: Andreas Veithen
>            Priority: Minor
>
> Java classes that are generated from Web service Parameters (types) have non-sensible code block (please excuse me for using the term).
> These happens setter methods:
> Take the following example generated code:
>     public void setBarcode(java.lang.String param) {
>         if (param != null) {
>             //update the setting tracker
>             localBarcodeTracker = true;
>         } else {
>             localBarcodeTracker = true;
>         }
>         this.localBarcode = param;
>     }
> localBarcodeTracker is always set to true in either case.  This either is a bug, or it's redundant check.  This happens to every other property setters that I have seen so far.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Assigned: (AXIS2-4640) WSDL2Java Generated Non-sensible Code

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen reassigned AXIS2-4640:
--------------------------------------

    Assignee: Andreas Veithen

> WSDL2Java Generated Non-sensible Code
> -------------------------------------
>
>                 Key: AXIS2-4640
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4640
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.5.1
>         Environment: OpenSuse 11.2, JDk 1.6.0
>            Reporter: Vy Ho
>            Assignee: Andreas Veithen
>
> Java classes that are generated from Web service Parameters (types) have non-sensible code block (please excuse me for using the term).
> These happens setter methods:
> Take the following example generated code:
>     public void setBarcode(java.lang.String param) {
>         if (param != null) {
>             //update the setting tracker
>             localBarcodeTracker = true;
>         } else {
>             localBarcodeTracker = true;
>         }
>         this.localBarcode = param;
>     }
> localBarcodeTracker is always set to true in either case.  This either is a bug, or it's redundant check.  This happens to every other property setters that I have seen so far.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Commented: (AXIS2-4640) WSDL2Java Generated Non-sensible Code

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845591#action_12845591 ] 

Andreas Veithen commented on AXIS2-4640:
----------------------------------------

Added the necessary unit tests (see r923503).

> WSDL2Java Generated Non-sensible Code
> -------------------------------------
>
>                 Key: AXIS2-4640
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4640
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.5.1
>         Environment: OpenSuse 11.2, JDk 1.6.0
>            Reporter: Vy Ho
>            Assignee: Andreas Veithen
>            Priority: Minor
>
> Java classes that are generated from Web service Parameters (types) have non-sensible code block (please excuse me for using the term).
> These happens setter methods:
> Take the following example generated code:
>     public void setBarcode(java.lang.String param) {
>         if (param != null) {
>             //update the setting tracker
>             localBarcodeTracker = true;
>         } else {
>             localBarcodeTracker = true;
>         }
>         this.localBarcode = param;
>     }
> localBarcodeTracker is always set to true in either case.  This either is a bug, or it's redundant check.  This happens to every other property setters that I have seen so far.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Assigned: (AXIS2-4640) WSDL2Java Generated Non-sensible Code

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen reassigned AXIS2-4640:
--------------------------------------

    Assignee: Andreas Veithen

> WSDL2Java Generated Non-sensible Code
> -------------------------------------
>
>                 Key: AXIS2-4640
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4640
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.5.1
>         Environment: OpenSuse 11.2, JDk 1.6.0
>            Reporter: Vy Ho
>            Assignee: Andreas Veithen
>
> Java classes that are generated from Web service Parameters (types) have non-sensible code block (please excuse me for using the term).
> These happens setter methods:
> Take the following example generated code:
>     public void setBarcode(java.lang.String param) {
>         if (param != null) {
>             //update the setting tracker
>             localBarcodeTracker = true;
>         } else {
>             localBarcodeTracker = true;
>         }
>         this.localBarcode = param;
>     }
> localBarcodeTracker is always set to true in either case.  This either is a bug, or it's redundant check.  This happens to every other property setters that I have seen so far.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Updated: (AXIS2-4640) WSDL2Java Generated Non-sensible Code

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen updated AXIS2-4640:
-----------------------------------

    Priority: Minor  (was: Major)

This is not a bug. This code is generated for nillable elements. The rationale is that when setting a property for a nillable element to null, the property is still set and an element must be generated. For non nillable elements the generated code is different. Obviously the generated code is suboptimal (in both cases actually, since for non nillable elements the code could be simplified to localBarcodeTracker = param != null). However, it looks like that part of the code generator is not covered by unit tests. Before changing the generator, such unit tests should be added.

> WSDL2Java Generated Non-sensible Code
> -------------------------------------
>
>                 Key: AXIS2-4640
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4640
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.5.1
>         Environment: OpenSuse 11.2, JDk 1.6.0
>            Reporter: Vy Ho
>            Assignee: Andreas Veithen
>            Priority: Minor
>
> Java classes that are generated from Web service Parameters (types) have non-sensible code block (please excuse me for using the term).
> These happens setter methods:
> Take the following example generated code:
>     public void setBarcode(java.lang.String param) {
>         if (param != null) {
>             //update the setting tracker
>             localBarcodeTracker = true;
>         } else {
>             localBarcodeTracker = true;
>         }
>         this.localBarcode = param;
>     }
> localBarcodeTracker is always set to true in either case.  This either is a bug, or it's redundant check.  This happens to every other property setters that I have seen so far.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Updated: (AXIS2-4640) WSDL2Java Generated Non-sensible Code

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen updated AXIS2-4640:
-----------------------------------

    Priority: Minor  (was: Major)

This is not a bug. This code is generated for nillable elements. The rationale is that when setting a property for a nillable element to null, the property is still set and an element must be generated. For non nillable elements the generated code is different. Obviously the generated code is suboptimal (in both cases actually, since for non nillable elements the code could be simplified to localBarcodeTracker = param != null). However, it looks like that part of the code generator is not covered by unit tests. Before changing the generator, such unit tests should be added.

> WSDL2Java Generated Non-sensible Code
> -------------------------------------
>
>                 Key: AXIS2-4640
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4640
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.5.1
>         Environment: OpenSuse 11.2, JDk 1.6.0
>            Reporter: Vy Ho
>            Assignee: Andreas Veithen
>            Priority: Minor
>
> Java classes that are generated from Web service Parameters (types) have non-sensible code block (please excuse me for using the term).
> These happens setter methods:
> Take the following example generated code:
>     public void setBarcode(java.lang.String param) {
>         if (param != null) {
>             //update the setting tracker
>             localBarcodeTracker = true;
>         } else {
>             localBarcodeTracker = true;
>         }
>         this.localBarcode = param;
>     }
> localBarcodeTracker is always set to true in either case.  This either is a bug, or it's redundant check.  This happens to every other property setters that I have seen so far.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Updated: (AXIS2-4640) WSDL2Java Generated Non-sensible Code

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen updated AXIS2-4640:
-----------------------------------

    Priority: Minor  (was: Major)

This is not a bug. This code is generated for nillable elements. The rationale is that when setting a property for a nillable element to null, the property is still set and an element must be generated. For non nillable elements the generated code is different. Obviously the generated code is suboptimal (in both cases actually, since for non nillable elements the code could be simplified to localBarcodeTracker = param != null). However, it looks like that part of the code generator is not covered by unit tests. Before changing the generator, such unit tests should be added.

> WSDL2Java Generated Non-sensible Code
> -------------------------------------
>
>                 Key: AXIS2-4640
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4640
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.5.1
>         Environment: OpenSuse 11.2, JDk 1.6.0
>            Reporter: Vy Ho
>            Assignee: Andreas Veithen
>            Priority: Minor
>
> Java classes that are generated from Web service Parameters (types) have non-sensible code block (please excuse me for using the term).
> These happens setter methods:
> Take the following example generated code:
>     public void setBarcode(java.lang.String param) {
>         if (param != null) {
>             //update the setting tracker
>             localBarcodeTracker = true;
>         } else {
>             localBarcodeTracker = true;
>         }
>         this.localBarcode = param;
>     }
> localBarcodeTracker is always set to true in either case.  This either is a bug, or it's redundant check.  This happens to every other property setters that I have seen so far.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Resolved: (AXIS2-4640) WSDL2Java Generated Non-sensible Code

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIS2-4640.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.6

Changed the templates to generate more optimized code.

> WSDL2Java Generated Non-sensible Code
> -------------------------------------
>
>                 Key: AXIS2-4640
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4640
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.5.1
>         Environment: OpenSuse 11.2, JDk 1.6.0
>            Reporter: Vy Ho
>            Assignee: Andreas Veithen
>            Priority: Minor
>             Fix For: 1.6
>
>
> Java classes that are generated from Web service Parameters (types) have non-sensible code block (please excuse me for using the term).
> These happens setter methods:
> Take the following example generated code:
>     public void setBarcode(java.lang.String param) {
>         if (param != null) {
>             //update the setting tracker
>             localBarcodeTracker = true;
>         } else {
>             localBarcodeTracker = true;
>         }
>         this.localBarcode = param;
>     }
> localBarcodeTracker is always set to true in either case.  This either is a bug, or it's redundant check.  This happens to every other property setters that I have seen so far.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org