refactor/use method handles for fields#818
Merged
joe-chacko merged 7 commits intoJun 18, 2026
Merged
Conversation
- Renamed MethodHandleHelper class to MethodHandleWrangler for better semantic clarity - Wrapped method and field lookup operations in privileged action blocks - Improved error handling by unwrapping PrivilegedActionException and using INTERNAL exception factory - Updated javadoc to reflect that class handles both methods and field accessors - Changed exception signatures to remove checked exceptions from package-private methods - substantive lines added: 37, lines removed: 18
…rectly - Removed Field.java wrapper class that used sun.misc.Unsafe for field access - Removed MethodHandleWrangler.java helper class for obtaining MethodHandles - Refactored FieldDescriptor.java to use MethodHandles directly for get/set operations - Simplified exception handling by using IOException instead of IllegalAccessException - Updated ValueMemberFieldDescriptor.java to throw IOException for unsupported operations - Consolidated field access logic, eliminating intermediate abstraction layers - Lines added: 175, lines removed: 640 Co-authored-by-AI: IBM Bob 1.0.4
…ization - Modified CorbaObjectReader.readCorbaObject() to perform PortableRemoteObject.narrow() when a target type is provided - Updated CorbaObjectFieldDescriptor to pass field type to readCorbaObject() instead of null - Added convenience method readCorbaObject() without parameters in ObjectReader - Simplified ValueMemberFieldDescriptor to use method reference for CORBA object reading - Substantive lines added: 7, lines removed: 4 Co-authored-by-AI: IBM Bob 1.0.4
- Renamed FieldDescriptor.get() to getFieldContents() to better reflect its purpose - Renamed FieldDescriptor.set() to setFieldContents() to better reflect its purpose - Updated all subclasses and call sites across FieldDescriptor hierarchy - Changes affect RemoteFieldDescriptor, AnyFieldDescriptor, ValueFieldDescriptor, StringFieldDescriptor, ObjectFieldDescriptor, and all primitive field descriptors - Substantive lines added: 62, lines removed: 62
…tion - Replace duplicate initialization code in 3-parameter constructor with delegation to 5-parameter constructor - Pass null for Field parameter to maintain same behavior - Substantive lines added: 1, lines removed: 6
…Descriptor - replace integer-based `TCKind` constant handling with enum-based `TCKind` lookups for primitive detection and reader dispatch - switch reader dispatch from a fixed array to an unmodifiable `Map<TCKind, ReaderOperation>` and keep unsupported kinds on the existing abstract-object fallback path - tighten method signatures with typed ignored maps and remove the obsolete array-bounds handling from `readValueByTypeCode` - substantive lines added: 89, lines removed: 88 Co-authored-by-AI: IBM Bob 1.0.4
joe-chacko
approved these changes
Jun 18, 2026
…eparate files - Extracted RemoteFieldDescriptor into separate file - Extracted AnyFieldDescriptor into separate file - Extracted BooleanFieldDescriptor into separate file - Extracted ByteFieldDescriptor into separate file - Extracted CharFieldDescriptor into separate file - Extracted CorbaObjectFieldDescriptor into separate file - Extracted DoubleFieldDescriptor into separate file - Extracted FloatFieldDescriptor into separate file - Extracted IntFieldDescriptor into separate file - Extracted LongFieldDescriptor into separate file - Extracted ObjectFieldDescriptor into separate file - Extracted ShortFieldDescriptor into separate file - Extracted StringFieldDescriptor into separate file - Extracted ValueFieldDescriptor into separate file - Removed inner class definitions from FieldDescriptor.java - Substantive lines added: 900, lines removed: 784
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes Java 23: Eliminate use of Unsafe #806