XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • None
    • Network Server, SQL
    • None

    Description

      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.

      Attachments

        Activity

          People

            mac777 Abhinav Gupta
            bryanpendleton Bryan Pendleton
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: