This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 71015

Summary: Diff does not detect xsl file encoding
Product: utilities Reporter: _ pkuzel <pkuzel>
Component: DiffAssignee: diff-issues@utilities <diff-issues>
Status: RESOLVED FIXED    
Severity: blocker Keywords: SIMPLEFIX
Priority: P2    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description _ pkuzel 2006-01-04 19:51:42 UTC
Proposed patch: 
 
Index: src/org/netbeans/modules/diff/EncodedReaderFactory.java 
=================================================================== 
RCS file: /cvs/diff/src/org/netbeans/modules/diff/EncodedReaderFactory.java,v 
retrieving revision 1.9 
diff -u -b -r1.9 EncodedReaderFactory.java 
--- src/org/netbeans/modules/diff/EncodedReaderFactory.java     9 Dec 2005 
18:11:48 -0000       1.9 
+++ src/org/netbeans/modules/diff/EncodedReaderFactory.java     4 Jan 2006 
19:33:13 -0000 
@@ -427,7 +427,7 @@ 
             } 
         } 
 
-        if (name.endsWith(".xml") || name.endsWith(".dtd") || 
name.endsWith(".xsd")) {  // NOI18N 
+        if (name.endsWith(".xml") || name.endsWith(".dtd") || 
name.endsWith(".xsd") || name.endsWith(".xsl")) {  // NOI18N 
             InputStream in = null; 
             try { 
                 in = new BufferedInputStream(new FileInputStream(file), 
2048); 
 
can not harm anything.
Comment 1 _ pkuzel 2006-01-04 19:53:28 UTC
Checking in src/org/netbeans/modules/diff/EncodedReaderFactory.java; 
/cvs/diff/src/org/netbeans/modules/diff/EncodedReaderFactory.java,v  <--  
EncodedReaderFactory.java 
new revision: 1.10; previous revision: 1.9 
done 
 
I'd like to backport to 5.0 => 50_HR_FIX 
Comment 2 Milan Kubec 2006-01-06 09:02:24 UTC
Please verify the fix and provide code review. Thanks.
Comment 3 Maros Sandor 2006-01-06 09:28:46 UTC
I have reviewed the fix, it is trivial and safe.
Comment 4 _ pkuzel 2006-01-06 10:57:12 UTC
backported 
 
Checking in src/org/netbeans/modules/diff/EncodedReaderFactory.java; 
/cvs/diff/src/org/netbeans/modules/diff/EncodedReaderFactory.java,v  <--  
EncodedReaderFactory.java 
new revision: 1.9.2.1; previous revision: 1.9 
done