Skip to content

Conversation

@baywet
Copy link
Member

@baywet baywet commented Mar 9, 2021

  • fixes a bug where native EDM return types would not be deserialized properly
  • fixes a bug where the content type for requests with empty bodies would be wrongfully defaulted

reflection of microsoftgraph/msgraph-sdk-java#693

@baywet baywet added this to the 2.0.0-release milestone Mar 9, 2021
@baywet baywet self-assigned this Mar 9, 2021
return null;
} else if(json.isJsonPrimitive()) {
return getPrimitiveValue(json, type);
} else if(json.isJsonObject()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: indent

Copy link
Member Author

Choose a reason for hiding this comment

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

those damn tabs keep creeping on me. Thanks for noticing.

Copy link
Contributor

Choose a reason for hiding this comment

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

GitHub makes it easy to show these because of weird tab width choice, whether it is a good or a bad thing.

I am really curious to know as to why VSCode is not applying .editorconfig on save for you.

Copy link
Member Author

Choose a reason for hiding this comment

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

it'd be interesting to see if using VS code on this repo (just check-out this branch to the commit before I fixed that mixed indent style), hitting ctrl + S on the file, it fixes it automatically for you. I had to do an explicit ctrl + h.
Here is the extension I'm using https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig

Copy link
Contributor

Choose a reason for hiding this comment

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

let me give it a try.

Copy link
Contributor

Choose a reason for hiding this comment

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

It turns out space conversion is not available on save: https://github.com/editorconfig/editorconfig-vscode#supported-properties.

If all your projects are using spaces, you may want to configure editor.insertSpaces in vscode settings. editor.renderWhitespace also helps in visualizing space types, so that you can tell when you need to hit that extra ctrl+h.

There is also this extension, but it ignores the space configuration in .editorconfig. It always applies 4 spaces: https://marketplace.visualstudio.com/items?itemName=redlin.remove-tabs-on-save

Visual Studio applies the .editorconfig spacing rules on save for C# files, so my expectation was similar with VSCode.

IntellijIDEA doesn't apply tab->space on save though it inserts new line at the end. But if you format the code, it does the conversion and respects the .editorconfig rules (tested with 8 spaces).

Maybe a little friction on Java development in VSCode to "share" in that BarcelonaJUG conference ;)

Copy link
Contributor

Choose a reason for hiding this comment

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

An alternative to Ctrl+H for tabs to spaces is: Command Palette (F1 or Ctrl+Shift+P) -> Convert Indentation to Spaces, which respects .editorconfig.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for looking into it! This is probably another case of Vincent getting confused by the tools. I do have auto final line insertion on save in TypeScript and yaml but this is probably because of other extensions. I do also have white space trim on save for all languages I believe?
I'll try to make the ctrl shift p alternative a habit and maybe if I get tired of doing that I'll go pr the editor config extension.

@baywet baywet requested a review from MIchaelMainer March 10, 2021 13:24
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