|
|
|
@ -77,7 +77,6 @@ class NoSuchMethodFailureAnalyzerTests { |
|
|
|
void whenAMethodOnAClassIsMissingThenNoSuchMethodErrorIsAnalyzed() { |
|
|
|
void whenAMethodOnAClassIsMissingThenNoSuchMethodErrorIsAnalyzed() { |
|
|
|
Throwable failure = createFailureForMissingMethod(); |
|
|
|
Throwable failure = createFailureForMissingMethod(); |
|
|
|
assertThat(failure).isNotNull(); |
|
|
|
assertThat(failure).isNotNull(); |
|
|
|
failure.printStackTrace(); |
|
|
|
|
|
|
|
FailureAnalysis analysis = new NoSuchMethodFailureAnalyzer().analyze(failure); |
|
|
|
FailureAnalysis analysis = new NoSuchMethodFailureAnalyzer().analyze(failure); |
|
|
|
assertThat(analysis).isNotNull(); |
|
|
|
assertThat(analysis).isNotNull(); |
|
|
|
assertThat(analysis.getDescription()) |
|
|
|
assertThat(analysis.getDescription()) |
|
|
|
@ -107,9 +106,8 @@ class NoSuchMethodFailureAnalyzerTests { |
|
|
|
|
|
|
|
|
|
|
|
private Throwable createFailureForMissingMethod() { |
|
|
|
private Throwable createFailureForMissingMethod() { |
|
|
|
try { |
|
|
|
try { |
|
|
|
System.out.println(MimeType.class.getProtectionDomain().getCodeSource().getLocation()); |
|
|
|
|
|
|
|
MimeType mimeType = new MimeType("application", "json"); |
|
|
|
MimeType mimeType = new MimeType("application", "json"); |
|
|
|
System.out.println(mimeType.isMoreSpecific(null)); |
|
|
|
mimeType.isMoreSpecific(null); |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
catch (Throwable ex) { |
|
|
|
catch (Throwable ex) { |
|
|
|
|