Skip to content

the number 0L shouldn't have a space inserted between the "0" and the "L" #138

@meadowsys

Description

@meadowsys

Unibeautify Playground link

Language: Java

Config:

{
  "Java": {
    "indent_comments": true,
    "end_with_comma": false,
    "indent_style": "space",
    "indent_size": 2,
    "break_chained_methods": false,
    "max_preserve_newlines": 10,
    "quotes": "none",
    "space_after_anon_function": false,
    "multiline_ternary": "never",
    "align_assignments": false,
    "wrap_line_length": 80,
    "beautifiers": [
      "Pretty Diff"
    ]
  }
}

Input:

public class AA {
  public static void main(String[] args) {
    System.out.println(0L);
  }
}

Output:

public class AA {
  public static void main(String[] args) {
    System.out.println(0 L);
  }
}

Expected behavior:
the long 0L shouldn't be touched by the code beautifier, but instead, there is a forbidden space inserted between the "0" and the "L". Examples: the playground linked above, as well as a commit in my project thing (its a really small project i know), as well as the Travis CI build that failed for that commit

The config file used in my project is slightly different, here it is.

Other longs are also affected (like here).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions