Skip to content

Conversation

@alzimmermsft
Copy link
Member

Description

Removes dead code from azure-json and azure-xml. Additionally modifies code to remove needless types, such as the merging of serialization types from having deep hierarchies to flattened hierarchies as the code is implementation.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@alzimmermsft alzimmermsft self-assigned this Dec 29, 2025
Copilot AI review requested due to automatic review settings December 29, 2025 20:59
@alzimmermsft alzimmermsft requested review from a team and srnagar as code owners December 29, 2025 20:59
@github-actions github-actions bot added the Azure.Core azure-core label Dec 29, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes dead code from azure-json and azure-xml modules, primarily eliminating unused classes and simplifying type hierarchies by flattening deep inheritance structures.

Key changes:

  • Removes unused classes including versioning utilities, delegate patterns, and duplicate detection functionality
  • Simplifies type hierarchies by eliminating intermediate base classes (e.g., JsonGeneratorImpl, JsonParserBase)
  • Removes support for various JSON parsing features that were not being used (single quotes, unquoted field names, trailing commas, etc.)
  • Inlines constants and removes unnecessary abstraction layers

Reviewed changes

Copilot reviewed 89 out of 132 changed files in this pull request and generated no comments.

Show a summary per file
File Description
ByteBasedPNameFactory.java Removes unused DO_INTERN flag and changes return type from ByteBasedPName to PName
ByteBasedPName.java Entire class removed (unused intermediate base class)
IoStreamException.java Entire class removed (unused exception wrapper)
ErrorConsts.java Inlines tokenTypeDesc method instead of delegating to external utility
CommonConfig.java Moves property constants from external class to inline definitions
WFCException.java Entire class removed (unused exception type)
spotbugs-exclude.xml Updates class names to match refactored code
VersionUtil.java Entire class removed (unused versioning utility)
TextBuffer.java Removes unused factory method and several content conversion methods
RequestPayload.java Entire class removed (unused payload container)
JsonParserSequence.java Entire class removed (unused parser composition utility)
JsonParserDelegate.java Entire class removed (unused delegation pattern)
JsonGeneratorDelegate.java Entire class removed (unused delegation pattern)
JacksonFeatureSet.java Entire class removed (unused feature management)
JacksonFeature.java Entire class removed (unused feature interface)
BufferRecyclers.java Removes deprecated legacy methods
BufferRecycler.java Removes unused base64 codec buffer constant
package-info.java Entire file removed (various packages)
WritableTypeId.java Entire class removed (unused type ID handling)
TypeReference.java Entire class removed (unused generic type handling)
ResolvedType.java Entire class removed (unused type abstraction)
Name.java Entire class removed (unused name abstraction)
CharsToNameCanonicalizer.java Removes flags parameter and simplifies construction
ByteQuadsCanonicalizer.java Removes flags parameter and hardcodes intern/overflow settings
WriterBasedJsonGenerator.java Flattens hierarchy by extending JsonGenerator directly, removes unused write methods
UTF8StreamJsonParser.java Flattens hierarchy by extending JsonParser directly, removes unused features
UTF8JsonGenerator.java Flattens hierarchy by extending JsonGenerator directly, removes configuration complexity
ReaderBasedJsonParser.java Flattens hierarchy by extending JsonParser directly, removes unused features
PackageVersion.java.in Entire file removed (template no longer needed)
PackageVersion.java Entire class removed (versioning no longer needed)
JsonWriteFeature.java Removes unused feature enum values and simplifies to single feature
JsonWriteContext.java Removes duplicate detection support and DupDetector integration
JsonReadFeature.java Removes most feature enum values, keeps only essential ones
JsonReadContext.java Removes duplicate detection and current value tracking
JsonParserBase.java Entire class removed (intermediate base class no longer needed)
JsonGeneratorImpl.java Entire class removed (intermediate base class no longer needed)
DupDetector.java Entire class removed (duplicate detection not used)
ByteSourceJsonBootstrapper.java Simplifies parser construction by removing codec and flags parameters
SegmentedStringWriter.java Entire class removed (unused writer implementation)
OutputDecorator.java Entire class removed (unused decorator pattern)
NumberOutput.java Simplifies notFinite methods to use Java 8+ isFinite methods

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Azure.Core azure-core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant