Global variables like this are never a good thing.

-----Original Message-----
From: Robert J. Liguori [mailto:[email protected]]
Sent: Fri 10/15/2010 6:01 PM
To: [email protected]
Subject: CXF Version class... proposed refactoring
 

I'm looking at the Version class in org.apache.cxf.version.

I see three methods; getCompleteVersionString, getCurrentVersion and getName.

Wouldn't constant data members be more appropriate? 

For example:

  public static final String CURRENT_VERSION_NAME = "Apache CXF";
  public static final String CURRENT_VERSION_NUMBER = "2.3.0";
  public static final String CURRENT_VERSION_NAME _AND_NUMBER = "Apache CXF 
2.3.0";

Of course, an example reference would look like this:

  System.out.println("Version.CURRENT_VERSION_NAME");

Is this a good candidate for refactoring, or is there a specific reason for the 
current design that I am missing?

Thanks.

Reply via email to