[jbossts-issues] [JBoss JIRA] (JBTM-2708) Test does not close FileInputStream

RH Bugzilla Integration (JIRA) issues at jboss.org
Thu Sep 22 09:36:00 EDT 2016


    [ https://issues.jboss.org/browse/JBTM-2708?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13297199#comment-13297199 ] 

RH Bugzilla Integration commented on JBTM-2708:
-----------------------------------------------

Vladimir Dosoudil <dosoudil at redhat.com> changed the Status of [bug 1356589|https://bugzilla.redhat.com/show_bug.cgi?id=1356589] from MODIFIED to ON_QA

> Test does not close FileInputStream
> -----------------------------------
>
>                 Key: JBTM-2708
>                 URL: https://issues.jboss.org/browse/JBTM-2708
>             Project: JBoss Transaction Manager
>          Issue Type: Task
>          Components: Testing
>            Reporter: Tom Jenkinson
>            Assignee: Tom Jenkinson
>             Fix For: 4.17.35, 5.3.4.Final
>
>
> {code}
> public XARRTestResource(String xarrHelper, File file) throws IOException {
>         this.xarrHelper = xarrHelper;
>         this.file = file;
>         DataInputStream fis = new DataInputStream(new FileInputStream(file));
>         final int formatId = fis.readInt();
>         final int gtrid_length = fis.readInt();
>         final byte[] gtrid = new byte[gtrid_length];
>         fis.read(gtrid, 0, gtrid_length);
>         final int bqual_length = fis.readInt();
>         final byte[] bqual = new byte[bqual_length];
>         fis.read(bqual, 0, bqual_length);
>         xids.put(file, new Xid() {
>             @Override
>             public byte[] getGlobalTransactionId() {
>                 return gtrid;
>             }
>             @Override
>             public int getFormatId() {
>                 return formatId;
>             }
>             @Override
>             public byte[] getBranchQualifier() {
>                 return bqual;
>             }
>         });
>         fis.close();
>     }
> {code}
> Spotted while working on JBTM-2614 backport



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jbossts-issues mailing list