General check of code to see if we have other things broken by new 2.8.0 collections semantics
Since issue #596 came up, it would be a good idea to do a general audit of the code base to find out where else we use "projection" and make sure that the new semantics fit with our assumptions.
Leave a comment
on 2010-07-29 16:32 *
By dchenbecker
Related association with ticket #596 was added
I checked through lift-base for any uses of view or projection in the 2.8.0 branches and the only place I found it is in net.liftweb.util.ClassHelpers.findClass:
Since the issue only manifests itself when we are applying functions (e.g map, flatMap, etc) this doesn't appear to be a problem.
def findClass[C <: AnyRef](name: String, where: List[String], modifiers: List[Function1[String, String]], targetType: Class[C]): Box[Class[C]] =
(for (
place <- where.view;
mod <- modifiers.view;
val fullName = place + "." + mod(name);
val ignore = List(classOf[ClassNotFoundException], classOf[ClassCastException], classOf[NoClassDefFoundError]);
klass <- tryo(ignore)(Class.forName(fullName).asSubclass(targetType).asInstanceOf[Class[C]])
) yield klass).headOption
Since the issue only manifests itself when we are applying functions (e.g map, flatMap, etc) this doesn't appear to be a problem.