Index: javax/swing/text/StyleContext.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/text/StyleContext.java,v retrieving revision 1.6 diff -u -r1.6 StyleContext.java --- javax/swing/text/StyleContext.java 13 Sep 2005 23:44:50 -0000 1.6 +++ javax/swing/text/StyleContext.java 30 Sep 2005 15:01:48 -0000 @@ -306,9 +306,14 @@ return attrs[i+1]; } - Object p = getResolveParent(); - if (p != null && p instanceof AttributeSet) - return (((AttributeSet)p).getAttribute(key)); + // Check the resolve parent, unless we're looking for the + // ResolveAttribute, which would cause an infinite loop + if (!(key.equals(ResolveAttribute))) + { + Object p = getResolveParent(); + if (p != null && p instanceof AttributeSet) + return (((AttributeSet)p).getAttribute(key)); + } return null; }