шедевры кодотворения
Apr. 7th, 2010 11:07 am(from daily wtf)
public class Destruction { public static void delete(Object object){ object = null; } }
public class Destruction { public static void delete(Object object){ object = null; } }
class Breaks { private val breakException = new BreakException /** A block from which one can exit with a `break''. */ def breakable(op: => Unit) { try { op } catch { case ex: BreakException => if (ex ne breakException) throw ex } } /* Break from dynamically closest enclosing breakable block * @note this might be different than the statically closest enclosing * block! */ def break { throw breakException } }