WICKET-6334 Fix a typo in class name Improve error message by printing the passed object
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/0b29a9a5 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/0b29a9a5 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/0b29a9a5 Branch: refs/heads/master Commit: 0b29a9a57613d2d3dd47d0944449f0637b7400ee Parents: 266c900 Author: Martin Tzvetanov Grigorov <[email protected]> Authored: Mon Mar 13 23:06:10 2017 +0100 Committer: Martin Tzvetanov Grigorov <[email protected]> Committed: Mon Mar 13 23:06:10 2017 +0100 ---------------------------------------------------------------------- .../util/instrument/InstrumentationObjectSizeOfStrategy.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/wicket/blob/0b29a9a5/wicket-objectsizeof-agent/src/main/java/org/apache/wicket/util/instrument/InstrumentationObjectSizeOfStrategy.java ---------------------------------------------------------------------- diff --git a/wicket-objectsizeof-agent/src/main/java/org/apache/wicket/util/instrument/InstrumentationObjectSizeOfStrategy.java b/wicket-objectsizeof-agent/src/main/java/org/apache/wicket/util/instrument/InstrumentationObjectSizeOfStrategy.java index a7355fa..03ab881 100644 --- a/wicket-objectsizeof-agent/src/main/java/org/apache/wicket/util/instrument/InstrumentationObjectSizeOfStrategy.java +++ b/wicket-objectsizeof-agent/src/main/java/org/apache/wicket/util/instrument/InstrumentationObjectSizeOfStrategy.java @@ -40,7 +40,7 @@ public class InstrumentationObjectSizeOfStrategy implements IObjectSizeOfStrateg * Records the size of an object and it's dependents as if they were serialized but using the * instrumentation API to calculate. */ - private final class SizeRecodingOuputStream extends ObjectOutputStream + private final class SizeRecodingOutputStream extends ObjectOutputStream { private long totalSize = 0; @@ -50,7 +50,7 @@ public class InstrumentationObjectSizeOfStrategy implements IObjectSizeOfStrateg * * @throws IOException */ - public SizeRecodingOuputStream() throws IOException + public SizeRecodingOutputStream() throws IOException { super(new OutputStream() { @@ -119,13 +119,13 @@ public class InstrumentationObjectSizeOfStrategy implements IObjectSizeOfStrateg } try { - SizeRecodingOuputStream recorder = new SizeRecodingOuputStream(); + SizeRecodingOutputStream recorder = new SizeRecodingOutputStream(); recorder.writeObject(obj); return recorder.getTotalSize(); } catch (IOException e) { - LOG.error("Error calculating size of object", e); + LOG.error("An error occurred while calculating the size of object: " + obj, e); return -1; }
