You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Detelin Yordanov (JIRA)" <ji...@apache.org> on 2009/07/24 15:12:15 UTC
[jira] Created: (AXIS2-4448) DefaultObjectSupplier fails to
instantiate static nested classes
DefaultObjectSupplier fails to instantiate static nested classes
----------------------------------------------------------------
Key: AXIS2-4448
URL: https://issues.apache.org/jira/browse/AXIS2-4448
Project: Axis 2.0 (Axis2)
Issue Type: Bug
Components: kernel
Affects Versions: 1.5
Reporter: Detelin Yordanov
The current DefaultObjectSupplier implementation cannot instantiate static nested classes. The problem is that it assumes that if the class to instantiate has a declaring class, it is an inner class. However, according to the Java language specification, an inner class is a nested class, which is not declared in a static context. Thus, in case the nested class is declared static, it is not required to create the parent enclosing instance.
See http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.1.3
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (AXIS2-4448) DefaultObjectSupplier fails to
instantiate static nested classes
Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-4448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Veithen reassigned AXIS2-4448:
--------------------------------------
Assignee: Andreas Veithen
> DefaultObjectSupplier fails to instantiate static nested classes
> ----------------------------------------------------------------
>
> Key: AXIS2-4448
> URL: https://issues.apache.org/jira/browse/AXIS2-4448
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.5
> Reporter: Detelin Yordanov
> Assignee: Andreas Veithen
> Attachments: DefaultObjectSupplier.diff, stacktrace.txt, StaticInnerClassService.aar
>
>
> The current DefaultObjectSupplier implementation cannot instantiate static nested classes. The problem is that it assumes that if the class to instantiate has a declaring class, it is an inner class. However, according to the Java language specification, an inner class is a nested class, which is not declared in a static context. Thus, in case the nested class is declared static, it is not required to create the parent enclosing instance (and it is not even possible, because the inner class does not have an implicit constructor with a parent instance first parameter)
> See http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.1.3
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (AXIS2-4448) DefaultObjectSupplier fails to
instantiate static nested classes
Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-4448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Detelin Yordanov updated AXIS2-4448:
------------------------------------
Attachment: DefaultObjectSupplier.diff
A patch that fixes the problem for the simple case when the nested class is declared static. The case when the nested class is not declared as static, but is declared in a static context (e.g. a static block or as a local nested class in a static method) is not very likely to happen, since Axis2 will not normally process such static declarations.
The patch is against Axis2 1.5 branch.
> DefaultObjectSupplier fails to instantiate static nested classes
> ----------------------------------------------------------------
>
> Key: AXIS2-4448
> URL: https://issues.apache.org/jira/browse/AXIS2-4448
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.5
> Reporter: Detelin Yordanov
> Attachments: DefaultObjectSupplier.diff, stacktrace.txt, StaticInnerClassService.aar
>
>
> The current DefaultObjectSupplier implementation cannot instantiate static nested classes. The problem is that it assumes that if the class to instantiate has a declaring class, it is an inner class. However, according to the Java language specification, an inner class is a nested class, which is not declared in a static context. Thus, in case the nested class is declared static, it is not required to create the parent enclosing instance (and it is not even possible, because the inner class does not have an implicit constructor with a parent instance first parameter)
> See http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.1.3
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (AXIS2-4448) DefaultObjectSupplier fails to
instantiate static nested classes
Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-4448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Detelin Yordanov updated AXIS2-4448:
------------------------------------
Description:
The current DefaultObjectSupplier implementation cannot instantiate static nested classes. The problem is that it assumes that if the class to instantiate has a declaring class, it is an inner class. However, according to the Java language specification, an inner class is a nested class, which is not declared in a static context. Thus, in case the nested class is declared static, it is not required to create the parent enclosing instance (and it is not even possible, because the inner class does not have an implicit constructor with a parent instance first parameter)
See http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.1.3
was:
The current DefaultObjectSupplier implementation cannot instantiate static nested classes. The problem is that it assumes that if the class to instantiate has a declaring class, it is an inner class. However, according to the Java language specification, an inner class is a nested class, which is not declared in a static context. Thus, in case the nested class is declared static, it is not required to create the parent enclosing instance.
See http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.1.3
> DefaultObjectSupplier fails to instantiate static nested classes
> ----------------------------------------------------------------
>
> Key: AXIS2-4448
> URL: https://issues.apache.org/jira/browse/AXIS2-4448
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.5
> Reporter: Detelin Yordanov
>
> The current DefaultObjectSupplier implementation cannot instantiate static nested classes. The problem is that it assumes that if the class to instantiate has a declaring class, it is an inner class. However, according to the Java language specification, an inner class is a nested class, which is not declared in a static context. Thus, in case the nested class is declared static, it is not required to create the parent enclosing instance (and it is not even possible, because the inner class does not have an implicit constructor with a parent instance first parameter)
> See http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.1.3
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AXIS2-4448) DefaultObjectSupplier fails to
instantiate static nested classes
Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-4448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12735406#action_12735406 ]
Andreas Veithen commented on AXIS2-4448:
----------------------------------------
Detelin,
I applied your patch. Thanks for contributing.
Regarding the documentation: I don't have a complete overview of the documentation. Can you check where in the documentation this should be added?
> DefaultObjectSupplier fails to instantiate static nested classes
> ----------------------------------------------------------------
>
> Key: AXIS2-4448
> URL: https://issues.apache.org/jira/browse/AXIS2-4448
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.5
> Reporter: Detelin Yordanov
> Assignee: Andreas Veithen
> Attachments: DefaultObjectSupplier.diff, stacktrace.txt, StaticInnerClassService.aar
>
>
> The current DefaultObjectSupplier implementation cannot instantiate static nested classes. The problem is that it assumes that if the class to instantiate has a declaring class, it is an inner class. However, according to the Java language specification, an inner class is a nested class, which is not declared in a static context. Thus, in case the nested class is declared static, it is not required to create the parent enclosing instance (and it is not even possible, because the inner class does not have an implicit constructor with a parent instance first parameter)
> See http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.1.3
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (AXIS2-4448) DefaultObjectSupplier fails to
instantiate static nested classes
Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-4448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Detelin Yordanov updated AXIS2-4448:
------------------------------------
Attachment: stacktrace.txt
StaticInnerClassService.aar
A test service and the exception that gets thrown when the service is invoked.
> DefaultObjectSupplier fails to instantiate static nested classes
> ----------------------------------------------------------------
>
> Key: AXIS2-4448
> URL: https://issues.apache.org/jira/browse/AXIS2-4448
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.5
> Reporter: Detelin Yordanov
> Attachments: stacktrace.txt, StaticInnerClassService.aar
>
>
> The current DefaultObjectSupplier implementation cannot instantiate static nested classes. The problem is that it assumes that if the class to instantiate has a declaring class, it is an inner class. However, according to the Java language specification, an inner class is a nested class, which is not declared in a static context. Thus, in case the nested class is declared static, it is not required to create the parent enclosing instance (and it is not even possible, because the inner class does not have an implicit constructor with a parent instance first parameter)
> See http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.1.3
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AXIS2-4448) DefaultObjectSupplier fails to
instantiate static nested classes
Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-4448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12735067#action_12735067 ]
Detelin Yordanov commented on AXIS2-4448:
-----------------------------------------
The nested classes support should be documented in official Axis2 documentation. Users should know which scenarios are supported by the DefaultObjectSupplier (inner classes & static nested classes), and for which they will need to implement custom ObjectSupplier.
> DefaultObjectSupplier fails to instantiate static nested classes
> ----------------------------------------------------------------
>
> Key: AXIS2-4448
> URL: https://issues.apache.org/jira/browse/AXIS2-4448
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.5
> Reporter: Detelin Yordanov
> Attachments: DefaultObjectSupplier.diff, stacktrace.txt, StaticInnerClassService.aar
>
>
> The current DefaultObjectSupplier implementation cannot instantiate static nested classes. The problem is that it assumes that if the class to instantiate has a declaring class, it is an inner class. However, according to the Java language specification, an inner class is a nested class, which is not declared in a static context. Thus, in case the nested class is declared static, it is not required to create the parent enclosing instance (and it is not even possible, because the inner class does not have an implicit constructor with a parent instance first parameter)
> See http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.1.3
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.