--- a/src/jdk.jfr/share/classes/jdk/jfr/internal/SecuritySupport.java Thu Sep 19 23:38:50 2019 +0200
+++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/SecuritySupport.java Sat Jan 26 15:47:50 2019 +0900
@@ -171,6 +171,19 @@
public String toString() {
return text;
}
+
+ @Override
+ public boolean equals(Object other) {
+ if(other != null && other instanceof SafePath){
+ return this.toPath().equals(((SafePath) other).toPath());
+ }
+ return false;
+ }
+
+ @Override
+ public int hashCode() {
+ return this.toPath().hashCode();
+ }
}
private interface RunnableWithCheckedException {