Skip to content
This repository was archived by the owner on Dec 4, 2018. It is now read-only.

Commit 53b9e4b

Browse files
committed
Avoid unnecessary cast
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc5.5.x/trunk@1027610 13f79535-47bb-0310-9956-ffa450edef68
1 parent 99172d2 commit 53b9e4b

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

STATUS.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,6 @@ PATCHES PROPOSED TO BACKPORT:
7676
+1: markt, kkolinko, timw
7777
-1:
7878

79-
* Avoid unnecessary cast
80-
http://svn.apache.org/viewvc?rev=1022134&view=rev
81-
+1: markt, kkolinko, rjung, timw
82-
-1:
83-
8479
* Improve sending an access message in DeltaManager.
8580
maxInactiveInterval of not Manager but the session is used.
8681
If maxInactiveInterval is negative, an access message is not sending.

container/catalina/src/share/org/apache/catalina/core/StandardContext.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4805,11 +4805,11 @@ private void postWorkDirectory() {
48054805
dir.mkdirs();
48064806

48074807
// Set the appropriate servlet context attribute
4808-
getServletContext().setAttribute(Globals.WORK_DIR_ATTR, dir);
4809-
if (getServletContext() instanceof ApplicationContext)
4810-
((ApplicationContext) getServletContext()).setAttributeReadOnly
4811-
(Globals.WORK_DIR_ATTR);
4812-
4808+
if (context == null) {
4809+
getServletContext();
4810+
}
4811+
context.setAttribute(Globals.WORK_DIR_ATTR, dir);
4812+
context.setAttributeReadOnly(Globals.WORK_DIR_ATTR);
48134813
}
48144814

48154815

container/webapps/docs/changelog.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@
4747
</fix>
4848
</changelog>
4949
</subsection>
50+
<subsection name="Catalina">
51+
<changelog>
52+
<fix>
53+
Avoid unnecessary cast in StandardContext. (markt)
54+
</fix>
55+
</changelog>
56+
</subsection>
5057
</section>
5158
<section name="Tomcat 5.5.31 (jim)" rtext="released 2010-09-16">
5259
<subsection name="General">

0 commit comments

Comments
 (0)