On Mon, Aug 27, 2012 at 2:53 PM, Thomas Neidhart <thomas.neidh...@gmail.com>wrote:
> On 08/27/2012 03:36 PM, Gary Gregory wrote: > > Hi All: > > > > FindBugs says the following a couple of times for UnixCrypt: > > "Vacuous bit mask operation on integer value (INT_VACUOUS_BIT_OPERATION) > > > > This is an integer bit operation (and, or, or exclusive or) that doesn't > do > > any useful work (e.g., v & 0xffffffff)." > > This makes me wonder if the whole class is correct in the first place and > > if/how/why these ops got in there. > > > > Was this translated (incorrectly) from JetSpeed's implementation? Where > the > > types (int vs longs?) in JetSpeed different? Where did JetSpeed get this > > implementation? > > I do not know the source of the JetSpeed implementation, but there are > several (slightly different) variants of this floating around in other > projects: > > > http://grepcode.com/file/repository.jboss.org/maven2/postgresql/postgresql/8.4-701.jdbc3/org/postgresql/util/UnixCrypt.java > > > http://grepcode.com/file/repo1.maven.org/maven2/org.mortbay.jetty/jetty/6.1.11/org/mortbay/jetty/security/UnixCrypt.java > > The jetty version looks the most clean one, and as it is also Apache > license, maybe we should take this one and cleanup the code a bit? > The first thing to try would be to drop in the Jetty impl (I looked at the one in the 8.1 version) and see our unit tests run unchanged (aside from the different APIs). I cannot do this today though. Feel try to try ;) Gary > > Thomas > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > For additional commands, e-mail: dev-h...@commons.apache.org > > -- E-Mail: garydgreg...@gmail.com | ggreg...@apache.org JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0 Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory