title: GWT AutoBean: annotation @PropertyName doesn't work anymore
body: <p>I use <a href="http://code.google.com/p/google-web-toolkit/wiki/AutoBean" rel="nofollow">AutoBean</a> to code/decode data to JSON and that was all right in previous GWT versions. In my opinion AutoBean is very good and convenient tool to deal with JSON. Since GWT ver.2.4.0 this functionality has changed and I spent some time to restore it in my code. But only one part stays still unfixed - annotation @PropertyName. This annotation is used to add an "alias" to properties. It saves a lot of network traffic. And now it throws an exception. The code example is below:</p>
  
  <pre><code>import com.google.web.bindery.autobean.shared.AutoBean.PropertyName;
  
  public interface IPersonInfo {
  
      // Name
      @PropertyName("n")
      public String getName();
      public void setName(String name);
  
      // Surname
      @PropertyName("s")
      public String getSurname();
      public void setSurname(String surname);
  
      // other properties...
  }
  </code></pre>
  
  <p>Then I try to decode this to JSON in this way:</p>
  
  <pre><code>AutoBean&lt;IPersonInfo&gt; user = factory.user();
  
  // clone the userDto (it's a new way to clone an object in ver 2.4.0
  // instad of deprecated clone() method)
  Splittable data = AutoBeanCodex.encode(user);
  IPersonInfo userDto = AutoBeanCodex.decode(factory, IPersonInfo.class, data).as();
  
  userDto.setName("Name");
  userDto.setSurname("Surname");
  //... other properties
  </code></pre>
  
  <p>This piece of code worked perfectly in legacy code. But now (in GWT 2.4.0) I get an exception:</p>
  
  <pre><code>java.lang.IllegalArgumentException: name
      at com.google.web.bindery.autobean.shared.impl.AutoBeanCodexImpl.doCoderFor(AutoBeanCodexImpl.java:524)
      at com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.setProperty(AbstractAutoBean.java:276)
      at com.google.web.bindery.autobean.vm.impl.ProxyAutoBean.setProperty(ProxyAutoBean.java:253)
      at com.google.web.bindery.autobean.vm.impl.BeanMethod$3.invoke(BeanMethod.java:103)
      at com.google.web.bindery.autobean.vm.impl.SimpleBeanHandler.invoke(SimpleBeanHandler.java:43)
      at $Proxy74.setName(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:104)
      at com.google.web.bindery.autobean.vm.impl.ShimHandler.invoke(ShimHandler.java:81)
      at $Proxy74.setName(Unknown Source)
  </code></pre>
  
  <p>If I remove the @PropertyName from my interface, then the exception won't occur.</p>
  
  <p>I still waiting, that the official documentation will be updated, but it still stays with old code examples.</p>
  
  <p>Can someone help me to solve this issue? Thank you for advice.</p>
  
  <p><em>I use GWT ver. 2.4.0, GAE ver. 1.6.1.</em></p>