http://defect.opensolaris.org/bz/show_bug.cgi?id=19221
Vladimir Kotal <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CAUSEKNOWN --- Comment #1 from Vladimir Kotal <[email protected]> 2012-07-04 14:07:36 UTC --- The problem lies in PageConfig:getDiffData() method: 179 if (data.genre == null || txtGenres.contains(data.genre)) { 180 InputStream[] in = new InputStream[2]; 181 BufferedReader br = null; 182 try { 183 for (int i = 0; i < 2; i++) { 184 File f = new File(srcRoot + filepath[i]); 185 in[i] = HistoryGuru.getInstance().getRevision(f.getParent(), f.getName(), data.rev[i]); 186 } 187 188 if (data.genre == null) { 189 try { 190 data.genre = AnalyzerGuru.getGenre(in[0]); 191 } catch (IOException e) { 192 data.errorMsg = "Unable to determine the file type: " 193 + Util.htmlize(e.getMessage()); 194 } 195 } 196 197 if (data.genre != Genre.PLAIN && data.genre != Genre.HTML) { 198 return data; 199 } The File object on line 184 is created with path which is already HTML escaped so the colons are substituted with '%3A'. As a result, the getGenre() on line 190 returns null. This is because find(InputStream) method in AnalyzerGuru failed to read the input data and returned null on line 461: 455 public static FileAnalyzerFactory find(InputStream in) throws IOException { 456 in.mark(8); 457 byte[] content = new byte[8]; 458 int len = in.read(content); 459 in.reset(); 460 if (len < 4) { 461 return null; 462 } -- Configure bugmail: http://defect.opensolaris.org/bz/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ opengrok-dev mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/opengrok-dev
