Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.

Ticket #2635: webstart.patch

File webstart.patch, 3.8 KB (added by jmoore, 14 years ago)
  • SRC/org/openmicroscopy/shoola/env/log/LoggerFactory.java

     
    132132        { 
    133133                Properties config = new Properties(); 
    134134                try {  
    135                         FileInputStream fis = new FileInputStream(file); 
    136                         config.load(fis); 
     135                        config.load(org.openmicroscopy.shoola.util.file.IOUtil.readConfigFile(file)); 
    137136                } catch (Exception e) { 
    138137                        return null; 
    139138                } 
  • SRC/org/openmicroscopy/shoola/env/cache/CacheServiceFactory.java

     
    130130        { 
    131131                InputStream stream; 
    132132                try {  
    133                         stream = new FileInputStream(file); 
     133                        stream = org.openmicroscopy.shoola.util.file.IOUtil.readConfigFile(file); 
    134134                } catch (Exception e) { 
    135135                        return null; 
    136136                } 
  • SRC/org/openmicroscopy/shoola/env/config/Parser.java

     
    154154        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); 
    155155        try { 
    156156            DocumentBuilder builder = factory.newDocumentBuilder(); 
    157             document = builder.parse(new File(configFile)); 
     157            document = builder.parse(org.openmicroscopy.shoola.util.file.IOUtil.readConfigFile(configFile)); 
    158158            if (validating) { 
    159159                factory.setValidating(true);    
    160160                factory.setNamespaceAware(true); 
  • SRC/org/openmicroscopy/shoola/env/data/DataServicesFactory.java

     
    130130        private static Properties loadConfig(String file) 
    131131        { 
    132132                Properties config = new Properties(); 
    133                 FileInputStream fis = null; 
    134                 try {  
    135                         fis = new FileInputStream(file); 
     133                java.io.InputStream fis = null; 
     134                try { 
     135                        fis = org.openmicroscopy.shoola.util.file.IOUtil.readConfigFile(file); 
    136136                        config.load(fis); 
    137137                } catch (Exception e) { 
    138138                        return null; 
  • SRC/org/openmicroscopy/shoola/env/ui/TaskBarManager.java

     
    162162        { 
    163163                String message; 
    164164                try { 
    165                         FileInputStream fis = new FileInputStream(file); 
     165                        java.io.InputStream fis = org.openmicroscopy.shoola.util.file.IOUtil.readConfigFile(file); 
    166166                        BufferedReader in = new BufferedReader(new InputStreamReader(fis)); 
    167167                        StringBuffer buffer = new StringBuffer(); 
    168168                        int number = 0; 
  • SRC/org/openmicroscopy/shoola/util/file/IOUtil.java

     
    144144                return readTextFile(new File(fileName)); 
    145145        } 
    146146         
     147        public static InputStream readConfigFile(String file) throws IOException { 
     148            try { 
     149                return System.getProperty("javawebstart.version", null) != null ? Class.forName("uk.ac.imperial.cisbic.Config").getClassLoader().getResourceAsStream(new java.io.File(file).getName()) : new FileInputStream(file); 
     150            } catch (ClassNotFoundException e) { 
     151                throw new RuntimeException(e); 
     152            } 
     153        } 
    147154} 

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.21690 sec.)

We're Hiring!