I'd say just eliminate all of that dead code. Also any commented code as well. We have a source control system, one can always look into the history to get that stuff. Using a field just makes it worse IMO... it'll never get removed if we do that.
-Stephen On Thu, May 7, 2015 at 11:26 AM, A. Soroka <[email protected]> wrote: > There are a goodly number of pieces (>150) of "dead code" in Jena, of the > form: > > org.apache.jena.mem.HashCommon: > > void showkeys() > { > if (false) > { > System.err.print( ">> KEYS:" ); > // some logging code > System.err.println(); > } > } > > If I understand this rightly, these are cases where we want to keep some > code "on deck" for potential use. I'd like to suggest that many of these > guys might be rewritten with a field or fields in the class, something like: > > boolean useLoggingCode = false; > > void showkeys() > { > if (useLoggingCode) > etc. > } > > This would make things a bit clearer and clean out a bunch of compiler > warnings. > > Does this sound like a good approach? Worth doing? > > --- > A. Soroka > The University of Virginia Library > >
