You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Ashutosh Chauhan (Created) (JIRA)" <ji...@apache.org> on 2011/12/15 01:05:30 UTC
[jira] [Created] (THRIFT-1465) Visibility of methods in generated
java code
Visibility of methods in generated java code
--------------------------------------------
Key: THRIFT-1465
URL: https://issues.apache.org/jira/browse/THRIFT-1465
Project: Thrift
Issue Type: Improvement
Components: Java - Compiler
Affects Versions: 0.7
Reporter: Ashutosh Chauhan
Need to resort to reflection to invoke private methods in generated java code.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (THRIFT-1465) Visibility of methods in generated
java code
Posted by "Ashutosh Chauhan (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ashutosh Chauhan updated THRIFT-1465:
-------------------------------------
Attachment: thrift-1465.patch
Here is my stab at it.
> Visibility of methods in generated java code
> --------------------------------------------
>
> Key: THRIFT-1465
> URL: https://issues.apache.org/jira/browse/THRIFT-1465
> Project: Thrift
> Issue Type: Improvement
> Components: Java - Compiler
> Affects Versions: 0.7
> Reporter: Ashutosh Chauhan
> Attachments: thrift-1465.patch
>
>
> Need to resort to reflection to invoke private methods in generated java code.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1465) Visibility of methods in generated
java code
Posted by "Ashutosh Chauhan (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13170503#comment-13170503 ]
Ashutosh Chauhan commented on THRIFT-1465:
------------------------------------------
Awesome. Thanks, Bryan!
> Visibility of methods in generated java code
> --------------------------------------------
>
> Key: THRIFT-1465
> URL: https://issues.apache.org/jira/browse/THRIFT-1465
> Project: Thrift
> Issue Type: Improvement
> Components: Java - Compiler
> Affects Versions: 0.7
> Reporter: Ashutosh Chauhan
>
> Need to resort to reflection to invoke private methods in generated java code.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1465) Visibility of methods in generated
java code
Posted by "Jake Farrell (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13172898#comment-13172898 ]
Jake Farrell commented on THRIFT-1465:
--------------------------------------
+1 for your approach Bryan, completely agree
> Visibility of methods in generated java code
> --------------------------------------------
>
> Key: THRIFT-1465
> URL: https://issues.apache.org/jira/browse/THRIFT-1465
> Project: Thrift
> Issue Type: Improvement
> Components: Java - Compiler
> Affects Versions: 0.7
> Reporter: Ashutosh Chauhan
> Attachments: thrift-1465.patch
>
>
> Need to resort to reflection to invoke private methods in generated java code.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1465) Visibility of methods in generated
java code
Posted by "Bryan Duxbury (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13172402#comment-13172402 ]
Bryan Duxbury commented on THRIFT-1465:
---------------------------------------
Are you sure that those protected methods need to become public? Also, I'd be more comfortable with an accessor method on TBaseProcessor that returns an immutable view of the processMap - we really don't want people to accidentally mess that map up by accessing it directly.
> Visibility of methods in generated java code
> --------------------------------------------
>
> Key: THRIFT-1465
> URL: https://issues.apache.org/jira/browse/THRIFT-1465
> Project: Thrift
> Issue Type: Improvement
> Components: Java - Compiler
> Affects Versions: 0.7
> Reporter: Ashutosh Chauhan
> Attachments: thrift-1465.patch
>
>
> Need to resort to reflection to invoke private methods in generated java code.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (THRIFT-1465) Visibility of methods in generated
java code
Posted by "Jake Farrell (Closed) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jake Farrell closed THRIFT-1465.
--------------------------------
Resolution: Fixed
Assignee: Ashutosh Chauhan
Thanks for updating your patch, committed
> Visibility of methods in generated java code
> --------------------------------------------
>
> Key: THRIFT-1465
> URL: https://issues.apache.org/jira/browse/THRIFT-1465
> Project: Thrift
> Issue Type: Improvement
> Components: Java - Compiler
> Affects Versions: 0.7, 0.8
> Reporter: Ashutosh Chauhan
> Assignee: Ashutosh Chauhan
> Fix For: 0.9
>
> Attachments: thrift-1465.patch, thrift-1465_1.patch
>
>
> Need to resort to reflection to invoke private methods in generated java code.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1465) Visibility of methods in generated
java code
Posted by "Bryan Duxbury (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13170390#comment-13170390 ]
Bryan Duxbury commented on THRIFT-1465:
---------------------------------------
I'd commit a patch that modified the visibility of these methods.
> Visibility of methods in generated java code
> --------------------------------------------
>
> Key: THRIFT-1465
> URL: https://issues.apache.org/jira/browse/THRIFT-1465
> Project: Thrift
> Issue Type: Improvement
> Components: Java - Compiler
> Affects Versions: 0.7
> Reporter: Ashutosh Chauhan
>
> Need to resort to reflection to invoke private methods in generated java code.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (THRIFT-1465) Visibility of methods in generated
java code
Posted by "Ashutosh Chauhan (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ashutosh Chauhan updated THRIFT-1465:
-------------------------------------
Attachment: thrift-1465_1.patch
New patch incorporating Bryan's suggestion of returning immutable view of processMap instead of directly returning it.
> Visibility of methods in generated java code
> --------------------------------------------
>
> Key: THRIFT-1465
> URL: https://issues.apache.org/jira/browse/THRIFT-1465
> Project: Thrift
> Issue Type: Improvement
> Components: Java - Compiler
> Affects Versions: 0.7
> Reporter: Ashutosh Chauhan
> Attachments: thrift-1465.patch, thrift-1465_1.patch
>
>
> Need to resort to reflection to invoke private methods in generated java code.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1465) Visibility of methods in generated
java code
Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13194456#comment-13194456 ]
Hudson commented on THRIFT-1465:
--------------------------------
Integrated in Thrift #397 (See [https://builds.apache.org/job/Thrift/397/])
Thrift-1465:Visibility of methods in generated java code
Client: java
Patch: Ashutosh Chauhan
Changes visibility of processor getProcessMap() and getEmptyArgs() methods
> Visibility of methods in generated java code
> --------------------------------------------
>
> Key: THRIFT-1465
> URL: https://issues.apache.org/jira/browse/THRIFT-1465
> Project: Thrift
> Issue Type: Improvement
> Components: Java - Compiler
> Affects Versions: 0.7, 0.8
> Reporter: Ashutosh Chauhan
> Assignee: Ashutosh Chauhan
> Fix For: 0.9
>
> Attachments: thrift-1465.patch, thrift-1465_1.patch
>
>
> Need to resort to reflection to invoke private methods in generated java code.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1465) Visibility of methods in generated
java code
Posted by "Ashutosh Chauhan (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13169835#comment-13169835 ]
Ashutosh Chauhan commented on THRIFT-1465:
------------------------------------------
I work on the Hive project and this problem came up there in context of HIVE-2616. I need to extend the Processor which was generated by thrift compiler on this idl http://svn.apache.org/repos/asf/hive/trunk/metastore/if/hive_metastore.thrift . In my extended Processor https://reviews.apache.org/r/2975/diff/#12 I want to access some of the methods (namely getProcessMap() and getEmptyArgs()) of the super class but can't because they are private. As a workaround I resorted to Reflection. Is it possible to change visibility of these methods ?
> Visibility of methods in generated java code
> --------------------------------------------
>
> Key: THRIFT-1465
> URL: https://issues.apache.org/jira/browse/THRIFT-1465
> Project: Thrift
> Issue Type: Improvement
> Components: Java - Compiler
> Affects Versions: 0.7
> Reporter: Ashutosh Chauhan
>
> Need to resort to reflection to invoke private methods in generated java code.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (THRIFT-1465) Visibility of methods in generated
java code
Posted by "Ashutosh Chauhan (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ashutosh Chauhan updated THRIFT-1465:
-------------------------------------
Fix Version/s: 0.9
Affects Version/s: 0.8
> Visibility of methods in generated java code
> --------------------------------------------
>
> Key: THRIFT-1465
> URL: https://issues.apache.org/jira/browse/THRIFT-1465
> Project: Thrift
> Issue Type: Improvement
> Components: Java - Compiler
> Affects Versions: 0.7, 0.8
> Reporter: Ashutosh Chauhan
> Fix For: 0.9
>
> Attachments: thrift-1465.patch, thrift-1465_1.patch
>
>
> Need to resort to reflection to invoke private methods in generated java code.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira