Skip to content

Issue #14: Unsupported Operation Exception when using CiscoUCSRest request using CLI#13

Merged
NassimBtk merged 3 commits intomainfrom
feature/MTX-518-Remove-immutable-lists
Jan 9, 2024
Merged

Issue #14: Unsupported Operation Exception when using CiscoUCSRest request using CLI#13
NassimBtk merged 3 commits intomainfrom
feature/MTX-518-Remove-immutable-lists

Conversation

@MedMaalej
Copy link
Contributor

@MedMaalej MedMaalej commented Jan 9, 2024

Issue #14

  • Remove immutable lists created by Collections.emptyList

* Remove immutable lists created by Collections.emptyList
// if there's no map return empty list
if (null == rowValuesMap || rowValuesMap.isEmpty()) {
return Collections.emptyList();
return new ArrayList<>(Collections.emptyList());
Copy link
Contributor

Choose a reason for hiding this comment

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

return new ArrayList<>();

static List<String> getValueData(final Map<Integer, String> values, final int totalProperties) {
return values.containsKey(ROOT_TAG_NOT_FOUND) ?
Collections.emptyList() :
new ArrayList<>(Collections.emptyList()) :
Copy link
Contributor

Choose a reason for hiding this comment

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

return new ArrayList<>();

* Refactor after code review
@NassimBtk
Copy link
Contributor

Please create an issue and reference the issue in the git commits.

@NassimBtk NassimBtk changed the title MTX-518 Unsupported Operation Exception when using CiscoUCSRest request using CLI [#14] Unsupported Operation Exception when using CiscoUCSRest request using CLI Jan 9, 2024
@NassimBtk NassimBtk merged commit 14801d8 into main Jan 9, 2024
@NassimBtk NassimBtk deleted the feature/MTX-518-Remove-immutable-lists branch January 9, 2024 15:13
@NassimBtk NassimBtk changed the title [#14] Unsupported Operation Exception when using CiscoUCSRest request using CLI Issue #14: Unsupported Operation Exception when using CiscoUCSRest request using CLI Jan 11, 2024
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.

3 participants