jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philippe Mouawad <philippe.moua...@gmail.com>
Subject svn commit: r1623759 - /jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeNode.java
Date Wed, 10 Sep 2014 06:19:55 GMT
well that's what I initially thought, first commit removed it.
Then sebb made a comment saying why I removed final.
I added it back to see if it worked , and it did.

Although reading litterature it was said it would be an issue during
deserialization.

According to this it seems you are right:
http://blog.clempinch.com/transient-and-final-instance-variables-in-java/

I think it works thougj because we rebuild an object from the deserialized
one.
But your analysis and a ref article on this would help me learn new things
and have a definite position on this.

Thanks for checking

On Wednesday, September 10, 2014, Felix Schumacher <
felix.schumacher@internetallee.de
<javascript:_e(%7B%7D,'cvml','felix.schumacher@internetallee.de');>> wrote:

>
>
> On 9. September 2014 13:25:39 MESZ, pmouawad@apache.org wrote:
> >Author: pmouawad
> >Date: Tue Sep  9 11:25:38 2014
> >New Revision: 1623759
> >
> >URL: http://svn.apache.org/r1623759
> >Log:
> >Bug 54648 - JMeter GUI on OS X crashes when using CMD+C (keyboard
> >shortcut or UI menu entry) on an element from the tree
> >Put back final.
> >Bugzilla Id: 54648
> >
> >Modified:
> >   jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeNode.java
> >
> >Modified:
> >jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeNode.java
> >URL:
> >
> http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeNode.java?rev=1623759&r1=1623758&r2=1623759&view=diff
>
> >==============================================================================
> >---
> >jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeNode.java
> >(original)
> >+++
> >jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeNode.java
> >Tue Sep  9 11:25:38 2014
> >@@ -47,7 +47,7 @@ public class JMeterTreeNode extends Defa
> >     private static final int TEST_PLAN_LEVEL = 1;
> >
> >     // See Bug 54648
> >-    private transient JMeterTreeModel treeModel;
> >+    private final transient JMeterTreeModel treeModel;
> I don't believe that fields can be transient and final at the same time.
>
> Since transient is for serialization and final fields have to be set
> during construction. But deserialization will not call the constructor.
>
> Regards
> Felix
> >
> >     private boolean markedBySearch;
> >
>
>

-- 
Cordialement.
Philippe Mouawad.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message