Framework build compatible with JDK 9 (tests running against java.base module)

Issue: SPR-13344
This commit is contained in:
Juergen Hoeller
2016-07-19 19:37:34 +02:00
parent d07381e862
commit 88fcd0a2ed
11 changed files with 233 additions and 238 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,8 +19,8 @@ package org.springframework.aop.framework.adapter;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.lang.reflect.Method;
import java.rmi.ConnectException;
import java.rmi.RemoteException;
import javax.transaction.TransactionRolledbackException;
import org.aopalliance.intercept.MethodInvocation;
import org.junit.Test;
@@ -35,9 +35,9 @@ import static org.mockito.BDDMockito.*;
* @author Rod Johnson
* @author Chris Beams
*/
public final class ThrowsAdviceInterceptorTests {
public class ThrowsAdviceInterceptorTests {
@Test(expected=IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class)
public void testNoHandlerMethods() {
// should require one handler method at least
new ThrowsAdviceInterceptor(new Object());
@@ -97,7 +97,7 @@ public final class ThrowsAdviceInterceptorTests {
MyThrowsHandler th = new MyThrowsHandler();
ThrowsAdviceInterceptor ti = new ThrowsAdviceInterceptor(th);
// Extends RemoteException
TransactionRolledbackException ex = new TransactionRolledbackException();
ConnectException ex = new ConnectException("");
MethodInvocation mi = mock(MethodInvocation.class);
given(mi.proceed()).willThrow(ex);
try {
@@ -126,7 +126,7 @@ public final class ThrowsAdviceInterceptorTests {
ThrowsAdviceInterceptor ti = new ThrowsAdviceInterceptor(th);
// Extends RemoteException
TransactionRolledbackException ex = new TransactionRolledbackException();
ConnectException ex = new ConnectException("");
MethodInvocation mi = mock(MethodInvocation.class);
given(mi.proceed()).willThrow(ex);
try {