Skip to content
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

PiranhaJava // print warning when .properties is used after v0.0.4 #49

Closed
pranavsb opened this issue Jun 13, 2020 · 0 comments
Closed
Assignees

Comments

@pranavsb
Copy link
Contributor

Version 0.0.4 moves to a JSON format for the Piranha config.
When users upgrade, they would have their old piranha.properties files lying around.
Piranha should print a warning and point them to the documentation so they can move to a json config.

For context:
#39 (comment)

@lazaroclapp lazaroclapp self-assigned this Jun 15, 2020
lazaroclapp added a commit that referenced this issue Jun 16, 2020
This change:
a) Switches `Map<String, List<Map<String, Object>>>` for an immutable map
   of structured records (PiranhaMethodRecord) [#54]
b) Performs ALL configuration parsing at init() time.
c) Removes confused mixed uses of two ParseException classes (one from
  `java.text.` and the other from `org.json.simple.parser.` and
   introduces our own `PiranhaConfigurationException` to encapsulate
   everything that can go wrong during Piranha configuration/initialization.
d) Adds a WARNING when seeing an old-format `piranha.properties` file. It
   adds a test for this. [#49]
e) Removes `throws` clause from the `XPFlagCleaner` constructor, as that
   exception can no longer happen there (it must happen during the latter
   call to `init()` and Piranha just silently disables itself in that case)

The change to `XPFlagCleanerTest` is huge, but mostly just removing redundant
try{...}catch{...} blocks for the never thrown exception in (e).
mkr-plse pushed a commit that referenced this issue Jun 16, 2020
* Refactor PiranhaJava configuration internals.

This change:
a) Switches `Map<String, List<Map<String, Object>>>` for an immutable map
   of structured records (PiranhaMethodRecord) [#54]
b) Performs ALL configuration parsing at init() time.
c) Removes confused mixed uses of two ParseException classes (one from
  `java.text.` and the other from `org.json.simple.parser.` and
   introduces our own `PiranhaConfigurationException` to encapsulate
   everything that can go wrong during Piranha configuration/initialization.
d) Adds a WARNING when seeing an old-format `piranha.properties` file. It
   adds a test for this. [#49]
e) Removes `throws` clause from the `XPFlagCleaner` constructor, as that
   exception can no longer happen there (it must happen during the latter
   call to `init()` and Piranha just silently disables itself in that case)

The change to `XPFlagCleanerTest` is huge, but mostly just removing redundant
try{...}catch{...} blocks for the never thrown exception in (e).

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

No branches or pull requests

2 participants