|
|
@ -1,5 +1,5 @@
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* Copyright 2012-2018 the original author or authors.
|
|
|
|
* Copyright 2012-2019 the original author or authors.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
@ -93,11 +93,19 @@ class NoSuchMethodFailureAnalyzer extends AbstractFailureAnalyzer<NoSuchMethodEr
|
|
|
|
List<URL> candidates, URL actual) {
|
|
|
|
List<URL> candidates, URL actual) {
|
|
|
|
StringWriter description = new StringWriter();
|
|
|
|
StringWriter description = new StringWriter();
|
|
|
|
PrintWriter writer = new PrintWriter(description);
|
|
|
|
PrintWriter writer = new PrintWriter(description);
|
|
|
|
writer.print("An attempt was made to call the method ");
|
|
|
|
writer.println("An attempt was made to call a method that does not"
|
|
|
|
writer.print(cause.getMessage());
|
|
|
|
+ " exist. The attempt was made from the following location:");
|
|
|
|
writer.print(" but it does not exist. Its class, ");
|
|
|
|
writer.println();
|
|
|
|
writer.print(className);
|
|
|
|
writer.print(" ");
|
|
|
|
writer.println(", is available from the following locations:");
|
|
|
|
writer.println(cause.getStackTrace()[0]);
|
|
|
|
|
|
|
|
writer.println();
|
|
|
|
|
|
|
|
writer.println("The following method did not exist:");
|
|
|
|
|
|
|
|
writer.println();
|
|
|
|
|
|
|
|
writer.print(" ");
|
|
|
|
|
|
|
|
writer.println(cause.getMessage());
|
|
|
|
|
|
|
|
writer.println();
|
|
|
|
|
|
|
|
writer.println("The method's class, " + className
|
|
|
|
|
|
|
|
+ ", is available from the following locations:");
|
|
|
|
writer.println();
|
|
|
|
writer.println();
|
|
|
|
for (URL candidate : candidates) {
|
|
|
|
for (URL candidate : candidates) {
|
|
|
|
writer.print(" ");
|
|
|
|
writer.print(" ");
|
|
|
|