()
| 710 | } |
| 711 | |
| 712 | private Charset defaultCharset() { |
| 713 | if (DefaultCharset == null) { |
| 714 | // String encoding = AccessController |
| 715 | // .doPrivileged(new PriviAction<String>( |
| 716 | // "file.encoding", "ISO8859_1")); //$NON-NLS-1$ //$NON-NLS-2$ |
| 717 | String encoding = System.getProperty("file.encoding", "UTF-8"); |
| 718 | // calling System.getProperty() may cause DefaultCharset to be |
| 719 | // initialized |
| 720 | try { |
| 721 | DefaultCharset = Charset.forName(encoding); |
| 722 | } catch (IllegalCharsetNameException e) { |
| 723 | // Ignored |
| 724 | } catch (UnsupportedCharsetException e) { |
| 725 | // Ignored |
| 726 | } |
| 727 | |
| 728 | if (DefaultCharset == null) { |
| 729 | DefaultCharset = Charset.forName("ISO-8859-1"); //$NON-NLS-1$ |
| 730 | } |
| 731 | } |
| 732 | return DefaultCharset; |
| 733 | } |
| 734 | |
| 735 | /** |
| 736 | * Compares the specified string to this string to determine if the |
no test coverage detected