[
https://issues.apache.org/jira/browse/HTTPCLIENT-866?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13065047#comment-13065047
]
David Smiley edited comment on HTTPCLIENT-866 at 7/14/11 4:46 AM:
------------------------------------------------------------------
Hi folks. I realize this is an closed issue, but I discovered that these
annotations are made available independently as CLASS level runtime retention
here:
http://www.jarvana.com/jarvana/view/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar!/javax/annotation/concurrent/GuardedBy.java?format=ok
Wouldn't it make sense to remove HttpComponents' internal copies of these
classes, which was a work-around, and instead depend on this JAR?
was (Author: dsmiley):
Hi folks. I realize this is an closed issue, but I discovered that these
annotations are made available independently as CLASS level runtime retention
here:
http://www.jarvana.com/jarvana/view/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar!/javax/annotation/concurrent/GuardedBy.java?format=ok
Wouldn't it make sense to remove HttoComponents' internal copies of these
classes, which was a work-around, and instead depend on this JAR?
> HttpClient depends on jcip-annotations.jar
> ------------------------------------------
>
> Key: HTTPCLIENT-866
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-866
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Affects Versions: 4.0 Final
> Environment: javac 1.5.0_19
> Reporter: David Nault
> Priority: Critical
> Fix For: 4.1 Alpha1
>
> Attachments: HTTPCLIENT-866.patch
>
>
> When using Java 5 to compile code that uses HttpClient, jcip-annotations.jar
> must be in the classpath or else you get a compiler error:
> [javac] /path/to/src/SomeFile.java:129: cannot access
> net.jcip.annotations.GuardedBy
> [javac] file net/jcip/annotations/GuardedBy.class not found
> [javac] DefaultHttpClient httpclient = new DefaultHttpClient();
> [javac] ^
> With Java 6, you get a bunch of warnings instead.
> [javac]
> org/apache/http/impl/client/AbstractHttpClient.class(org/apache/http/impl/client:AbstractHttpClient.class):
> warning: Cannot find annotation method 'value()' in type
> 'net.jcip.annotations.GuardedBy': class file for
> net.jcip.annotations.GuardedBy not found
> This requirement doesn't seem to be documented anywhere, and
> jcip-annotations.jar is not included in the
> "httpcomponents-client-4.0-bin-with-dependencies" package.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]