Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@schmitch
Copy link
Contributor

@schmitch schmitch commented Jun 3, 2018

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.

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
@schmitch schmitch mentioned this pull request Jun 4, 2018
@schmitch
Copy link
Contributor Author

schmitch commented Jun 4, 2018

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()
Copy link
Member

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?

Copy link
Contributor Author

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>
*/

/*
Copy link
Member

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:

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;
Copy link
Contributor

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.
Copy link
Member

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"

Copy link
Member

@marcospereira marcospereira left a 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.

@schmitch schmitch merged commit 05e5460 into playframework:master Jun 12, 2018
Kavit900 added a commit to Kavit900/playframework that referenced this pull request Jun 14, 2018
* 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
@guizmaii guizmaii mentioned this pull request Aug 6, 2018
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants