Thread: [Fb-contrib-commit] SF.net SVN: fb-contrib: [408] trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/uti
Brought to you by:
dbrosius
From: <dbr...@us...> - 2006-04-07 13:57:39
|
Revision: 408 Author: dbrosius Date: 2006-04-07 06:57:31 -0700 (Fri, 07 Apr 2006) ViewCVS: http://svn.sourceforge.net/fb-contrib/?rev=408&view=rev Log Message: ----------- if getting the bytecode set fails for some reason, return a set of all opcodes Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/utils/VersionTransition.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/utils/VersionTransition.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/utils/VersionTransition.java 2006-04-07 13:53:12 UTC (rev 407) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/utils/VersionTransition.java 2006-04-07 13:57:31 UTC (rev 408) @@ -28,7 +28,9 @@ gbs = ClassContext.class.getMethod("getBytecodeSet", new Class[] { Method.class }); return (BitSet)gbs.invoke(classContext, new Object[] { m }); } catch (Exception e) { - return new BitSet(); + BitSet byteCodeSet = new BitSet(); + byteCodeSet.set(0, 255, true); + return byteCodeSet; } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2006-04-07 13:59:16
|
Revision: 409 Author: dbrosius Date: 2006-04-07 06:58:31 -0700 (Fri, 07 Apr 2006) ViewCVS: http://svn.sourceforge.net/fb-contrib/?rev=409&view=rev Log Message: ----------- preallocate bitset Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/utils/VersionTransition.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/utils/VersionTransition.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/utils/VersionTransition.java 2006-04-07 13:57:31 UTC (rev 408) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/utils/VersionTransition.java 2006-04-07 13:58:31 UTC (rev 409) @@ -28,7 +28,7 @@ gbs = ClassContext.class.getMethod("getBytecodeSet", new Class[] { Method.class }); return (BitSet)gbs.invoke(classContext, new Object[] { m }); } catch (Exception e) { - BitSet byteCodeSet = new BitSet(); + BitSet byteCodeSet = new BitSet(256); byteCodeSet.set(0, 255, true); return byteCodeSet; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dbr...@us...> - 2006-04-15 00:37:13
|
Revision: 447 Author: dbrosius Date: 2006-04-14 17:37:03 -0700 (Fri, 14 Apr 2006) ViewCVS: http://svn.sourceforge.net/fb-contrib/?rev=447&view=rev Log Message: ----------- add copyright Modified Paths: -------------- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/utils/VersionTransition.java Modified: trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/utils/VersionTransition.java =================================================================== --- trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/utils/VersionTransition.java 2006-04-15 00:36:31 UTC (rev 446) +++ trunk/fb-contrib/src/com/mebigfatguy/fbcontrib/utils/VersionTransition.java 2006-04-15 00:37:03 UTC (rev 447) @@ -1,11 +1,24 @@ +/* + * fb-contrib - Auxilliary detectors for Java programs + * Copyright (C) 2005-2006 Dave Brosius + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package com.mebigfatguy.fbcontrib.utils; -import java.util.BitSet; -import org.apache.bcel.classfile.Method; - -import edu.umd.cs.findbugs.ba.ClassContext; - /** * supports different versions/changes to the FindBugs.jar file, by using reflection, etc * to use different signatures. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |