Commit Graph

1200 Commits

Author SHA1 Message Date
Greg Wilkins 9706d70484
Jetty 9.4.x reformat (#3811)
* Removing Legacy Method Separators
* Restyling branch `jetty-9.4.x`
* Applying changes highlighted by checkstyle
* Applying XML restyling
* Fixing XML codestyle for IntelliJ
* Fixing XML style mistakes
* Revert "Applying XML restyling"
* Updating checkstyle for XML codestyle
* Reformatting pom.xml files
* Fixed empty string from line wraps
* Update intellij style to not do expression relative formatting. Reformatted code based on that.
* Increasing line split on Eclipse IDE Formatter to 512
* Restoring setting on internal default value.
+ IntelliJ will not export settings on things that set to their
  internal default values.
  We want to keep those values as a hedge against future default
  value changes in future releases of IntelliJ.
* Fixing intellij codestyle
* do not allow single line simple methods
* misc checkstyle fixes
* re-exported with correct name and all values

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-06-24 17:40:30 +02:00
Joakim Erdfelt af4dd0285f Issue #3798 - Prevent NPE on null or partial URI in ClasspathPattern
+ Not allowing URI to be null or non-absolute for location or
  module tests.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-06-21 07:05:55 -05:00
Joakim Erdfelt 1118750139 Issue #3700 - Fixing bad ClasspathPatternTest assumptions
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-06-21 06:55:59 -05:00
Joakim Erdfelt 075333a627 Merge `jetty-9.4.x` into `jetty-9.4.x-3700-felix-webapp-testing`
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

# Conflicts:
#	jetty-util/src/main/java/org/eclipse/jetty/util/TypeUtil.java
2019-06-20 15:37:48 -05:00
Joakim Erdfelt 8d59302978 Issue #3700 - Reworking getLocationOfClass()
+ Reverting commit against IncludeExcludeSet
+ TypeUtil.getLocationOfClass is now MethodHandle based
+ new ModuleLocation class provides Module behaviors for Java 9+
  Runtimes, and is used by new MethodHandle based getLocationOfClass
+ Jetty 10 doesn't need reflect complexity of ModuleLocation class
  and can be inlined as real code in TypeUtil
+ TypeUtil.getLocationOfClass is only guaranteed to return the
  URI to the container holding the location of the class, or null.
  - The JAR file - most common
  - The Directory - 2nd most common - a classpath dir entry
  - The jrt:// module reference - if a module reference
+ URLResource support for results of getLocationOfClass is deprecated
  (nothing was using it anyway)

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-06-20 15:35:10 -05:00
Greg Wilkins 862e6d008e
Jetty 9.4.x 3755 annotation/jndi example cleanup (#3763)
* Issue #3755 Annotation example cleanup

+ Created JettyDistribution class as common utility to locate a jetty distribution for examples.
+ Fixed ServerWithAnnotations to correctly use the test-spec-webapp
+ Added AttributeContainerMap as a better way to treat attribute values as beans. This avoids them appearing twice in a dump and always associates them with their key.
+ Added NamingDump and use it in EnvConfiguration and jetty-plus.xml so that a server dump will contain dumps of the server local tree and each contexts java:comp/env tree
+ Improved the dump format of NamingContext and WebAppContext
+ Improved the toString format of several associated classes

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-06-18 09:50:18 +02:00
Joakim Erdfelt 40e9e053b9
Merge pull request #3768 from eclipse/jetty-9.4.x-3708-stringutil-replace
Issue #3708 - use StringUtil alternatives for known slow JVM impls.
2019-06-13 14:01:35 -05:00
Joakim Erdfelt e81fdbd7c7 Issue #3736 - Give better exception when using bad classloader impl
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-06-12 13:38:45 -05:00
Joakim Erdfelt 877815e195 Issue #3708 - Adding new methods and converting codebase to use them
+ StringUtil.replace(String, char, char)
+ StringUtil.strip(String, String)
+ URIUtil.encodeSpecific(String, String)
+ URIUtil.decodeSpecific(String, String)
+ TypeUtil.toClassReference(Class)
+ TypeUtil.toClassReference(String)

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-06-12 09:56:41 -05:00
Joakim Erdfelt 33fe55c339 Issue #3708 - use StringUtil alternatives for known slow JVM impls.
+ StringUtil.replace()
+ StringUtil.replaceFirst()
+ StringUtil.sanitizeFileSystemPath()

Change existing usages of String.replace() to either
use new StringUtil.replace() or other methods elsewhere
that better suit that specific need.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-06-11 11:25:50 -05:00
Joakim Erdfelt ae21126cad Updating to version 9.4.20-SNAPSHOT 2019-06-10 13:40:17 -05:00
Joakim Erdfelt afcf563148 Updating to version 9.4.19.v20190610 2019-06-10 11:17:56 -05:00
Michael Hausegger e8f11d3c7e Added small performance improvements
Signed-off-by: Michael Hausegger <hausegger.michael@googlemail.com>
2019-05-22 08:27:53 +02:00
Greg Wilkins 6c6646286d cleanup after review
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-05-03 15:25:05 +02:00
Greg Wilkins 1a76d487cc improved names and javadoc
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-05-03 15:25:05 +02:00
Greg Wilkins feb0333844 Fixed IncludeExclude combination logic
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-05-03 15:25:05 +02:00
Joakim Erdfelt 734be56938 Updating to version 9.4.19-SNAPSHOT 2019-04-29 16:27:23 -05:00
Joakim Erdfelt e1bc35120a Updating to version 9.4.18.v20190429 2019-04-29 15:40:33 -05:00
Jan Bartel ab174d1015
Issue #3597 Fix session persistence classloading for deep structures (#3602)
* Issue #3597 Fix session persistence classloading for deep structures with system classes.
2019-04-29 12:05:34 +02:00
Joakim Erdfelt 05bb111580 Updating to version 9.4.18-SNAPSHOT 2019-04-18 15:59:49 -05:00
Joakim Erdfelt aa1c656c31 Updating to version 9.4.17.v20190418 2019-04-18 14:44:28 -05:00
Joakim Erdfelt 5882d63ba7 Updating to version 9.3.28-SNAPSHOT 2019-04-18 13:54:17 -05:00
Joakim Erdfelt d3e249f869 Updating to version 9.3.27.v20190418 2019-04-18 13:10:03 -05:00
Joakim Erdfelt 2c14d93885 Updating to version 9.2.29-SNAPSHOT 2019-04-18 12:17:07 -05:00
Joakim Erdfelt 1dffa36fe3 Updating to version 9.2.28.v20190418 2019-04-18 11:23:17 -05:00
Joakim Erdfelt 79537a5f51 Updating to version 9.4.17-SNAPSHOT 2019-04-11 11:00:24 -05:00
Joakim Erdfelt e0aa4ae4c0 Updating to version 9.4.16.v20190411 2019-04-11 10:01:26 -05:00
Joakim Erdfelt 9b19374c5d Updating to version 9.2.28-SNAPSHOT 2019-04-03 19:38:05 -05:00
Joakim Erdfelt 84dfe74b97 Updating to version 9.2.27.v20190403 2019-04-03 19:04:45 -05:00
Joakim Erdfelt c70034766e Updating to version 9.3.27-SNAPSHOT 2019-04-03 18:46:31 -05:00
Joakim Erdfelt dae476e369 Updating to version 9.3.26.v20190403 2019-04-03 18:16:32 -05:00
Joakim Erdfelt 2ccde9772b Undoing bad release-9.3.26 2019-04-03 18:11:16 -05:00
Greg Wilkins 9f4b3542cb Updating to version 9.3.27-SNAPSHOT 2019-04-03 17:32:08 +11:00
Greg Wilkins 7ec6d2fb32 Updating to version 9.3.26.v20190403 2019-04-03 13:06:51 +11:00
Joakim Erdfelt 73f7975189 Issue #3489 - Allowing JAR directory references on Windows
+ Moving Resource.newResource() to later point

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-03-27 14:14:41 -07:00
Joakim Erdfelt 9cdb59d4d7 Updating to version 9.4.16-SNAPSHOT 2019-02-15 13:35:15 -05:00
Joakim Erdfelt eb70b24016 Updating to version 9.4.15.v20190215 2019-02-15 11:53:00 -05:00
Jan Bartel 9a25f2757e
Issue #3307 WebAppClassLoader.loadClass call resolveClass if resolve==true (#3328)
Signed-off-by: Jan Bartel <janb@webtide.com>
2019-02-07 09:22:42 +11:00
Tushar I cd304eb65b Issue #150: Ability to handle JAR directories in extraClasspath. (#3325)
* Issue #150: Ability to handle JAR directories in extraClasspath. In keeping with Java conventions[0], any directory paths ending in /* should be considered a JAR directory and all jars in that directory will be added (non recursively) to the classpath.

[0] https://docs.oracle.com/javase/8/docs/technotes/tools/windows/classpath.html

Signed-off-by: Tushar Inamdar <tusharinamdar@hotmail.com>
2019-02-06 17:56:54 +11:00
Olivier Lamy 9b7afd8a03
Happy new year!! (#3232)
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-01-01 11:52:16 +10:00
Joakim Erdfelt 29fd18e046 Updating to version 9.4.15-SNAPSHOT 2018-11-14 16:42:40 -06:00
Joakim Erdfelt c4550056e7 Updating to version 9.4.14.v20181114 2018-11-14 15:19:10 -06:00
Joakim Erdfelt a903017f5f Updating to version 9.4.14-SNAPSHOT 2018-11-11 21:06:50 -06:00
Joakim Erdfelt 49123a3313 Updating to version 9.4.13.v20181111 2018-11-11 20:02:42 -06:00
Simone Bordet f814354bb5 Issue #3085 - Restore Dump methods for backwards compatibility reasons.
Restored removed methods to maintain backwards compatibility.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-11-09 17:47:46 +01:00
Greg Wilkins 15e1c73f9c
Cleanup the dump implementation (#2998)
* Cleanup the dump implementation
* improved the clarity of utility methods for dump and updated most dump methods
* fixed upgrade filter dump
* Improved dump after review
* Moved dumpObjects to Dumpable
* implemented dumpBeans with dumpObjects
* less verbose dump
* Dump streams
* fixed dump test

Signed-off-by: Greg Wilkins <gregw@webtide.com>
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-10-22 11:53:59 +11:00
Simone Bordet bd3eeeaa3f Merged branch 'jetty-9.4.x' into 'jetty-9.4.x-2191-jpms_automatic_module_name'. 2018-10-04 12:27:31 +02:00
Greg Wilkins 9d37feba3c
Cleanup after #2903 (#2933)
Improved dump output of ServletHandler and ContextHandler
Fixed duplicate listeners
Removed unused fields

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-10-03 10:00:14 +10:00
Simone Bordet 27e7b3287a Merged branch 'jetty-9.4.x' into 'jetty-9.4.x-2191-jpms_automatic_module_name'. 2018-09-26 13:51:21 +02:00
Simone Bordet 22cbbdc900 Issue #2191 - JPMS Support.
Reverted wrong change in WebInfConfiguration.findAndFilterContainerPaths().

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-09-26 12:41:12 +02:00
Jan Bartel 5593e5b479
Jetty 9.4.x 2903 delay listener instantiation (#2930)
* Issue #2903 Ensure listeners not instantiated for quickstart gen

Signed-off-by: Jan Bartel <janb@webtide.com>
2018-09-26 11:27:57 +10:00
Simone Bordet e4ff653295 Issue #2191 - JPMS Support.
Introduced --jpms option in jetty-start to run Jetty from the module-path.

Introduced [jpms] sections in *.mod files, to specify JPMS command line
options that needs to be added to the command line generated by jetty-start.

Bumped java.transaction-api to 1.3 because it has Automatic-Module-Name.

Fixed ASM version lookup using ManifestUtils.

Fixed WebInfConfiguration.findAndFilterContainerPaths() to properly
scan the module-path, which may contain both files and directories.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-09-25 22:11:25 +02:00
Jan Bartel 2dd5fec4f4
Issue #2740 Ensure OSGiWebappClassLoader uses bundleloader for all loadClass methods. (#2804)
Signed-off-by: Jan Bartel <janb@webtide.com>
2018-09-11 12:04:31 +10:00
Joakim Erdfelt a3f1592c50 Issue #2431 - Upgrade to Junit 5 (#2436)
+ Changes needed for new Junit 5
+ Migrating from Vintage junit API to Jupiter junit API
+ Relies on SNAPSHOT jetty-test-helper
  - this will be a formal release once this issue has been
    resolved satisfactory
+ Have jenkins always pull latest SNAPSHOT for each build
+ Adding jetty.snapshots repository
+ Using surefire 2.22.0 per advice from junit
+ Ensuring <reuseForks>true</reuseForks> to work around issue junit-team/junit5#801
+ Disabling <forkMode>always</forkMode> in maven-surefire-plugin
  due to bug https://github.com/junit-team/junit5/issues/801
+ OSGi tests must remain at vintage due to PaxExam
+ Moving from vintage TestingDir to jupiter WorkDir
+ Fixing imports to use jupiter, not vintage
+ Migrating vintage ExpectedException to jupiter assertThrows
+ Migrating vintage TestName to jupiter TestInfo
+ Migrating @RunWith(Parameterized.class)
  to @ParameterizedTest with Argument Sources
+ Migrating assertTrue(val.contains(needle))
  to assertThat(val, containsString(needle))
+ Aligning junit versions per recommendations from @sormuras
+ Adjusting parameter order change for assertEquals()
+ Test LifeCycle Annotation Migration

junit 4      | junit 5 / jupiter
------------ | -----------
@Before      | @BeforeEach
@After       | @AfterEach
@BeforeClass | @BeforeAll
@AfterClass  | @AfterAll

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2018-09-05 10:07:17 +10:00
Jesse McConnell 863a19bccf
Updating to version 9.3.26-SNAPSHOT 2018-09-04 17:23:31 -05:00
Jesse McConnell 3ce520221d
Updating to version 9.3.25.v20180904 2018-09-04 16:08:21 -05:00
Jesse McConnell dcf6a8fa9f
Updating to version 9.4.13-SNAPSHOT 2018-08-30 10:48:22 -05:00
Jesse McConnell 2720868475
Updating to version 9.4.12.v20180830 2018-08-30 08:56:44 -05:00
Jan Bartel 09be34e08b
Issue #2844 Clean up webdefault and DefaultServlet documentation (#2851)
Signed-off-by: Jan Bartel <janb@webtide.com>
2018-08-28 09:53:06 +10:00
Joakim Erdfelt a90c28bde8 Issue #2835 - Use original WAR Resource for lastModified
+ During WebInfConfiguration.unpack()
  If you have WebAppContext declared with .setWar()
  and it points to a file on the filesystem, use that
  original PathResource object to determine lastModified()
  instead of the forced JarFileResource.
  This is done to avoid URLConnection caching that prevents
  the original WAR file from being deleted / replaced on
  MS Windows.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2018-08-21 16:39:31 -05:00
Kazuhiro Sera 96218e8bc4 Fix typos detected by github.com/client9/misspell
Signed-off-by: Kazuhiro Sera <seratch@gmail.com>
2018-08-10 23:52:16 +09:00
Joakim Erdfelt 516d93c488 Updating to version 9.2.27-SNAPSHOT 2018-08-06 11:33:22 -05:00
Joakim Erdfelt 8c637489ae Updating to version 9.2.26.v20180806 2018-08-06 10:51:25 -05:00
Joakim Erdfelt 0b69f00665 Updating to version 9.4.12-SNAPSHOT 2018-07-11 17:32:16 -05:00
Joakim Erdfelt 260596dd10 Updating to version 9.4.12.RC0 2018-07-11 16:30:55 -05:00
Simone Bordet 253c637742
Fixes #2663 - Guard Throwable.addSuppressed() calls. (#2665)
* Fixes #2663 - Guard Throwable.addSuppressed() calls.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-06-14 15:21:44 +02:00
Greg Wilkins 346879f2a5
Merge pull request #2664 from mperktold/jetty-9.4.x
Issue #2662 Unnecessary boxing conversions
2018-06-13 22:52:27 +02:00
Matthias Perktold f901efc413 Issue #2662 - Unnecessary boxing conversions
Signed-off-by: Matthias Perktold <tias251@gmail.com>
2018-06-13 16:20:12 +02:00
Joakim Erdfelt 0e6c91b604 Updating to version 9.2.26-SNAPSHOT 2018-06-06 18:54:58 -05:00
Joakim Erdfelt 4830fd15e9 Updating to version 9.2.25.v20180606 2018-06-06 16:42:54 -05:00
Joakim Erdfelt e4bfe00dce Updating to version 9.4.12-SNAPSHOT 2018-06-05 14:18:37 -05:00
Joakim Erdfelt d5fc0523cf Updating to version 9.4.11.v20180605 2018-06-05 13:23:02 -05:00
Joakim Erdfelt 5eefa90e05 Updating to version 9.3.25-SNAPSHOT 2018-06-05 13:13:07 -05:00
Joakim Erdfelt 84205aa28f Updating to version 9.3.24.v20180605 2018-06-05 12:11:03 -05:00
Joakim Erdfelt f0ff571c98 Reverting version to 9.3.24-SNAPSHOT 2018-06-05 12:06:58 -05:00
Joakim Erdfelt 13640c297c Bumping version to 9.3.25-SNAPSHOT 2018-06-05 11:58:37 -05:00
Joakim Erdfelt 1732ffca51 Updating to version 9.4.11-SNAPSHOT 2018-05-03 11:48:05 -05:00
Joakim Erdfelt daa59876e6 Updating to version 9.4.10.v20180503 2018-05-03 10:55:19 -05:00
Olivier Lamy f36eba4577
class.newInstance is deprecated #2435 (#2437)
* Class.newInstance() is deprecated in Java 9+ #2435

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2018-04-17 19:07:20 +10:00
Joakim Erdfelt a74a328024 Merge branch 'release-9.4.9' into jetty-9.4.x 2018-03-21 16:33:56 -05:00
Joakim Erdfelt 9c68b141ba Issue #2361 - CachingWebAppClassLoader using cache properly
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2018-03-20 09:30:31 -05:00
Joakim Erdfelt c3cc138a3b Updating to version 9.4.10-SNAPSHOT 2018-03-20 08:25:59 -05:00
Joakim Erdfelt 1f8159b1e4 Updating to version 9.4.9.v20180320 2018-03-20 07:18:24 -05:00
WalkerWatch 534b8ea38b Add edit warning for .mod files. Resolves #173 2018-03-15 13:23:42 -04:00
Greg Wilkins bcb9fa3b32
Merge pull request #2257 from lachlan-roberts/jetty-9.4.x-2206-ReferenceEquality
Resolved errorprone ReferenceEquality warnings #2206
2018-03-07 11:11:40 +11:00
Lachlan Roberts a639ee9275 Resolved errorprone MissingOverride warnings #2206
`@Override` was added to methods which were missing the annotation #2206

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-03-01 13:59:25 +11:00
Joakim Erdfelt a05b157c03 Updating to version 9.3.24-SNAPSHOT 2018-02-28 16:39:30 -06:00
Joakim Erdfelt 0554f8d8b4 Updating to version 9.3.23.v20180228 2018-02-28 15:45:57 -06:00
Lachlan Roberts 0cfc25d4ed Resolved errorprone ReferenceEquality warnings #2206
Objects which inherit or implement an `equals()` method should not be compared with == or !=
When the comparison of references is intentional `@SuppressWarnings("ReferenceEquality")` can be used

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-02-28 14:26:02 +11:00
olivier lamy 0b13e6cddd fix error prone error
Signed-off-by: olivier lamy <olamy@webtide.com>
2018-02-19 15:00:59 +10:00
Joakim Erdfelt c9dd17bf9a
Merge pull request #2110 from eclipse/issue-1602-deployer-error
Issue #1602 - Deployment Error should fail fast
2018-02-08 08:44:19 -06:00
Joakim Erdfelt 3001c8af2f Merge remote-tracking branch 'origin/release-9.2.24' into jetty-9.2.x 2018-02-07 15:35:04 -06:00
Joakim Erdfelt f3c36f804a Issue #1602 - Reverting AbstractLifeCycle changes per review 2018-01-11 16:16:26 -06:00
Joakim Erdfelt 4ba0277c37 Issue #1602 - Requested fixes to StandardStarter and AbstractLifeCycle 2018-01-11 10:00:39 -06:00
Joakim Erdfelt ce84ca35fb Issue #1602 - LifeCycle FAILED fixes
+ AbstractLifeCycle.setFailed(Throwable) is now protected, so
  that the odd usages from WebAppContext.doStart() can be supported
+ The AbstractLifeCycle.doStart() now checks for state == FAILED
2018-01-11 09:36:05 -06:00
Joakim Erdfelt 1440b2d1fa Issue #1602 - WebAppContext Deployment fail should be on Throwable, not Exception 2018-01-09 11:58:57 -06:00
Joakim Erdfelt 21365234f8 Issue #2108 - Updating license headers for year 2018 2018-01-09 09:44:41 -06:00
Joakim Erdfelt 41ed9f29f4 Merge remote-tracking branch 'origin/jetty-9.3.x' into jetty-9.4.x 2018-01-09 09:37:25 -06:00
Joakim Erdfelt fa4c7b0ca9 Issue #2108 - Updating license headers for year 2018 2018-01-09 08:39:37 -06:00
Joakim Erdfelt 067fc5d2d8 Issue #2108 - Upgrade licenses for 2018 2018-01-09 07:42:06 -06:00