Bryan Pendleton created DERBY-6823: -------------------------------------- Summary: Refactor uses of DB2_JCC_MAX_EXCEPTION_PARAM_LENGTH Key: DERBY-6823 URL: https://issues.apache.org/jira/browse/DERBY-6823 Project: Derby Issue Type: Sub-task Components: Network Server, SQL Reporter: Bryan Pendleton Priority: Minor
There is some duplication of code, probably historic, which leads to multiple definitions of the named constant DB2_JCC_MAX_EXCEPTION_PARAM_LENGTH: $ find . -name '*.java' -exec grep DB2_JCC_MAX_EXCEPTION_PARAM_LENGTH {} \; -print return Limits.DB2_JCC_MAX_EXCEPTION_PARAM_LENGTH; ./java/drda/org/apache/derby/impl/drda/AppRequester.java public static final int DB2_JCC_MAX_EXCEPTION_PARAM_LENGTH = 2400; ./java/engine/org/apache/derby/iapi/reference/Limits.java Types.VARCHAR, Limits.DB2_JCC_MAX_EXCEPTION_PARAM_LENGTH), ./java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java I suspect this code pre-dates the work to create the "shared" library where code shared among all Derby jar packages can reside. It seems like we should be able to refactor this code so that there is only one instance of DB2_JCC_MAX_EXCEPTION_PARAM_LENGTH, and it seems like the new MessageUtils class proposed by DERBY-6801 would be a good place for that constant to live. -- This message was sent by Atlassian JIRA (v6.3.4#6332)