0

我有在 Java 1.6 下编译好的源代码,但在 java 1.7 下编译不正常:

addText( indent, NBSP + '»' + NBSP );

编译器抛出以下错误:

<message priority="warn"><![CDATA[C:\Build\Nightly\trunk\server\src\uk\co\stasys\ier\reports\capability\CapabilityReport.java:411: error: unclosed character literal]]></message>
<message priority="warn"><![CDATA[            addText( indent, NBSP + '»' + NBSP );]]></message>
<message priority="warn"><![CDATA[                                    ^]]></message>
<message priority="warn"><![CDATA[C:\Build\Nightly\trunk\server\src\uk\co\stasys\ier\reports\capability\CapabilityReport.java:411: error: illegal character: \187]]></message>
<message priority="warn"><![CDATA[            addText( indent, NBSP + '»' + NBSP );]]></message>
<message priority="warn"><![CDATA[                                      ^]]></message>
<message priority="warn"><![CDATA[C:\Build\Nightly\trunk\server\src\uk\co\stasys\ier\reports\capability\CapabilityReport.java:411: error: unclosed character literal]]></message>
<message priority="warn"><![CDATA[            addText( indent, NBSP + '»' + NBSP );]]></message>
<message priority="warn"><![CDATA[                                       ^]]></message>

它还可以通过 IntelliJ IDEA 使用 java 1.7 编译。

4

0 回答 0