src/java.xml/share/classes/com/sun/xml/internal/stream/writers/XMLStreamWriterImpl.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
42 import java.util.ArrayList; |
42 import java.util.ArrayList; |
43 import java.util.HashMap; |
43 import java.util.HashMap; |
44 import java.util.Iterator; |
44 import java.util.Iterator; |
45 import java.util.List; |
45 import java.util.List; |
46 import java.util.Map; |
46 import java.util.Map; |
|
47 import java.util.Objects; |
47 import java.util.Random; |
48 import java.util.Random; |
48 import java.util.Set; |
49 import java.util.Set; |
49 import javax.xml.XMLConstants; |
50 import javax.xml.XMLConstants; |
50 import javax.xml.namespace.NamespaceContext; |
51 import javax.xml.namespace.NamespaceContext; |
51 import javax.xml.stream.XMLOutputFactory; |
52 import javax.xml.stream.XMLOutputFactory; |
1727 * @param uri |
1728 * @param uri |
1728 * @return |
1729 * @return |
1729 */ |
1730 */ |
1730 private boolean isDefaultNamespace(String uri) { |
1731 private boolean isDefaultNamespace(String uri) { |
1731 String defaultNamespace = fInternalNamespaceContext.getURI(DEFAULT_PREFIX); |
1732 String defaultNamespace = fInternalNamespaceContext.getURI(DEFAULT_PREFIX); |
1732 |
1733 return Objects.equals(uri, defaultNamespace); |
1733 if (uri.equals(defaultNamespace)) { |
|
1734 return true; |
|
1735 } |
|
1736 |
|
1737 return false; |
|
1738 } |
1734 } |
1739 |
1735 |
1740 /** |
1736 /** |
1741 * @param prefix |
1737 * @param prefix |
1742 * @param uri |
1738 * @param uri |