File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323 setcode do
2424 unless [ 'openbsd' , 'darwin' ] . include? Facter . value ( :operatingsystem ) . downcase
2525 if Facter ::Util ::Resolution . which ( 'java' )
26- Facter ::Util ::Resolution . exec ( 'java -Xmx8m -version 2>&1' ) . lines . first . split ( /"/ ) [ 1 ] . strip
26+ Facter ::Util ::Resolution . exec ( 'java -Xmx12m -version 2>&1' ) . lines . first . split ( /"/ ) [ 1 ] . strip
2727 end
2828 end
2929 end
3535 setcode do
3636 Facter ::Util ::Resolution . with_env ( "PATH" => '/usr/local/jdk-1.7.0/jre/bin:/usr/local/jre-1.7.0/bin' ) do
3737 if Facter ::Util ::Resolution . which ( 'java' )
38- Facter ::Util ::Resolution . exec ( 'java -Xmx8m -version 2>&1' ) . lines . first . split ( /"/ ) [ 1 ] . strip
38+ Facter ::Util ::Resolution . exec ( 'java -Xmx12m -version 2>&1' ) . lines . first . split ( /"/ ) [ 1 ] . strip
3939 end
4040 end
4141 end
4646 has_weight 100
4747 setcode do
4848 unless /Unable to find any JVMs matching version/ =~ Facter ::Util ::Resolution . exec ( '/usr/libexec/java_home --failfast 2>&1' )
49- Facter ::Util ::Resolution . exec ( 'java -Xmx8m -version 2>&1' ) . lines . first . split ( /"/ ) [ 1 ] . strip
49+ Facter ::Util ::Resolution . exec ( 'java -Xmx12m -version 2>&1' ) . lines . first . split ( /"/ ) [ 1 ] . strip
5050 end
5151 end
5252end
Original file line number Diff line number Diff line change 1919OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode)
2020 EOS
2121 Facter ::Util ::Resolution . expects ( :which ) . with ( "java" ) . returns ( '/usr/local/jdk-1.7.0/jre/bin/java' )
22- Facter ::Util ::Resolution . expects ( :exec ) . with ( "java -Xmx8m -version 2>&1" ) . returns ( java_version_output )
22+ Facter ::Util ::Resolution . expects ( :exec ) . with ( "java -Xmx12m -version 2>&1" ) . returns ( java_version_output )
2323 expect ( Facter . value ( :java_version ) ) . to eq ( "1.7.0_71" )
2424 end
2525 end
3535Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
3636 EOS
3737 Facter ::Util ::Resolution . expects ( :exec ) . with ( "/usr/libexec/java_home --failfast 2>&1" ) . returns ( "/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home" )
38- Facter ::Util ::Resolution . expects ( :exec ) . with ( "java -Xmx8m -version 2>&1" ) . returns ( java_version_output )
38+ Facter ::Util ::Resolution . expects ( :exec ) . with ( "java -Xmx12m -version 2>&1" ) . returns ( java_version_output )
3939 expect ( Facter . value ( :java_version ) ) . to eql "1.7.0_71"
4040 end
4141 end
5050Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
5151Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
5252 EOS
53- Facter ::Util ::Resolution . expects ( :exec ) . with ( "java -Xmx8m -version 2>&1" ) . returns ( java_version_output )
53+ Facter ::Util ::Resolution . expects ( :exec ) . with ( "java -Xmx12m -version 2>&1" ) . returns ( java_version_output )
5454 expect ( Facter . value ( :java_version ) ) . to eq ( "1.7.0_71" )
5555 end
5656 end
You can’t perform that action at this time.
0 commit comments