[jira] Created: (LUCENE-2733) Add private ctors to static utility classes

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (LUCENE-2733) Add private ctors to static utility classes

JIRA jira@apache.org
Add private ctors to static utility classes
-------------------------------------------

                 Key: LUCENE-2733
                 URL: https://issues.apache.org/jira/browse/LUCENE-2733
             Project: Lucene - Java
          Issue Type: Task
            Reporter: Uwe Schindler
             Fix For: 3.1, 4.0


During development in 3.x and trunk we added some new classes like IOUtils and CodecUtils that are only providing static methods, but have no ctor at all. This adds the default empty public ctor, which is wrong, the classes should never be instantiated.

We should add private dummy ctors to prevent creating instances.

--
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (LUCENE-2733) Add private ctors to static utility classes

JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/LUCENE-2733?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2733:
----------------------------------

    Priority: Minor  (was: Major)

> Add private ctors to static utility classes
> -------------------------------------------
>
>                 Key: LUCENE-2733
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2733
>             Project: Lucene - Java
>          Issue Type: Task
>            Reporter: Uwe Schindler
>            Priority: Minor
>             Fix For: 3.1, 4.0
>
>
> During development in 3.x and trunk we added some new classes like IOUtils and CodecUtils that are only providing static methods, but have no ctor at all. This adds the default empty public ctor, which is wrong, the classes should never be instantiated.
> We should add private dummy ctors to prevent creating instances.

--
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (LUCENE-2733) Add private ctors to static utility classes

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/LUCENE-2733?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2733:
----------------------------------

    Attachment: LUCENE-2733.patch

Here are some of them, I am sure, there may be more such classes (possibly outside util).

When we backport to 3.x, we should revalidate (some classes existed before, eg. BitUtil), but they are all maked as @lucene.internal, so we may remove the ctors easily.

> Add private ctors to static utility classes
> -------------------------------------------
>
>                 Key: LUCENE-2733
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2733
>             Project: Lucene - Java
>          Issue Type: Task
>            Reporter: Uwe Schindler
>            Priority: Minor
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2733.patch
>
>
> During development in 3.x and trunk we added some new classes like IOUtils and CodecUtils that are only providing static methods, but have no ctor at all. This adds the default empty public ctor, which is wrong, the classes should never be instantiated.
> We should add private dummy ctors to prevent creating instances.

--
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (LUCENE-2733) Add private ctors to static utility classes

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/LUCENE-2733?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler resolved LUCENE-2733.
-----------------------------------

    Resolution: Fixed

Committed trunk revision: 1030754
Committed 3.x revision: 1030756

> Add private ctors to static utility classes
> -------------------------------------------
>
>                 Key: LUCENE-2733
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2733
>             Project: Lucene - Java
>          Issue Type: Task
>            Reporter: Uwe Schindler
>            Priority: Minor
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2733.patch
>
>
> During development in 3.x and trunk we added some new classes like IOUtils and CodecUtils that are only providing static methods, but have no ctor at all. This adds the default empty public ctor, which is wrong, the classes should never be instantiated.
> We should add private dummy ctors to prevent creating instances.

--
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: [hidden email]
For additional commands, e-mail: [hidden email]