< prev index next >

src/java.xml/share/classes/com/sun/xml/internal/stream/writers/XMLStreamWriterImpl.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2005, 2017, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2005, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 42,51 **** --- 42,52 ---- import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; + import java.util.Objects; import java.util.Random; import java.util.Set; import javax.xml.XMLConstants; import javax.xml.namespace.NamespaceContext; import javax.xml.stream.XMLOutputFactory;
*** 1727,1742 **** * @param uri * @return */ private boolean isDefaultNamespace(String uri) { String defaultNamespace = fInternalNamespaceContext.getURI(DEFAULT_PREFIX); ! ! if (uri.equals(defaultNamespace)) { ! return true; ! } ! ! return false; } /** * @param prefix * @param uri --- 1728,1738 ---- * @param uri * @return */ private boolean isDefaultNamespace(String uri) { String defaultNamespace = fInternalNamespaceContext.getURI(DEFAULT_PREFIX); ! return Objects.equals(uri, defaultNamespace); } /** * @param prefix * @param uri
< prev index next >