Print

Print


Commit in lcsim/src/org/lcsim/job on MAIN
JobControlManager.java+2-21.51 -> 1.52
When parsing setter methods only replace the first set, otherwise methods with another "set" in the name will be broken

lcsim/src/org/lcsim/job
JobControlManager.java 1.51 -> 1.52
diff -u -r1.51 -r1.52
--- JobControlManager.java	1 Apr 2011 22:32:02 -0000	1.51
+++ JobControlManager.java	14 Apr 2011 05:05:07 -0000	1.52
@@ -79,7 +79,7 @@
  * which it should be discarded.  If the {@link #run()} method is called twice on 
  * the same manager, a fatal exception will be thrown.
  *   
- * @version $Id: JobControlManager.java,v 1.51 2011/04/01 22:32:02 jeremy Exp $
+ * @version $Id: JobControlManager.java,v 1.52 2011/04/14 05:05:07 grefe Exp $
  * @author Jeremy McCormick
  */
 public class JobControlManager
@@ -770,7 +770,7 @@
                 List<Method> methodCandidates = new ArrayList<Method>();
                 for (Method method : methods)
                 {                                  
-                    String propHack = method.getName().replace("set", "");
+                    String propHack = method.getName().replaceFirst("set", "");
                     propHack = propHack.substring(0, 1).toLowerCase() + propHack.substring(1);
                     if (propHack.equals(pname))
                     {
CVSspam 0.2.8