gpt4 book ai didi

java - 关于 Hudson 中 Java 编译的问题

转载 作者:行者123 更新时间:2023-12-01 15:47:50 25 4
gpt4 key购买 nike

假设我有一个扩展 CommonDomain 类的 Transformation 类。

我创建了一个 DaoUtil 只是为了插入一个默认参数以插入。

public static void populateValuesForInsert(CommonDomain domain, Long userId)
{
java.util.Date today = new java.util.Date();
domain.setCreatedBy(userId);
domain.setCreatedDate(today);
domain.setUpdatedBy(userId);
domain.setUpdatedDate(today);
}

public class Transformation extends CommonDomain
{
//private static final long serialVersionUID = -2800564185309854734L;
private Long id;
private Long scenarioType;
private String description;
//.... get set here ...

}

public class CommonDomain implements Serializable
{

private static final long serialVersionUID = 1L;
public static final Integer DEFAULT_BASELINE_ID = 0;

public static final String DATE_FORMAT_DEFAULT = "MM/dd/yyyy";
public static final String DATE_FORMAT_WITH_TIME = "MM/dd/yyyy HH:mm:ss";
public long maxRowCount;
private String roleName;
private Date createdDate;
private Date updatedDate;
private Long createdBy;
private Long updatedBy;
//..get set here
}

当我运行 JUnit 测试时,它在本地运行得很好。然而,在 Hudson 中运行测试会导致此错误:

populateValuesForInsert(com.domain.CommonDomain,java.lang.Long) in 
com.utils.DaoUtil
cannot be applied to (com.domain.Transformation,java.lang.Long)

我在 Local 中使用 JDK 1.5.0_14,在 Hudson 中使用 JDK 1.5.0_21。

知道为什么会发生此错误吗?

最佳答案

我不知道 Hudson 的内部结构,但也许有某种缓存保存着一些类文件的旧版本。

关于java - 关于 Hudson 中 Java 编译的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6775413/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com