Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003004 [Hessian] major always 10-13-08 07:24 10-14-08 15:59
Reporter tcouery View Status public  
Assigned To
Priority normal Resolution fixed  
Status closed   Product Version 3.2.0
Summary 0003004: Hessian serializer in Flex don't use the [Transient] metadata
Description Actualy, this instance is fully serialized:

package hessian.test
{
  public class TestTransient
  {
    [Transient]
    public var field1: String;

    [Bindable]
    [Transient]
    public var field2: String;
    
    [Bindable]
    [Transient]
    public function get field3(): String
    {
      return "field3";
    }
    
    public function set field3(value: String): void
    {
      //
    }
  }
}

An idea of implementation in HessianOutput:

private function writeObject10(obj:Object):void
{
...
  //Fields
  for each(var variable:XML in variables) {
    key = variable.@name;
    
    if ((!isMetadataContains(variable.metadata, "Transient")) && (key != "hessianTypeName")) {
      writeObject(key);
      writeObject(obj[key]);
    }
  }

  //Accessors
  for each(var accessor:XML in accessors) {
    key = accessor.@name;
    if ((isMetadataContains(accessor.metadata, "Bindable")) &&
        (!isMetadataContains(accessor.metadata, "Transient")) &&
        (key != "hessianTypeName")) {
      writeObject(key);
      writeObject(obj[key]);
    }
  }

...
}

private function isMetadataContains(metadatas:XMLList, code:String): Boolean
{
  for each(var metada:XML in metadatas) {
    if (metada.@name == code) {
      return true;
    }
  }
  return false;
}
Additional Information
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
10-13-08 07:24 tcouery New Issue
10-14-08 15:59 emil Status new => closed
10-14-08 15:59 emil Resolution open => fixed
10-14-08 15:59 emil Fixed in Version  => 3.2.1


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
27 total queries executed.
25 unique queries executed.
Powered by Mantis Bugtracker