Agreed about deprecation.
A logged WARNing would be detected during testing as well as at run-time.

Ron
On 10/01/2018 3:34 PM, Daan Hoogland wrote:
Ron, we could but that would only log during compile-time, not on runtime. I am doing some analysis and commenting in Wido's ticket.

On Wed, Jan 10, 2018 at 9:23 PM, Ron Wheeler <rwhee...@artifact-software.com <mailto:rwhee...@artifact-software.com>> wrote:

    Is it possible to mark it as deprecated and have it log a warning
    when used?

    Ron


    On 10/01/2018 2:26 PM, Daan Hoogland wrote:

        I think we could start with giving it an explicit non standard
        name like
        CloudStackLocalStringUtils or something a little shorter.
        Making sure that
        we prefer for these types of utils to be imported from other
        projects.

        On Wed, Jan 10, 2018 at 4:26 PM, Wido den Hollander
        <w...@widodh.nl <mailto:w...@widodh.nl>> wrote:


            On 01/10/2018 01:09 PM, Rafael Weingärtner wrote:

                Instead of creating a PR for that, we could do the bit
                by bit job
                (hopefully one day we finish the job).
                Every time we see a code using ACS's StringUtils, we
                check if it can be
                replaced by Apache's one.


            Yes, but that will slip from peoples attention and we will
            probably see
            cases where people still use the old one by accident.

            I've created a issue: https://issues.apache.org/jira
            /browse/CLOUDSTACK-10225

            I also started on some low hanging fruit as some methods
            in StringUtils
            are not used or are very easy to replace.


            Wido

            On Wed, Jan 10, 2018 at 10:01 AM, Wido den Hollander
            <w...@widodh.nl <mailto:w...@widodh.nl>>

                wrote:


                    On 01/10/2018 12:01 PM, Daan Hoogland wrote:

                    I'd say remove as much functionality as we can
                    from 'our' StringUtils and

                        phase them out asap.


                        Yes, but such a PR would be invasive and would
                        be difficult to merge and

                    also break a lot of other code.

                    It's not easy since it will touch a lot, but I
                    mean, a lot of files.

                    Our StringUtils was a very good solution, but the
                    Apache one is better I
                    think.

                    Wido


                    On Wed, Jan 10, 2018 at 11:59 AM, Wido den
                    Hollander <w...@widodh.nl <mailto:w...@widodh.nl>>

                        wrote:

                        Hi,

                            We have com.cloud.utils.StringUtils which
                            has a few nice functions, but
                            throughout the code I also see
                            org.apache.commons.lang.StringUtils

                            They both provide about the same
                            functionality, but which one do we
                            prefer?

                            I'd say
                            org.apache.commons.lang.StringUtils as
                            that allows us to
                            remove
                            our own StringUtils, but we could also
                            have 'our' StringUtils simply
                            be a
                            wrapper around
                            org.apache.commons.lang.StringUtils

                            Opinions?

                            Wido








-- Ron Wheeler
    President
    Artifact Software Inc
    email: rwhee...@artifact-software.com
    <mailto:rwhee...@artifact-software.com>
    skype: ronaldmwheeler
    phone: 866-970-2435, ext 102




--
Daan


--
Ron Wheeler
President
Artifact Software Inc
email: rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102

Reply via email to