some questionable code about net.liftweb.actor

35 views
Skip to first unread message

shigang zhong

unread,
Feb 5, 2018, 1:58:20 AM2/5/18
to Lift
Hi,

I found the following questionable code:

https://github.com/lift/framework/blob/master/core/actor/src/main/scala/net/liftweb/actor/LAFuture.scala#L174
def aborted_? = synchronized {satisfied}  // aborted ?

https://github.com/lift/framework/blob/master/core/actor/src/main/scala/net/liftweb/actor/LiftActor.scala#L132L136
def remove() {
     val newPrev = prev
     prev.next = next
     next.prev = prev // newPrev ?
}

Thanks.

shigang zhong

unread,
Feb 5, 2018, 2:35:08 AM2/5/18
to Lift




https://github.com/lift/framework/blob/master/core/actor/src/main/scala/net/liftweb/actor/LiftActor.scala#L132L136
def remove() {
     val newPrev = prev
     prev.next = next
     next.prev = prev // newPrev ?
}


It's right.  "val newPrev = prev" is redundant.

Antonio Salazar Cardozo

unread,
Feb 7, 2018, 12:31:33 PM2/7/18
to Lift
Whoops, sounds like some early code that didn't get cleaned up/hasn't
been exercised much.

Would you mind opening a PR for these two changes?
Thanks,
Antonio

shigang zhong

unread,
Feb 9, 2018, 12:27:41 AM2/9/18
to Lift
I have opened a PR for it.

Thanks.

在 2018年2月8日星期四 UTC+8上午1:31:33,Antonio Salazar Cardozo写道:
Reply all
Reply to author
Forward
0 new messages