persistence@glassfish.java.net

Re: Strings duplications in TopLink code

From: Tom Ware <tom.ware_at_oracle.com>
Date: Tue, 14 Mar 2006 11:38:28 -0500

Hi Marina,

  Thanks for pointing this issue out. If it is ok with you, we'll make
the change here. The hint-related constants will now be on:
oracle.toplink.essentials.ejb.cmp3.EJBQuery

Thanks again,
-Tom


Marina Vatkina wrote:

>Tom,
>
>While trying to fix the issue 327
>(https://glassfish.dev.java.net/issues/show_bug.cgi?id=327)
>I saw that some strings are defined in 2 classes, and used
>directly in the 3rd. For example:
>
>- In EJBQueryImpl: as the string itself, e.g.
> if (hintName.equals("cacheUsage"))
>
>- In EntityMappingsXMLWriter as
> private static final String CACHE_USAGE = "cacheUsage";
>
>- In XMLConstants as
> static final String CACHE_USAGE
>
>Do you see any problems with combining such cases into a single
>place and making them public? Will XMLConstants be the right place?
>
>thanks,
>-marina
>
>
>

-- 
Tom Ware
Principal Software Engineer
Oracle Canada Inc.
Direct: (613) 783-4598
Email: tom.ware_at_oracle.com