juneau-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamesbog...@apache.org
Subject incubator-juneau git commit: JUNEAU-51 - properties added to rest client, serializer, and parser are not available during pojo swap and unswap methods
Date Tue, 23 May 2017 21:51:52 GMT
Repository: incubator-juneau
Updated Branches:
  refs/heads/master a69156a81 -> 953f1d9e3


JUNEAU-51 - properties added to rest client, serializer, and parser are
not available during pojo swap and unswap methods

Project: http://git-wip-us.apache.org/repos/asf/incubator-juneau/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-juneau/commit/953f1d9e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-juneau/tree/953f1d9e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-juneau/diff/953f1d9e

Branch: refs/heads/master
Commit: 953f1d9e395235df1aac0a09a6436b27dcb3d33f
Parents: a69156a
Author: JamesBognar <jamesbognar@apache.org>
Authored: Tue May 23 17:51:48 2017 -0400
Committer: JamesBognar <jamesbognar@apache.org>
Committed: Tue May 23 17:51:48 2017 -0400

----------------------------------------------------------------------
 .../apache/juneau/jena/RdfParserSession.java    |  2 +-
 .../main/java/org/apache/juneau/Context.java    | 15 ++++-
 .../main/java/org/apache/juneau/ObjectMap.java  | 14 +----
 .../java/org/apache/juneau/PropertyStore.java   | 12 ++--
 .../main/java/org/apache/juneau/Session.java    | 64 ++++++++++++++++++--
 .../apache/juneau/html/HtmlDocSerializer.java   |  8 +--
 .../apache/juneau/soap/SoapXmlSerializer.java   |  2 +-
 .../juneau/examples/rest/PhotosResource.java    |  2 +-
 .../examples/rest/RequestEchoResource.java      |  2 +-
 .../juneau/rest/test/AcceptCharsetResource.java |  4 +-
 .../juneau/rest/test/NlsPropertyResource.java   |  2 +-
 .../juneau/rest/test/OnPostCallResource.java    |  3 +-
 .../juneau/rest/test/OnPreCallResource.java     |  5 +-
 .../juneau/rest/test/PropertiesResource.java    |  8 +--
 14 files changed, 97 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/953f1d9e/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserSession.java
