You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by sebb <se...@gmail.com> on 2014/12/09 13:47:29 UTC

Re: svn commit: r1644011 - in /httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation: Experimental.java Obsolete.java

On 9 December 2014 at 09:41,  <ol...@apache.org> wrote:
> Author: olegk
> Date: Tue Dec  9 09:41:27 2014
> New Revision: 1644011
>
> URL: http://svn.apache.org/r1644011
> Log:
> Added @Obsolete and @Experimental annotations

Good idea, but Obsolete sounds rather like a synonym for Deprecated to me.

I wonder if it might be better to use a more specific name, e.g.

ObsoleteProtocol

> Added:
>     httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/Experimental.java   (with props)
>     httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/Obsolete.java   (with props)
>
> Added: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/Experimental.java
> URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/Experimental.java?rev=1644011&view=auto
> ==============================================================================
> --- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/Experimental.java (added)
> +++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/Experimental.java Tue Dec  9 09:41:27 2014
> @@ -0,0 +1,42 @@
> +/*
> + * ====================================================================
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements.  See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership.  The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License.  You may obtain a copy of the License at
> + *
> + *   http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied.  See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + * ====================================================================
> + *
> + * This software consists of voluntary contributions made by many
> + * individuals on behalf of the Apache Software Foundation.  For more
> + * information on the Apache Software Foundation, please see
> + * <http://www.apache.org/>.
> + *
> + */
> +package org.apache.http.annotation;
> +
> +import java.lang.annotation.Documented;
> +import java.lang.annotation.ElementType;
> +import java.lang.annotation.Retention;
> +import java.lang.annotation.RetentionPolicy;
> +import java.lang.annotation.Target;
> +
> +/**
> + * The field or method to which this annotation is applied is marked as experimental.
> + */
> +@Documented
> +@Target({ElementType.FIELD, ElementType.METHOD})
> +@Retention(RetentionPolicy.CLASS)
> +public @interface Experimental {
> +}
>
> Propchange: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/Experimental.java
> ------------------------------------------------------------------------------
>     svn:eol-style = native
>
> Propchange: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/Experimental.java
> ------------------------------------------------------------------------------
>     svn:keywords = Date Revision
>
> Propchange: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/Experimental.java
> ------------------------------------------------------------------------------
>     svn:mime-type = text/plain
>
> Added: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/Obsolete.java
> URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/Obsolete.java?rev=1644011&view=auto
> ==============================================================================
> --- httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/Obsolete.java (added)
> +++ httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/Obsolete.java Tue Dec  9 09:41:27 2014
> @@ -0,0 +1,43 @@
> +/*
> + * ====================================================================
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements.  See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership.  The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License.  You may obtain a copy of the License at
> + *
> + *   http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied.  See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + * ====================================================================
> + *
> + * This software consists of voluntary contributions made by many
> + * individuals on behalf of the Apache Software Foundation.  For more
> + * information on the Apache Software Foundation, please see
> + * <http://www.apache.org/>.
> + *
> + */
> +package org.apache.http.annotation;
> +
> +import java.lang.annotation.Documented;
> +import java.lang.annotation.ElementType;
> +import java.lang.annotation.Retention;
> +import java.lang.annotation.RetentionPolicy;
> +import java.lang.annotation.Target;
> +
> +/**
> + * The field or method to which this annotation is applied is marked as implementing
> + * requirements of the HTTP protocol or a related protocol that are now obsolete.
> + */
> +@Documented
> +@Target({ElementType.FIELD, ElementType.METHOD})
> +@Retention(RetentionPolicy.CLASS)
> +public @interface Obsolete {
> +}
>
> Propchange: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/Obsolete.java
> ------------------------------------------------------------------------------
>     svn:eol-style = native
>
> Propchange: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/Obsolete.java
> ------------------------------------------------------------------------------
>     svn:keywords = Date Revision
>
> Propchange: httpcomponents/httpcore/branches/4.4.x/httpcore/src/main/java/org/apache/http/annotation/Obsolete.java
> ------------------------------------------------------------------------------
>     svn:mime-type = text/plain
>
>

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


Re: svn commit: r1644011

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Tue, 2014-12-09 at 12:47 +0000, sebb wrote:
> On 9 December 2014 at 09:41,  <ol...@apache.org> wrote:
> > Author: olegk
> > Date: Tue Dec  9 09:41:27 2014
> > New Revision: 1644011
> >
> > URL: http://svn.apache.org/r1644011
> > Log:
> > Added @Obsolete and @Experimental annotations
> 
> Good idea, but Obsolete sounds rather like a synonym for Deprecated to me.
> 
> I wonder if it might be better to use a more specific name, e.g.
> 
> ObsoleteProtocol
> 

It is in a way a synonym for Deprecated that does not cause compile
warnings. I am currently working on RFC 6265 compliant cookie spec
implementation(s) that render RFC 2109 / RFC 2965 compatible ones
obsolete. I would like to discourage their use without explicitly making
them deprecated (which may suggest their are no longer adequately
maintained) while still keeping them around for compatibility reasons.

Feel free to rename Obsolete to something more appropriate.

Oleg


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