此代码抛出一个NullPointerException
int StrtYr = getYear(timeToDate(0));
int YrDiff = 0;
int Pyr = 0;
List <Tuple> FP_entry = selectFrom(dummy_prices).list();
for (Tuple row : FP_entry){
Pyr = row.get(dummy_prices.year);
YrDiff = Pyr - StrtYr;
if (YrDiff >= 0) {
create_FPrice_tm(YrDiff, row.get(dummy_prices.price));
}
}
&#34; dummy_prices&#34;是一个包含两个字段(int year,double price)
的数据库表&#34; FPrice_tm&#34;是动态事件的实例。它是为仿真模型定义的。