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 - Diff does not detect xsl file encoding
Summary: Diff does not detect xsl file encoding
Status: RESOLVED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Diff (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: diff-issues@utilities
URL:
Keywords: SIMPLEFIX
Depends on:
Blocks:
 
Reported: 2006-01-04 19:51 UTC by _ pkuzel
Modified: 2006-01-06 14:11 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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