import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
+import java.util.*;
import org.apache.poi.hwpf.HWPFDocument;
import org.apache.poi.hwpf.HWPFDocumentCore;
Element element1 = (Element) node1;
Element element2 = (Element) node2;
- if ( !equals( requiredTagName, element1.getTagName() )
- || !equals( requiredTagName, element2.getTagName() ) )
+ if ( !Objects.equals( requiredTagName, element1.getTagName() )
+ || !Objects.equals( requiredTagName, element2.getTagName() ) )
return false;
NamedNodeMap attributes1 = element1.getAttributes();
attr2 = (Attr) attributes2.getNamedItem( attr1.getName() );
if ( attr2 == null
- || !equals( attr1.getTextContent(), attr2.getTextContent() ) )
+ || !Objects.equals( attr1.getTextContent(), attr2.getTextContent() ) )
return false;
}
}
}
- static boolean equals( String str1, String str2 )
- {
- return str1 == null ? str2 == null : str1.equals( str2 );
- }
-
public static String getBorderType( BorderCode borderCode )
{
if ( borderCode == null )
import java.util.Deque;
import java.util.LinkedList;
import java.util.List;
+import java.util.Objects;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.ParserConfigurationException;
Triplet triplet = getCharacterRunTriplet( characterRun );
if ( AbstractWordUtils.isNotEmpty( triplet.fontName )
- && !AbstractWordUtils.equals( triplet.fontName,
+ && !Objects.equals( triplet.fontName,
blockProperies.pFontName ) )
{
style.append("font-family:").append(triplet.fontName).append(";");