Anonymous | Login | Signup for a new account | 12-17-2024 10:37 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0000134 | [Resin] | minor | always | 05-04-05 00:00 | 02-03-06 09:54 | ||||
Reporter | user154 | View Status | public | ||||||
Assigned To | ferg | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | |||||||
Summary | 0000134: Hessian Deserializer and constructors | ||||||||
Description |
RSN-125 Hi, it seems that the deserializer of hessian chooses the constructor undeterminsticily. We have a class with a private default constructor (it's not allowed to call it despite hessian) and a constructor with a pointer argument. On some systems hessian chooses the correct default constructor and on others the wrong constructor with argument. On the faulty systems it helped, if we change the visibility to public, why ever. I don't understand the code in "com.caucho.hessian.io.JavaDeserializer.java". There I can find: Constructor []constructors = cl.getDeclaredConstructors(); int bestLength = Integer.MAX_VALUE; [...] for (int i = 0; i < constructors.length; i++) { if (constructors[i].getParameterTypes().length < bestLength) { _constructor = constructors[i]; bestLength = _constructor.getParameterTypes().length; } } [...] This is not deterministic (a new constructor with fewer args will always be choosen), and the constructor arguments are only guessed afterwards (with null). Why doesn't hessian use "__type.newInstance()" all the time? Ciao, Marc Ewert |
||||||||
Additional Information | JDK 1.4.2 | ||||||||
Attached Files | |||||||||
|
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
37 total queries executed. 28 unique queries executed. |