hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: svn commit: r1716560
Date Thu, 26 Nov 2015 18:32:12 GMT
On 26 November 2015 at 16:57, Gary Gregory <garydgregory@gmail.com> wrote:
> On Thu, Nov 26, 2015 at 12:33 AM, Oleg Kalnichevski <olegk@apache.org>
> wrote:
>
>> Gary,
>>
>> HC 4.4 is expected to be Java 1.6 compatible. Is it really reasonable to
>> deprecate code in HC 4.4 in favor of something that does not exist in
>> Java 1.6? Now we have deprecation warnings even in our own example
>> classes without any reasonable choice of fixing them.
>
>
> Ah crud, I thought we were on Java 7 on the branch, my bad, I'll revert.
>
>
>>
>
>
>> Besides, the build now fails for me. Have you tested it locally?
>>
>
> I did not run the build indeed, this is a "classic" bug since the import
> *is* used from Javadoc, but this very old version of the plugin is not
> smart enough to see that. Maybe the current version of Checktyle is
> smarter, regardless I'll revert.

Related to this:

Please do not use import if only needed by Javadoc.
I think it's misleading to see an import that is not used in code.

It's easy enough to spell out the full name for the occasional case
where the Javadoc references something not used by the code.


> Gary
>
>
>> ---
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Building Apache HttpCore 4.4.5-SNAPSHOT
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO]
>> [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ httpcore ---
>> [INFO] Deleting /home/oleg/src/
>> apache.org/httpcomponents/httpcore/httpcore/target
>> [INFO]
>> [INFO] --- maven-checkstyle-plugin:2.9.1:checkstyle (validate) @ httpcore
>> ---
>> [INFO] Starting audit...
>> /home/oleg/src/
>> apache.org/httpcomponents/httpcore/httpcore/src/main/java/org/apache/http/Consts.java:31:8:
>> Unused import - java.nio.charset.StandardCharsets.
>> Audit done.
>>
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Reactor Summary:
>> [INFO]
>> [INFO] Apache HttpComponents Core ......................... SUCCESS [
>> 2.153 s]
>> [INFO] Apache HttpCore .................................... FAILURE [
>> 8.523 s]
>> [INFO] Apache HttpCore NIO ................................ SKIPPED
>> [INFO] Apache HttpCore OSGi bundle ........................ SKIPPED
>> [INFO] Apache HttpCore Benchmarking Tool .................. SKIPPED
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] BUILD FAILURE
>> [INFO]
>> ------------------------------------------------------------------------
>> ---
>>
>> Oleg
>>
>>
>> On Thu, 2015-11-26 at 03:58 +0000, ggregory@apache.org wrote:
>> > Author: ggregory
>> > Date: Thu Nov 26 03:58:20 2015
>> > New Revision: 1716560
>> >
>> > URL: http://svn.apache.org/viewvc?rev=1716560&view=rev
>> > Log:
>> > Javadoc as deprecated constants that now use Java 7's StandardCharsets
>> in version 5.0.
>> >
>> > Modified:
>> >
>>  httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/Consts.java
>> >
>> > Modified:
>> httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/Consts.java
>> > URL:
>> http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/Consts.java?rev=1716560&r1=1716559&r2=1716560&view=diff
>> >
>> ==============================================================================
>> > ---
>> httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/Consts.java
>> (original)
>> > +++
>> httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/Consts.java
>> Thu Nov 26 03:58:20 2015
>> > @@ -28,6 +28,7 @@
>> >  package org.apache.http;
>> >
>> >  import java.nio.charset.Charset;
>> > +import java.nio.charset.StandardCharsets;
>> >
>> >  /**
>> >   * Commons constants.
>> > @@ -39,10 +40,24 @@ public final class Consts {
>> >      public static final int CR = 13; // <US-ASCII CR, carriage return
>> (13)>
>> >      public static final int LF = 10; // <US-ASCII LF, linefeed (10)>
>> >      public static final int SP = 32; // <US-ASCII SP, space (32)>
>> > -    public static final int HT = 9;  // <US-ASCII HT, horizontal-tab
>> (9)>
>> > +    public static final int HT = 9; // <US-ASCII HT, horizontal-tab (9)>
>> >
>> > +    /**
>> > +     * @deprecated Removed in version 5.0, use {@link
>> StandardCharsets#UTF_8} instead.
>> > +     */
>> > +    @Deprecated
>> >      public static final Charset UTF_8 = Charset.forName("UTF-8");
>> > +
>> > +    /**
>> > +     * @deprecated Removed in version 5.0, use {@link
>> StandardCharsets#US_ASCII} instead.
>> > +     */
>> > +    @Deprecated
>> >      public static final Charset ASCII = Charset.forName("US-ASCII");
>> > +
>> > +    /**
>> > +     * @deprecated Removed in version 5.0, use {@link
>> StandardCharsets#ISO_8859_1} instead.
>> > +     */
>> > +    @Deprecated
>> >      public static final Charset ISO_8859_1 =
>> Charset.forName("ISO-8859-1");
>> >
>> >      private Consts() {
>> >
>> >
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
>> For additional commands, e-mail: dev-help@hc.apache.org
>>
>>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> <http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message