tristaZero commented on a change in pull request #12588:
URL: https://github.com/apache/shardingsphere/pull/12588#discussion_r712020211



##########
File path: 
shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/adapter/invocation/JdbcMethodInvocationTest.java
##########
@@ -29,7 +29,22 @@ public void assertInvokeSuccess() throws 
NoSuchMethodException {
     
     @Test(expected = IllegalAccessException.class)
     public void assertInvokeFailure() throws NoSuchMethodException {
-        JdbcMethodInvocation actual = new 
JdbcMethodInvocation(String.class.getDeclaredMethod("indexOfSupplementary", 
int.class, int.class), new Object[] {1, 1});
+        JdbcMethodInvocation actual;
+
+        if (isJDK8OrEarlier()) {
+            actual = new 
JdbcMethodInvocation(String.class.getDeclaredMethod("indexOfSupplementary", 
int.class, int.class), new Object[] {1, 1});
+        } else {
+            actual = new 
JdbcMethodInvocation(String.class.getDeclaredMethod("value"), new Object[] {});
+        }
         actual.invoke("");
     }
+
+    private boolean isJDK8OrEarlier() {
+        String version = System.getProperty("java.specification.version");
+        if (version.startsWith("1.")) {
+            version = version.substring(2);
+        }
+

Review comment:
       Same with the last comment. Thanks.

##########
File path: 
shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/adapter/invocation/JdbcMethodInvocationTest.java
##########
@@ -29,7 +29,22 @@ public void assertInvokeSuccess() throws 
NoSuchMethodException {
     
     @Test(expected = IllegalAccessException.class)
     public void assertInvokeFailure() throws NoSuchMethodException {
-        JdbcMethodInvocation actual = new 
JdbcMethodInvocation(String.class.getDeclaredMethod("indexOfSupplementary", 
int.class, int.class), new Object[] {1, 1});
+        JdbcMethodInvocation actual;
+

Review comment:
       Could you remove this redundant blank line?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to