Changeset d2bdbcd


Ignore:
Timestamp:
Mar 28, 2019 1:31:39 PM (17 months ago)
Author:
zab2 <zab2@…>
Branches:
master
Children:
e919271
Parents:
97eb5a5
Message:

correct io pattern

Location:
apps/i2ptunnel/java/src/net/i2p/i2ptunnel/access
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/access/AccessFilter.java

    r97eb5a5 rd2bdbcd  
    9393            // if the file already exists, add previously breached b32s
    9494            if (file.exists() && file.isFile()) {
    95                 BufferedReader reader = new BufferedReader(new FileReader(file));
     95                BufferedReader reader = null;
    9696                try {
     97                    reader = new BufferedReader(new FileReader(file));
    9798                    String b32;
    9899                    while((b32 = reader.readLine()) != null)
     
    103104            }
    104105
    105             BufferedWriter writer = new BufferedWriter(new FileWriter(file));
     106            BufferedWriter writer = null;
    106107            try {
     108                writer = new BufferedWriter(new FileWriter(file));
    107109                for (String b32 : breached) {
    108110                    writer.write(b32);
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/access/FileFilterDefinitionElement.java

    r97eb5a5 rd2bdbcd  
    2121        if (!(file.exists() && file.isFile()))
    2222            return;
    23         BufferedReader reader = new BufferedReader(new FileReader(file));
     23        BufferedReader reader = null;
    2424        try {
     25            reader = new BufferedReader(new FileReader(file));
    2526            String b32;
    2627            while((b32 = reader.readLine()) != null) {
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/access/FilterFactory.java

    r97eb5a5 rd2bdbcd  
    1717        List<String> linesList = new ArrayList<String>();
    1818
    19         BufferedReader reader = new BufferedReader(new FileReader(definition));
     19        BufferedReader reader = null;
    2020        try {
     21            reader = new BufferedReader(new FileReader(definition));
    2122            String line;
    2223            while((line = reader.readLine()) != null) {
Note: See TracChangeset for help on using the changeset viewer.