Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aether-users] Making Aether work with Apache HttpComponents 4.3.x

Hi,

I am currently trying to build Aether to assess whether an
Import-Package for org.apache.http.* broader than [4.2.1,4.3) works.

This might become important as Eclipse Mars will apparently ship with
Apache HttpComponents 4.3.x due to problems with 4.2.x in conjunction
with NTLM proxies [1]. Unfortunately, Aether 1.0 (with HC 4.2.x) doesn't
work in Eclipse Mars M3 [2]. Hence my attempt to assess whether a
version range of [4.2.1,4.4) may be acceptable as well.

Unfortunately, I am still encountering one test failure in
HttpTransporterTest.testConnectTimeout:

Said test has two catch clauses:

>         catch ( HttpHostConnectException e )
>         {
>             assertEquals( Transporter.ERROR_OTHER, transporter.classify( e ) );
>         }
>         catch ( ConnectException e )
>         {
>             assertEquals( Transporter.ERROR_OTHER, transporter.classify( e ) );
>         }

However, unlike the 4.2.x version of DefaultClientConnectionOperator,
the 4.3.x version no longer wraps its java.net.ConnectExpcetion

4.2.x DefaultClientConnectionOperator:
>             } catch (ConnectException ex) {
>                 if (last) {
>                     throw new HttpHostConnectException(target, ex);
>                 }

4.3.x DefaultClientConnectionOperator:

>             } catch (final ConnectException ex) {
>                 if (last) {
>                     throw ex;
>                 }

As far as I can tell, DefaultClientConnectionOperator is perfectly
within its rights to do that as its throws clause ("throws IOException")
is very broad and the catch clause in the test is very narrow (unlike
HttpTransporter.execute's catch clause), but I'd just like to
double-check that I'm not missing some larger point here and that it's
really the test that's in error.

Best wishes,

Andreas

[1] <https://bugs.eclipse.org/bugs/show_bug.cgi?id=422665>
[2] <https://bugs.eclipse.org/bugs/show_bug.cgi?id=450738>

-- 
Codetrails GmbH
The knowledge transfer company

Robert-Bosch-Str. 7, 64293 Darmstadt
Phone: +49-6151-276-7092
Mobile: +49-170-811-3791
http://www.codetrails.com/

Managing Director: Dr. Marcel Bruch
Handelsregister: Darmstadt HRB 91940


Back to the top