-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
remove apache commons libs #8455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove apache commons libs #8455
Conversation
currently play added a lot of "helper" libraries in the past, however with recent JVM upgrades and more and more stuff inside the JVM itself these got more and more unnecessary. Actually this imports some Classes from apache commons lang3, however only a really small subset of the library is imported. The subset itself barly changed over the recent years and Play mostly used just the reflect stuff of commons lang3
|
Looks like the new header plugin does not like it that I tried to keep the apache header. |
| private static <T> List<T> wrapArgsToListIfNeeded(final T... args) { | ||
| List<T> out; | ||
| if (ArrayUtils.isNotEmpty(args) | ||
| if (Optional.ofNullable(args).filter(a -> a.length > 0).isPresent() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be just args != null since we already check the length at the next condition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
of course it can... my parser didn't checked the next line, I just looked at the Source of ArrayUtils and written a replacement... 😊
| * Copyright (C) 2009-2018 Lightbend Inc. <https://www.lightbend.com> | ||
| */ | ||
|
|
||
| /* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exclude the file so sbt-header won't bother you:
playframework/framework/project/BuildSettings.scala
Lines 51 to 52 in 8ef9e47
| excludeFilter in (Compile, headerSources) := HiddenFileFilter || | |
| fileUriRegexFilter(".*/cookie/encoding/.*") || fileUriRegexFilter(".*/inject/SourceProvider.java$"), |
| import java.util.Arrays; | ||
| import java.util.Collection; | ||
| import java.util.List; | ||
| import java.util.Optional; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused import
|
|
||
| ### Removed libraries | ||
|
|
||
| In order to make the default play distribution a bit smaller we removed some libraries. The following libraries are no longer dependencies in Play 2.6, so you will need to manually add them to your build if you use them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"are no longer dependencies in Play 2.7"
marcospereira
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Thanks, @schmitch.
* remove apache commons libs (playframework#8455) * remove apache commons libs currently play added a lot of "helper" libraries in the past, however with recent JVM upgrades and more and more stuff inside the JVM itself these got more and more unnecessary. Actually this imports some Classes from apache commons lang3, however only a really small subset of the library is imported. The subset itself barly changed over the recent years and Play mostly used just the reflect stuff of commons lang3 * Remove set current app when allow global false (playframework#8462) * Remove imports to current app * Add missing deprecation notes * Remove invalid scaladoc tags There is no `@deprecated` tag in scaladocs since we have the `@deprecated` annotation. * Do not set current app when global state is disabled * Configure mima filter * Clear warn messages when using global state * Just stop the current app if global state is enabled * logback graceful shutdown (playframework#8407) * add shutdown hook to logback-play-default.xml playframework#8277 * update SettingsLogger.md documentation playframework#8277 * delete an unnecessary line playframework#8277. * add shutdown hook to logback-play-logSql.xml playframework#8277 * add line playframework#8277 * update SettingsLogger.md playframework#8277 * update SettingsLogger.md playframework#8277
currently play added a lot of "helper" libraries in the past,
however with recent JVM upgrades and more and more stuff inside
the JVM itself these got more and more unnecessary.
Actually this imports some Classes from apache commons lang3,
however only a really small subset of the library is imported.
The subset itself barly changed over the recent years and Play
mostly used just the reflect stuff of commons lang3
Edit:
actually I'm not against these libraries, I'm actually like them, however I think Play should use as few helper libraries as possible. It's easier for users to upgrade them without any breakage and it also reduces the Play footprint.
If people are ok with the PR I will still need to write docs.