Skip to content

Обработка типов значение и длинные квалификаторы#587

Merged
theshadowco merged 2 commits intodevelopfrom
feature/fixes260220
Feb 20, 2026
Merged

Обработка типов значение и длинные квалификаторы#587
theshadowco merged 2 commits intodevelopfrom
feature/fixes260220

Conversation

@theshadowco
Copy link
Copy Markdown
Member

@theshadowco theshadowco commented Feb 20, 2026

Описание

  • добавлена обработка ранее не обрабатываемых типов значений
  • парсинг квалификаторов строки и двоичных данных поддерживает длинные значения (long)

Связанные задачи

Closes #573
Closes #583

Чеклист

Общие

  • Ветка PR обновлена из develop
  • Отладочные, закомментированные и прочие, не имеющие смысла участки кода удалены
  • Изменения покрыты тестами
  • Обязательные действия перед коммитом выполнены (запускал команду gradlew precommit)

Дополнительно

Summary by CodeRabbit

Release Notes

  • New Features

    • Extended support for additional type alias recognition, including ChartType mapping.
  • Bug Fixes

    • Fixed parsing of larger numeric length values to prevent overflow errors.
    • Enhanced error logging with additional contextual information for improved troubleshooting.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 20, 2026

📝 Walkthrough

Walkthrough

Three targeted updates to type conversion and error handling: enhanced logging in TransformationUtils to include values in error messages, updated value-type mappings in ValueTypeConverter (removing d5p1-prefixed FlowchartContextType alias and adding ChartType), and changed length value parsing from int to long in ValueTypeQualifierConverter to support larger values.

Changes

Cohort / File(s) Summary
Type Mapping and Parsing Converters
src/main/java/com/github/_1c_syntax/bsl/reader/common/converter/ValueTypeConverter.java, src/main/java/com/github/_1c_syntax/bsl/reader/common/converter/ValueTypeQualifierConverter.java
Updated value-type aliases (removed d5p1:FlowchartContextType prefix, added ChartType mapping) and changed length parsing from Integer.parseInt to Long.parseLong to handle larger numeric values.
Error Logging Enhancement
src/main/java/com/github/_1c_syntax/bsl/reader/common/TransformationUtils.java
Enhanced error logging in setValue method to include the value being set alongside class and method name in error messages for better debugging.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • PR #569: Related modifications to the same converter classes (ValueTypeQualifierConverter and ValueTypeConverter) for updating parsing and type recognition logic.

Poem

🐰 A hop, skip, and fix we make today,
Better logs to light the debugging way,
Types now map with wider span,
Long values in our parsing plan,
Fewer errors, clearer sight—
Our converters work just right! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The Russian title 'Обработка типов значение и длинные квалификаторы' accurately describes the main changes: handling value types and long qualifiers, which corresponds to the three modified files addressing issues #573 and #583.
Linked Issues check ✅ Passed Changes address both linked issues: ValueTypeConverter adds FlowchartContextType and ChartType support [#573], while TransformationUtils and ValueTypeQualifierConverter fix IllegalArgumentException and long qualifier parsing [#583].
Out of Scope Changes check ✅ Passed All three file changes are directly scoped to the linked issues: adding unknown value types, fixing type conversion errors, and supporting long qualifiers for string and binary data qualifiers.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/fixes260220

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 20, 2026

Test Results

  402 files  ±0    402 suites  ±0   6m 13s ⏱️ +10s
  284 tests ±0    284 ✅ ±0  0 💤 ±0  0 ❌ ±0 
1 764 runs  ±0  1 764 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit f2631f1. ± Comparison against base commit de5581f.

♻️ This comment has been updated with latest results.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@src/main/java/com/github/_1c_syntax/bsl/reader/common/TransformationUtils.java`:
- Line 54: LOGGER_MESSAGE_PREF currently has three placeholders ("Class {},
method {}, value {}") but invoke, builder, toBuilder, and build(Object) log only
class and method plus a Throwable, leaving the third placeholder unfilled and
causing SLF4J to treat the Throwable as a message parameter; add a second format
constant (e.g., LOGGER_MESSAGE_PREF_NO_VALUE = "Class {}, method {}") or inline
that two-parameter template and replace the LOGGER.error calls in invoke,
builder, toBuilder, and build(Object) to use the two-arg template so the
Throwable is correctly treated as the exception; leave setValue using the
three-arg template since it supplies the value parameter.

Comment thread src/main/java/com/github/_1c_syntax/bsl/reader/common/TransformationUtils.java Outdated
@sonarqubecloud
Copy link
Copy Markdown

@theshadowco theshadowco merged commit bfe0a70 into develop Feb 20, 2026
19 checks passed
@theshadowco theshadowco deleted the feature/fixes260220 branch February 20, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ошибка ExternalDataSourceTableFieldBuilder [BUG] Unknown valueType [v8ui:HorizontalAlign]

1 participant