diff --git a/library/core/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlStyle.java b/library/core/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlStyle.java
index 3a600029f5..2ccbe7d85b 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlStyle.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlStyle.java
@@ -166,19 +166,8 @@ import java.lang.annotation.RetentionPolicy;
}
/**
- * Inherits from an ancestor style. Properties like tts:backgroundColor which
- * are not inheritable are not inherited as well as properties which are already set locally
- * are never overridden.
- *
- * @param ancestor the ancestor style to inherit from
- */
- public TtmlStyle inherit(TtmlStyle ancestor) {
- return inherit(ancestor, false);
- }
-
- /**
- * Chains this style to referential style. Local properties which are already set
- * are never overridden.
+ * Chains this style to referential style. Local properties which are already set are never
+ * overridden.
*
* @param ancestor the referential style to inherit from
*/
@@ -186,6 +175,17 @@ import java.lang.annotation.RetentionPolicy;
return inherit(ancestor, true);
}
+ /**
+ * Inherits from an ancestor style. Properties like tts:backgroundColor which are not
+ * inheritable are not inherited as well as properties which are already set locally are never
+ * overridden.
+ *
+ * @param ancestor the ancestor style to inherit from
+ */
+ public TtmlStyle inherit(TtmlStyle ancestor) {
+ return inherit(ancestor, false);
+ }
+
private TtmlStyle inherit(TtmlStyle ancestor, boolean chaining) {
if (ancestor != null) {
if (!hasFontColor && ancestor.hasFontColor) {