You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Johan Stuyts (JIRA)" <ji...@apache.org> on 2008/05/19 17:37:55 UTC

[jira] Created: (THRIFT-15) Name of struct 'constants' clashes with class name used for constants

Name of struct 'constants' clashes with class name used for constants
---------------------------------------------------------------------

                 Key: THRIFT-15
                 URL: https://issues.apache.org/jira/browse/THRIFT-15
             Project: Thrift
          Issue Type: Bug
          Components: Test Suite
            Reporter: Johan Stuyts
            Priority: Minor


The Thrift file {{ConstantsDemo.thrift}} In the directory {{test}} defines an enum {{constants}}. The Java file generated for this enum is {{constants.java}}. On case-insensitive filesystems this will clash with the Java file generated for constants: {{Constants.java}}.

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


[jira] Resolved: (THRIFT-15) Name of struct 'constants' clashes with class name used for constants

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

David Reiss resolved THRIFT-15.
-------------------------------

    Resolution: Fixed
      Assignee: David Reiss

I meant that if someone else made a class or enum called "constants" in production code on a case-insensitive filesystem (or if they called something "Constants"), they would run into this same problem.  But that seems unlikely, so I'll just apply this.

> Name of struct 'constants' clashes with class name used for constants
> ---------------------------------------------------------------------
>
>                 Key: THRIFT-15
>                 URL: https://issues.apache.org/jira/browse/THRIFT-15
>             Project: Thrift
>          Issue Type: Bug
>          Components: Test Suite
>            Reporter: Johan Stuyts
>            Assignee: David Reiss
>            Priority: Minor
>         Attachments: constantsEnum.patch
>
>
> The Thrift file {{ConstantsDemo.thrift}} In the directory {{test}} defines an enum {{constants}}. The Java file generated for this enum is {{constants.java}}. On case-insensitive filesystems this will clash with the Java file generated for constants: {{Constants.java}}.

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


[jira] Updated: (THRIFT-15) Name of struct 'constants' clashes with class name used for constants

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

Johan Stuyts updated THRIFT-15:
-------------------------------

    Attachment: constantsEnum.patch

This patch changes the name of enumeration {{constants}} to {{enumconstants}} to prevent a name clash with the generated class that holds constants.

As far as I could tell {{ConstantsDemo.thrift}} is not used for running tests, so the number of changes is small.

> Name of struct 'constants' clashes with class name used for constants
> ---------------------------------------------------------------------
>
>                 Key: THRIFT-15
>                 URL: https://issues.apache.org/jira/browse/THRIFT-15
>             Project: Thrift
>          Issue Type: Bug
>          Components: Test Suite
>            Reporter: Johan Stuyts
>            Priority: Minor
>         Attachments: constantsEnum.patch
>
>
> The Thrift file {{ConstantsDemo.thrift}} In the directory {{test}} defines an enum {{constants}}. The Java file generated for this enum is {{constants.java}}. On case-insensitive filesystems this will clash with the Java file generated for constants: {{Constants.java}}.

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


[jira] Assigned: (THRIFT-15) Name of struct 'constants' clashes with class name used for constants

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

David Reiss reassigned THRIFT-15:
---------------------------------

    Assignee: Johan Stuyts  (was: David Reiss)

> Name of struct 'constants' clashes with class name used for constants
> ---------------------------------------------------------------------
>
>                 Key: THRIFT-15
>                 URL: https://issues.apache.org/jira/browse/THRIFT-15
>             Project: Thrift
>          Issue Type: Bug
>          Components: Test Suite
>            Reporter: Johan Stuyts
>            Assignee: Johan Stuyts
>            Priority: Minor
>         Attachments: constantsEnum.patch
>
>
> The Thrift file {{ConstantsDemo.thrift}} In the directory {{test}} defines an enum {{constants}}. The Java file generated for this enum is {{constants.java}}. On case-insensitive filesystems this will clash with the Java file generated for constants: {{Constants.java}}.

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


[jira] Commented: (THRIFT-15) Name of struct 'constants' clashes with class name used for constants

Posted by "Johan Stuyts (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-15?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12600042#action_12600042 ] 

Johan Stuyts commented on THRIFT-15:
------------------------------------

I should have been more specific about the problem. The issue is the name of the enum, not the name of the class used to store constants. So just renaming that enum will do.

I have not looked at the implications of renaming yet, but I will. If the number of changes is small, I will make them and add a patch.

> Name of struct 'constants' clashes with class name used for constants
> ---------------------------------------------------------------------
>
>                 Key: THRIFT-15
>                 URL: https://issues.apache.org/jira/browse/THRIFT-15
>             Project: Thrift
>          Issue Type: Bug
>          Components: Test Suite
>            Reporter: Johan Stuyts
>            Priority: Minor
>
> The Thrift file {{ConstantsDemo.thrift}} In the directory {{test}} defines an enum {{constants}}. The Java file generated for this enum is {{constants.java}}. On case-insensitive filesystems this will clash with the Java file generated for constants: {{Constants.java}}.

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


[jira] Commented: (THRIFT-15) Name of struct 'constants' clashes with class name used for constants

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-15?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12599954#action_12599954 ] 

David Reiss commented on THRIFT-15:
-----------------------------------

Well, the easiest thing to do would be to rename the enum.  But do people think we should change the name of the constants package to make collisions like this less likely?  I am leaning towards "no", myself.

> Name of struct 'constants' clashes with class name used for constants
> ---------------------------------------------------------------------
>
>                 Key: THRIFT-15
>                 URL: https://issues.apache.org/jira/browse/THRIFT-15
>             Project: Thrift
>          Issue Type: Bug
>          Components: Test Suite
>            Reporter: Johan Stuyts
>            Priority: Minor
>
> The Thrift file {{ConstantsDemo.thrift}} In the directory {{test}} defines an enum {{constants}}. The Java file generated for this enum is {{constants.java}}. On case-insensitive filesystems this will clash with the Java file generated for constants: {{Constants.java}}.

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