--- old/src/java.desktop/share/classes/javax/swing/text/html/FormView.java 2019-05-02 04:35:22.000000000 -0700 +++ new/src/java.desktop/share/classes/javax/swing/text/html/FormView.java 2019-05-02 04:35:22.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -602,7 +602,7 @@ String name = (String) getElement().getAttributes().getAttribute(HTML.Attribute.NAME); String data; - if (name == null || name.equals("")) { + if (name == null || name.isEmpty()) { data = "x="+ x +"&y="+ y; } else { name = URLEncoder.encode(name);