Re: Notes from review of BZ 56029 and ELParser patches
On 21/01/2014 04:14, Konstantin Kolinko wrote: > Hi! > > Reviewing the patches for > https://issues.apache.org/bugzilla/show_bug.cgi?id=56029 > (r1559555, r1559708, r1559820) Thanks for the review. I'm really beginning to dislike this code ;) I'll take a look at the individual issues asap. As an aside, I'd love to let the spec compliant EL parser we already have deal with this. Unfortunately, Jasper has to access it via the EL API and that API does not provide enough access to the internals to enable Jasper to do what it needs to do. Mark > > Important: > > 1. The test "org.apache.jasper.compiler.TestELParser" tests success of > a roundtrip: > - parsing a String into EL expression > - recreating original String with ELParser$TextBuilder > > The method ELParser$TextBuilder.visit(Function n) reconstructs function call > as > prefix + ':' + name + '(' > > To reconstruct original string it has to know whitespaces of 4 tokens: > prefix, name and ':' and '('. > Starting with r1559708 both prefix and name are trimmed, and > character tokens do not know their whitespace either. > > Thus it does not fly. > > Test TestELParser.testTernary07() is a valid test, but it is a bit > misleading. It works because '$ {' does not start an EL expression. > If I remove the whitespace between '$ {' characters, its starts to fail. > The following 3 new tests fail: > doTestParser(" ${ do:it( a eq 1 ? true : false, y ) } "); > doTestParser(" ${ do:it ( a eq 1 ? true : false, y ) } "); > doTestParser(" ${!empty my:link(foo)} "); > > (If reconstruction were not necessary then I think BZ 56029 could be > fixed by simply returning > ' ' + prefix + ':' + name + '(' there. The leading whitespace can be > conditioned on whether > preceding character is a symbol.) > > > Performance notes: > > Performance of this code is not important, as it runs at JSP > compilation time only. I think compilation of the java code is the > main consumer of time here. > With such disclaimer, here are some notes. > > 2. The code that resets StringBuilder in methods parseEL() and > getAndResetWhiteSpace() of ELParser. > > Currently it is done via "new StringBuilder()" call. > > It can be done by calling buf.setLength(0). I see no need to create a > new buffer each time. > > 3. The input here is a String. When parsing a whitespace or a token > it would be better to call substring() method on the original String > rather than manipulating a StringBuilder. > > A StringBuilder is needed only when some unescaping is performed and > thus substring() cannot be used. > > 4. Calling ELParser$Id.toString().trim() performs string > concatenation (whiteSpace+id) followed by trimming. The string > manipulations can be avoided by adding a new method that returns > trimmed text (the value of id). > > The prefix + ':' + name + '(' concatenation in ELParser$TextBuilder > could be avoided if one had a substring() from the original input > String that contains all those spaces and tokens. > > Best regards, > Konstantin Kolinko > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56044] New: Extract EL implementation from embedded Jasper into a separate JAR
https://issues.apache.org/bugzilla/show_bug.cgi?id=56044 Bug ID: 56044 Summary: Extract EL implementation from embedded Jasper into a separate JAR Product: Tomcat 7 Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P2 Component: Packaging Assignee: dev@tomcat.apache.org Reporter: david_s...@hotmail.com The embedded version of Tomcat Jasper bundles EL together with it which seems unnecessary. EL should be usable without JSPs (indeed it is used by some popular validation frameworks). -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56045] New: Cannot start embedded container without Jasper
https://issues.apache.org/bugzilla/show_bug.cgi?id=56045 Bug ID: 56045 Summary: Cannot start embedded container without Jasper Product: Tomcat 7 Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P2 Component: Jasper Assignee: dev@tomcat.apache.org Reporter: david_s...@hotmail.com If I don't have a web.xml and I'm not using JSPs I shoudln't need Jasper on the classpath (it worked in 7.0.47) Caused by: java.lang.ExceptionInInitializerError: null at org.apache.catalina.startup.TldConfig.createTldDigester(TldConfig.java:94) at org.apache.catalina.startup.TldConfig.init(TldConfig.java:576) at org.apache.catalina.startup.TldConfig.lifecycleEvent(TldConfig.java:559) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139) ... 7 common frames omitted Caused by: java.lang.NullPointerException: null at org.apache.tomcat.util.descriptor.DigesterFactory.idFor(DigesterFactory.java:107) at org.apache.tomcat.util.descriptor.DigesterFactory.(DigesterFactory.java:59) ... 15 common frames omitted -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Git
I've been using Git more and more for Tomcat development and was wondering what folks thought about moving Tomcat to git. This isn't a formal proposal or a vote, I'm just trying to gather some views. On the plus side: - it is much easier to have multiple issues in progress at the same time and switch between them - being able to work off-line but still commit is a huge benefit when working on a complex issue and you don't have internet access - merging between branches (assuming all supported branches were in a single repo) is simpler Neutral - we would need to agree some simple guidelines for how we used git - tooling seems equivalent to that available for svn (at for what I use anyway) On the down side: - there is much more potential to mess things up - cleaning up is potentially more complex - the disruption of the move - particularly if we want to move to a single git repo - could be significant Thoughts? Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Git
2014/1/21 Mark Thomas > On the down side: > - there is much more potential to mess things up > Yes, I can help with that if you want :) > - cleaning up is potentially more complex > - the disruption of the move - particularly if we want to move to a > single git repo - could be significant > > > Thoughts? > Risky, but it can be attempted. I'm not very familiar with the infrastructure used though. git.apache.org is there already, it mirrors svn, and it is then mirrored again in github ? The repo to do the commits would then be git.apache.org ? Since we're considering big changes, what about Maven too ? I'll spare you the pros and cons. Rémy
Re: Git
On 21/01/2014 10:18, Rémy Maucherat wrote: > 2014/1/21 Mark Thomas >> Thoughts? >> > > Risky, but it can be attempted. I'm not very familiar with the > infrastructure used though. git.apache.org is there already, it mirrors > svn, and it is then mirrored again in github ? The repo to do the commits > would then be git.apache.org ? Yes, git.a.o would become the master repo (or maybe git-wip.a.o) and that would be mirrored to github. svn would be made read-only and would not be updated any further. > Since we're considering big changes, what about Maven too ? I'll spare you > the pros and cons. I still see more cons than pros for moving to Maven. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Git
On 21.01.2014 10:58, Mark Thomas wrote: > I've been using Git more and more for Tomcat development and was > wondering what folks thought about moving Tomcat to git. This isn't a > formal proposal or a vote, I'm just trying to gather some views. > > On the plus side: > - it is much easier to have multiple issues in progress at the > same time and switch between them > - being able to work off-line but still commit is a huge benefit > when working on a complex issue and you don't have internet > access > - merging between branches (assuming all supported branches were in a > single repo) is simpler > > Neutral > - we would need to agree some simple guidelines for how we used git > - tooling seems equivalent to that available for svn (at for what I > use anyway) > > On the down side: > - there is much more potential to mess things up > - cleaning up is potentially more complex > - the disruption of the move - particularly if we want to move to a > single git repo - could be significant > > > Thoughts? I am slightly positive for a move but there's one thing I was negatively surprised a couple of times: commit emails. Our current commit emails are very easy to read and contain all the needed information. I guess some of that will be adjustable for the git commit mails, but the ones I looked at today (using wicket as an example), had something like the first line of the commit log as the mail subject. That could be better or worse than what we have in svn currently, depending on the log message. I remember having seen many "merge" type commit messages somewhere, where the subject basically carries no information on what was changed, because it always says "Merge". Sometimes such mails do not contain a diff in the body but only the information, which ids have been merged between which branches. These are the ones I find really unhelpful. I haven't dug deeper into it though. The PHP project has a weekly or so message automated about pull requests waiting to be handled. Something like that might be needed because if we move to git the community will expect us to watch for contributions coming via GitHub. My 2ct. Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Git
2014/1/21 Mark Thomas > > I've been using Git more and more for Tomcat development and was > wondering what folks thought about moving Tomcat to git. This isn't a > formal proposal or a vote, I'm just trying to gather some views. > > On the plus side: > - it is much easier to have multiple issues in progress at the > same time and switch between them > - being able to work off-line but still commit is a huge benefit > when working on a complex issue and you don't have internet > access > - merging between branches (assuming all supported branches were in a > single repo) is simpler > > Neutral > - we would need to agree some simple guidelines for how we used git > - tooling seems equivalent to that available for svn (at for what I > use anyway) > > On the down side: > - there is much more potential to mess things up > - cleaning up is potentially more complex > - the disruption of the move - particularly if we want to move to a > single git repo - could be significant > > > Thoughts? +1 for Git About Maven I share Mark's opinion. I have more negative experience than positive. Regards Violeta > Mark > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org >
Re: Git
Hi all +1 for Git About Maven, it will be a very good move also. There is tons of projects inside ASF using Maven as their build tool. There is also so many projects using Tomcat artefacts, hosted on Central, that it will make their life easier if Maven was used has main build tool for Tomcat. One of Tomcat number one user, TomEE project, would certainly be more than happy to see Tomcat Mavenized. There is really tons of goods things in Maven, and when it's release time, Maven Release Plugin, is a safe and fast approach. One of our members, Olivier Lamy, worked on a Maven layout for Tomcat, outside Tomcat trunk and it worked well. And you should all know Olivier enough to know is mastering in Maven area, so you'll never be alone or stuck. So please, "ne jetez pas la bébé avec l'eau du bain", and take sometime to reconsider positivly using Maven for Tomcat. 2014/1/21 Violeta Georgieva : > 2014/1/21 Mark Thomas >> >> I've been using Git more and more for Tomcat development and was >> wondering what folks thought about moving Tomcat to git. This isn't a >> formal proposal or a vote, I'm just trying to gather some views. >> >> On the plus side: >> - it is much easier to have multiple issues in progress at the >> same time and switch between them >> - being able to work off-line but still commit is a huge benefit >> when working on a complex issue and you don't have internet >> access >> - merging between branches (assuming all supported branches were in a >> single repo) is simpler >> >> Neutral >> - we would need to agree some simple guidelines for how we used git >> - tooling seems equivalent to that available for svn (at for what I >> use anyway) >> >> On the down side: >> - there is much more potential to mess things up >> - cleaning up is potentially more complex >> - the disruption of the move - particularly if we want to move to a >> single git repo - could be significant >> >> >> Thoughts? > > +1 for Git > > About Maven I share Mark's opinion. I have more negative experience than > positive. > > Regards > Violeta > >> Mark >> >> - >> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: dev-h...@tomcat.apache.org >> - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Git
Hi Rainer, On Tue, Jan 21, 2014 at 1:01 PM, Rainer Jung wrote: > On 21.01.2014 10:58, Mark Thomas wrote: > > I've been using Git more and more for Tomcat development and was > > wondering what folks thought about moving Tomcat to git. This isn't a > > formal proposal or a vote, I'm just trying to gather some views. > > > > On the plus side: > > - it is much easier to have multiple issues in progress at the > > same time and switch between them > > - being able to work off-line but still commit is a huge benefit > > when working on a complex issue and you don't have internet > > access > > - merging between branches (assuming all supported branches were in a > > single repo) is simpler > > > > Neutral > > - we would need to agree some simple guidelines for how we used git > > - tooling seems equivalent to that available for svn (at for what I > > use anyway) > > > > On the down side: > > - there is much more potential to mess things up > > - cleaning up is potentially more complex > > - the disruption of the move - particularly if we want to move to a > > single git repo - could be significant > > > > > > Thoughts? > > I am slightly positive for a move but there's one thing I was negatively > surprised a couple of times: commit emails. Our current commit emails > are very easy to read and contain all the needed information. I guess > some of that will be adjustable for the git commit mails, but the ones I > looked at today (using wicket as an example), had something like the > first line of the commit log as the mail subject. That could be better > or worse than what we have in svn currently, depending on the log message. > Yes, this is adjustable. Just it is in the hands of Apache Infra. I have asked once for read-only access to the Git hooks ( http://git-scm.com/book/en/Customizing-Git-Git-Hooks) but they rejected. I guess it will be easier for you or Mark as Infra members. > > I remember having seen many "merge" type commit messages somewhere, > where the subject basically carries no information on what was changed, > because it always says "Merge". Sometimes such mails do not contain a > diff in the body but only the information, which ids have been merged > between which branches. These are the ones I find really unhelpful. I > haven't dug deeper into it though. > The merge commits appear when you use "git merge" or "git pull" in the fix/feature branch. If you stick to "git rebase" or "git pull --rebase" then there is no such "noise" in the Git history. I use "git pull --rebase" daily and had no merge problems. > > The PHP project has a weekly or so message automated about pull requests > waiting to be handled. Something like that might be needed because if we > move to git the community will expect us to watch for contributions > coming via GitHub. > Contributions via GitHub doesn't work well at the moment with Apache projects. There are few discussions about this in members@. I use https://github.com/github/hub to make it easier to merge remote branches. I prefer command line but many devs don't. > > My 2ct. > > Rainer > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > >
Re: Git
On 21 January 2014 21:18, Rémy Maucherat wrote: > 2014/1/21 Mark Thomas > >> On the down side: >> - there is much more potential to mess things up >> > > Yes, I can help with that if you want :) > > >> - cleaning up is potentially more complex >> - the disruption of the move - particularly if we want to move to a >> single git repo - could be significant >> >> >> Thoughts? >> Very good idea! > > Risky, but it can be attempted. I'm not very familiar with the > infrastructure used though. git.apache.org is there already, it mirrors > svn, and it is then mirrored again in github ? The repo to do the commits > would then be git.apache.org ? > > Since we're considering big changes, what about Maven too ? I'll spare you > the pros and cons. I wonder if this could improve a bit the modularity of the various jars we deploy. Especially for the embeded part. (maybe could prevent issues as: jsp/jasper is mandatory to run embeded mode even if you don't use it) > > Rémy -- Olivier Lamy Ecetera: http://ecetera.com.au http://twitter.com/olamy | http://linkedin.com/in/olamy - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Git
On 21/01/2014 12:27, Olivier Lamy wrote: > I wonder if this could improve a bit the modularity of the various > jars we deploy. Especially for the embeded part. (maybe could prevent > issues as: jsp/jasper is mandatory to run embeded mode even if you > don't use it) The modularity is not the issue there. The issue is how we choose to package things for embedded and the build system wouldn't have changed that. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Git
Hi just a side note about maven from a tomee dev (and big tomcat user ;): would be great to make it easier to build for anyone but it would mandate to be useful to restructure tomcat sources to be modular as well which would be really great IMO! Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014/1/21 Olivier Lamy : > On 21 January 2014 21:18, Rémy Maucherat wrote: >> 2014/1/21 Mark Thomas >> >>> On the down side: >>> - there is much more potential to mess things up >>> >> >> Yes, I can help with that if you want :) >> >> >>> - cleaning up is potentially more complex >>> - the disruption of the move - particularly if we want to move to a >>> single git repo - could be significant >>> >>> >>> Thoughts? >>> > > Very good idea! > >> >> Risky, but it can be attempted. I'm not very familiar with the >> infrastructure used though. git.apache.org is there already, it mirrors >> svn, and it is then mirrored again in github ? The repo to do the commits >> would then be git.apache.org ? >> >> Since we're considering big changes, what about Maven too ? I'll spare you >> the pros and cons. > > I wonder if this could improve a bit the modularity of the various > jars we deploy. Especially for the embeded part. (maybe could prevent > issues as: jsp/jasper is mandatory to run embeded mode even if you > don't use it) > >> >> Rémy > > > > -- > Olivier Lamy > Ecetera: http://ecetera.com.au > http://twitter.com/olamy | http://linkedin.com/in/olamy > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Git
2014/1/21 Mark Thomas > > Since we're considering big changes, what about Maven too ? I'll spare > you > > the pros and cons. > > I still see more cons than pros for moving to Maven. > > It (mostly) works now and allows behaving better with bigger projects. IMO it is unavoidable now. Rémy
Re: Git
2014/1/21 Mark Thomas : > I've been using Git more and more for Tomcat development and was > wondering what folks thought about moving Tomcat to git. This isn't a > formal proposal or a vote, I'm just trying to gather some views. > > On the plus side: > - it is much easier to have multiple issues in progress at the > same time and switch between them > - being able to work off-line but still commit is a huge benefit > when working on a complex issue and you don't have internet > access > - merging between branches (assuming all supported branches were in a > single repo) is simpler > > Neutral > - we would need to agree some simple guidelines for how we used git > - tooling seems equivalent to that available for svn (at for what I > use anyway) Regarding the tools: 1. In my experience it was harder to review history of some project hosted on github than one using subversion. (Using only web tools such as viewvc log & annotate pages). It is more to the nature of git itself, as the recommended "Feature branches" approach makes so that most of merges to master branch are collections of several other commits at elsewhere. It is harder to review the tree. 2. Buildbot uses subversion revision number as identifier (when building and when publishing logs). 3. We have references to revision numbers in our commit messages. > On the down side: > - there is much more potential to mess things up > - cleaning up is potentially more complex > - the disruption of the move - particularly if we want to move to a > single git repo - could be significant 4. IIUC, the current Tomcat6/7/trunk mirrors at github does not comply to this "single repo" condition? 5. Subversion does not allow deleting files from the past history (a long wanted 'obliterate' feature). Git does allow such deletion (so you can mess your history fatally). Disclaimer: I do not such experience with git, so I cannot assess whether it is easy to trigger this deletion or easy to prevent it from administrators' side. In Jenkins project there was some incident with Git several months ago. http://jenkins-ci.org/content/summary-report-git-repository-disruption-incident-nov-10th 6. Overall, I have some frustration with the direction where Apache Subversion project itself is going, but I am not brave enough to hop to Git. My "vote" is -0. 7. -1 for Maven. The arguments were stated in old discussions. My main ones - I like the single source tree that we have now - Oliver's project to convert Tomcat build to Maven was not a success 2014/1/21 Rémy Maucherat : >> >> I still see more cons than pros for moving to Maven. >> >> It (mostly) works now and allows behaving better with bigger projects. IMO > it is unavoidable now. Spring Framework is a big project, but it uses Gradle, not Maven. https://github.com/spring-projects/spring-framework#building-from-source Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56046] New: org.apache.tomcat.jdbc.pool.XADataSource InitSQL property
https://issues.apache.org/bugzilla/show_bug.cgi?id=56046 Bug ID: 56046 Summary: org.apache.tomcat.jdbc.pool.XADataSource InitSQL property Product: Tomcat 7 Version: 7.0.35 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P2 Component: Connectors Assignee: dev@tomcat.apache.org Reporter: ajsi...@tecnologia.cajamar.es Hi. I think that it would be helpful if the InitSQL property from a JDBC Connection Pool org.apache.tomcat.jdbc.pool take a List of querys to run when a connection is first created, better than a single statement. For example: ALTER SESSION SET NLS_SORT=BINARY ALTER SESSION SET NLS_COMP=LINGUISTIC Thank you very much. Regards. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56046] org.apache.tomcat.jdbc.pool.XADataSource InitSQL property
https://issues.apache.org/bugzilla/show_bug.cgi?id=56046 Mark Thomas changed: What|Removed |Added Component|Connectors |jdbc-pool Version|7.0.35 |unspecified Product|Tomcat 7|Tomcat Modules --- Comment #1 from Mark Thomas --- Correct component -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Git
On 21 January 2014 23:42, Konstantin Kolinko wrote: > 2014/1/21 Mark Thomas : >> I've been using Git more and more for Tomcat development and was >> wondering what folks thought about moving Tomcat to git. This isn't a >> formal proposal or a vote, I'm just trying to gather some views. >> >> On the plus side: >> - it is much easier to have multiple issues in progress at the >> same time and switch between them >> - being able to work off-line but still commit is a huge benefit >> when working on a complex issue and you don't have internet >> access >> - merging between branches (assuming all supported branches were in a >> single repo) is simpler >> >> Neutral >> - we would need to agree some simple guidelines for how we used git >> - tooling seems equivalent to that available for svn (at for what I >> use anyway) > > Regarding the tools: > > 1. In my experience it was harder to review history of some project > hosted on github than one using subversion. > > (Using only web tools such as viewvc log & annotate pages). > > It is more to the nature of git itself, as the recommended "Feature > branches" approach makes so that most of merges to master branch are > collections of several other commits at elsewhere. It is harder to > review the tree. > > 2. Buildbot uses subversion revision number as identifier (when > building and when publishing logs). > > 3. We have references to revision numbers in our commit messages. > >> On the down side: >> - there is much more potential to mess things up >> - cleaning up is potentially more complex >> - the disruption of the move - particularly if we want to move to a >> single git repo - could be significant > > 4. IIUC, the current Tomcat6/7/trunk mirrors at github does not comply > to this "single repo" condition? > > 5. Subversion does not allow deleting files from the past history (a > long wanted 'obliterate' feature). > > Git does allow such deletion (so you can mess your history fatally). > Disclaimer: I do not such experience with git, so I cannot assess > whether it is easy to trigger this deletion or easy to prevent it from > administrators' side. > > In Jenkins project there was some incident with Git several months ago. > http://jenkins-ci.org/content/summary-report-git-repository-disruption-incident-nov-10th > > 6. Overall, I have some frustration with the direction where Apache > Subversion project itself is going, but I am not brave enough to hop > to Git. > > My "vote" is -0. > > 7. -1 for Maven. > > The arguments were stated in old discussions. > My main ones > - I like the single source tree that we have now > - Oliver's project to convert Tomcat build to Maven was not a success I started but this change need a bit support so perso I don't want to spend time if lack of interest. > > 2014/1/21 Rémy Maucherat : >>> >>> I still see more cons than pros for moving to Maven. >>> >>> It (mostly) works now and allows behaving better with bigger projects. IMO >> it is unavoidable now. > > Spring Framework is a big project, but it uses Gradle, not Maven. > https://github.com/spring-projects/spring-framework#building-from-source > > Best regards, > Konstantin Kolinko > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > -- Olivier Lamy Ecetera: http://ecetera.com.au http://twitter.com/olamy | http://linkedin.com/in/olamy - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Git
>> - Oliver's project to convert Tomcat build to Maven was not a success > > I started but this change need a bit support so perso I don't want to > spend time if lack of interest. it make sense ;( - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1560017 - in /tomcat/trunk: java/org/apache/jasper/compiler/ELNode.java java/org/apache/jasper/compiler/ELParser.java test/org/apache/el/TestELInJsp.java test/org/apache/jasper/compiler/T
Author: markt Date: Tue Jan 21 14:08:03 2014 New Revision: 1560017 URL: http://svn.apache.org/r1560017 Log: Further work for https://issues.apache.org/bugzilla/show_bug.cgi?id=56029 Review from kkolinko - Fix bug in parsing functions and whitespace - More efficient resetting of StringBuidler - Use String.substring() for token and whitespace - avoid unnecessary use of trim() Modified: tomcat/trunk/java/org/apache/jasper/compiler/ELNode.java tomcat/trunk/java/org/apache/jasper/compiler/ELParser.java tomcat/trunk/test/org/apache/el/TestELInJsp.java tomcat/trunk/test/org/apache/jasper/compiler/TestELParser.java tomcat/trunk/test/webapp/bug5/bug56029.jspx Modified: tomcat/trunk/java/org/apache/jasper/compiler/ELNode.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ELNode.java?rev=1560017&r1=1560016&r2=1560017&view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/ELNode.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/ELNode.java Tue Jan 21 14:08:03 2014 @@ -122,14 +122,16 @@ abstract class ELNode { private final String prefix; private final String name; +private final String originalText; private String uri; private FunctionInfo functionInfo; private String methodName; private String[] parameters; -Function(String prefix, String name) { +Function(String prefix, String name, String originalText) { this.prefix = prefix; this.name = name; +this.originalText = originalText; } @Override @@ -145,6 +147,10 @@ abstract class ELNode { return name; } +public String getOriginalText() { +return originalText; +} + public void setUri(String uri) { this.uri = uri; } Modified: tomcat/trunk/java/org/apache/jasper/compiler/ELParser.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ELParser.java?rev=1560017&r1=1560016&r2=1560017&view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/ELParser.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/ELParser.java Tue Jan 21 14:08:03 2014 @@ -38,7 +38,7 @@ public class ELParser { private Token curToken; // current token private Token prevToken; // previous token -private StringBuilder whiteSpace = new StringBuilder(); +private String whiteSpace = ""; private final ELNode.Nodes expr; @@ -96,7 +96,9 @@ public class ELParser { * * @return An ELNode.Nodes representing the EL expression * - * TODO: Can this be refactored to use the standard EL implementation? + * Note: This can not be refactored to use the standard EL implementation as + * the EL API does not provide the level of access required to the + * parsed expression. */ private ELNode.Nodes parseEL() { @@ -115,7 +117,7 @@ public class ELParser { // Output whatever is in buffer if (buf.length() > 0) { ELexpr.add(new ELNode.ELText(buf.toString())); -buf = new StringBuilder(); +buf.setLength(0); } if (!parseFunction()) { ELexpr.add(new ELNode.ELText(curToken.toString())); @@ -138,12 +140,13 @@ public class ELParser { * arguments */ private boolean parseFunction() { -if (!(curToken instanceof Id) || isELReserved(curToken.toString()) || +if (!(curToken instanceof Id) || isELReserved(curToken.toTrimmedString()) || prevToken instanceof Char && prevToken.toChar() == '.') { return false; } String s1 = null; // Function prefix -String s2 = curToken.toString(); // Function name +String s2 = curToken.toTrimmedString(); // Function name +int start = index - curToken.toString().length(); Token original = curToken; if (hasNext()) { int mark = getIndex() - whiteSpace.length(); @@ -153,7 +156,7 @@ public class ELParser { Token t2 = nextToken(); if (t2 instanceof Id) { s1 = s2.trim(); -s2 = t2.toString(); +s2 = t2.toTrimmedString(); if (hasNext()) { curToken = nextToken(); } @@ -161,7 +164,7 @@ public class ELParser { } } if (curToken.toChar() == '(') { -ELexpr.add(new ELNode.Function(s1, s2.trim())); +ELexpr.add(new ELNode.Function(s1, s2, expression.substring(start, index - 1))); return tr
svn commit: r1560019 - /tomcat/trunk/test/webapp/bug5nnnn/bug56029.jspx
Author: markt Date: Tue Jan 21 14:09:04 2014 New Revision: 1560019 URL: http://svn.apache.org/r1560019 Log: Fix line endings Modified: tomcat/trunk/test/webapp/bug5/bug56029.jspx (props changed) Propchange: tomcat/trunk/test/webapp/bug5/bug56029.jspx -- svn:eol-style = native - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1560023 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/jasper/compiler/ test/org/apache/el/ test/org/apache/jasper/compiler/ test/webapp-3.0/bug5nnnn/
Author: markt Date: Tue Jan 21 14:14:38 2014 New Revision: 1560023 URL: http://svn.apache.org/r1560023 Log: Further work for https://issues.apache.org/bugzilla/show_bug.cgi?id=56029 Review from kkolinko - Fix bug in parsing functions and whitespace - More efficient resetting of StringBuidler - Use String.substring() for token and whitespace - avoid unnecessary use of trim() Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELNode.java tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELParser.java tomcat/tc7.0.x/trunk/test/org/apache/el/TestELInJsp.java tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestELParser.java tomcat/tc7.0.x/trunk/test/webapp-3.0/bug5/bug56029.jspx Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1560017 Modified: tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELNode.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELNode.java?rev=1560023&r1=1560022&r2=1560023&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELNode.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELNode.java Tue Jan 21 14:14:38 2014 @@ -122,14 +122,16 @@ abstract class ELNode { private String prefix; private String name; +private final String originalText; private String uri; private FunctionInfo functionInfo; private String methodName; private String[] parameters; -Function(String prefix, String name) { +Function(String prefix, String name, String originalText) { this.prefix = prefix; this.name = name; +this.originalText = originalText; } @Override @@ -145,6 +147,10 @@ abstract class ELNode { return name; } +public String getOriginalText() { +return originalText; +} + public void setUri(String uri) { this.uri = uri; } Modified: tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELParser.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELParser.java?rev=1560023&r1=1560022&r2=1560023&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELParser.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELParser.java Tue Jan 21 14:14:38 2014 @@ -38,7 +38,7 @@ public class ELParser { private Token curToken; // current token private Token prevToken; // previous token -private StringBuilder whiteSpace = new StringBuilder(); +private String whiteSpace = ""; private ELNode.Nodes expr; @@ -98,7 +98,9 @@ public class ELParser { * * @return An ELNode.Nodes representing the EL expression * - * TODO: Can this be refactored to use the standard EL implementation? + * Note: This can not be refactored to use the standard EL implementation as + * the EL API does not provide the level of access required to the + * parsed expression. */ private ELNode.Nodes parseEL() { @@ -117,7 +119,7 @@ public class ELParser { // Output whatever is in buffer if (buf.length() > 0) { ELexpr.add(new ELNode.ELText(buf.toString())); -buf = new StringBuilder(); +buf.setLength(0); } if (!parseFunction()) { ELexpr.add(new ELNode.ELText(curToken.toString())); @@ -140,12 +142,13 @@ public class ELParser { * arguments */ private boolean parseFunction() { -if (!(curToken instanceof Id) || isELReserved(curToken.toString()) || +if (!(curToken instanceof Id) || isELReserved(curToken.toTrimmedString()) || prevToken instanceof Char && prevToken.toChar() == '.') { return false; } String s1 = null; // Function prefix -String s2 = curToken.toString(); // Function name +String s2 = curToken.toTrimmedString(); // Function name +int start = index - curToken.toString().length(); Token original = curToken; if (hasNext()) { int mark = getIndex() - whiteSpace.length(); @@ -155,7 +158,7 @@ public class ELParser { Token t2 = nextToken(); if (t2 instanceof Id) { s1 = s2.trim(); -s2 = t2.toString(); +s2 = t2.toTrimmedString(); if (hasNext()) { curToken = nextToken(); } @@ -163,7 +166,7 @@ public cla
svn commit: r1560024 - /tomcat/tc7.0.x/trunk/test/webapp-3.0/bug5nnnn/bug56029.jspx
Author: markt Date: Tue Jan 21 14:15:31 2014 New Revision: 1560024 URL: http://svn.apache.org/r1560024 Log: Fix line endings Modified: tomcat/tc7.0.x/trunk/test/webapp-3.0/bug5/bug56029.jspx (contents, props changed) Modified: tomcat/tc7.0.x/trunk/test/webapp-3.0/bug5/bug56029.jspx URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/webapp-3.0/bug5/bug56029.jspx?rev=1560024&r1=1560023&r2=1560024&view=diff == --- tomcat/tc7.0.x/trunk/test/webapp-3.0/bug5/bug56029.jspx (original) +++ tomcat/tc7.0.x/trunk/test/webapp-3.0/bug5/bug56029.jspx Tue Jan 21 14:15:31 2014 @@ -1,26 +1,26 @@ - - -http://java.sun.com/JSP/Page"; version="2.0" - xmlns:c="http://java.sun.com/jsp/jstl/core"; - xmlns:fn="http://java.sun.com/jsp/jstl/functions";> - - - - - [${limitA}]:[${limitB}] + + +http://java.sun.com/JSP/Page"; version="2.0" + xmlns:c="http://java.sun.com/jsp/jstl/core"; + xmlns:fn="http://java.sun.com/jsp/jstl/functions";> + + + + + [${limitA}]:[${limitB}] \ No newline at end of file Propchange: tomcat/tc7.0.x/trunk/test/webapp-3.0/bug5/bug56029.jspx -- svn:eol-style = native - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1560025 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: markt Date: Tue Jan 21 14:16:15 2014 New Revision: 1560025 URL: http://svn.apache.org/r1560025 Log: Another proposal update Modified: tomcat/tc6.0.x/trunk/STATUS.txt Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1560025&r1=1560024&r2=1560025&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Jan 21 14:16:15 2014 @@ -40,6 +40,7 @@ PATCHES PROPOSED TO BACKPORT: Regression in fix for BZ55198 broke parsing of some ternary expressions https://svn.apache.org/r1559555 https://svn.apache.org/r1559708 (excluding test case) + https://svn.apache.org/r1560023 (excluding test case) +1: markt -1: - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Cancelled][VOTE] Release Apache Tomcat 6.0.38
This vote has been cancelled due to the regression described in https://issues.apache.org/bugzilla/show_bug.cgi?id=56029#c3 I will tag 6.0.39 just as soon as the fix for BZ 56029 has the necessary votes in the status file. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Git
Others have mostly captured the pros and cons, so mine is brief... On Tue, Jan 21, 2014 at 4:58 AM, Mark Thomas wrote: > I've been using Git more and more for Tomcat development and was > wondering what folks thought about moving Tomcat to git. This isn't a > formal proposal or a vote, I'm just trying to gather some views. +1 to Git. My main pro from it is speed. Everything feels speedier: commits, diffs, pushes, pulls, etc. I don't think the potential for messing up is bigger. At least, not bigger than learning any new tools (for those of us who would have to learn git). I switched to primarily-git SCM about 2 years ago and haven't had any more mishaps than I would have with svn merging, I don't think. Also +1 to separating the git vs svn discussion from the build system discussion (Maven, Ant, whatever.) (Side note: been using gradle recently, fun.) Yoav > > On the plus side: > - it is much easier to have multiple issues in progress at the > same time and switch between them > - being able to work off-line but still commit is a huge benefit > when working on a complex issue and you don't have internet > access > - merging between branches (assuming all supported branches were in a > single repo) is simpler > > Neutral > - we would need to agree some simple guidelines for how we used git > - tooling seems equivalent to that available for svn (at for what I > use anyway) > > On the down side: > - there is much more potential to mess things up > - cleaning up is potentially more complex > - the disruption of the move - particularly if we want to move to a > single git repo - could be significant > > > Thoughts? > > Mark > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Git
> Also +1 to separating the git vs svn discussion from the build system > discussion (Maven, Ant, whatever.) (Side note: been using gradle > recently, fun.) +1 for split - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56039] JmxRemoteLifecycleListener does not work with SSL
https://issues.apache.org/bugzilla/show_bug.cgi?id=56039 esengst...@gmail.com changed: What|Removed |Added CC||esengst...@gmail.com -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Git
2014/1/21 Yoav Shapira > Also +1 to separating the git vs svn discussion from the build system > discussion (Maven, Ant, whatever.) (Side note: been using gradle > recently, fun.) > +1 Never used that Gradle yet though. Rémy
buildbot success in ASF Buildbot on tomcat-trunk
The Buildbot has detected a restored build on builder tomcat-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-trunk/builds/5422 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1560019 Blamelist: markt Build succeeded! sincerely, -The Buildbot
Multi "jvmRoute" per Tomcat instance
I conducted a little experiment to facilitate testing of load-balancing, stickyness etc. I wanted to use a single Tomcat instance with multiple connectors (ports) each of which using a different jvmRoute when generating sessions for requests coming in via the respective connector. That allows to test load-balancing and stickyness bahevior using a single Tomcat with multiple connectors, thus needing less resources and also making some testing easier (only one logs directory, automatically shared webapps, only one stop/start etc., less copying of configs etc. I used the following patch to make this possible: http://people.apache.org/~rjung/patches/named-connectors.patch It adds a new attribute to the Connector (I have chosen to call it name, the connector's name, because jvmRoute is a route for a jvm, which is the whole process). Then it adds a new method to the Manager interface which allows to hand over a chosen id suffix when creating a new session. The new method is implemented in ManagerBase as usual, so all session manager implementations we bundle inherit it, except for DeltaManager, which gets some local additions. The optional suffix is handed down to the SessionIdGenerator. The wiring is done in the Request class which has access to the connector and triggers session creation. Only addition is accessing the connector name and forwarding it when creating a session. The rest is some minor stuff in AuthenticatorBase and JvmRouteBinderValve. The behavior should be unchanged unless a request comes in via a connector that has a name explicitly set. In that case the session id gets the connector name as a suffix instead of the jvmRoute from the Engine. Not contained in the patch is docs for the new name attribute and the addition for mbeans-descriptors.xml. Somehow it is a hack. On the other hand at least for my test setup is was pretty useful. Because of the method addition in the Manager interface I guess it is a no-go for TC 7. What do people think for TC 8? Is it useful or to much of a hack? Regards, Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1560136 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: kkolinko Date: Tue Jan 21 18:43:32 2014 New Revision: 1560136 URL: http://svn.apache.org/r1560136 Log: Add Jeremy's patch. These changes were overwritten by a subsequent commit, but they may be needed to make a clean svn merge. Modified: tomcat/tc6.0.x/trunk/STATUS.txt Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1560136&r1=1560135&r2=1560136&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Jan 21 18:43:32 2014 @@ -40,6 +40,7 @@ PATCHES PROPOSED TO BACKPORT: Regression in fix for BZ55198 broke parsing of some ternary expressions https://svn.apache.org/r1559555 https://svn.apache.org/r1559708 (excluding test case) + https://svn.apache.org/r1559820 (overwritten by r1560023, may be needed for a clean svn merge) https://svn.apache.org/r1560023 (excluding test case) +1: markt -1: - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56032] WebSocket Endpoint onClose method not called when channel closed by thread interruption
https://issues.apache.org/bugzilla/show_bug.cgi?id=56032 --- Comment #3 from Kenneth Gendron --- Thank you very much. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1560158 - in /tomcat/trunk: java/org/apache/coyote/http11/upgrade/ java/org/apache/tomcat/websocket/ test/org/apache/tomcat/websocket/
Author: markt Date: Tue Jan 21 19:51:26 2014 New Revision: 1560158 URL: http://svn.apache.org/r1560158 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56032 After an IO error sending a WebSocket message, close the connection. Modified: tomcat/trunk/java/org/apache/coyote/http11/upgrade/NioServletOutputStream.java tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java tomcat/trunk/test/org/apache/tomcat/websocket/TesterFirehoseServer.java tomcat/trunk/test/org/apache/tomcat/websocket/TesterMessageCountClient.java Modified: tomcat/trunk/java/org/apache/coyote/http11/upgrade/NioServletOutputStream.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/upgrade/NioServletOutputStream.java?rev=1560158&r1=1560157&r2=1560158&view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/upgrade/NioServletOutputStream.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/upgrade/NioServletOutputStream.java Tue Jan 21 19:51:26 2014 @@ -135,6 +135,6 @@ public class NioServletOutputStream exte @Override protected void doClose() throws IOException { -channel.close(); +channel.close(true); } } Modified: tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties?rev=1560158&r1=1560157&r2=1560158&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties Tue Jan 21 19:51:26 2014 @@ -43,6 +43,7 @@ wsFrame.controlNoFin=A control frame was wsFrame.invalidOpCode= A WebSocket frame was sent with an unrecognised opCode of [{0}] wsFrame.invalidUtf8=A WebSocket text frame was received that could not be decoded to UTF-8 because it contained invalid byte sequences wsFrame.invalidUtf8Close=A WebSocket close frame was received with a close reason that contained invalid UTF-8 byte sequences +wsFrame.ioeTriggeredClose=An unrecoverable IOException occurred so the connection was closed wsFrame.messageTooBig=The message was [{0}] bytes long but the MessageHandler has a limit of [{1}] bytes wsFrame.noContinuation=A new message was started when a continuation frame was expected wsFrame.notMasked=The client frame was not masked but all client frames must be masked Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java?rev=1560158&r1=1560157&r2=1560158&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java Tue Jan 21 19:51:26 2014 @@ -333,8 +333,7 @@ public abstract class WsFrameBase { try { mhPong.onMessage(new WsPongMessage(controlBufferBinary)); } catch (Throwable t) { -ExceptionUtils.handleThrowable(t); -wsSession.getLocal().onError(wsSession, t); +handleThrowableOnSend(t); } finally { controlBufferBinary.clear(); } @@ -377,8 +376,7 @@ public abstract class WsFrameBase { messageBufferText.toString()); } } catch (Throwable t) { -ExceptionUtils.handleThrowable(t); -wsSession.getLocal().onError(wsSession, t); +handleThrowableOnSend(t); } finally { messageBufferText.clear(); } @@ -533,6 +531,15 @@ public abstract class WsFrameBase { } +private void handleThrowableOnSend(Throwable t) throws WsIOException { +ExceptionUtils.handleThrowable(t); +wsSession.getLocal().onError(wsSession, t); +CloseReason cr = new CloseReason(CloseCodes.CLOSED_ABNORMALLY, +sm.getString("wsFrame.ioeTriggeredClose")); +throw new WsIOException(cr); +} + + @SuppressWarnings("unchecked") private void sendMessageBinary(ByteBuffer msg, boolean last) throws WsIOException { @@ -554,8 +561,7 @@ public abstract class WsFrameBase { ((MessageHandler.Whole) binaryMsgHandler).onMessage(msg); } } catch(Throwable t) { -ExceptionUtils.handleThrowable(t); -wsSession.getLocal().onError(wsSession, t); +handleThrowableOnSend(t); }
svn commit: r1560159 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/coyote/http11/upgrade/ java/org/apache/tomcat/websocket/ test/org/apache/tomcat/websocket/ webapps/docs/
Author: markt Date: Tue Jan 21 19:54:32 2014 New Revision: 1560159 URL: http://svn.apache.org/r1560159 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56032 After an IO error sending a WebSocket message, close the connection. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/NioServletOutputStream.java tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsSession.java tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TesterFirehoseServer.java tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TesterMessageCountClient.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1560158 Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/NioServletOutputStream.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/NioServletOutputStream.java?rev=1560159&r1=1560158&r2=1560159&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/NioServletOutputStream.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/upgrade/NioServletOutputStream.java Tue Jan 21 19:54:32 2014 @@ -134,6 +134,6 @@ public class NioServletOutputStream exte @Override protected void doClose() throws IOException { -channel.close(); +channel.close(true); } } Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties?rev=1560159&r1=1560158&r2=1560159&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties Tue Jan 21 19:54:32 2014 @@ -43,6 +43,7 @@ wsFrame.controlNoFin=A control frame was wsFrame.invalidOpCode= A WebSocket frame was sent with an unrecognised opCode of [{0}] wsFrame.invalidUtf8=A WebSocket text frame was received that could not be decoded to UTF-8 because it contained invalid byte sequences wsFrame.invalidUtf8Close=A WebSocket close frame was received with a close reason that contained invalid UTF-8 byte sequences +wsFrame.ioeTriggeredClose=An unrecoverable IOException occurred so the connection was closed wsFrame.messageTooBig=The message was [{0}] bytes long but the MessageHandler has a limit of [{1}] bytes wsFrame.noContinuation=A new message was started when a continuation frame was expected wsFrame.notMasked=The client frame was not masked but all client frames must be masked Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java?rev=1560159&r1=1560158&r2=1560159&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsFrameBase.java Tue Jan 21 19:54:32 2014 @@ -333,8 +333,7 @@ public abstract class WsFrameBase { try { mhPong.onMessage(new WsPongMessage(controlBufferBinary)); } catch (Throwable t) { -ExceptionUtils.handleThrowable(t); -wsSession.getLocal().onError(wsSession, t); +handleThrowableOnSend(t); } finally { controlBufferBinary.clear(); } @@ -377,8 +376,7 @@ public abstract class WsFrameBase { messageBufferText.toString()); } } catch (Throwable t) { -ExceptionUtils.handleThrowable(t); -wsSession.getLocal().onError(wsSession, t); +handleThrowableOnSend(t); } finally { messageBufferText.clear(); } @@ -533,6 +531,15 @@ public abstract class WsFrameBase { } +private void handleThrowableOnSend(Throwable t) throws WsIOException { +ExceptionUtils.handleThrowable(t); +wsSession.getLocal().onError(wsSession, t); +CloseReason cr = new CloseReason(CloseCodes.CLOSED_ABNORMALLY, +sm.getString("wsFrame.ioeTriggeredClose")); +throw new WsIOException(cr); +} + + @SuppressWarnings("unchecked") private void sendMessageBinary(B
[Bug 56032] WebSocket Endpoint onClose method not called when channel closed by thread interruption
https://issues.apache.org/bugzilla/show_bug.cgi?id=56032 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #4 from Mark Thomas --- This has been fixed in 8.0.x for 8.0.0 onwards and in 7.0.x for 7.0.51 onwards. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1560163 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: rjung Date: Tue Jan 21 20:11:49 2014 New Revision: 1560163 URL: http://svn.apache.org/r1560163 Log: Vote, promote. Modified: tomcat/tc6.0.x/trunk/STATUS.txt Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1560163&r1=1560162&r2=1560163&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Jan 21 20:11:49 2014 @@ -33,7 +33,7 @@ PATCHES PROPOSED TO BACKPORT: * BIO tolerates whitespace in the ciphers attribute whereas NIO does not. Make NIO tolerate it as well http://people.apache.org/~markt/patches/2014-01-18-ciphers-whitespace-nio-tc6-v1.patch - +1: markt + +1: markt, rjung -1: * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56029 @@ -44,6 +44,7 @@ PATCHES PROPOSED TO BACKPORT: https://svn.apache.org/r1560023 (excluding test case) +1: markt -1: + rjung: a combined patch would be useful, merging seems to be non-trivial PATCHES/ISSUES THAT ARE STALLED: - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn propchange: r1560163 - svn:log
Author: rjung Revision: 1560163 Modified property: svn:log Modified: svn:log at Tue Jan 21 20:13:02 2014 -- --- svn:log (original) +++ svn:log Tue Jan 21 20:13:02 2014 @@ -1 +1 @@ -Vote, promote. +Vote, comment. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1560165 - /tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
Author: markt Date: Tue Jan 21 20:15:06 2014 New Revision: 1560165 URL: http://svn.apache.org/r1560165 Log: Simplify bind and unbind on start Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1560165&r1=1560164&r2=1560165&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Tue Jan 21 20:15:06 2014 @@ -5015,9 +5015,7 @@ public class StandardContext extends Con ClassLoader oldCCL = bindThread(); try { - if (ok) { - // Start our subordinate components, if any Loader loader = getLoader(); if ((loader != null) && (loader instanceof Lifecycle)) @@ -5104,40 +5102,31 @@ public class StandardContext extends Con } } -} finally { -// Unbinding thread -unbindThread(oldCCL); -} - -if (!getConfigured()) { -log.error( "Error getConfigured"); -ok = false; -} - -// We put the resources into the servlet context -if (ok) -getServletContext().setAttribute -(Globals.RESOURCES_ATTR, getResources()); - -// Binding thread -oldCCL = bindThread(); +if (!getConfigured()) { +log.error( "Error getConfigured"); +ok = false; +} -if (ok ) { -if (getInstanceManager() == null) { -javax.naming.Context context = null; -if (isUseNaming() && getNamingContextListener() != null) { -context = getNamingContextListener().getEnvContext(); +// We put the resources into the servlet context +if (ok) +getServletContext().setAttribute +(Globals.RESOURCES_ATTR, getResources()); + +if (ok ) { +if (getInstanceManager() == null) { +javax.naming.Context context = null; +if (isUseNaming() && getNamingContextListener() != null) { +context = getNamingContextListener().getEnvContext(); +} +Map> injectionMap = buildInjectionMap( +getIgnoreAnnotations() ? new NamingResourcesImpl(): getNamingResources()); +setInstanceManager(new DefaultInstanceManager(context, +injectionMap, this, this.getClass().getClassLoader())); +getServletContext().setAttribute( +InstanceManager.class.getName(), getInstanceManager()); } -Map> injectionMap = buildInjectionMap( -getIgnoreAnnotations() ? new NamingResourcesImpl(): getNamingResources()); -setInstanceManager(new DefaultInstanceManager(context, -injectionMap, this, this.getClass().getClassLoader())); -getServletContext().setAttribute( -InstanceManager.class.getName(), getInstanceManager()); } -} -try { // Create context attributes that will be required if (ok) { getServletContext().setAttribute( - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1560164 - /tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
Author: markt Date: Tue Jan 21 20:14:33 2014 New Revision: 1560164 URL: http://svn.apache.org/r1560164 Log: Simplify bind and unbind on stop Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1560164&r1=1560163&r2=1560164&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Tue Jan 21 20:14:33 2014 @@ -5356,34 +5356,28 @@ public class StandardContext extends Con ClassLoader oldCCL = bindThread(); try { - // Stop our child containers, if any final Container[] children = findChildren(); -ClassLoader old = bindThread(); -try { -// Stop ContainerBackgroundProcessor thread -threadStop(); - -for (int i = 0; i < children.length; i++) { -children[i].stop(); -} +// Stop ContainerBackgroundProcessor thread +threadStop(); -// Stop our filters -filterStop(); +for (int i = 0; i < children.length; i++) { +children[i].stop(); +} -Manager manager = getManager(); -if (manager != null && manager instanceof Lifecycle && -((Lifecycle) manager).getState().isAvailable()) { -((Lifecycle) manager).stop(); -} +// Stop our filters +filterStop(); -// Stop our application listeners -listenerStop(); -} finally{ -unbindThread(old); +Manager manager = getManager(); +if (manager != null && manager instanceof Lifecycle && +((Lifecycle) manager).getState().isAvailable()) { +((Lifecycle) manager).stop(); } +// Stop our application listeners +listenerStop(); + // Finalize our character set mapper setCharsetMapper(null); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1560177 - /tomcat/trunk/java/org/apache/jasper/compiler/ELParser.java
Author: markt Date: Tue Jan 21 20:56:21 2014 New Revision: 1560177 URL: http://svn.apache.org/r1560177 Log: Remove unnecessary code Modified: tomcat/trunk/java/org/apache/jasper/compiler/ELParser.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/ELParser.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ELParser.java?rev=1560177&r1=1560176&r2=1560177&view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/ELParser.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/ELParser.java Tue Jan 21 20:56:21 2014 @@ -155,7 +155,7 @@ public class ELParser { if (hasNext()) { Token t2 = nextToken(); if (t2 instanceof Id) { -s1 = s2.trim(); +s1 = s2; s2 = t2.toTrimmedString(); if (hasNext()) { curToken = nextToken(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1560180 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: markt Date: Tue Jan 21 20:57:30 2014 New Revision: 1560180 URL: http://svn.apache.org/r1560180 Log: Address review comment and provide a combined patch. Modified: tomcat/tc6.0.x/trunk/STATUS.txt Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1560180&r1=1560179&r2=1560180&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Jan 21 20:57:30 2014 @@ -38,13 +38,10 @@ PATCHES PROPOSED TO BACKPORT: * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56029 Regression in fix for BZ55198 broke parsing of some ternary expressions - https://svn.apache.org/r1559555 - https://svn.apache.org/r1559708 (excluding test case) - https://svn.apache.org/r1559820 (overwritten by r1560023, may be needed for a clean svn merge) - https://svn.apache.org/r1560023 (excluding test case) + Align tc6 implementation with that of trunk (diff to trunk is easy to review) + http://people.apache.org/~markt/patches/2014-01-21-ELParser-tc6-v1.patch +1: markt -1: - rjung: a combined patch would be useful, merging seems to be non-trivial PATCHES/ISSUES THAT ARE STALLED: - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot failure in ASF Buildbot on tomcat-7-trunk
The Buildbot has detected a new failure on builder tomcat-7-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-7-trunk/builds/1701 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1560159 Blamelist: markt BUILD FAILED: failed compile_1 sincerely, -The Buildbot
buildbot failure in ASF Buildbot on tomcat-trunk
The Buildbot has detected a new failure on builder tomcat-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-trunk/builds/5423 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1560158 Blamelist: markt BUILD FAILED: failed compile_1 sincerely, -The Buildbot
svn commit: r1560212 - /tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java
Author: markt Date: Tue Jan 21 22:32:24 2014 New Revision: 1560212 URL: http://svn.apache.org/r1560212 Log: Fix order of magnitude error in the wait time Modified: tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java Modified: tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java?rev=1560212&r1=1560211&r2=1560212&view=diff == --- tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java (original) +++ tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java Tue Jan 21 22:32:24 2014 @@ -142,7 +142,7 @@ public class TestWebSocketFrameClient ex // should be a lot faster. System.out.println("Waiting for connection to be closed"); count = 0; -limit = 1; +limit = 100; while (TesterFirehoseServer.Endpoint.getOpenConnectionCount() != 0 && count < limit) { Thread.sleep(100); count ++; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1560213 - /tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java
Author: markt Date: Tue Jan 21 22:44:17 2014 New Revision: 1560213 URL: http://svn.apache.org/r1560213 Log: Writes don't timeout currently with BIO Modified: tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java Modified: tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java?rev=1560213&r1=1560212&r2=1560213&view=diff == --- tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java (original) +++ tomcat/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java Tue Jan 21 22:44:17 2014 @@ -92,6 +92,12 @@ public class TestWebSocketFrameClient ex @Test public void testBug56032() throws Exception { +// TODO Investigate options to get this test to pass with the HTTP BIO +// connector. +if (getTomcatInstance().getConnector().getProtocol().equals( +"org.apache.coyote.http11.Http11Protocol")) { +return; +} Tomcat tomcat = getTomcatInstance(); // Must have a real docBase - just use temp @@ -142,7 +148,7 @@ public class TestWebSocketFrameClient ex // should be a lot faster. System.out.println("Waiting for connection to be closed"); count = 0; -limit = 100; +limit = (TesterFirehoseServer.SEND_TIME_OUT_MILLIS * 2) / 100; while (TesterFirehoseServer.Endpoint.getOpenConnectionCount() != 0 && count < limit) { Thread.sleep(100); count ++; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1560214 - in /tomcat/tc7.0.x/trunk: ./ test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java
Author: markt Date: Tue Jan 21 22:45:35 2014 New Revision: 1560214 URL: http://svn.apache.org/r1560214 Log: Back port unit test fixes / improvements Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1560212-1560213 Modified: tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java?rev=1560214&r1=1560213&r2=1560214&view=diff == --- tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java Tue Jan 21 22:45:35 2014 @@ -98,6 +98,12 @@ public class TestWebSocketFrameClient ex @Test public void testBug56032() throws Exception { +// TODO Investigate options to get this test to pass with the HTTP BIO +// connector. +if (getTomcatInstance().getConnector().getProtocol().equals( +"org.apache.coyote.http11.Http11Protocol")) { +return; +} Tomcat tomcat = getTomcatInstance(); // Must have a real docBase - just use temp @@ -148,7 +154,7 @@ public class TestWebSocketFrameClient ex // should be a lot faster. System.out.println("Waiting for connection to be closed"); count = 0; -limit = 1; +limit = (TesterFirehoseServer.SEND_TIME_OUT_MILLIS * 2) / 100; while (TesterFirehoseServer.Endpoint.getOpenConnectionCount() != 0 && count < limit) { Thread.sleep(100); count ++; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot success in ASF Buildbot on tomcat-trunk
The Buildbot has detected a restored build on builder tomcat-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-trunk/builds/5425 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1560213 Blamelist: markt Build succeeded! sincerely, -The Buildbot
svn commit: r1560237 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/jasper/compiler/ELFunctionMapper.java java/org/apache/jasper/compiler/ELNode.java java/org/apache/jasper/compiler/ELParser.java
Author: kkolinko Date: Wed Jan 22 02:46:08 2014 New Revision: 1560237 URL: http://svn.apache.org/r1560237 Log: Merging ELParser changes from trunk, to better align TC7 code with trunk here (proposed TC6 patch for BZ 56029 already ports these changes to Tomcat 6) This commit is a merge of r1374086 minus Java 7 generics changes: Code clean-up - UCDetector use of final Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELFunctionMapper.java tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELNode.java tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELParser.java Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1374086 Modified: tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELFunctionMapper.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELFunctionMapper.java?rev=1560237&r1=1560236&r2=1560237&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELFunctionMapper.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELFunctionMapper.java Wed Jan 22 02:46:08 2014 @@ -74,7 +74,7 @@ public class ELFunctionMapper { * Use a global name map to facilitate reuse of function maps. * The key used is prefix:function:uri. */ -private HashMap gMap = new HashMap(); +private final HashMap gMap = new HashMap(); @Override public void visit(Node.ParamAction n) throws JasperException { @@ -163,9 +163,8 @@ public class ELFunctionMapper { // Only care about functions in ELNode's class Fvisitor extends ELNode.Visitor { -ArrayList funcs = -new ArrayList(); -HashMap keyMap = new HashMap(); +final ArrayList funcs = new ArrayList(); +final HashMap keyMap = new HashMap(); @Override public void visit(ELNode.Function n) throws JasperException { String key = n.getPrefix() + ":" + n.getName(); Modified: tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELNode.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELNode.java?rev=1560237&r1=1560236&r2=1560237&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELNode.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELNode.java Wed Jan 22 02:46:08 2014 @@ -48,8 +48,8 @@ abstract class ELNode { */ public static class Root extends ELNode { -private ELNode.Nodes expr; -private char type; +private final ELNode.Nodes expr; +private final char type; Root(ELNode.Nodes expr, char type) { this.expr = expr; @@ -75,7 +75,7 @@ abstract class ELNode { */ public static class Text extends ELNode { -private String text; +private final String text; Text(String text) { this.text = text; @@ -97,7 +97,7 @@ abstract class ELNode { */ public static class ELText extends ELNode { -private String text; +private final String text; ELText(String text) { this.text = text; @@ -120,8 +120,8 @@ abstract class ELNode { */ public static class Function extends ELNode { -private String prefix; -private String name; +private final String prefix; +private final String name; private final String originalText; private String uri; private FunctionInfo functionInfo; @@ -193,7 +193,7 @@ abstract class ELNode { EL expression, for communication to Generator. */ String mapName = null;// The function map associated this EL -private List list; +private final List list; public Nodes() { list = new ArrayList(); Modified: tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELParser.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELParser.java?rev=1560237&r1=1560236&r2=1560237&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELParser.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELParser.java Wed Jan 22 02:46:08 2014 @@ -40,18 +40,16 @@ public class ELParser { private Token prevToken; // previous token private String whiteSpace = ""; -private ELNode.Nodes expr; +private final ELNode.Nodes expr; private ELNode.Nodes ELexpr; private int index; // Current index of the expression -private String e
svn commit: r1560238 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/jasper/compiler/ELParser.java
Author: kkolinko Date: Wed Jan 22 02:55:20 2014 New Revision: 1560238 URL: http://svn.apache.org/r1560238 Log: Merging ELParser changes from trunk, to better align TC7 code with trunk here (proposed TC6 patch for BZ 56029 already ports these changes to Tomcat 6) Merged r1410742 from tomcat/trunk: Refactor since returning -1 makes no sense with chars. The old code worked but it was a little odd (and FindBugs didn't like it). Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELParser.java Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1410742 Modified: tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELParser.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELParser.java?rev=1560238&r1=1560237&r2=1560238&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELParser.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELParser.java Wed Jan 22 02:55:20 2014 @@ -265,8 +265,9 @@ public class ELParser { char ch = nextChar(); if (Character.isJavaIdentifierStart(ch)) { int start = index - 1; -while ((ch = peekChar()) != -1 -&& Character.isJavaIdentifierPart(ch)) { +while (index < expression.length() && +Character.isJavaIdentifierPart( +ch = expression.charAt(index))) { nextChar(); } return new Id(getAndResetWhiteSpace(), expression.substring(start, index)); @@ -334,13 +335,6 @@ public class ELParser { return expression.charAt(index++); } -private char peekChar() { -if (index >= expression.length()) { -return (char) -1; -} -return expression.charAt(index); -} - private int getIndex() { return index; } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1560240 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/jasper/compiler/ELParser.java
Author: kkolinko Date: Wed Jan 22 02:57:47 2014 New Revision: 1560240 URL: http://svn.apache.org/r1560240 Log: Merging ELParser changes from trunk, to better align TC7 code with trunk here (proposed TC6 patch for BZ 56029 already ports these changes to Tomcat 6) Merged r1560177 from tomcat/trunk: Remove unnecessary code Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELParser.java Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1560177 Modified: tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELParser.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELParser.java?rev=1560240&r1=1560239&r2=1560240&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELParser.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELParser.java Wed Jan 22 02:57:47 2014 @@ -155,7 +155,7 @@ public class ELParser { if (hasNext()) { Token t2 = nextToken(); if (t2 instanceof Id) { -s1 = s2.trim(); +s1 = s2; s2 = t2.toTrimmedString(); if (hasNext()) { curToken = nextToken(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1560244 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: kkolinko Date: Wed Jan 22 03:28:04 2014 New Revision: 1560244 URL: http://svn.apache.org/r1560244 Log: votes Modified: tomcat/tc6.0.x/trunk/STATUS.txt Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1560244&r1=1560243&r2=1560244&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Jan 22 03:28:04 2014 @@ -34,13 +34,20 @@ PATCHES PROPOSED TO BACKPORT: NIO tolerate it as well http://people.apache.org/~markt/patches/2014-01-18-ciphers-whitespace-nio-tc6-v1.patch +1: markt, rjung + +1: kkolinko: OK, though I have two comments: + 1. If we align NIO and BIO here, the code in JSSESocketFactory.getEnabledCiphers(..) + also skips empty tokens. + 2. There is similar code in TC7 & trunk in AbstractEndpoint.setCiphers(), + but it has not been fixed yet. + Actually as far as I see the ciphersarr is never used in TC7 & + trunk, as there are no calls to AbstractEndpoint.getCiphersArray(). -1: * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56029 Regression in fix for BZ55198 broke parsing of some ternary expressions Align tc6 implementation with that of trunk (diff to trunk is easy to review) http://people.apache.org/~markt/patches/2014-01-21-ELParser-tc6-v1.patch - +1: markt + +1: markt, kkolinko -1: - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1560214 - in /tomcat/tc7.0.x/trunk: ./ test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java
2014/1/22 : > Author: markt > Date: Tue Jan 21 22:45:35 2014 > New Revision: 1560214 > > URL: http://svn.apache.org/r1560214 > Log: > Back port unit test fixes / improvements > > Modified: > tomcat/tc7.0.x/trunk/ (props changed) > > tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java > > Propchange: tomcat/tc7.0.x/trunk/ > -- > Merged /tomcat/trunk:r1560212-1560213 > > Modified: > tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java > URL: > http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java?rev=1560214&r1=1560213&r2=1560214&view=diff > == > --- > tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java > (original) > +++ > tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java > Tue Jan 21 22:45:35 2014 > @@ -98,6 +98,12 @@ public class TestWebSocketFrameClient ex > > @Test > public void testBug56032() throws Exception { > +// TODO Investigate options to get this test to pass with the HTTP > BIO > +// connector. > +if (getTomcatInstance().getConnector().getProtocol().equals( > +"org.apache.coyote.http11.Http11Protocol")) { > +return; > +} Connector.getProtocol() returns "HTTP/1.1" for BIO connector in Tomcat 7. Thus the above condition fails and the test is not skipped. This code works in trunk, as the "HTTP/1.1" value is returned for NIO connector there. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56050] New: NPE in WebappClassLoader.clearReferencesJdbc on shutdown
https://issues.apache.org/bugzilla/show_bug.cgi?id=56050 Bug ID: 56050 Summary: NPE in WebappClassLoader.clearReferencesJdbc on shutdown Product: Tomcat 7 Version: 7.0.50 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: alex.panche...@gmail.com We run tomcat with a few web applications, recently tomcat was updated from 7.0.35 to 7.0.50 and now on server shutdown an exception is reported for every context: Jan 21, 2014 4:47:06 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc WARNING: JDBC driver de-registration failed for web application [/manager] java.lang.NullPointerException at org.apache.catalina.loader.WebappClassLoader.clearReferencesJdbc(WebappClassLoader.java:2054) at org.apache.catalina.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1990) at org.apache.catalina.loader.WebappClassLoader.stop(WebappClassLoader.java:1902) at org.apache.catalina.loader.WebappLoader.stopInternal(WebappLoader.java:662) at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232) at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5527) at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232) at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1575) at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1564) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:701) java -version java version "1.6.0_27" OpenJDK Runtime Environment (IcedTea6 1.12.6) (6b27-1.12.6-1ubuntu0.12.04.4) OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode) Ubuntu 12.04 with binary packages from https://launchpad.net/ubuntu/+source/tomcat7 I am sure how it fails, the referenced lines are: 2053:Class lpClass = 2054: defineClass("org.apache.catalina.loader.JdbcLeakPrevention", 2055:classBytes, 0, offset, this.getClass().getProtectionDomain()); -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56050] NPE in WebappClassLoader.clearReferencesJdbc on shutdown
https://issues.apache.org/bugzilla/show_bug.cgi?id=56050 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #1 from Mark Thomas --- Please user the users mailing list if you require further assistance with this warning message about an application memory leak. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 56050] NPE in WebappClassLoader.clearReferencesJdbc on shutdown
https://issues.apache.org/bugzilla/show_bug.cgi?id=56050 Mark Thomas changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|INVALID |--- --- Comment #2 from Mark Thomas --- Ignore my last. I read the stacktrace too quickly. The NPE shouldn't happen. I'll take a look. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org