Java Copy\Strip functionality throws exception when source node is only spaces (Doc ID 1027978.1)

Last updated on OCTOBER 25, 2016

Applies to:

Sun e*Gate - Version: 4.1.2 and later   [Release: 4.1 and later ]
Information in this document applies to any platform.
Sun SeeBeyond e*Gate - Version: 4.5.3 and later
***Checked for relevance on 06-03-2012***

Symptoms

When using the CollabUtils.copy method to strip trailing white space, if the inbound data field contains nothing but spaces the following error is thrown by the Java collaboration:
StackTrace:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms