www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitry Markman <d...@simplayer.com>
Subject mod_jserv/7311: servlet throws exception in runtime if was return from within synchronized block
Date Sat, 24 Feb 2001 04:32:55 GMT

>Number:         7311
>Category:       mod_jserv
>Synopsis:       servlet throws exception in runtime if was return from within synchronized
block
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    jserv
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Fri Feb 23 20:40:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     dima@simplayer.com
>Release:        Linux RedHat 6.2 distribution
>Organization:
apache
>Environment:
Linux x86 RedHat 6.2
>Description:
if servlet's doGet method uses code where you try return from within
synchronized block:
	synchronized(foo){
		...
		if(condition) return;
		...
	}
you will receive exception in runtime - something like that: invalid word 
<return>

	
>How-To-Repeat:
yes, always
>Fix:
no, only if you will change your code:
	boolean needReturn = false;
 	synchronized(foo){
		...
		if(condition) needReturn = true;
		if(!needReturn){
			...
		}
	}
	if(needReturn) return;
>Release-Note:
>Audit-Trail:
>Unformatted:
 [In order for any reply to be added to the PR database, you need]
 [to include <apbugs@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]
 
 


Mime
View raw message