Springsource tool suite skipping codes

谁说我不能喝 提交于 2019-12-25 08:15:07

问题


I have a very weird problem. When I try to debug a code, sts totally ignores the code. Below is my very simple code and I wondered why the values did not change, when I debugged, the lines from { to client.employmentKindOfWork ="asdasd" are not executed. It skips all and jumped right into client.save().

Client client = Client.FindById(caseInstance.clientIdClient);
if (client!=null) {
  client.clientMailAddr1="sdfsdfsf"
  client.isDelete = true
  client.employmentKindOfWork ="asdasd"
  client.save()
}

I tried the following steps:

  1. cleaning thru wizard command
  2. by clicking project then clean.
  3. Build the project few times.
  4. open and close STS.
  5. Create new workspace then Imported the project again.
  6. Adding this line in preferences?Java>je edit and default vm -XX:+UseParallelGC
  7. Refreshing the project by right click and refresh
  8. recompile thru command wizard

All of which did not work!!!

Pls. suggest anything I haven't tried that might fix this aside from updating because all my team mates have the same version I have and they are not having this prob.


回答1:


You are most likely not running the code that you think you are. Add some system.out.println statements and see if they are being reached. My guess is that they are not. Most likely, you are compiling your class files to one location, but running a stale version of them from another location.

I am assuming that this is a maven project. Make sure that in your java build path (Ctrl-I on the project), that the output folder is set to target/classes and target/test-classes.



来源:https://stackoverflow.com/questions/10784329/springsource-tool-suite-skipping-codes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!