CyberSource / cybersource-sdk-java

Java SDK for CyberSource Simple Order API
Other
51 stars 84 forks source link

MerchantConfig constructor throw unresolvable ConfigException #110

Closed sporniket closed 5 years ago

sporniket commented 5 years ago

The constructor of MerchantConfig may throws ConfigException that is a package private class, thus one has to catch Exception instead of ConfigException.

The javadoc of ConfigException explains that :

Note that you do not have to catch this exception in your code as it would be the inner exception of a ClientException.

Obviously, this not the inner exception of a client exception in my case.

⇒ I believe a fix could be one of the following :

  1. either make ConfigException public
  2. OR make the MerchantConfig constructor throw a ClientException with an inner ConfigException.

non blocking issue

Workaround : catch Exception

sporniket commented 5 years ago

nevermind