Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Tero Pihlaja committed May 15, 2019
1 parent 2d0b527 commit 21749f4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libraries/asadmin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ def escape_property(string)
string.to_s.gsub(/([#{Regexp.escape('\/,=:.!$%^&*|{}[]"`~;')}])/) { |match| "\\#{match}" }
end

# asadmin (and REST API) returns JDK version restrictions for JVM options in different format than it requires as input
# This function converts between the return-format and input-format (or optionally without any version)
#
# For example:
# From: "-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.6.jar --> JDK versions: min(1.8.0), max(1.8.0.120) (Inactive on this JDK)"
# To: "[1.8.0|1.8.0u120]-Xbootclasspath/p:${com.sun.aas.installRoot}/lib/grizzly-npn-bootstrap-1.6.jar"
#
def transform_jvm_options(options, withoutversions = false)
options.map do |line|
min = ''
Expand Down

0 comments on commit 21749f4

Please sign in to comment.