Sorry, I misspelt in sentense about EmptyBox in my previous message. I was trying to say that in turn, it has Empty, Failrue and ParamFailrue subclasses.
Vladimir 2011/7/28 Vladimir Ivanov <[email protected]> > Hi Jack! > > That's because UserAuth.find method returns Box[User]. Box has two > subclasses Full and EmptyBox. EmptyBox in has Empty, Failrue and > ParamFailrue. Pattern matching clause below checks only two cases Full and > Empty - that is why (more correctly due to EmptyBox is marked as sealed) > compiler issues warnings that not all combinations have been covered. But at > the moment actual Lift's Mapper code returns only two possible results - > Full and Empty, you can check it by yourself: > > def find(by: QueryParam[A]*): Box[A] = > findDb(dbDefaultConnectionIdentifier, by :_*) > > def findDb(dbId: ConnectionIdentifier, by: QueryParam[A]*): Box[A] = > findDb(dbId, mappedFields, by :_*) > > def findDb(dbId: ConnectionIdentifier, fields: Seq[SelectableField], > by: QueryParam[A]*): Box[A] = { > DB.use(dbId) { > conn => > > val (query, start, max, bl) = buildSelectString(fields, conn, by :_*) > DB.prepareStatement(query, conn) { > st => > setStatementFields(st, bl, 1, conn) > DB.exec(st) { > rs => > val mi = buildMapper(rs) > if (rs.next) Full(createInstance(dbId, rs, mi)) > else Empty > } > > } > } > } > > It's possible to add @unchecked annotation to supress warnings for this > case if it disturbs you or, even better, to cover all possible combinations > in pattern matching clauses (through all code base as low priority task). > Another way is to interpret Box as a collection and map/filter/foreach > through it were possible. > > Vladimir > > 2011/7/28 Jack Park <[email protected]> > >> While compiling the release, I got this (not sure what it means): >> [WARNING] C:\projects\SCALA-Projects\**ESME\svx1.3\server\src\main\** >> scala\org\apache\esme\model\**UserAuth.scala:468: warning: match is not >> exhaustive! >> [WARNING] missing combination Failure >> [WARNING] missing combination ParamFailure >> [WARNING] >> [WARNING] user <- UserAuth.find(By(UserAuth.** >> authKey,name), >> [WARNING] ^ >> [WARNING] warning: there were unchecked warnings; re-run with-unchecked >> for details >> >> I notice that, unlike 1.2, in 1.3, tags do not appear to be displayed. >> >> Jack >> >> >> On 7/28/2011 12:52 AM, Ethan Jewett wrote: >> >>> Hi Dick, >>> >>> Ok, that sounds perfect. I'll go through some testing tomorrow morning. >>> >>> Cheers, >>> Ethan >>> >>> On Thu, Jul 28, 2011 at 9:23 AM, Richard Hirsch<[email protected]> >>> wrote: >>> >>>> @Ethan I was going to close the vote tomorrow. So go ahead and test it. >>>> >>>> Ill be leaving on vacation on Saturday and I wanted to put the new >>>> release in the download area tomorrow afternoon. >>>> >>>> D. >>>> >>>> On Thu, Jul 28, 2011 at 9:16 AM, Ethan Jewett<[email protected]> >>>> wrote: >>>> >>>>> Unfortunately I haven't been able to test this release candidate at >>>>> all. If we want to keep the vote open a bit longer, I should be able >>>>> to do some basic testing tomorrow. Otherwise, go for it! >>>>> >>>>> Thanks, >>>>> Ethan >>>>> >>>>> On Mon, Jul 25, 2011 at 7:02 PM, Vladimir Ivanov<[email protected]> >>>>> wrote: >>>>> >>>>>> My two cents: +1 >>>>>> >>>>>> Vladimir >>>>>> >>>>>> 2011/7/25 Richard Hirsch<[email protected]> >>>>>> >>>>>> Hi, >>>>>>> >>>>>>> I have posted our candidate for the 1.3 release for Apache ESME. >>>>>>> >>>>>>> The candidate can be found at >>>>>>> http://people.apache.org/~**rhirsch/esme/<http://people.apache.org/~rhirsch/esme/> >>>>>>> >>>>>>> See the CHANGES.txt file for details on release contents. >>>>>>> >>>>>>> The release candidate is a tar archive of the sources in >>>>>>> http://svn.apache.org/repos/**asf/esme/tags/apache-esme-1.**3RC1/<http://svn.apache.org/repos/asf/esme/tags/apache-esme-1.3RC1/> >>>>>>> >>>>>>> The MD5 checksum of the apache-esme-1.3.src.tar.gz release package is >>>>>>> 9B FF 83 5D 1E 1C D6 BD 22 9A C9 6C 3D C5 4D 37 >>>>>>> >>>>>>> Please vote on releasing this package as Apache ESME 1.3. >>>>>>> >>>>>>> The vote is open for the next 72 hours and passes if >>>>>>> a majority of at least three +1 ESME PMC votes is reached. >>>>>>> >>>>>>> [ ] +1 Release this package as Apache ESME 1.3 >>>>>>> [ ] -1 Do not release this package because... >>>>>>> >>>>>>> Here's my +1. >>>>>>> >>>>>>> Dick >>>>>>> Apache ESME Chair >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Best Regards, >>>>>> Vladimir Ivanov >>>>>> >>>>>> >>>>> >>>> > > > -- > Best Regards, > Vladimir Ivanov > -- Best Regards, Vladimir Ivanov
