Skip to content

Commit be7441c

Browse files
authored
Merge pull request #1701 from bstaletic/new_java
Upgrade java completer to 1.26.0
2 parents 5ab37ab + b612242 commit be7441c

File tree

6 files changed

+33
-35
lines changed

6 files changed

+33
-35
lines changed

build.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ def Exit( self ):
8989
)$
9090
"""
9191

92-
JDTLS_MILESTONE = '1.23.0'
93-
JDTLS_BUILD_STAMP = '202304271346'
92+
JDTLS_MILESTONE = '1.26.0'
93+
JDTLS_BUILD_STAMP = '202307271613'
9494
JDTLS_SHA256 = (
95-
'2363d8c01d5a8260a3d55f8fa008828d26a7b0acf9b173fafca4471ee81a701f'
95+
'ba5fe5ee3b2a8395287e24aef20ce6e17834cf8e877117e6caacac6a688a6c53'
9696
)
9797

9898
DEFAULT_RUST_TOOLCHAIN = 'nightly-2023-05-11'

ycmd/tests/java/diagnostics_test.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -141,32 +141,32 @@ def ProjectPath( *args ):
141141
has_entries( {
142142
'kind': 'WARNING',
143143
'text': 'The value of the local variable a is not used [536870973]',
144-
'location': LocationMatcher( TestWidgetImpl, 15, 9 ),
145-
'location_extent': RangeMatcher( TestWidgetImpl, ( 15, 9 ), ( 15, 10 ) ),
144+
'location': LocationMatcher( TestWidgetImpl, 13, 9 ),
145+
'location_extent': RangeMatcher( TestWidgetImpl, ( 13, 9 ), ( 13, 10 ) ),
146146
'ranges': contains_exactly( RangeMatcher( TestWidgetImpl,
147-
( 15, 9 ),
148-
( 15, 10 ) ) ),
147+
( 13, 9 ),
148+
( 13, 10 ) ) ),
149149
'fixit_available': False
150150
} ),
151151
has_entries( {
152152
'kind': 'ERROR',
153153
'text': 'ISR cannot be resolved to a variable [33554515]',
154-
'location': LocationMatcher( TestWidgetImpl, 34, 12 ),
155-
'location_extent': RangeMatcher( TestWidgetImpl, ( 34, 12 ), ( 34, 15 ) ),
154+
'location': LocationMatcher( TestWidgetImpl, 32, 12 ),
155+
'location_extent': RangeMatcher( TestWidgetImpl, ( 32, 12 ), ( 32, 15 ) ),
156156
'ranges': contains_exactly( RangeMatcher( TestWidgetImpl,
157-
( 34, 12 ),
158-
( 34, 15 ) ) ),
157+
( 32, 12 ),
158+
( 32, 15 ) ) ),
159159
'fixit_available': False
160160
} ),
161161
has_entries( {
162162
'kind': 'ERROR',
163163
'text': 'Syntax error, insert ";" to complete BlockStatements '
164164
'[1610612976]',
165-
'location': LocationMatcher( TestWidgetImpl, 34, 12 ),
166-
'location_extent': RangeMatcher( TestWidgetImpl, ( 34, 12 ), ( 34, 15 ) ),
165+
'location': LocationMatcher( TestWidgetImpl, 32, 12 ),
166+
'location_extent': RangeMatcher( TestWidgetImpl, ( 32, 12 ), ( 32, 15 ) ),
167167
'ranges': contains_exactly( RangeMatcher( TestWidgetImpl,
168-
( 34, 12 ),
169-
( 34, 15 ) ) ),
168+
( 32, 12 ),
169+
( 32, 15 ) ) ),
170170
'fixit_available': False
171171
} ),
172172
),

ycmd/tests/java/get_completions_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ def test_GetCompletions_ForceAtTopLevel_NoImport( self, app ):
799799
'request': {
800800
'filetype' : 'java',
801801
'filepath' : ProjectPath( 'TestWidgetImpl.java' ),
802-
'line_num' : 30,
802+
'line_num' : 28,
803803
'column_num': 20,
804804
'force_semantic': True,
805805
},
@@ -827,7 +827,7 @@ def test_GetCompletions_NoForceAtTopLevel_NoImport( self, app ):
827827
'request': {
828828
'filetype' : 'java',
829829
'filepath' : ProjectPath( 'TestWidgetImpl.java' ),
830-
'line_num' : 30,
830+
'line_num' : 28,
831831
'column_num': 20,
832832
'force_semantic': False,
833833
},
@@ -853,7 +853,7 @@ def test_GetCompletions_ForceAtTopLevel_WithImport( self, app ):
853853
'request': {
854854
'filetype' : 'java',
855855
'filepath' : filepath,
856-
'line_num' : 34,
856+
'line_num' : 32,
857857
'column_num': 16,
858858
'force_semantic': True,
859859
},
@@ -892,7 +892,7 @@ def test_GetCompletions_UseServerTriggers( self, app ):
892892
'request': {
893893
'filetype' : 'java',
894894
'filepath' : filepath,
895-
'line_num' : 24,
895+
'line_num' : 22,
896896
'column_num': 7,
897897
'force_semantic': False,
898898
},

ycmd/tests/java/subcommands_test.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ def test_Subcommands_GetDoc_Class( self, app ):
297297

298298
event_data = BuildRequest( filepath = filepath,
299299
filetype = 'java',
300-
line_num = 11,
300+
line_num = 9,
301301
column_num = 7,
302302
contents = contents,
303303
command_arguments = [ 'GetDoc' ],
@@ -323,7 +323,7 @@ def test_Subcommands_GetType_NoKnownType( self, app ):
323323

324324
event_data = BuildRequest( filepath = filepath,
325325
filetype = 'java',
326-
line_num = 28,
326+
line_num = 26,
327327
column_num = 1,
328328
contents = contents,
329329
command_arguments = [ 'GetType' ],
@@ -352,7 +352,7 @@ def test_Subcommands_GetType_Class( self, app ):
352352

353353
event_data = BuildRequest( filepath = filepath,
354354
filetype = 'java',
355-
line_num = 11,
355+
line_num = 9,
356356
column_num = 7,
357357
contents = contents,
358358
command_arguments = [ 'GetType' ],
@@ -375,7 +375,7 @@ def test_Subcommands_GetType_Constructor( self, app ):
375375

376376
event_data = BuildRequest( filepath = filepath,
377377
filetype = 'java',
378-
line_num = 14,
378+
line_num = 12,
379379
column_num = 3,
380380
contents = contents,
381381
command_arguments = [ 'GetType' ],
@@ -399,7 +399,7 @@ def test_Subcommands_GetType_ClassMemberVariable( self, app ):
399399

400400
event_data = BuildRequest( filepath = filepath,
401401
filetype = 'java',
402-
line_num = 12,
402+
line_num = 10,
403403
column_num = 18,
404404
contents = contents,
405405
command_arguments = [ 'GetType' ],
@@ -422,7 +422,7 @@ def test_Subcommands_GetType_MethodArgument( self, app ):
422422

423423
event_data = BuildRequest( filepath = filepath,
424424
filetype = 'java',
425-
line_num = 16,
425+
line_num = 14,
426426
column_num = 17,
427427
contents = contents,
428428
command_arguments = [ 'GetType' ],
@@ -447,7 +447,7 @@ def test_Subcommands_GetType_MethodVariable( self, app ):
447447

448448
event_data = BuildRequest( filepath = filepath,
449449
filetype = 'java',
450-
line_num = 15,
450+
line_num = 13,
451451
column_num = 9,
452452
contents = contents,
453453
command_arguments = [ 'GetType' ],
@@ -471,7 +471,7 @@ def test_Subcommands_GetType_Method( self, app ):
471471

472472
event_data = BuildRequest( filepath = filepath,
473473
filetype = 'java',
474-
line_num = 20,
474+
line_num = 18,
475475
column_num = 15,
476476
contents = contents,
477477
command_arguments = [ 'GetType' ],
@@ -520,7 +520,7 @@ def test_Subcommands_GetType_LiteralValue( self, app ):
520520

521521
event_data = BuildRequest( filepath = filepath,
522522
filetype = 'java',
523-
line_num = 15,
523+
line_num = 13,
524524
column_num = 13,
525525
contents = contents,
526526
command_arguments = [ 'GetType' ],
@@ -702,7 +702,7 @@ def test_Subcommands_GoToReferences( self, app ):
702702
'TestWidgetImpl.java' ),
703703
'column_num': 15,
704704
'description': " public void doSomethingVaguelyUseful() {",
705-
'line_num': 20
705+
'line_num': 18
706706
} ) ) )
707707

708708

@@ -763,7 +763,7 @@ def test_Subcommands_GoToSymbol_Multiple( self, app ):
763763
'test',
764764
'TestWidgetImpl.java' ) ,
765765
'description': "Class: TestWidgetImpl",
766-
'line_num': 11,
766+
'line_num': 9,
767767
'column_num': 7,
768768
} ),
769769
has_entries( {
@@ -913,8 +913,8 @@ def test_Subcommands_RefactorRename_MultipleFiles( self, app ):
913913
LocationMatcher( TestLauncher, 32, 35 ) ),
914914
ChunkMatcher(
915915
'a_quite_long_string',
916-
LocationMatcher( TestWidgetImpl, 20, 15 ),
917-
LocationMatcher( TestWidgetImpl, 20, 39 ) ),
916+
LocationMatcher( TestWidgetImpl, 18, 15 ),
917+
LocationMatcher( TestWidgetImpl, 18, 39 ) ),
918918
),
919919
'location': LocationMatcher( TestLauncher, 32, 13 )
920920
} ) )

ycmd/tests/java/testdata/simple_eclipse_project/src/com/test/TestWidgetImpl.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
* This concrete implementation is the equivalent of the main function in other
77
* languages
88
*/
9-
10-
119
class TestWidgetImpl implements AbstractTestWidget {
1210
private String info;
1311

ycmd/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def ToBytes( value ):
143143
if not value:
144144
return b''
145145

146-
if type( value ) == bytes:
146+
if type( value ) is bytes:
147147
return value
148148

149149
if isinstance( value, str ):

0 commit comments

Comments
 (0)