Skip to content

try with ressource issues #7

@floison51

Description

@floison51

Some issues are encountered with tty with resources constructions:

1**) Semicolon**

	try (
		// Semi-colon at end of line causing parsing error
		InputStream is = Test200.class.getResourceAsStream( "/toto.txt" );
	) {
		System.out.println( "is" );
	}

2) Multiple try with resources

	try (
		// Several try with resources causes parsing issue
		InputStream is1 = Test200.class.getResourceAsStream( "/toto.txt" );
		InputStream is2 = Test200.class.getResourceAsStream( "/toto.txt" );
		InputStream is3 = Test200.class.getResourceAsStream( "/toto.txt" );
	) {
		System.out.println( "is" );
	}
  1. try nccs statements are not counted

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions