Springsource工具套件跳过代码 [英] Springsource tool suite skipping codes

查看:143
本文介绍了Springsource工具套件跳过代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个非常奇怪的问题。当我尝试调试代码时,sts完全忽略了代码。
以下是我的非常简单的代码,我想知道为什么当我调试时,这些值没有改变,从 {客户端的行。 employmentKindOfWork =asdasd不执行。它跳过所有,并跳转到client.save()。

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

我尝试了以下步骤:


  1. 清理通过向导命令

  2. 通过点击项目然后清洁。


  3. 打开和关闭STS。

  4. 创建新工作区,然后重新导入项目。

  5. 添加这行在首选项?Java> je编辑和默认vm
    -XX:+ UseParallelGC

  6. 通过右键单击刷新项目刷新

  7. 重新编译通过命令向导

所有这些都不起作用!



建议我没有尝试的任何东西,可能会修复这个,除了更新,因为我所有的队友有相同的版本,我有,他们没有这个prob。

解决方案

您最有可能不运行您认为的代码。添加一些system.out.println语句,看看它们是否被到达。我的猜测是他们不是。最有可能的是,您将类文件编译到一个位置,但是从另一个位置运行它们的旧版本。



我假设这是一个maven项目。确保在您的java构建路径(项目中的Ctrl-I),输出文件夹设置为目标/类和目标/测试类。


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.

解决方案

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.

这篇关于Springsource工具套件跳过代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