From 28a6bb158a2a7bdb33354a27d934626936f9160a Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Wed, 12 Jun 2013 18:51:29 +0200 Subject: [PATCH] Removed a few obsolete usages, and benefit from new classes from EiffelStudio >= 7.2 --- .../openid/consumer/demo/application.e | 23 ++++++++++++++----- .../openid/consumer/src/openid_consumer.e | 2 +- library/server/libfcgi/interface/fcgi_i.e | 12 +++++----- .../wsf_openshift_service_launcher.e | 19 +++++++++++---- 4 files changed, 38 insertions(+), 18 deletions(-) diff --git a/library/security/openid/consumer/demo/application.e b/library/security/openid/consumer/demo/application.e index c92a7146..b74ef494 100644 --- a/library/security/openid/consumer/demo/application.e +++ b/library/security/openid/consumer/demo/application.e @@ -12,13 +12,18 @@ inherit undefine requires_proxy end - + WSF_URI_TEMPLATE_HELPER_FOR_ROUTED_SERVICE WSF_SERVICE WSF_NO_PROXY_POLICY + SHARED_EXECUTION_ENVIRONMENT + export + {NONE} all + end + create make_and_launch @@ -42,14 +47,20 @@ feature {NONE} -- Initialization on_launched (conn: WGI_CONNECTOR) local e: EXECUTION_ENVIRONMENT + cmd: STRING_32 do if attached {WGI_NINO_CONNECTOR} conn as nino then - create e - if attached e.get ("COMSPEC") as l_comspec then - e.launch (l_comspec + " /C start " + "http://localhost:" + nino.port.out + "/") - else - e.launch ("http://localhost:" + nino.port.out + "/") + e := execution_environment + create cmd.make (32) + if attached e.item ("COMSPEC") as l_comspec then + cmd.append (l_comspec) + cmd.append ({STRING_32} " /C start ") end + cmd.append ("http://localhost:") + cmd.append_integer (nino.port) + cmd.append_character ({CHARACTER_32} '/') + + e.launch (cmd) end end diff --git a/library/security/openid/consumer/src/openid_consumer.e b/library/security/openid/consumer/src/openid_consumer.e index 2dcc090c..68b73a5c 100644 --- a/library/security/openid/consumer/src/openid_consumer.e +++ b/library/security/openid/consumer/src/openid_consumer.e @@ -137,7 +137,7 @@ feature {OPENID_CONSUMER_VALIDATION} -- Implementation sess: HTTP_CLIENT_SESSION ctx: detachable HTTP_CLIENT_REQUEST_CONTEXT xrds_location: detachable READABLE_STRING_8 - xml: XML_LITE_PARSER + xml: XML_STANDARD_PARSER tree: XML_CALLBACKS_DOCUMENT xelt: detachable XML_ELEMENT s: READABLE_STRING_32 diff --git a/library/server/libfcgi/interface/fcgi_i.e b/library/server/libfcgi/interface/fcgi_i.e index b568f197..08ec4242 100644 --- a/library/server/libfcgi/interface/fcgi_i.e +++ b/library/server/libfcgi/interface/fcgi_i.e @@ -19,21 +19,21 @@ feature {NONE} -- Initialization feature -- Access - updated_environ_variables: HASH_TABLE [STRING, STRING] + updated_environ_variables: STRING_TABLE [READABLE_STRING_8] local i: INTEGER p, v, null: POINTER do p := fcgi_environ - create Result.make (50) + create Result.make_equal (50) if p /= null then from i := 0 - v := fcgi_i_th_environ (i,p) + v := fcgi_i_th_environ (i, p) until v = null loop - if attached separated_variables (create {STRING}.make_from_c (v)) as t then + if attached separated_variables (create {STRING_8}.make_from_c (v)) as t then Result.force (t.value, t.key) end i := i + 1 @@ -196,7 +196,7 @@ feature {NONE} -- Implementation: Environment "return ((char **)$p)[$i];" end - separated_variables (a_var: STRING): detachable TUPLE [value: STRING; key: STRING] + separated_variables (a_var: READABLE_STRING_8): detachable TUPLE [value: READABLE_STRING_8; key: READABLE_STRING_8] -- Given an environment variable `a_var' in form of "key=value", -- return separated key and value. -- Return Void if `a_var' is in incorrect format. @@ -224,7 +224,7 @@ feature {NONE} -- Implementation: Environment end note - copyright: "Copyright (c) 1984-2011, Eiffel Software and others" + copyright: "Copyright (c) 1984-2013, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software diff --git a/library/server/wsf/connector/openshift/wsf_openshift_service_launcher.e b/library/server/wsf/connector/openshift/wsf_openshift_service_launcher.e index cd5ffbc4..5e262ae9 100644 --- a/library/server/wsf/connector/openshift/wsf_openshift_service_launcher.e +++ b/library/server/wsf/connector/openshift/wsf_openshift_service_launcher.e @@ -24,6 +24,11 @@ inherit initialize end + SHARED_EXECUTION_ENVIRONMENT + export + {NONE} all + end + create make, make_and_launch, @@ -37,15 +42,19 @@ feature {NONE} -- Initialization l_env: EXECUTION_ENVIRONMENT do Precursor - create l_env + l_env := execution_environment - if attached l_env.get (Openshift_ip) as l_ip then - server_name := l_ip.to_string_8 + if attached l_env.item (Openshift_ip) as l_ip then + if l_ip.is_valid_as_string_8 then + server_name := l_ip.to_string_8 + else + die ("could not parse " + Openshift_ip) + end else die (Openshift_ip + " is not defined") end - if attached l_env.get (Openshift_port) as l_port then + if attached l_env.item (Openshift_port) as l_port then if l_port.is_integer then port_number := l_port.to_integer else @@ -77,7 +86,7 @@ feature {NONE} -- Implementation ;note - copyright: "2011-2012, Jocelyn Fiat, Javier Velilla, Eiffel Software and others" + copyright: "2011-2013, Jocelyn Fiat, Javier Velilla, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software