* Use File.list and File.walk within a try with resource
The API contract of File.list and File.walk requires them to be closed after use.
* Fix from review
Left out filter
* Fix from review
Factored out deleteFile with better debug
* Fix from review
Can delete files whilst walking
* Fix from review
Restored sweepFile
fixed minor code suggestions
* Fixes#5521 ResourceCollection NPE
Fix constructor and addPath so that all resources in a RC must exist when created.
* Fixes#5521 ResourceCollection NPE
Cleanup the vestiges of non existent directories detected by resource ending in /
* Fixes#5521 ResourceCollection NPE
Revert adding paths ending in / as jar:file resource needs them
* feedback from review
improved javadoc.
* SessionCookieConfig name may be null
Protect against NPE by make a null name in SessionCookieConfig deactive session cookies.
* SessionCookieConfig name may be null
Protect against NPE by make a null name in SessionCookieConfig deactive session cookies.
* SessionCookieConfig name may be null
Protect against NPE by make a null name in SessionCookieConfig deactive session cookies.
* feedback from review
added static method to convert null name to default.
* Issue #5357 - Updating to https://eclipse.org/
- Removing redundant <url> refs in pom.xml
- Correcting bad indenting from merge
- Correcting mailing list references
- Correcting bugs.eclipse.org references
- Correcting text file references
- Correcting html references
- Correcting further references
- Correcting download.eclipse.org reference
- Adding test for demo-base /proxy/current/
- Ensuring jetty-client is included in javadoc-proxy.war/WEB-INF/lib
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
+ Cleanup of test-servlet-spec webapp
+ Removing unused methods
+ Commented System.err.println moved to java.util.logging
+ General checkstyle cleanup (empty lines, spacing, etc)
+ Eliminate bogus WebApp LIB ordering tests.
+ No ClassLoader has a order guarantee.
+ Moving HttpSessionListenerTest contents to existing SessionListenerTest
+ Cleanup of SessionListenerTest with eye to resource cleanup
+ Removing ServletContextListenerTest as it duplicates tests
+ Restoring WebAppClassLoaderTest test method
+ `ordering()` is now `testClashingResource()` and properly
tests assumptions when dealing with a ClassLoader.
The old test assumed guaranteed order from a ClassLoader,
which is not a feature of any Java ClassLoader.
Especially so for URLClassLoader.
+ Restoring clashing resource test
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
+ Reverting name ResourceFactory.newResource(String)
to .getResource(String)
+ Reintroducing Resource.getResource(String)
+ ResourceHandler.getResource(String) cleaned up
in light of Exception handling requirement
+ Resource.addPath(String) implementations can
never return null now
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
+ Now parsed by WebAppContext into List<Resource>
+ Reintroduced Resource.fromList
+ Refactored ResourceFactory to never return null
and always throw an exception if unable to
get/create/resolve the Resource
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
+ Introduce new Resource.fromReferences to help with
parsing delimited resource reference lists.
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
+ More tests for both relative and absolute path references
+ More testing that will trigger quirks on Windows builds
so that we can catch regressions faster
+ Reworked WebInfConfiguration to be glob aware in a way
similar to how WebAppClassLoader behaves.
+ Reworked Resource.newResource(String) to delegate
canonical path resolution to PathResource
+ Guarded PathResource's usage of Path.toAbsolutePath()
to ignore valid conditions where the Path cannot be
resolved to an absolute path (yet)
+ Normalize resolved paths in PathResource
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
* Issue #5088 Review ContextHandler locking
The locking was primarily as a memory guard for the availability status, which was already volatile.
Have instead using an AtomicReference with a simple state machine layered on top of start/stop lifecycle.
There was also protection for AttributesMap, which is no longer needed as AttributesMap is now concurrent.
* Issue #5088
updates from review
* Issue #5088
updates from review (better this time)
* Replaced relevant usages of synchronized with AutoLock.
* Made AutoLock serializable since classes that use it may be stored in the HttpSession.
* Added convenience methods to AutoLock to execute lambdas with the lock held.
* Introduced AutoLock.WithCondition to use a Lock and a Condition together.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
* Issue #4741 - fixes to jetty implementation of HttpServletMapping
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
* Issue #4741 - don't lazily generate HttpServletMapping to preserve servletName
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
* Issue #4741 - tests should expect no leading / for matchValue
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
* resolving TODOs from review
- removed pathSpec from Request
- getServletMapping moved to ServletHandler
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
* Issue #4741 - only create HttpServletMapping for exact matches once
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
* use wrapped attributes for async dispatch
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
* Issue #4741 - Changes from review, revert async attribute wrapping
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
* Issue #4741 - Changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
* Issue #4741 Async ServletMapping
Greatly increased the scope of this PR by combining the servletPath and
pathInfo into the ServletPathMapping class that implements the
HttpServletPathMapping interface. This allows us to greatly simplify
the matching of servlets and reduce the number of times we need to
actually to the match per request.
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #4741 Async ServletMapping
Fixed problems with previous commit
more cleanup of attributes in dispatcher.
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #4741 Async ServletMapping
More code cleanups
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #4741 Async ServletMapping
Named dispatch cleanup
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #4741 Async ServletMapping
misc cleanup
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #4741 Async HttpServletMapping
Added tests for named dispatchers
Do not use ServletPathMapping for named dispatch
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #4741 Async HttpServletMapping
renamed confusing isDefault method on ServletMapping
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #4741 Async HttpServletMapping
simplified setAttribute
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #4741 Async HttpServletMapping
added javadoc about AsyncAttributes
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Issue #4741 Async HttpServletMapping
Fixed javadoc
Signed-off-by: Greg Wilkins <gregw@webtide.com>
Co-authored-by: Greg Wilkins <gregw@webtide.com>
* Use HandlerList instead of HandlerCollection
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Use HandlerList instead of HandlerCollection
Signed-off-by: Greg Wilkins <gregw@webtide.com>
Modified jetty-alpn-openjdk8-* classes to support both
pre 8u252 (via alpn-boot) and post 8u252 (via standard API).
Replaced usages of -Xbootclasspath with -javaagent, and
using Jetty ALPN Agent jar rather than Jetty ALPN boot jar.
Removed all alpn-1.8.0*.mod files since now it is
possible to use a fixed version of the ALPN Agent
to cover all the versions.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
* Introducing jetty-slf4j-impl
* Make Jetty use org.slf4j
* Removed most of org.eclipse.jetty.util.log classes
* Left org.eclipse.jetty.util.log.Log and
org.eclipse.jetty.util.log.Logger but as
simple bridge classes that are deprecated
* Migrated code using org.eclipse.jetty.util.log.StacklessLogging
to org.eclipse.jetty.logging.StacklessLogging found in
the jetty-slf4j-impl
* Moved logging start modules from jetty-util to jetty-home
* Simplified logging start modules
* Updated code that was using StdErrLog directly
* Updating module-info.java for org.slf4j
* removing org.eclipse.jetty.util.log.class references
* jetty-start supports manually declared default provider
+ and we use it to default "logging" to the "logging-jetty" provider
* Cleaning up jetty-maven-plugin and IT testing for Logging
* Using old slf4j for it testing
* Updating compiler config to show Xlint:exports warnings
* Updating console-capture and logging-noop
* Adding slf4j bridge (capture) jetty modules
* Updates to jetty logging module locations
* Changing reference to slf4j dependent mod
* Process requested enabled modules in topological order
* Limiting inclusions in shaded jetty-start
+ Also adding note to jetty-util classes that are used by
jetty-start
* Default logging level on baseline logging config is INFO (not DEBUG)
* Changing from system to server classes in logging
* Updating other modules to use new logging names
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>