Return-Path: Delivered-To: apmail-apache-bugdb-archive@apache.org Received: (qmail 82041 invoked by uid 500); 24 Feb 2001 04:40:00 -0000 Mailing-List: contact apache-bugdb-help@apache.org; run by ezmlm Precedence: bulk Reply-To: apache-bugdb@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list apache-bugdb@apache.org Received: (qmail 82024 invoked by uid 501); 24 Feb 2001 04:40:00 -0000 Resent-Date: 24 Feb 2001 04:40:00 -0000 Resent-Message-ID: <20010224044000.82022.qmail@apache.org> Resent-From: submit@bugz.apache.org (GNATS Filer) Resent-To: jserv-bugdb@apache.org Resent-Cc: apache-bugdb@apache.org Resent-Reply-To: submit@bugz.apache.org, dima@simplayer.com Received: (qmail 78931 invoked by uid 501); 24 Feb 2001 04:32:55 -0000 Message-Id: <20010224043255.78930.qmail@apache.org> Date: 24 Feb 2001 04:32:55 -0000 From: Dmitry Markman Reply-To: dima@simplayer.com To: submit@bugz.apache.org X-Send-Pr-Version: 3.110 Subject: mod_jserv/7311: servlet throws exception in runtime if was return from within synchronized block >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 >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 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! ]