Bug 56864 - XWPFLatentStyles.isLatentStyle always returns true if there is at least 1 lsdException
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1620999 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a82d67a2dd
commit
3be80a5b03
@ -41,8 +41,9 @@ public class XWPFLatentStyles {
|
||||
@SuppressWarnings("deprecation")
|
||||
protected boolean isLatentStyle(String latentStyleID){
|
||||
for ( CTLsdException lsd: latentStyles.getLsdExceptionArray()) {
|
||||
if(lsd.getName().equals(latentStyleID));
|
||||
if(lsd.getName().equals(latentStyleID)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -116,6 +116,6 @@ public class TestXWPFStyles extends TestCase {
|
||||
ex.setName("ex1");
|
||||
XWPFLatentStyles ls = new XWPFLatentStyles(latentStyles);
|
||||
assertEquals(true, ls.isLatentStyle("ex1"));
|
||||
|
||||
assertEquals(false, ls.isLatentStyle("notex1"));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user