Commit Graph

1028 Commits

Author SHA1 Message Date
Arnout Engelen
fe85a7d9e7
Avoid instantiating arbitrary classes
This PR avoids the use of `Class#newInstance`, which is
deprecated in Java 9.

In particular, previously you could set the `config.strategy`
system to an arbitrary class that would get instantiated even
if it was not a subclass of `ConfigLoadingStrategy`. This is
now checked before instantiating the class.

The previous behavior could arguably be considered a security
concern when an attacker has write access to system properties,
though in such a scenario there are likely many other ways to
load arbitrary code.
2022-02-01 14:58:34 +01:00
Enno Runne
80725b89ea
CI: test on JDK 8 and 11 (#757) 2022-01-27 17:01:15 +01:00
Havoc Pennington
141b79f99b
Merge pull request #755 from ennru/ennru-actions-and-jdk17
CI: use GitHub actions; replace JDK11 with JDK17
2022-01-27 07:33:20 -05:00
Enno Runne
f85ecd665a CI: use GitHub actions; replace JDK11 with JDK17 2022-01-27 13:21:04 +01:00
y
6aa24bb481
add new erlang port to readme (#722) 2022-01-27 12:23:37 +01:00
Havoc Pennington
b443c29529
Merge pull request #749 from sksamuel/patch-1 2021-12-13 07:20:56 -05:00
Sam Sam
c40cbaef97
Added hoplite to Kotlin wrappers 2021-12-12 14:36:21 -06:00
Lukasz Lenart
4e3996f0c1
Fixes wrong url in news.md (#723) 2021-09-16 12:48:32 +02:00
Havoc Pennington
2c0ac854e8
Merge pull request #731 from hkupty/drop-array-from-fast-path 2021-05-28 09:07:40 -04:00
Henry Kupty
fca5de9004 Remove unnecessary array
Usage of this array seems to have been dropped by #280, but the array
remained.

Cleaning up so it doesn't allocate the array needlessly anymore.

Fixes #730.
2021-05-21 23:23:33 +02:00
Siu Leung Chan
f92a4ee2f6
Update repo path for Ficus (#694)
Update the repo path as it is adopted by iHeartRadio
2020-12-10 15:23:50 +01:00
Andrea Peruffo
ee92d7f4c2
Release notes for 1.4.1 (#716)
* Release 1.4.1

* minor release notes updates

* minor rephrasing
2020-10-23 00:13:34 +01:00
Havoc Pennington
7c44daf5f5
Merge pull request #711 from andreaTP/improve-set-array-values
Improve set array values section
2020-10-02 14:25:54 -04:00
Andrea Peruffo
f3650a3e51 Improve set array values section 2020-10-02 16:35:47 +01:00
Ignasi Marimon-Clos
c87f9f945c
Use the correct name (#710)
- also fixed capitalization

Co-Authored-By: Sebastian Alfers <sebastian.alfers@lightbend.com>
2020-10-01 17:09:28 +02:00
Ignasi Marimon-Clos
8648e07976
Introduce docs for arrays on env vars (#706)
* Introduce array support from java arguments
2020-10-01 16:15:32 +02:00
Havoc Pennington
82df5a6b75
Merge pull request #709 from bbaldino/fix_parse_replacement
use correct ParseOptions object
2020-09-24 15:58:24 -04:00
Brian Baldino
4be9b6dd8c use correct ParseOptions object 2020-09-24 12:50:52 -07:00
Havoc Pennington
2d43727310
Merge pull request #708 from bbaldino/parse_app_overrides
Split out a helper method for parsing only application overrides
2020-09-23 15:28:40 -04:00
Brian Baldino
5029d9325c add @since tags 2020-09-23 12:22:00 -07:00
Brian Baldino
f3baf1dfba use ensureClassLoader 2020-09-23 09:15:17 -07:00
Brian Baldino
83349ecbfa add parseApplicationReplacement overrides 2020-09-23 09:15:17 -07:00
Brian Baldino
1428ebb894 remove accidentally committed files 2020-09-23 09:13:05 -07:00
Brian Baldino
bba56f2e98 return an Optional from parseApplicationReplacement 2020-09-23 09:00:03 -07:00
Brian Baldino
7e1c64c9d4 don't use wildcard imports 2020-09-23 08:54:00 -07:00
Brian Baldino
3be726d918 rename method 2020-09-23 08:51:31 -07:00
Brian Baldino
af6b7b8a6a remove unused imports 2020-09-23 08:50:31 -07:00
Brian Baldino
09e2d57e18 Split out a helper method for parsing only application overrides 2020-09-22 15:52:47 -07:00
Havoc Pennington
001e6c3b82
Merge pull request #701 from lightbend/fix-stack-overflow-in-resolve-context
Remove unmodifiable collection wrappers in ResolveContext
2020-09-18 08:18:39 -04:00
Havoc Pennington
4739cba0bd Remove unmodifiable collection wrappers in ResolveContext
This fixes #700 (Java is unhelpful and the Collections.unmodifiableList etc
methods don't check whether the thing is already wrapped).

These were just an assertion basically intended to find any accidental
modification of these collections, so not essential.
2020-07-24 11:20:07 -04:00
Havoc Pennington
e0984d41b0
Merge pull request #686 from andreaTP/fix-playframework-10206
Fix: Avoid loading all the environment variables as configurations
2020-06-24 10:59:25 -04:00
Andrea Peruffo
379a1f056c Fix: Avoid loading all the environment variables as configurations when override_with_env_vars = true 2020-05-07 18:28:56 +01:00
Havoc Pennington
44f21c31b9
Merge pull request #675 from gurkankaymak/patch-1
added go port to the README
2020-03-28 15:33:35 -04:00
Gürkan Kaymak
3e6f6bbf1d
added go port to the README 2020-03-28 21:35:27 +03:00
Adriaan Moors
7486006f07
Merge pull request #666 from roldevg/maven_central_501_error
Fixed 501 error for the maven central link, using of https
2020-02-20 16:16:13 +01:00
Havoc Pennington
d0271d4be7
Merge pull request #663 from mpryahin/master
Support for huge memory units
2020-02-17 11:16:42 -05:00
Evgeniy Roldukhin
ae846e2cab Fixed 501 error for the maven central link, using of https 2020-02-03 13:06:50 +03:00
Mike
89afa77574
Update config/src/main/java/com/typesafe/config/impl/SimpleConfig.java
Co-Authored-By: Havoc Pennington <hp@pobox.com>
2020-01-17 23:29:29 +03:00
mpryahin
b29fdd4a8b fixed contract violation which stems from incorect exception thrown when reading bytes and memorysize values 2020-01-11 21:59:42 +03:00
mpryahin
0b4c9e81ab fixed code formating to reduce diffs 2020-01-09 12:22:19 +03:00
mpryahin
179e6d647a Code review improvements 2020-01-09 12:03:24 +03:00
mpryahin
db6b6dcaf6 removed a redundant method 2019-12-26 23:18:48 +03:00
mpryahin
a789d3884c added Javadocs 2019-12-26 23:09:05 +03:00
mpryahin
50c86cf309 fixed code format 2019-12-26 22:52:48 +03:00
mpryahin
9f29aa5cb0 added support for memory units which don't fit in a long when transformed to bytes 2019-12-26 22:46:08 +03:00
Johan Andrén
e3ec7d3490
Release 1.4.0 (#655) 2019-10-14 10:53:41 +02:00
Havoc Pennington
edf2eaef20
Merge pull request #648 from widgetii/master
Performance fix: added capacity parameter in ArrayLists
2019-09-03 16:46:26 -04:00
Dmitry Ilyin
44daaf87fa Performance fix: added capacity parameter in ArrayLists contructor when adding elements 2019-09-03 21:35:07 +03:00
James Roper
ab890103dd Allow application.conf to override variables in reference.conf (#619)
* Allow application.conf to override variables in reference.conf

Fixes #167

This only affects the output of `ConfigFactory.load`. It does not change
`ConfigFactory.defaultReference`. This uses the unresolved
`reference.conf` in the building of configuration in
`ConfigFactory.load`, effectively allowing `application.conf` properties
to override variable substitutions in `reference.conf`.

However, it still requires `reference.conf` to be fully resolvable, if
it isn't, an exception will be thrown. So two resolves are still done
during load, it's just that the output of the resolve of
`reference.conf` isn't used in building the final configuration. The
documentation has been updated to reflect this behavior.

The reasoning behind this change can be read about in #167, but
essentially, it is not uncommon for configuration properties to depend
on each other by default, a good example of this is directory
hierarchies, where you might have a configuration option for a base
directory, and then a configuration for the log directory that by
default is under the base directory, and within that a configuration for
individual log files which by default are under the log directory.
Without allowing variable substitutions in `reference.conf` from
`application.conf`, there is no point in defining a configuration option
for the base directory since changing it won't have any impact, and each
path defined that depends on it will have to be manually overridden.
This limitation is contrary to convention over configuration best
practices, and hence not desirable in a configuration library.

* Renamed public method to defaultReferenceUnresolved

Also added the methods to ConfigFactory, as requested in code review.
2019-08-20 15:02:50 +02:00
Marcos Pereira
558c1e22f5
Merge pull request #632 from raboof/jdk11
Test on JDK 11
2019-06-23 17:08:26 -04:00