----------------------------------------------------------------------
diff --git a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserSession.java b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserSession.java
index f699443..257fc7a 100644
--- a/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserSession.java
+++ b/juneau-core-rdf/src/main/java/org/apache/juneau/jena/RdfParserSession.java
@@ -206,7 +206,7 @@ public class RdfParserSession extends ParserSession {
 	 * @param name The property name.
 	 * @return The new property object.
 	 */
-	public final Property getProperty(String name) {
+	public final Property getRdfProperty(String name) {
 		return model.createProperty(juneauBpNs.getUri(), name);
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/953f1d9e/juneau-core/src/main/java/org/apache/juneau/Context.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/Context.java b/juneau-core/src/main/java/org/apache/juneau/Context.java
index d6912e7..5eeff2c 100644
--- a/juneau-core/src/main/java/org/apache/juneau/Context.java
+++ b/juneau-core/src/main/java/org/apache/juneau/Context.java
@@ -30,6 +30,8 @@ import org.apache.juneau.serializer.*;
  */
 public abstract class Context {
 
+	private final PropertyStore propertyStore;
+
 	/**
 	 * Constructor for this class.
 	 * <p>
@@ -37,7 +39,18 @@ public abstract class Context {
 	 *
 	 * @param propertyStore The factory that created this config.
 	 */
-	public Context(PropertyStore propertyStore) {}
+	public Context(PropertyStore propertyStore) {
+		this.propertyStore = PropertyStore.create(propertyStore);
+	}
+
+	/**
+	 * Returns the property store associated with this context.
+	 * 
+	 * @return The property store associated with this context.
+	 */
+	protected PropertyStore getPropertyStore() {
+		return propertyStore;
+	}
 
 	/**
 	 * Returns the properties defined on this bean context as a simple map for debugging purposes.

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/953f1d9e/juneau-core/src/main/java/org/apache/juneau/ObjectMap.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/ObjectMap.java b/juneau-core/src/main/java/org/apache/juneau/ObjectMap.java
index 0bb3491..1cfccb7 100644
--- a/juneau-core/src/main/java/org/apache/juneau/ObjectMap.java
+++ b/juneau-core/src/main/java/org/apache/juneau/ObjectMap.java
@@ -100,7 +100,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
 	private static final long serialVersionUID = 1L;
 
 	private transient BeanSession session;
-	private ObjectMap inner;
+	private Map<String,Object> inner;
 	private transient PojoRest pojoRest;
 
 	/**
@@ -240,7 +240,7 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
 	 * Can be <jk>null</jk> to remove the inner map from an existing map.
 	 * @return This object (for method chaining).
 	 */
-	public ObjectMap setInner(ObjectMap inner) {
+	public ObjectMap setInner(Map<String,Object> inner) {
 		this.inner = inner;
 		return this;
 	}
@@ -258,16 +258,6 @@ public class ObjectMap extends LinkedHashMap<String,Object> {
 		return null;
 	}
 
-
-	/**
-	 * Returns the inner map if one was set through {@link #setInner(ObjectMap)}.
-	 *
-	 * @return The inner map if one was set through {@link #setInner(ObjectMap)}, or <jk>null</jk>
if no inner map is present.
-	 */
-	public ObjectMap getInner() {
-		return inner;
-	}
-
 	/**
 	 * Override the default bean session used for converting POJOs.
 	 * <p>

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/953f1d9e/juneau-core/src/main/java/org/apache/juneau/PropertyStore.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/PropertyStore.java b/juneau-core/src/main/java/org/apache/juneau/PropertyStore.java
index 8d19304..91af225 100644
--- a/juneau-core/src/main/java/org/apache/juneau/PropertyStore.java
+++ b/juneau-core/src/main/java/org/apache/juneau/PropertyStore.java
@@ -290,11 +290,13 @@ public final class PropertyStore {
 	 * @return This object (for method chaining).
 	 */
 	public PropertyStore copyFrom(PropertyStore ps) {
-		// TODO - Needs more testing.
-		for (Map.Entry<String,PropertyMap> e : ps.properties.entrySet())
-			this.properties.put(e.getKey(), new PropertyMap(this.properties.get(e.getKey()), e.getValue()));
-		this.classLoader = ps.classLoader;
-		this.defaultParser = ps.defaultParser;
+		if (ps != null) {
+			// TODO - Needs more testing.
+			for (Map.Entry<String,PropertyMap> e : ps.properties.entrySet())
+				this.properties.put(e.getKey(), new PropertyMap(this.properties.get(e.getKey()), e.getValue()));
+			this.classLoader = ps.classLoader;
+			this.defaultParser = ps.defaultParser;
+		}
 		return this;
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/953f1d9e/juneau-core/src/main/java/org/apache/juneau/Session.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/Session.java b/juneau-core/src/main/java/org/apache/juneau/Session.java
index e0864e1..a75d197 100644
--- a/juneau-core/src/main/java/org/apache/juneau/Session.java
+++ b/juneau-core/src/main/java/org/apache/juneau/Session.java
@@ -33,6 +33,7 @@ public abstract class Session {
 	private JuneauLogger logger;
 
 	private final ObjectMap properties;
+	private final Context ctx;
 	private Map<String,Object> cache;
 	private boolean closed;
 	private List<String> warnings;                 // Any warnings encountered.
@@ -44,17 +45,68 @@ public abstract class Session {
 	 * The context contains all the configuration settings for the session.
 	 * @param op Properties associated with this session.
 	 */
-	protected Session(Context ctx, ObjectMap op) {
+	protected Session(final Context ctx, ObjectMap op) {
+		this.ctx = ctx;
 		this.properties = op != null ? op : ObjectMap.EMPTY_MAP;
 	}
 
 	/**
-	 * Returns the properties associated with this session.
-	 *
-	 * @return The properties associated with this session.
+	 * Returns the session property with the specified key.
+	 * <p>
+	 * The order of lookup for the property is as follows:
+	 * <ul>
+	 * 	<li>Override property passed in through the constructor.
+	 * 	<li>Property defined on the context object.
+	 * 	<li>System.property.
+	 * </ul>
+	 * 
+	 * @param key The property key.
+	 * @return The property value, or <jk>null</jk> if it doesn't exist.
+	 */
+	public String getProperty(String key) {
+		return getProperty(key, null);
+	}
+
+	/**
+	 * Same as {@link #getProperty(String)} but with a default value.
+	 * 
+	 * @param key The property key.
+	 * @param def The default value if the property doesn't exist or is <jk>null</jk>.
+	 * @return The property value.
+	 */
+	public String getProperty(String key, String def) {
+		Object v = properties.get(key);
+		if (v == null)
+			v = ctx.getPropertyStore().getProperty(key, String.class, null);
+		if (v == null)
+			v = def;
+		return StringUtils.toString(v);
+	}
+
+	/**
+	 * Same as {@link #getProperty(String)} but transforms the value to the specified type.
+	 * 
+	 * @param type The class type of the value.
+	 * @param key The property key.
+	 * @return The property value.
+	 */
+	public <T> T getProperty(Class<T> type, String key) {
+		return getProperty(type, key, null);
+	}
+
+	/**
+	 * Same as {@link #getProperty(Class,String)} but with a default value.
+	 * 
+	 * @param type The class type of the value.
+	 * @param key The property key.
+	 * @param def The default value if the property doesn't exist or is <jk>null</jk>.
+	 * @return The property value.
 	 */
-	public ObjectMap getProperties() {
-		return properties;
+	public <T> T getProperty(Class<T> type, String key, T def) {
+		T t = properties.get(type, key);
+		if (t == null)
+			t = ctx.getPropertyStore().getProperty(key, type, def);
+		return t;
 	}
 
 	/**

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/953f1d9e/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializer.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializer.java
index 68e19e2..9bd5a10 100644
--- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocSerializer.java
@@ -85,9 +85,7 @@ public class HtmlDocSerializer extends HtmlStrippedDocSerializer {
 		HtmlDocSerializerSession s = (HtmlDocSerializerSession)session;
 		HtmlWriter w = s.getWriter();
 
-		ObjectMap op = s.getProperties();
-
-		boolean isOptionsPage = op.containsKey(REST_method) && op.getString(REST_method).equalsIgnoreCase("OPTIONS");
+		boolean isOptionsPage = session.getProperty(REST_method, "").equalsIgnoreCase("OPTIONS");
 
 		// Render the header.
 		w.sTag("html").nl();
@@ -95,7 +93,7 @@ public class HtmlDocSerializer extends HtmlStrippedDocSerializer {
 
 		String cssUrl = s.getCssUrl();
 		if (cssUrl == null)
-			cssUrl = op.getString(REST_relativeServletURI) + "/style.css";
+			cssUrl = session.getProperty(REST_relativeServletURI, "") + "/style.css";
 
 		w.oTag(1, "style")
 			.attr("type", "text/css")
@@ -129,7 +127,7 @@ public class HtmlDocSerializer extends HtmlStrippedDocSerializer {
 				for (Map.Entry<String,String> e : htmlLinks.entrySet()) {
 					String uri = e.getValue();
 					if (uri.indexOf("://") == -1 && ! StringUtils.startsWith(uri, '/')) {
-						StringBuilder sb = new StringBuilder(op.getString(REST_relativeServletURI));
+						StringBuilder sb = new StringBuilder(session.getProperty(REST_relativeServletURI, ""));
 						if (! (uri.isEmpty() || uri.charAt(0) == '?' || uri.charAt(0) == '/'))
 							sb.append('/');
 						sb.append(uri);

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/953f1d9e/juneau-core/src/main/java/org/apache/juneau/soap/SoapXmlSerializer.java
----------------------------------------------------------------------
diff --git a/juneau-core/src/main/java/org/apache/juneau/soap/SoapXmlSerializer.java b/juneau-core/src/main/java/org/apache/juneau/soap/SoapXmlSerializer.java
index 707402e..81580f2 100644
--- a/juneau-core/src/main/java/org/apache/juneau/soap/SoapXmlSerializer.java
+++ b/juneau-core/src/main/java/org/apache/juneau/soap/SoapXmlSerializer.java
@@ -65,7 +65,7 @@ public final class SoapXmlSerializer extends XmlSerializer {
 			.attr("encoding", "UTF-8")
 			.appendln("?>");
 		w.oTag("soap", "Envelope")
-			.attr("xmlns", "soap", s.getProperties().getString(SOAPXML_SOAPAction, "http://www.w3.org/2003/05/soap-envelope"))
+			.attr("xmlns", "soap", s.getProperty(SOAPXML_SOAPAction, "http://www.w3.org/2003/05/soap-envelope"))
 			.appendln(">");
 		w.sTag(1, "soap", "Body").nl();
 		super.serialize(s, o);

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/953f1d9e/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/PhotosResource.java
----------------------------------------------------------------------
diff --git a/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/PhotosResource.java
b/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/PhotosResource.java
index b5dace5..c8745f3 100644
--- a/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/PhotosResource.java
+++ b/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/PhotosResource.java
@@ -134,7 +134,7 @@ public class PhotosResource extends Resource {
 		@Override /* Serializer */
 		protected void doSerialize(SerializerSession session, Object o) throws Exception {
 			RenderedImage image = (RenderedImage)o;
-			String mediaType = session.getProperties().getString("mediaType");
+			String mediaType = session.getProperty("mediaType");
 			ImageIO.write(image, mediaType.substring(mediaType.indexOf('/')+1), session.getOutputStream());
 		}
 	}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/953f1d9e/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/RequestEchoResource.java
----------------------------------------------------------------------
diff --git a/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/RequestEchoResource.java
b/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/RequestEchoResource.java
index 244f6a0..be993bd 100644
--- a/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/RequestEchoResource.java
+++ b/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/RequestEchoResource.java
@@ -49,7 +49,7 @@ public class RequestEchoResource extends Resource {
 	private static final long serialVersionUID = 1L;
 
 	/** GET request handler */
-	@RestMethod(name="GET", path="/*", converters={Traversable.class,Queryable.class}, summary="Serializes
the incoming HttpServletRequest object.")
+	@RestMethod(name="*", path="/*", converters={Traversable.class,Queryable.class}, summary="Serializes
the incoming HttpServletRequest object.")
 	public HttpServletRequest doGet(RestRequest req, RestResponse res, @Properties ObjectMap
properties) {
 		// Set the HtmlDocSerializer title programmatically.
 		res.setPageTitle("Contents of HttpServletRequest object");

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/953f1d9e/juneau-rest-test/src/main/java/org/apache/juneau/rest/test/AcceptCharsetResource.java
----------------------------------------------------------------------
diff --git a/juneau-rest-test/src/main/java/org/apache/juneau/rest/test/AcceptCharsetResource.java
b/juneau-rest-test/src/main/java/org/apache/juneau/rest/test/AcceptCharsetResource.java
index 9ab29c6..3f5ef8b 100644
--- a/juneau-rest-test/src/main/java/org/apache/juneau/rest/test/AcceptCharsetResource.java
+++ b/juneau-rest-test/src/main/java/org/apache/juneau/rest/test/AcceptCharsetResource.java
@@ -64,7 +64,7 @@ public class AcceptCharsetResource extends RestServlet {
 		@SuppressWarnings("unchecked")
 		@Override /* Parser */
 		protected <T> T doParse(ParserSession session, ClassMeta<T> type) throws Exception
{
-			return (T)session.getProperties().getString("characterEncoding");
+			return (T)session.getProperty("characterEncoding");
 		}
 	}
 
@@ -78,7 +78,7 @@ public class AcceptCharsetResource extends RestServlet {
 		@Override /* Serializer */
 		protected void doSerialize(SerializerSession session, Object o) throws Exception {
 			Writer w = new OutputStreamWriter(session.getOutputStream());
-			w.append(o.toString()).append('/').append(session.getProperties().getString("characterEncoding"));
+			w.append(o.toString()).append('/').append(session.getProperty("characterEncoding"));
 			w.flush();
 			w.close();
 		}

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/953f1d9e/juneau-rest-test/src/main/java/org/apache/juneau/rest/test/NlsPropertyResource.java
----------------------------------------------------------------------
diff --git a/juneau-rest-test/src/main/java/org/apache/juneau/rest/test/NlsPropertyResource.java
b/juneau-rest-test/src/main/java/org/apache/juneau/rest/test/NlsPropertyResource.java
index 05093b9..6785872 100644
--- a/juneau-rest-test/src/main/java/org/apache/juneau/rest/test/NlsPropertyResource.java
+++ b/juneau-rest-test/src/main/java/org/apache/juneau/rest/test/NlsPropertyResource.java
@@ -61,7 +61,7 @@ public class NlsPropertyResource extends RestServlet {
 
 		@Override /* Serializer */
 		protected void doSerialize(SerializerSession session, Object o) throws Exception {
-			session.getWriter().write(session.getProperties().getString("TestProperty"));
+			session.getWriter().write(session.getProperty("TestProperty"));
 		}
 	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/953f1d9e/juneau-rest-test/src/main/java/org/apache/juneau/rest/test/OnPostCallResource.java
----------------------------------------------------------------------
diff --git a/juneau-rest-test/src/main/java/org/apache/juneau/rest/test/OnPostCallResource.java
b/juneau-rest-test/src/main/java/org/apache/juneau/rest/test/OnPostCallResource.java
index e046779..b5a3981 100644
--- a/juneau-rest-test/src/main/java/org/apache/juneau/rest/test/OnPostCallResource.java
+++ b/juneau-rest-test/src/main/java/org/apache/juneau/rest/test/OnPostCallResource.java
@@ -44,8 +44,7 @@ public class OnPostCallResource extends RestServlet {
 
 		@Override /* Serializer */
 		protected void doSerialize(SerializerSession session, Object o) throws Exception {
-			ObjectMap p = session.getProperties();
-			session.getWriter().write("p1="+p.get("p1")+",p2="+p.get("p2")+",p3="+p.get("p3")+",p4="+p.get("p4")+",p5="+p.get("p5")+",contentType="+session.getProperties().getString("mediaType"));
+			session.getWriter().write("p1="+session.getProperty("p1")+",p2="+session.getProperty("p2")+",p3="+session.getProperty("p3")+",p4="+session.getProperty("p4")+",p5="+session.getProperty("p5")+",contentType="+session.getProperty("mediaType"));
 		}
 		@Override /* Serializer */
 		public ObjectMap getResponseHeaders(ObjectMap properties) {

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/953f1d9e/juneau-rest-test/src/main/java/org/apache/juneau/rest/test/OnPreCallResource.java
----------------------------------------------------------------------
diff --git a/juneau-rest-test/src/main/java/org/apache/juneau/rest/test/OnPreCallResource.java
b/juneau-rest-test/src/main/java/org/apache/juneau/rest/test/OnPreCallResource.java
index feefe2f..d4f6e20 100644
--- a/juneau-rest-test/src/main/java/org/apache/juneau/rest/test/OnPreCallResource.java
+++ b/juneau-rest-test/src/main/java/org/apache/juneau/rest/test/OnPreCallResource.java
@@ -47,9 +47,8 @@ public class OnPreCallResource extends RestServlet {
 		@SuppressWarnings("unchecked")
 		@Override /* Parser */
 		protected <T> T doParse(ParserSession session, ClassMeta<T> type) throws Exception
{
-			ObjectMap p = session.getProperties();
-			String matchingContentType = session.getProperties().getString("mediaType");
-			return (T)("p1="+p.get("p1")+",p2="+p.get("p2")+",p3="+p.get("p3")+",p4="+p.get("p4")+",p5="+p.get("p5")+",contentType="+matchingContentType);
+			String matchingContentType = session.getProperty("mediaType");
+			return (T)("p1="+session.getProperty("p1")+",p2="+session.getProperty("p2")+",p3="+session.getProperty("p3")+",p4="+session.getProperty("p4")+",p5="+session.getProperty("p5")+",contentType="+matchingContentType);
 		}
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/953f1d9e/juneau-rest-test/src/main/java/org/apache/juneau/rest/test/PropertiesResource.java
----------------------------------------------------------------------
diff --git a/juneau-rest-test/src/main/java/org/apache/juneau/rest/test/PropertiesResource.java
b/juneau-rest-test/src/main/java/org/apache/juneau/rest/test/PropertiesResource.java
index ff41a3b..9ea92b6 100644
--- a/juneau-rest-test/src/main/java/org/apache/juneau/rest/test/PropertiesResource.java
+++ b/juneau-rest-test/src/main/java/org/apache/juneau/rest/test/PropertiesResource.java
@@ -68,10 +68,9 @@ public class PropertiesResource extends RestServletDefault {
 
 		@Override /* Serializer */
 		protected void doSerialize(SerializerSession session, Object output) throws Exception {
-			ObjectMap p = session.getProperties();
 			session.getWriter().write(format("A1=%s,A2=%s,B1=%s,B2=%s,C=%s,R1a=%s,R1b=%s,R2=%s,R3=%s,R4=%s,R5=%s,R6=%s",
-				p.get("A1"), p.get("A2"), p.get("B1"), p.get("B2"), p.get("C"),
-				p.get("R1a"), p.get("R1b"), p.get("R2"), p.get("R3"), p.get("R4"), p.get("R5"), p.get("R6")));
+				session.getProperty("A1"), session.getProperty("A2"), session.getProperty("B1"), session.getProperty("B2"),
session.getProperty("C"),
+				session.getProperty("R1a"), session.getProperty("R1b"), session.getProperty("R2"), session.getProperty("R3"),
session.getProperty("R4"), session.getProperty("R5"), session.getProperty("R6")));
 		}
 	}
 
@@ -92,8 +91,7 @@ public class PropertiesResource extends RestServletDefault {
 
 		@Override /* Serializer */
 		protected void doSerialize(SerializerSession session, Object output) throws Exception {
-			ObjectMap p = session.getProperties();
-			session.getWriter().write(format("A=%s,P=%s,H=%s", p.get("A"), p.get("P"), p.get("h")));
+			session.getWriter().write(format("A=%s,P=%s,H=%s", session.getProperty("A"), session.getProperty("P"),
session.getProperty("h")));
 		}
 	}
 }


Mime
View raw message