4
我有一个问题,因为文件名的长度,因此编译器给我的Scala的类中倒闭的一个,使用Scala的2.9.2斯卡拉闭包文件名
CurrencyInitializer $$ anonfun $ COM $ gottex $ gottware $服务器$启动$初始化$ impl $货币$ CurrencyInitializer $$ updateDepositEquivalentBonds $ 1.class
我有这个文件名的问题是,我上传一个文件夹包含所有我编译的类通过SSH服务器通过SSH gui和这失败。
private def updateDepositEquivalentBonds(currency: Currency) {
val depositEquivalentBonds = gottwareDataSource.space.readAllWithCurrency(classOf[DepositEquivalentBondImpl], currency)
for (depositEquivalentBond <- depositEquivalentBonds) depositEquivalentBond.updateFromDeposit(gottwareDataSource.space)
if (depositEquivalentBonds.length > 0) {
gottwareDataSource.space.writeMultiple(depositEquivalentBonds, Lease.FOREVER,
UpdateModifiers.UPDATE_OR_WRITE | UpdateModifiers.NO_RETURN_VALUE)
gottwareDataSource.space.writeMultiple(AskBidSpread.newInstances(depositEquivalentBonds.toArray[SecurityImpl]), Lease.FOREVER, UpdateModifiers.UPDATE_OR_WRITE | UpdateModifiers
.NO_RETURN_VALUE)
}
}
令人惊讶的是,这是产生长文件名的代码。有什么我可以做的编译器,以防止这种情况发生?
你真的需要上传一个.class文件? .jar文件不会吗? – jpalecek 2013-03-20 13:10:31
无法控制编译器如何为函数文字等内容生成内部类名称。 (请记住,所有闭包都是函数文字,但并非所有函数文字都是闭包,术语很重要......虽然不是针对这个特殊问题......) – 2013-03-20 15:14:33