|
From: SourceForge.net <no...@so...> - 2010-06-28 17:55:04
|
Plugin Bugs item #3022454, was opened at 2010-06-28 11:44 Message generated for change (Settings changed) made by daleanson You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=565475&aid=3022454&group_id=588 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Eric Le Lay (kerik-sf) >Assigned to: Dale Anson (daleanson) Summary: PMDPlugin 3.2 ignores buffer encoding Initial Comment: It uses the platform's encoding and it will then fail on accented character constants. (tested on winxp and mac os x) Please find attached a file demonstrating that. - Open it with utf-8 encoding (make sure that accented characters show up correctly) - invoke pmd-check-current-buffer Error log : 19:38:32 [AWT-EventQueue-0] [error] PMDJEditPlugin: Error while processing /Users/elelay/Desktop/TestClass.java: 19:38:32 [AWT-EventQueue-0] [error] PMDJEditPlugin: Error while processing /Users/elelay/Desktop/TestClass.java 19:38:32 [AWT-EventQueue-0] [error] PMDJEditPlugin: net.sourceforge.pmd.ast.TokenMgrError: Lexical error at line 8, column 32. Encountered: "\u00a9" (169), after : "\'\u221a" 19:38:32 [AWT-EventQueue-0] [error] PMDJEditPlugin: net.sourceforge.pmd.PMDException: Error while processing /Users/elelay/Desktop/TestClass.java 19:38:32 [AWT-EventQueue-0] [error] PMDJEditPlugin: at net.sourceforge.pmd.PMD.processFile(PMD.java:132) 19:38:32 [AWT-EventQueue-0] [error] PMDJEditPlugin: at net.sourceforge.pmd.PMD.processFile(PMD.java:75) 19:38:32 [AWT-EventQueue-0] [error] PMDJEditPlugin: at net.sourceforge.pmd.PMD.processFile(PMD.java:210) 19:38:32 [AWT-EventQueue-0] [error] PMDJEditPlugin: at net.sourceforge.pmd.jedit.PMDJEditPlugin.instanceCheck(PMDJEditPlugin.java:206) 19:38:32 [AWT-EventQueue-0] [error] PMDJEditPlugin: at net.sourceforge.pmd.jedit.PMDJEditPlugin.check(PMDJEditPlugin.java:263) Cause: net/sourceforge/pmd/jedit/PMDJEditPlugin.java, line 216 should use buffer.getProperty("encoding") instead of System.getProperty("file.encoding") Work-around: in the beanshell console, invoke System.setProperty("file.encoding","UTF-8") ---------------------------------------------------------------------- >Comment By: Dale Anson (daleanson) Date: 2010-06-28 11:55 Message: Nice bug report, thanks! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=565475&aid=3022454&group_id=588 |