From 691e1c1636c4a831e37db17eadb1e0f0ca73ac3f Mon Sep 17 00:00:00 2001 From: gmungoc Date: Tue, 13 Nov 2018 17:52:42 +0000 Subject: [PATCH] JAL-3026 test for File.hashCode problem --- utils/test/JalviewJSTest.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/utils/test/JalviewJSTest.java b/utils/test/JalviewJSTest.java index 989d13d..e981196 100644 --- a/utils/test/JalviewJSTest.java +++ b/utils/test/JalviewJSTest.java @@ -6,7 +6,10 @@ import java.awt.Dimension; import java.awt.Font; import java.awt.GridLayout; import java.awt.MediaTracker; +import java.io.File; import java.text.DecimalFormat; +import java.util.HashMap; +import java.util.Map; import javax.swing.ImageIcon; import javax.swing.JButton; @@ -32,14 +35,22 @@ public class JalviewJSTest extends JPanel { public static void main(String[] args) { - new JalviewJSTest().doTest(); + new JalviewJSTest().doTest2(); } + void doTest2() { + Map map = new HashMap<>(); + File f1 = new File("/var/folders/y/xyz"); + File f2 = new File("/var/folders/y/xyz"); + map.put(f1, "hello world"); + System.out.println(map.get(f2)); + } /** * Put some content in a JFrame and show it */ void doTest() { + System.out.println("ab;c;".split(";")); new DecimalFormat("###,###").format((Integer) 1); JFrame main = new JFrame(); main.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); -- 1.7.10.2