commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: svn commit: r1436768 [1/13] - in /commons/proper/lang/trunk/src: main/java/org/apache/commons/lang3/ main/java/org/apache/commons/lang3/builder/ main/java/org/apache/commons/lang3/concurrent/ main/java/org/apache/commons/lang3/event/ main/java/org/apac...
Date Tue, 22 Jan 2013 20:35:19 GMT
I've explained my reasons (shared by some other folks) for using final on
the three different possible sites (parameter, local variable, instance
variable) so I'll not reiterate here again. The curious can search the ML.

Thank you,
G


On Tue, Jan 22, 2013 at 3:28 PM, Oliver Heger
<oliver.heger@oliver-heger.de>wrote:

> I don't want to open another can of worms, but just want to state that I
> am not in favor of all those final modifiers except when applied to member
> fields of a class.
>
> IMHO, this makes code harder to read because it only adds clutter. It also
> hides the occasions where final is really required, e.g. when accessing a
> variable from an anonymous class.
>
> Oliver
>
> Am 22.01.2013 08:07, schrieb ggregory@apache.org:
>
>> Author: ggregory
>> Date: Tue Jan 22 07:07:42 2013
>> New Revision: 1436768
>>
>> URL: http://svn.apache.org/viewvc?**rev=1436768&view=rev<http://svn.apache.org/viewvc?rev=1436768&view=rev>
>> Log:
>> Add final modifier to method parameters.
>>
>> Modified:
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/AnnotationUtils.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/ArrayUtils.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/BitField.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/BooleanUtils.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/CharEncoding.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/CharRange.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/CharSequenceUtils.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/CharSet.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/CharSetUtils.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/CharUtils.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/ClassUtils.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/Conversion.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/EnumUtils.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/JavaVersion.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/LocaleUtils.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/ObjectUtils.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/RandomStringUtils.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/Range.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/SerializationException.**java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/SerializationUtils.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/StringEscapeUtils.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/StringUtils.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/SystemUtils.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/Validate.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/builder/**CompareToBuilder.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/builder/EqualsBuilder.**java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/builder/HashCodeBuilder.**java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/builder/IDKey.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/builder/**ReflectionToStringBuilder.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/builder/**StandardToStringStyle.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/builder/ToStringBuilder.**java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/builder/ToStringStyle.**java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/concurrent/**BackgroundInitializer.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/concurrent/**BasicThreadFactory.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/concurrent/**CallableBackgroundInitializer.**java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/concurrent/**ConcurrentException.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/concurrent/**ConcurrentRuntimeException.**java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/concurrent/**ConcurrentUtils.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/concurrent/**ConstantInitializer.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/concurrent/**MultiBackgroundInitializer.**java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/concurrent/**TimedSemaphore.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/event/**EventListenerSupport.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/event/EventUtils.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/exception/**ContextedException.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/exception/**ContextedRuntimeException.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/exception/**DefaultExceptionContext.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/exception/**ExceptionUtils.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/math/Fraction.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/math/IEEE754rUtils.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/math/NumberUtils.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/mutable/MutableBoolean.**java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/mutable/MutableByte.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/mutable/MutableDouble.**java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/mutable/MutableFloat.**java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/mutable/MutableInt.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/mutable/MutableLong.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/mutable/MutableObject.**java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/mutable/MutableShort.**java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/reflect/**ConstructorUtils.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/reflect/FieldUtils.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/reflect/MemberUtils.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/reflect/MethodUtils.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/reflect/TypeUtils.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/text/CompositeFormat.**java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/text/**ExtendedMessageFormat.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/text/FormattableUtils.**java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/text/StrBuilder.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/text/StrLookup.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/text/StrMatcher.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/text/StrSubstitutor.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/text/StrTokenizer.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/text/WordUtils.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/text/translate/**AggregateTranslator.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/text/translate/**CharSequenceTranslator.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/text/translate/**CodePointTranslator.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/text/translate/**EntityArrays.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/text/translate/**JavaUnicodeEscaper.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/text/translate/**LookupTranslator.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/text/translate/**NumericEntityEscaper.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/text/translate/**NumericEntityUnescaper.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/text/translate/**OctalUnescaper.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/text/translate/**UnicodeEscaper.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/text/translate/**UnicodeUnescaper.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/time/DateFormatUtils.**java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/time/DateUtils.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/time/**DurationFormatUtils.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/time/FastDateFormat.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/time/FastDateParser.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/time/FastDatePrinter.**java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/time/FormatCache.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/tuple/ImmutablePair.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/tuple/ImmutableTriple.**java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/tuple/MutablePair.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/tuple/MutableTriple.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/tuple/Pair.java
>>      commons/proper/lang/trunk/src/**main/java/org/apache/commons/**
>> lang3/tuple/Triple.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/AnnotationUtilsTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/ArrayUtilsTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/CharEncodingTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/CharUtilsPerfRun.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/ClassUtilsTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/ConversionTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/EnumUtilsTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/HashSetvBitSetTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/LocaleUtilsTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/ObjectUtilsTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/RandomStringUtilsTest.**java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/RangeTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/SerializationUtilsTest.**java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/StringEscapeUtilsTest.**java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/**StringUtilsEqualsIndexOfTest.**java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/StringUtilsTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/builder/**CompareToBuilderTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/builder/**EqualsBuilderTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/builder/**HashCodeBuilderAndEqualsBuilde**rTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/builder/**HashCodeBuilderTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/builder/**ReflectionToStringBuilderConcu**rrencyTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/builder/**ReflectionToStringBuilderExclu**deTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/builder/**ReflectionToStringBuilderMutat**
>> eInspectConcurrencyTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/builder/**ToStringBuilderTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/builder/**ToStringStyleConcurrencyTest.**java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/concurrent/**BackgroundInitializerTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/concurrent/**BasicThreadFactoryTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/concurrent/**ConstantInitializerTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/concurrent/**MultiBackgroundInitializerTest**.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/concurrent/**TimedSemaphoreTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/event/**EventListenerSupportTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/event/EventUtilsTest.**java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/exception/**ExceptionUtilsTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/math/NumberUtilsTest.**java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/reflect/**ConstructorUtilsTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/reflect/MethodUtilsTest.**java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/reflect/TypeUtilsTest.**java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/text/**CompositeFormatTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/text/**ExtendedMessageFormatTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/text/**StrBuilderAppendInsertTest.**java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/text/StrBuilderTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/text/StrSubstitutorTest.**java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/text/StrTokenizerTest.**java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/time/**DateUtilsRoundingTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/time/DateUtilsTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/time/**DurationFormatUtilsTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/time/FastDateFormatTest.**java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/time/FastDateFormat_**ParserTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/time/FastDateFormat_**PrinterTest.java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/time/FastDateParserTest.**java
>>      commons/proper/lang/trunk/src/**test/java/org/apache/commons/**
>> lang3/time/**FastDatePrinterTest.java
>>
>
> [snip]
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: dev-unsubscribe@commons.**apache.org<dev-unsubscribe@commons.apache.org>
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message