1. /*
  2. * @(#)ValueHandlerImpl_1_3_1.java 1.6 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package com.sun.corba.se.impl.orbutil;
  8. import org.omg.CORBA.TCKind;
  9. /**
  10. * This class overrides behavior of our current ValueHandlerImpl to
  11. * provide backwards compatibility with JDK 1.3.1.
  12. */
  13. public class ValueHandlerImpl_1_3_1
  14. extends com.sun.corba.se.impl.io.ValueHandlerImpl
  15. {
  16. public ValueHandlerImpl_1_3_1() {}
  17. public ValueHandlerImpl_1_3_1(boolean isInputStream) {
  18. super(isInputStream);
  19. }
  20. /**
  21. * Our JDK 1.3 and JDK 1.3.1 behavior subclasses override this.
  22. * The correct behavior is for a Java char to map to a CORBA wchar,
  23. * but our older code mapped it to a CORBA char.
  24. */
  25. protected TCKind getJavaCharTCKind() {
  26. return TCKind.tk_char;
  27. }
  28. /**
  29. * RepositoryId_1_3_1 performs an incorrect repId calculation
  30. * when using serialPersistentFields and one of the fields no longer
  31. * exists on the class itself.
  32. */
  33. public boolean useFullValueDescription(Class clazz, String repositoryID)
  34. throws java.io.IOException
  35. {
  36. return RepositoryId_1_3_1.useFullValueDescription(clazz, repositoryID);
  37. }
  38. /**
  39. * Installs the legacy IIOPOutputStream_1_3_1 which does
  40. * PutFields/GetFields incorrectly. Bug 4407244.
  41. */
  42. protected final String getOutputStreamClassName() {
  43. return "com.sun.corba.se.impl.orbutil.IIOPOutputStream_1_3_1";
  44. }
  45. /**
  46. * Installs the legacy IIOPInputStream_1_3_1 which does
  47. * PutFields/GetFields incorrectly. Bug 4407244.
  48. */
  49. protected final String getInputStreamClassName() {
  50. return "com.sun.corba.se.impl.orbutil.IIOPInputStream_1_3_1";
  51. }
  52. }