Code Monkey home page Code Monkey logo

Comments (6)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 8, 2024

Original comment by [email protected] on 24 Feb 2012 at 11:53

  • Changed state: Accepted

from daisydiff.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 8, 2024
If the streams are closed properly the issue goes away?
Have you already fixed it yourself? Do you have a patch?

Original comment by [email protected] on 24 Feb 2012 at 3:45

  • Changed state: Started

from daisydiff.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 8, 2024
I move the initialization of oldStream and newStream object outside the 
try->catch->block

....
String[] css = new String[]{};

InputStream oldStream = null;
InputStream newStream = null;
....

and add a finally block

finally {
            try {
                if(oldStream != null) oldStream.close();
            } catch (IOException e) {
                //ignore this exception
            }
            try {
                if(newStream != null) newStream.close();
            } catch (IOException e) {
                //ignore this exception
            }
        }

furthermore it would be helpful to rewrite Line 167-169

InputStreamReader oldReader = null;
                BufferedReader oldBuffer = null;

                InputStreamReader newISReader = null;
                BufferedReader newBuffer = null;
                try {
                    oldReader = new InputStreamReader(oldStream);
                    oldBuffer = new BufferedReader(oldReader);

                    newISReader = new InputStreamReader(newStream);
                    newBuffer = new BufferedReader(newISReader);
                    DaisyDiff.diffTag(oldBuffer, newBuffer, postProcess);

                } catch (Exception e) {
                    System.out.println(e);
                } finally {
                    oldBuffer.close();
                    newBuffer.close();
                    oldReader.close();
                    newISReader.close();
                }


Original comment by [email protected] on 24 Feb 2012 at 11:33

from daisydiff.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 8, 2024
Can you perform a diff on your code to create a patch and post it here? I will 
apply it to trunk after testing.

Original comment by [email protected] on 25 Feb 2012 at 9:39

from daisydiff.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 8, 2024
A local test shows, that this will prevent a resource blocking problem.

Original comment by [email protected] on 27 Feb 2012 at 4:41

Attachments:

from daisydiff.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 8, 2024
Fixed in subversion r175

Original comment by [email protected] on 27 Feb 2012 at 8:59

  • Changed state: Fixed

from daisydiff.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.