You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "nadir amra (JIRA)" <ax...@ws.apache.org> on 2008/07/19 01:41:31 UTC
[jira] Created: (AXISCPP-1050) generated bean constructor(),
destructor() and reset() methods not consistent
generated bean constructor(), destructor() and reset() methods not consistent
-----------------------------------------------------------------------------
Key: AXISCPP-1050
URL: https://issues.apache.org/jira/browse/AXISCPP-1050
Project: Axis-C++
Issue Type: Bug
Components: WSDL processing - Doc, WSDL processing - RPC
Reporter: nadir amra
Assignee: nadir amra
Currently. a generated constructor, destructor and reset methods looks like:
aRecord::aRecord()
{
reset();
}
aRecord::~aRecord()
{
if(__axis_deepcopy_field1)
delete field1;
}
void aRecord::reset()
{
field1 = NULL;
__axis_deepcopy_field1 = false;
}
This does not make sense. a reset method should reclaim storage if necessary. And the constructor should contain the code in what is currently reset() above. And the destructure should call reset(). So the new code would be something like the following:
aRecord::aRecord()
{
field1 = NULL;
__axis_deepcopy_field1 = false;
}
aRecord::~aRecord()
{
reset();
}
void aRecord::reset()
{
if(__axis_deepcopy_field1)
delete field1;
field1 = NULL;
__axis_deepcopy_field1 = false;
}
--
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: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org
[jira] Resolved: (AXISCPP-1050) generated bean constructor(),
destructor() and reset() methods not consistent
Posted by "nadir amra (JIRA)" <ax...@ws.apache.org>.
[ https://issues.apache.org/jira/browse/AXISCPP-1050?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
nadir amra resolved AXISCPP-1050.
---------------------------------
Resolution: Fixed
Fix Version/s: current (nightly)
Done. In addition, constructors no longer instantiate arrays automatically. User will have to set it. There was no reason to instantiate due to my updating the serializer so that passing a null array pointer will work (i.e. size of 0). Not instantiating also helped resolved serializing array elements that are member of a 'choice' group. Before, there was no way to detect which array element was to be chosen.
Will wait to close so I can generate more test cases.
The SVN revision is 679267 (http://svn.apache.org/viewvc?view=rev&revision=679267).
> generated bean constructor(), destructor() and reset() methods not consistent
> -----------------------------------------------------------------------------
>
> Key: AXISCPP-1050
> URL: https://issues.apache.org/jira/browse/AXISCPP-1050
> Project: Axis-C++
> Issue Type: Bug
> Components: WSDL processing - Doc, WSDL processing - RPC
> Reporter: nadir amra
> Assignee: nadir amra
> Fix For: current (nightly)
>
>
> Currently. a generated constructor, destructor and reset methods looks like:
> aRecord::aRecord()
> {
> reset();
> }
> aRecord::~aRecord()
> {
> if(__axis_deepcopy_field1)
> delete field1;
> }
> void aRecord::reset()
> {
> field1 = NULL;
> __axis_deepcopy_field1 = false;
> }
> This does not make sense. a reset method should reclaim storage if necessary. And the constructor should contain the code in what is currently reset() above. And the destructure should call reset(). So the new code would be something like the following:
> aRecord::aRecord()
> {
> field1 = NULL;
> __axis_deepcopy_field1 = false;
> }
> aRecord::~aRecord()
> {
> reset();
> }
> void aRecord::reset()
> {
> if(__axis_deepcopy_field1)
> delete field1;
> field1 = NULL;
> __axis_deepcopy_field1 = false;
> }
--
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: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org