Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: Fixing "typos" in enums... Date: Mon, 18 Nov 2013 13:37:01 -0500 Organization: A noiseless patient Spider Lines: 21 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 18 Nov 2013 18:37:01 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="858a9d65d95f4ea4d355bd116aa2cdbf"; logging-data="15716"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX192ITA1W/YmmaYhUIhdFj8S" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 In-Reply-To: Cancel-Lock: sha1:KmEvvEXJhK5iTCjFShXUAzW1rBI= Xref: csiph.com comp.lang.java.programmer:26540 On 11/18/2013 12:33 PM, markspace wrote: > On 11/18/2013 9:20 AM, Andreas Leitgeb wrote: >> markspace wrote: >>> On 11/15/2013 8:25 AM, Andreas Leitgeb wrote: >>>> @Deprecated public enum Foo { FURST, SECOND } >>>> public enum Fooing { FIRST, SECOND } >> >> This solution would require duplicating lots of other >> code, like methods taking that enum as parameter... > > So you change the old method to a new method that takes the new type. > It's called refactoring. You don't duplicate methods, that's dumb. If you change the method signatures, haven't you already given up on backwards compatibility? And if you're willing to sacrifice compatibility, why not just fix the damn' typo and break for lunch? -- Eric Sosman esosman@comcast-dot-net.invalid