Exploit databaseDownload repository ZIP
GH-cd474985a1d611a2a689e02bc95daae0
satheesh575555/frameworks_base_aosp10_r33_cve-2022-20142
Sources for CVE-2022-20142
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files11
satheesh575555/frameworks_base_aosp10_r33_cve-2022-20142Revision 0b10dce4665c
- ↑..Parent directory
- Assert.java
- AssertionFailedError.java
- ComparisonCompactor.java
- ComparisonFailure.java
- Protectable.java
- Test.java
- TestCase.java
- TestFailure.java
- TestListener.java
- TestResult.java
- TestSuite.java
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
test-base/src/junit/framework/ComparisonFailure.java
Java · 1,278 bytespackage junit.framework;
/**
* Thrown when an assert equals for Strings failed.
*
* Inspired by a patch from Alex Chaffee mailto:[email protected]
*/
public class ComparisonFailure extends AssertionFailedError {
private static final int MAX_CONTEXT_LENGTH= 20;
private static final long serialVersionUID= 1L;
private String fExpected;
private String fActual;
/**
* Constructs a comparison failure.
* @param message the identifying message or null
* @param expected the expected string value
* @param actual the actual string value
*/
public ComparisonFailure (String message, String expected, String actual) {
super (message);
fExpected= expected;
fActual= actual;
}
/**
* Returns "..." in place of common prefix and "..." in
* place of common suffix between expected and actual.
*
* @see Throwable#getMessage()
*/
@Override
public String getMessage() {
return new ComparisonCompactor(MAX_CONTEXT_LENGTH, fExpected, fActual).compact(super.getMessage());
}
/**
* Gets the actual string value
* @return the actual string value
*/
public String getActual() {
return fActual;
}
/**
* Gets the expected string value
* @return the expected string value
*/
public String getExpected() {
return fExpected;
}
}