Index: src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFLatentStyles.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFLatentStyles.java (revision 1617896) +++ src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFLatentStyles.java (revision ) @@ -40,7 +40,7 @@ */ protected boolean isLatentStyle(String latentStyleID){ for ( CTLsdException lsd: latentStyles.getLsdExceptionList()) { - if(lsd.getName().equals(latentStyleID)); + if(lsd.getName().equals(latentStyleID)) return true; } return false; Index: src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFStyles.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFStyles.java (revision 1617896) +++ src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFStyles.java (revision ) @@ -116,6 +116,6 @@ ex.setName("ex1"); XWPFLatentStyles ls = new XWPFLatentStyles(latentStyles); assertEquals(true, ls.isLatentStyle("ex1")); - + assertEquals(false, ls.isLatentStyle("notex1")); } }