Skip to content

Commit d23ae16

Browse files
authored
Fix MyViewsProperty condition (#11252)
1 parent c24d34e commit d23ae16

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

core/src/main/java/hudson/model/View.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,6 +1250,12 @@ public static View createViewFromXML(String name, InputStream xml) throws IOExce
12501250
}
12511251
}
12521252

1253+
// for Jelly
1254+
@Restricted(DoNotUse.class)
1255+
public boolean isMyViewsProperty() {
1256+
return getOwner() instanceof MyViewsProperty;
1257+
}
1258+
12531259
public static class PropertyList extends DescribableList<ViewProperty, ViewPropertyDescriptor> {
12541260
private PropertyList(View owner) {
12551261
super(owner);

core/src/main/resources/hudson/model/View/main.jelly

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
<j:if test="${!newDashboardPage}">
1818
<j:choose>
19-
<j:when test="${it.owner.class == hudson.model.MyViewsProperty.class}">
19+
<j:when test="${it.isMyViewsProperty()}">
2020
<st:include it="${it.owner.viewsTabBar}" page="viewTabs" />
2121
</j:when>
2222
<j:otherwise>
@@ -41,7 +41,7 @@
4141

4242
<j:if test="${!newDashboardPage}">
4343
<j:choose>
44-
<j:when test="${it.owner.class == hudson.model.MyViewsProperty.class}">
44+
<j:when test="${it.isMyViewsProperty()}">
4545
<st:include it="${it.owner.viewsTabBar}" page="viewTabs" />
4646
</j:when>
4747
<j:otherwise>

0 commit comments

Comments
 (0)