> On Jan. 30, 2015, 6:44 p.m., Bill Farner wrote:
> > I was able to address these compiler errors with a more targeted change, 
> > adding a type witness:
> > ```
> > $ git diff 
> > src/test/java/org/apache/aurora/scheduler/storage/testing/StorageTestUtil.java
> > diff --git 
> > a/src/test/java/org/apache/aurora/scheduler/storage/testing/StorageTestUtil.java
> >  
> > b/src/test/java/org/apache/aurora/scheduler/storage/testing/StorageTestUtil.java
> > index d492e17..6feddc3 100644
> > --- 
> > a/src/test/java/org/apache/aurora/scheduler/storage/testing/StorageTestUtil.java
> > +++ 
> > b/src/test/java/org/apache/aurora/scheduler/storage/testing/StorageTestUtil.java
> > @@ -75,7 +75,7 @@ public class StorageTestUtil {
> >  
> >    public <T> IExpectationSetters<T> expectRead() {
> >      final Capture<Work<T, RuntimeException>> work = 
> > EasyMockTest.createCapture();
> > -    return expect(storage.read(capture(work)))
> > +    return expect(storage.<T, RuntimeException>read(capture(work)))
> >          .andAnswer(new IAnswer<T>() {
> >            @Override
> >            public T answer() {
> > @@ -86,7 +86,7 @@ public class StorageTestUtil {
> >  
> >    public <T> IExpectationSetters<T> expectWrite() {
> >      final Capture<MutateWork<T, RuntimeException>> work = 
> > EasyMockTest.createCapture();
> > -    return expect(storage.write(capture(work))).andAnswer(new IAnswer<T>() 
> > {
> > +    return expect(storage.<T, 
> > RuntimeException>write(capture(work))).andAnswer(new IAnswer<T>() {
> >        @Override
> >        public T answer() {
> >          return work.getValue().apply(mutableStoreProvider);
> > ```

Thank you, I knew there had to be a cleaner way to do this! Will send updated 
diff.


- Joshua


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30446/#review70393
-----------------------------------------------------------


On Jan. 30, 2015, 6:18 p.m., Joshua Cohen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30446/
> -----------------------------------------------------------
> 
> (Updated Jan. 30, 2015, 6:18 p.m.)
> 
> 
> Review request for Aurora, Kevin Sweeney and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Fix compile errors under Java 8.
> 
> I think this is just caused by the Java 8 compiler having better type 
> inference than Java 7?
> 
> 
> Diffs
> -----
> 
>   src/test/java/org/apache/aurora/scheduler/SchedulerLifecycleTest.java 
> 97ecb742d6e0418890f875394ded8d9fdae2b1c2 
>   src/test/java/org/apache/aurora/scheduler/TaskVarsTest.java 
> 4e7efb3c1214c3d193afd61f162713490eb8effb 
>   src/test/java/org/apache/aurora/scheduler/UserTaskLauncherTest.java 
> f96110c55011699768f17cc2d4afdc8bf7daa16c 
>   src/test/java/org/apache/aurora/scheduler/async/AsyncModuleTest.java 
> 4ed6b159afda3f118e8ae28d03fdf796cbd98149 
>   src/test/java/org/apache/aurora/scheduler/async/GcExecutorLauncherTest.java 
> 422d5a9a42310979752eb7282658316c2b772419 
>   
> src/test/java/org/apache/aurora/scheduler/async/RescheduleCalculatorImplTest.java
>  131bd826dfe47f40f3c27f29c095ed42953e316c 
>   src/test/java/org/apache/aurora/scheduler/async/TaskHistoryPrunerTest.java 
> 6eaf3ce765c8e50b6724e40848ceb9105e1ab529 
>   src/test/java/org/apache/aurora/scheduler/async/TaskTimeoutTest.java 
> 88fc172be6c24fefb6f708ce7574bbbb87082542 
>   
> src/test/java/org/apache/aurora/scheduler/async/preemptor/LiveClusterStateTest.java
>  763f8b5f3aaaa1349f291c0ede7b5d3292f6ca5b 
>   
> src/test/java/org/apache/aurora/scheduler/async/preemptor/PreemptorImplTest.java
>  4c2448ffba5c7e0f0ea59fc6484fbcdfc7df7f52 
>   
> src/test/java/org/apache/aurora/scheduler/async/preemptor/PreemptorModuleTest.java
>  020b67187a18bba64d9b562c3a6c0969fc85d469 
>   src/test/java/org/apache/aurora/scheduler/http/MnameTest.java 
> afa83f2c6f8b03fbd869c8e5c4d81b27a0cc5be5 
>   
> src/test/java/org/apache/aurora/scheduler/mesos/SchedulerDriverServiceTest.java
>  09593b15c9bd711530ddcb5508ed85b58a2ebe02 
>   src/test/java/org/apache/aurora/scheduler/sla/MetricCalculatorTest.java 
> cb98834e925793fc116814371548a30470830164 
>   src/test/java/org/apache/aurora/scheduler/storage/log/LogStorageTest.java 
> 0a5cc51967f756411ca1489d81872f863c045b6b 
>   
> src/test/java/org/apache/aurora/scheduler/storage/log/SnapshotStoreImplTest.java
>  8fc3cb865fbcd467db91f4cb828d381a02ba7595 
>   
> src/test/java/org/apache/aurora/scheduler/storage/testing/StorageTestUtil.java
>  d492e176e73cbd2b3c696fc488010db16106b36a 
> 
> Diff: https://reviews.apache.org/r/30446/diff/
> 
> 
> Testing
> -------
> 
> ./gradlew build -Pq
> 
> 
> Thanks,
> 
> Joshua Cohen
> 
>

Reply via email to