google-code-export / protostuff

Automatically exported from code.google.com/p/protostuff
Apache License 2.0
1 stars 1 forks source link

Generated J2ME code not is not compatible #91

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.

Simple message object:

message Version {
  required int32 version = 1;
}

2.

Generate J2ME classes with properties set to foo.output = java_bean_me

3.

Try to compile with J2ME

What is the expected output? What do you see instead?

cannot find symbol 
symbol : method valueOf(int) 
location: class java.lang.Integer 
message.version = Integer.valueOf(input.readInt32());

--> valueOf(int) is not supported 

Same issue with Long and Boolean, beacause unsupported methods are used.

What version of the product are you using? On what operating system?
1.0.4, Windwows 7

Please provide any additional information below.

Some files of the com.dyuproject.protostuff.me are not J2ME compatible too. 
They have annotations which are not supported by J2ME. 

Original issue reported on code.google.com by ak80...@gmail.com on 31 Oct 2011 at 9:40

GoogleCodeExporter commented 9 years ago
The j2me module was maintained by Michael Donohue at some point.  I'm no j2me 
user.  If you'd like to take a crack and fix the issues, I'd be glad to merge 
it in trunk.

Original comment by david.yu...@gmail.com on 31 Oct 2011 at 9:47

GoogleCodeExporter commented 9 years ago
Thnx for the quick reply. For now I adapt the generated code as needed but
I'll provide a fix when available! Best regards
Am 31.10.2011 10:48 schrieb <protostuff@googlecode.com>:

is not compatible

j2me user.  If you'd like to take a crack and fix the issues, I'd be glad
to merge it in trunk.

Original comment by ak80...@gmail.com on 31 Oct 2011 at 9:54

GoogleCodeExporter commented 9 years ago
The protostuff-me module has been updated (and the no j2me compatible bits have 
been fixed).  Can you check if you still get errors?

The remaining issue is the generated code (w/c I'll try to fix).

Original comment by david.yu...@gmail.com on 3 Nov 2011 at 1:43

GoogleCodeExporter commented 9 years ago
I've just committed the fix for everything related to j2me.
If you could check it out and test, that would be great.
All tests pass.

Original comment by david.yu...@gmail.com on 3 Nov 2011 at 5:17

GoogleCodeExporter commented 9 years ago

Original comment by david.yu...@gmail.com on 12 Nov 2011 at 1:39