• R/O
  • HTTP
  • SSH
  • HTTPS

JinParser: 提交

JinParserライブラリは、CGIゲーム「人狼BBS」のクライアント制作者向けに作られたJavaライブラリです。


Commit MetaInfo

修訂7c2044e9f24553fb2ff14e5e865652d22ceeaa56 (tree)
時間2017-04-09 12:23:22
作者Olyutorskii <olyutorskii@user...>
CommiterOlyutorskii

Log Message

release/1.409.4 とマージ

Change Summary

差異

--- a/.hgignore
+++ b/.hgignore
@@ -27,7 +27,7 @@ syntax: regexp
2727 syntax: glob
2828
2929 .DS_Store
30-_MACOSX
30+__MACOSX
3131 [Tt]humbs.db
3232 [Dd]esktop.ini
3333 core
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -4,6 +4,9 @@
44 JinParser 変更履歴
55
66
7+1.409.4 (2017-04-09)
8+ ・F国URL修正に伴い JinCore 1.206.10 に対応。
9+
710 1.409.2 (2016-06-25)
811 ・SMP面文字代替処理のオンオフを可能に。
912
--- a/README.txt
+++ b/README.txt
@@ -43,7 +43,7 @@ JindolfのXHTML文書パース機能を提供することを目的に発足し
4343
4444 === 開発プロジェクト運営元 ===
4545
46- https://osdn.jp/projects/jindolf/devel/ まで。
46+ https://ja.osdn.net/projects/jindolf/ まで。
4747
4848
4949 === ディレクトリ内訳構成 ===
@@ -65,6 +65,15 @@ JindolfのXHTML文書パース機能を提供することを目的に発足し
6565 ./pom.xml
6666 Maven3用プロジェクト構成定義ファイル。
6767
68+./checkstyle.xml
69+ Checkstyle用configファイル。
70+
71+./pmdrules.xml
72+ PMD用ルール定義ファイル。
73+
74+./src/assembly/src.xml
75+ ソースアーカイブ構成定義ファイル。
76+
6877 ./src/main/java/
6978 Javaのソースコード。
7079
@@ -77,17 +86,4 @@ JindolfのXHTML文書パース機能を提供することを目的に発足し
7786 ./src/test/java/sample/
7887 サンプルのパーサ実装。
7988
80-./src/main/config/
81- 各種ビルド・構成管理に必要なファイル群。
82-
83-./src/main/config/checks.xml
84- Checkstyle用configファイル。
85-
86-./src/main/config/pmdrules.xml
87- PMD用ルール定義ファイル。
88-
89-./src/main/assembly/descriptor.xml
90- ソースアーカイブ構成定義ファイル。
91-
92-
9389 --- EOF ---
--- a/SCM.txt
+++ b/SCM.txt
@@ -10,10 +10,10 @@
1010
1111 このアーカイブの原本は、Mercurial(hg)でバージョン管理されています。
1212 このアーカイブの原本となる開発資産は、
13- https://osdn.jp/projects/jindolf/scm/hg/JinParser/
13+ https://ja.osdn.net/projects/jindolf/scm/hg/JinParser/
1414 を上位に持つMercurialリポジトリで管理されています。
1515 アーカイブの代わりにMercurialを通じての開発資産へのアクセスが可能です。
16- # hg clone http://hg.osdn.jp/view/jindolf/JinParser
16+ # hg clone http://hg.osdn.net/view/jindolf/JinParser
1717
1818
1919 === 各種設定ファイル ===
@@ -42,7 +42,7 @@ EOL Extensionを有効にしないと設定が反映されません。
4242 ・https://www.mercurial-scm.org/wiki/.hgignore
4343 ・https://www.selenic.com/mercurial/hgignore.5.html
4444 ・https://www.mercurial-scm.org/wiki/EolExtension
45-・http://tortoisehg.bitbucket.org/
45+・https://tortoisehg.bitbucket.io/
4646
4747
4848 --- EOF ---
--- a/src/main/config/suppressions.xml
+++ b/checkstyle-suppressions.xml
@@ -5,8 +5,8 @@
55 "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
66
77 <!--
8- Checkstyle用警告抑止設定
9- ※ SuppressionFilter モジュール用
8+ Checkstyle suppressions
9+ for Checkstyle 6.19(7.4) or later
1010
1111 [ http://checkstyle.sourceforge.net/ ]
1212
@@ -29,17 +29,13 @@
2929
3030 <!-- Javadoc Comments -->
3131 <suppress files="" checks="SummaryJavadocCheck" />
32- <!-- 句読点対応待ち -->
33- <suppress files="" checks="SingleLineJavadoc" />
34- <!-- ignoredTagsプロパティ対応待ち -->
3532
3633 <!-- Miscellaneous -->
3734 <suppress files="" checks="FinalParameters" />
3835 <suppress files="" checks="TrailingComment" />
3936
40- <suppress files="HtmlParser.java" checks="DeclarationOrder" />
41- <suppress files="SysEventParser.java" checks="DeclarationOrder" />
42- <suppress files="TalkParser.java" checks="DeclarationOrder" />
37+ <!-- Whitespace -->
38+ <suppress files="" checks="SingleSpaceSeparator" />
4339
4440 </suppressions>
4541
--- a/src/main/config/checks.xml
+++ b/checkstyle.xml
@@ -5,9 +5,8 @@
55 "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
66
77 <!--
8- Checkstyle用チェック項目定義。
9-
10- Checkstyle 6.1 以降向けに記述。
8+ Checkstyle modules
9+ for Checkstyle 6.19(7.4) or later
1110
1211 [ http://checkstyle.sourceforge.net/ ]
1312
@@ -19,21 +18,25 @@
1918
2019 <property name="charset" value="UTF-8" />
2120 <property name="localeCountry" value="JP" />
22- <property name="localeLanguage" value="ja" />
21+ <property name="localeLanguage" value="en" />
22+ <!--property name="localeLanguage" value="ja" /-->
23+ <property name="fileExtensions" value="java, xml, properties" />
2324 <property name="severity" value="error" />
2425
2526
2627 <!-- Filters -->
2728 <module name="SeverityMatchFilter" />
2829 <module name="SuppressionCommentFilter" />
29- <module name="SuppressionFilter">
30- <property name="file" value="src/main/config/suppressions.xml" />
31- </module>
30+ <module name="SuppressionFilter" />
3231 <module name="SuppressWarningsFilter" />
3332 <module name="SuppressWithNearbyCommentFilter" />
3433
3534
3635 <!-- Headers -->
36+ <module name="Header">
37+ <property name="header" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;" />
38+ <property name="fileExtensions" value="xml" />
39+ </module>
3740 <module name="RegexpHeader">
3841 <property name="header" value="^/\*$\n^ \*( .*)?$\n^ \*/$\n" />
3942 <property name="multiLines" value="2" />
@@ -57,7 +60,7 @@
5760 <module name="RegexpMultiline">
5861 <property name="format" value="[\u000b\f\u001a]" />
5962 </module>
60-<!--<module name="RegexpOnFilename" /> 6.15 or later -->
63+ <module name="RegexpOnFilename" />
6164 <module name="RegexpSingleline">
6265 <property name="format" value="\s+$" />
6366 </module>
@@ -68,9 +71,7 @@
6871
6972
7073 <!-- Size Violations -->
71- <module name="FileLength">
72- <property name="max" value="2000"/>
73- </module>
74+ <module name="FileLength" />
7475
7576
7677 <!-- Whitespace -->
@@ -80,6 +81,7 @@
8081 <module name="TreeWalker">
8182
8283 <property name="tabWidth" value="8"/>
84+ <property name="fileExtensions" value="java"/>
8385
8486
8587 <!-- Annotations -->
@@ -94,12 +96,13 @@
9496
9597
9698 <!-- Block Checks -->
99+
97100 <module name="AvoidNestedBlocks" />
98101 <module name="EmptyBlock" />
99-<!-- <module name="EmptyCatchBlock" /> 6.4 or later -->
102+ <module name="EmptyCatchBlock" />
100103 <module name="LeftCurly" />
101104 <module name="NeedBraces">
102- <property name="tokens" value="LITERAL_DO" />
105+ <property name="allowSingleLineStatement" value="true" />
103106 </module>
104107 <module name="RightCurly" />
105108
@@ -113,9 +116,7 @@
113116 <module name="InterfaceIsType" />
114117 <module name="MutableException" />
115118 <module name="OneTopLevelClass" />
116- <module name="ThrowsCount">
117- <property name="max" value="4" />
118- </module>
119+ <module name="ThrowsCount" />
119120 <module name="VisibilityModifier" />
120121
121122
@@ -135,6 +136,7 @@
135136 <module name="HiddenField">
136137 <property name="ignoreConstructorParameter" value="true" />
137138 <property name="ignoreSetter" value="true" />
139+ <property name="setterCanReturnItsClass" value="true" />
138140 <property name="ignoreAbstractMethods" value="true" />
139141 </module>
140142 <module name="IllegalCatch" />
@@ -143,11 +145,7 @@
143145 <module name="IllegalToken">
144146 <property name="tokens" value="LITERAL_NATIVE" />
145147 </module>
146- <module name="IllegalTokenText">
147- <property name="tokens" value="NUM_INT, NUM_LONG" />
148- <property name="format" value="^0_*[0-7]" />
149- <property name="message" value="inhibit octal number" />
150- </module>
148+ <module name="IllegalTokenText" />
151149 <module name="IllegalType" />
152150 <module name="InnerAssignment" />
153151 <module name="MagicNumber" />
@@ -156,9 +154,6 @@
156154 <module name="ModifiedControlVariable" />
157155 <module name="MultipleStringLiterals" />
158156 <module name="MultipleVariableDeclarations" />
159- <module name="SimplifyBooleanExpression" />
160- <module name="SimplifyBooleanReturn" />
161- <module name="StringLiteralEquality" />
162157 <module name="NestedForDepth" />
163158 <module name="NestedIfDepth" />
164159 <module name="NestedTryDepth" />
@@ -169,20 +164,16 @@
169164 <module name="PackageDeclaration" />
170165 <module name="ParameterAssignment" />
171166 <module name="RequireThis">
172- <property name="checkMethods" value="false" />
173- </module>
174- <module name="ReturnCount">
175- <property name="max" value="5" />
167+ <!--property name="checkMethods" value="false" /-->
176168 </module>
169+ <module name="ReturnCount" />
177170 <module name="SimplifyBooleanExpression" />
178171 <module name="SimplifyBooleanReturn" />
179172 <module name="StringLiteralEquality" />
180173 <module name="SuperClone" />
181174 <module name="SuperFinalize" />
182175 <module name="UnnecessaryParentheses" />
183- <module name="VariableDeclarationUsageDistance">
184- <property name="allowedDistance" value="5" />
185- </module>
176+ <module name="VariableDeclarationUsageDistance" />
186177
187178
188179 <!-- Imports -->
@@ -239,7 +230,7 @@
239230 <property name="allowIfAllCharactersEscaped" value="true"/>
240231 <property name="allowNonPrintableEscapes" value="true"/>
241232 </module>
242-<!-- <module name="CommentsIndentation" /> 6.10 or later -->
233+ <module name="CommentsIndentation" />
243234 <module name="DescendantToken" />
244235 <module name="FileContentsHolder" />
245236 <module name="FinalParameters" />
@@ -264,34 +255,19 @@
264255 <!-- Naming Conventions -->
265256
266257 <module name="AbbreviationAsWordInName" />
267- <module name="AbstractClassName">
268- <property
269- name="format"
270- value="^Abstract.*$|^.*Factory$|^.*Builder$|^.*Adapter$"
271- />
272- </module>
273-<!-- <module name="CatchParameterName" /> 6.14 or later -->
258+ <module name="AbstractClassName" />
259+ <module name="CatchParameterName" />
274260 <module name="ClassTypeParameterName" />
275261 <module name="ConstantName" />
276262 <module name="InterfaceTypeParameterName" />
277- <module name="LocalFinalVariableName">
278- <property name="format" value="^[a-z][_a-zA-Z0-9]*$" />
279- </module>
280- <module name="LocalVariableName">
281- <property name="format" value="^[a-z][_a-zA-Z0-9]*$" />
282- </module>
283- <module name="MemberName">
284- <property name="format" value="^[a-z][_a-zA-Z0-9]*$" />
285- </module>
263+ <module name="LocalFinalVariableName" />
264+ <module name="LocalVariableName" />
265+ <module name="MemberName" />
286266 <module name="MethodName" />
287267 <module name="MethodTypeParameterName" />
288268 <module name="PackageName" />
289- <module name="ParameterName">
290- <property name="format" value="^[a-z][_a-zA-Z0-9]*$" />
291- </module>
292- <module name="StaticVariableName">
293- <property name="format" value="^[a-z][_a-zA-Z0-9]*$" />
294- </module>
269+ <module name="ParameterName" />
270+ <module name="StaticVariableName" />
295271 <module name="TypeName" />
296272
297273
@@ -361,32 +337,7 @@
361337 <property name="allowLineBreaks" value="false" />
362338 <property name="tokens" value="COMMA, POST_INC, POST_DEC" />
363339 </module>
364- <module name="NoWhitespaceBefore">
365- <property name="allowLineBreaks" value="true" />
366- <property name="tokens" value="SEMI" />
367- </module>
368- <module name="OperatorWrap">
369- <property name="option" value="eol" />
370- <property
371- name="tokens"
372- value="ASSIGN,
373- BAND_ASSIGN, BOR_ASSIGN, BXOR_ASSIGN,
374- PLUS_ASSIGN, MINUS_ASSIGN,
375- STAR_ASSIGN, DIV_ASSIGN, MOD_ASSIGN,
376- SL_ASSIGN, SR_ASSIGN, BSR_ASSIGN"
377- />
378- </module>
379- <module name="OperatorWrap">
380- <property name="option" value="nl" />
381- <property
382- name="tokens"
383- value="QUESTION,
384- BAND, BOR, BXOR,
385- PLUS, MINUS, STAR, DIV, MOD,
386- LAND, LOR,
387- EQUAL, NOT_EQUAL"
388- />
389- </module>
340+ <module name="OperatorWrap" />
390341 <module name="ParenPad">
391342 <property name="option" value="nospace" />
392343 <property
@@ -398,8 +349,11 @@
398349 <property name="tokens" value="DOT" />
399350 <property name="option" value="nl" />
400351 </module>
352+ <module name="SingleSpaceSeparator" />
401353 <module name="TypecastParenPad" />
402- <module name="WhitespaceAfter" />
354+ <module name="WhitespaceAfter" >
355+ <property name="tokens" value="COMMA, SEMI,"/>
356+ </module>
403357 <module name="WhitespaceAround">
404358 <property
405359 name="tokens"
@@ -420,6 +374,7 @@
420374
421375 </module>
422376
377+
423378 </module>
424379
425380 <!-- EOF -->
--- a/src/main/config/pmdrules.xml
+++ b/pmdrules.xml
@@ -1,9 +1,8 @@
11 <?xml version="1.0" encoding="UTF-8" ?>
22
33 <!--
4- PMD用ルールセット定義
5-
6- PMD [ https://pmd.github.io/ ] 5.3 以降用に記述されています。
4+ Custom rule set
5+ for PMD [ https://pmd.github.io/ ] 5.5.2 or later
76
87 Copyright(c) 2016 olyutorskii
98 -->
@@ -17,12 +16,10 @@
1716 >
1817
1918 <description>
20- custom rulesets for project
19+ custom rulesets
2120 </description>
2221
23-<!--
2422 <rule ref="rulesets/java/android.xml" />
25--->
2623
2724 <rule ref="rulesets/java/basic.xml" />
2825
@@ -33,18 +30,10 @@
3330
3431 <rule ref="rulesets/java/clone.xml" />
3532
36- <rule ref="rulesets/java/codesize.xml">
37- <exclude name="TooManyMethods" />
38- </rule>
39- <rule ref="rulesets/java/codesize.xml/TooManyMethods">
40- <properties>
41- <property name="maxmethods" value="25"/>
42- </properties>
43- </rule>
33+ <rule ref="rulesets/java/codesize.xml" />
4434
4535 <rule ref="rulesets/java/comments.xml">
46- <exclude name="CommentRequired" />
47- <exclude name="CommentSize" />
36+ <exclude name="CommentDefaultAccessModifier" />
4837 </rule>
4938 <rule ref="rulesets/java/comments.xml/CommentRequired" >
5039 <properties>
@@ -58,13 +47,10 @@
5847 </rule>
5948
6049 <rule ref="rulesets/java/controversial.xml">
61- <exclude name="NullAssignment" />
62- <exclude name="OnlyOneReturn" />
6350 <exclude name="DefaultPackage" />
51+ <exclude name="OnlyOneReturn" />
6452 <exclude name="DataflowAnomalyAnalysis" />
65- <exclude name="AvoidUsingShortType" />
6653 <exclude name="AvoidLiteralsInIfCondition" />
67- <exclude name="UseConcurrentHashMap" />
6854 </rule>
6955
7056 <rule ref="rulesets/java/coupling.xml">
@@ -73,8 +59,6 @@
7359 </rule>
7460
7561 <rule ref="rulesets/java/design.xml">
76- <exclude name="SimplifyBooleanReturns" />
77- <exclude name="ConfusingTernary" />
7862 <exclude name="UnnecessaryLocalBeforeReturn" />
7963 <exclude name="FieldDeclarationsShouldBeAtStartOfClass" />
8064 </rule>
@@ -85,33 +69,23 @@
8569
8670 <rule ref="rulesets/java/imports.xml" />
8771
88-<!--
8972 <rule ref="rulesets/java/j2ee.xml" />
90- <rule ref="rulesets/java/javabeans.xml" />
91--->
92-
93- <rule ref="rulesets/java/junit.xml" />
9473
95-<!--
9674 <rule ref="rulesets/java/logging-jakarta-commons.xml" />
97--->
75+
76+ <rule ref="rulesets/java/javabeans.xml">
77+ <exclude name="BeanMembersShouldSerialize" />
78+ </rule>
9879
9980 <rule ref="rulesets/java/logging-java.xml" />
10081
82+ <rule ref="rulesets/java/junit.xml" />
83+
10184 <rule ref="rulesets/java/migrating.xml" />
102-<!--
103- <rule ref="rulesets/java/migrating_to_XX.xml" />
104--->
10585
10686 <rule ref="rulesets/java/naming.xml">
10787 <exclude name="ShortVariable" />
10888 <exclude name="LongVariable" />
109- <exclude name="AvoidFieldNameMatchingMethodName" />
110- </rule>
111- <rule ref="rulesets/java/naming.xml/LongVariable">
112- <properties>
113- <property name="minimum" value="25"/>
114- </properties>
11589 </rule>
11690
11791 <rule ref="rulesets/java/optimizations.xml">
@@ -120,11 +94,11 @@
12094 <exclude name="RedundantFieldInitializer" />
12195 </rule>
12296
123- <rule ref="rulesets/java/strictexception.xml">
124- <exclude name="AvoidThrowingNullPointerException" />
125- </rule>
97+ <rule ref="rulesets/java/strictexception.xml" />
12698
127- <rule ref="rulesets/java/strings.xml" />
99+ <rule ref="rulesets/java/strings.xml">
100+ <exclude name="ConsecutiveAppendsShouldReuse" />
101+ </rule>
128102
129103 <rule ref="rulesets/java/sunsecure.xml" />
130104
@@ -132,7 +106,6 @@
132106
133107 <rule ref="rulesets/java/unnecessary.xml">
134108 <exclude name="UnnecessaryReturn" />
135- <exclude name="UselessParentheses" />
136109 </rule>
137110
138111 <rule ref="rulesets/java/unusedcode.xml" />
--- a/pom.xml
+++ b/pom.xml
@@ -8,7 +8,7 @@
88 xmlns="http://maven.apache.org/POM/4.0.0"
99 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
11- http://maven.apache.org/maven-v4_0_0.xsd"
11+ http://maven.apache.org/xsd/maven-4.0.0.xsd"
1212 >
1313 <modelVersion>4.0.0</modelVersion>
1414 <!--parent/-->
@@ -16,7 +16,7 @@
1616 <groupId>jp.sourceforge.jindolf</groupId>
1717 <artifactId>jinparser</artifactId>
1818
19- <version>1.409.3-SNAPSHOT</version>
19+ <version>1.409.4</version>
2020
2121 <packaging>jar</packaging>
2222 <name>JinParser</name>
@@ -26,18 +26,18 @@
2626 -->作られたJavaライブラリです。<!--
2727 --></description>
2828
29- <url>https://osdn.jp/projects/jindolf/devel/</url>
29+ <url>https://ja.osdn.net/projects/jindolf/devel/</url>
3030 <inceptionYear>2009</inceptionYear>
3131
3232 <organization>
3333 <name>Jindolf Partners</name>
34- <url>https://osdn.jp/projects/jindolf/devel/</url>
34+ <url>https://ja.osdn.net/projects/jindolf/devel/</url>
3535 </organization>
3636
3737 <licenses>
3838 <license>
3939 <name>The MIT License</name>
40- <url>https://opensource.org/licenses/mit-license.php</url>
40+ <url>https://opensource.org/licenses/MIT</url>
4141 <distribution>manual</distribution>
4242 </license>
4343 </licenses>
@@ -47,7 +47,7 @@
4747 <id>olyutorskii</id>
4848 <url>https://sites.google.com/site/olyutorskiipit/</url>
4949 <organization>Jindolf Partners</organization>
50- <organizationUrl>https://osdn.jp/projects/jindolf/devel/</organizationUrl>
50+ <organizationUrl>https://ja.osdn.net/projects/jindolf/devel/</organizationUrl>
5151 <roles>
5252 <role>Project Founder</role>
5353 <role>Java Developer</role>
@@ -59,42 +59,56 @@
5959 <mailingLists/>
6060
6161 <prerequisites>
62- <maven>3.3</maven>
62+ <maven>3.0.1</maven>
6363 </prerequisites>
6464
6565 <modules/>
6666
6767 <scm>
68- <connection>scm:hg:http://hg.osdn.jp/view/jindolf/JinParser</connection>
69- <developerConnection>scm:hg:ssh://hg.osdn.jp//hgroot/jindolf/JinParser</developerConnection>
70- <url>https://osdn.jp/projects/jindolf/scm/hg/JinParser/</url>
68+ <connection>scm:hg:http://hg.osdn.net/view/jindolf/JinParser</connection>
69+ <developerConnection>scm:hg:ssh://hg.osdn.net//hgroot/jindolf/JinParser</developerConnection>
70+ <url>https://osdn.net/projects/jindolf/scm/hg/JinParser/</url>
7171 </scm>
7272
7373 <issueManagement>
74- <system>OSDN.JP</system>
75- <url>https://osdn.jp/projects/jindolf/ticket/</url>
74+ <system>OSDN.NET</system>
75+ <url>https://ja.osdn.net/projects/jindolf/ticket/</url>
7676 </issueManagement>
7777
7878 <ciManagement/>
7979 <distributionManagement/>
8080
8181 <properties>
82- <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
83-
8482 <maven.compiler.source>1.7</maven.compiler.source>
8583 <maven.compiler.target>1.7</maven.compiler.target>
8684
8785 <maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>
8886 <maven.compiler.showWarnings>true</maven.compiler.showWarnings>
8987
88+ <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
9089 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
9190 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
9291
93- <project.mainconf>${project.basedir}/src/main/config</project.mainconf>
92+ <site.locales>en</site.locales>
93+ <javadoc.locale>en</javadoc.locale>
94+ <findbugs.jvmArgs>-Duser.language=en</findbugs.jvmArgs>
9495
95- <checkstyle.config.location>${project.mainconf}/checks.xml</checkstyle.config.location>
96+ <jacoco-plugin.version>0.7.9</jacoco-plugin.version>
97+
98+ <checkstyle-plugin.version>2.17</checkstyle-plugin.version>
99+ <checkstyleruntime.version>6.19</checkstyleruntime.version>
100+ <checkstyle.config.location>${project.basedir}/checkstyle.xml</checkstyle.config.location>
101+ <checkstyle.suppressions.location>${project.basedir}/checkstyle-suppressions.xml</checkstyle.suppressions.location>
96102 <checkstyle.enable.rss>false</checkstyle.enable.rss>
97103
104+ <pmd-plugin.version>3.7</pmd-plugin.version>
105+
106+ <findbugs-plugin.version>3.0.4</findbugs-plugin.version>
107+ <findbugs.effort>Max</findbugs.effort>
108+ <findbugs.threshold>Low</findbugs.threshold>
109+ <!-- for Jenkins -->
110+ <findbugs.xmlOutput>true</findbugs.xmlOutput>
111+
98112 </properties>
99113
100114 <dependencyManagement/>
@@ -111,7 +125,7 @@
111125 <dependency>
112126 <groupId>jp.sourceforge.jindolf</groupId>
113127 <artifactId>jincore</artifactId>
114- <version>1.206.8</version>
128+ <version>1.206.10</version>
115129 <scope>compile</scope>
116130 </dependency>
117131
@@ -121,31 +135,33 @@
121135 <pluginRepositories/>
122136
123137 <build>
124- <pluginManagement/>
138+
139+ <pluginManagement>
140+
141+ <plugins>
142+
143+ <plugin>
144+ <groupId>org.apache.maven.plugins</groupId>
145+ <artifactId>maven-checkstyle-plugin</artifactId>
146+ <version>${checkstyle-plugin.version}</version>
147+ <dependencies>
148+ <dependency>
149+ <groupId>com.puppycrawl.tools</groupId>
150+ <artifactId>checkstyle</artifactId>
151+ <!--artifactId>checkstyle-backport-jre6</artifactId-->
152+ <version>${checkstyleruntime.version}</version>
153+ </dependency>
154+ </dependencies>
155+ </plugin>
156+
157+ </plugins>
158+
159+ </pluginManagement>
125160
126161 <plugins>
127162
128- <plugin>
129- <groupId>org.apache.maven.plugins</groupId>
130- <artifactId>maven-enforcer-plugin</artifactId>
131- <version>1.4.1</version>
132- <configuration>
133- <rules>
134- <requireMavenVersion>
135- <version>[3.3,)</version>
136- </requireMavenVersion>
137- <requireJavaVersion>
138- <version>[1.7,)</version>
139- </requireJavaVersion>
140- </rules>
141- </configuration>
142- </plugin>
143163
144- <plugin>
145- <groupId>org.apache.maven.plugins</groupId>
146- <artifactId>maven-install-plugin</artifactId>
147- <version>2.5.2</version>
148- </plugin>
164+ <!-- clean lifecycle -->
149165
150166 <plugin>
151167 <groupId>org.apache.maven.plugins</groupId>
@@ -156,63 +172,133 @@
156172 <fileset>
157173 <directory>${project.basedir}</directory>
158174 <includes>
159- <include>**/.DS_Store</include>
160- <include>**/_MACOSX</include>
175+ <include>**/*~</include>
176+ <include>**/*.swp</include>
177+ <include>**/*.DS_Store</include>
178+ <include>**/._*</include>
179+ <include>**/__MACOSX</include>
161180 <include>**/Thumbs.db</include>
162- <include>**/thumbs.db</include>
163- <include>**/Desktop.ini</include>
164181 <include>**/desktop.ini</include>
165182 <include>**/core</include>
183+ <include>**/hs_err_pid*</include>
166184 </includes>
167185 </fileset>
168186 </filesets>
169187 </configuration>
170188 </plugin>
171189
190+
191+ <!-- default lifecycle -->
192+
193+ <plugin>
194+ <groupId>org.apache.maven.plugins</groupId>
195+ <artifactId>maven-enforcer-plugin</artifactId>
196+ <version>1.4.1</version>
197+ <configuration>
198+ <rules>
199+ <requireMavenVersion>
200+ <version>[3.0.1,)</version>
201+ </requireMavenVersion>
202+ <requireJavaVersion>
203+ <version>[1.7,)</version>
204+ </requireJavaVersion>
205+ </rules>
206+ </configuration>
207+ </plugin>
208+
209+ <plugin>
210+ <groupId>org.apache.maven.plugins</groupId>
211+ <artifactId>maven-resources-plugin</artifactId>
212+ <version>3.0.2</version>
213+ </plugin>
214+
172215 <plugin>
173216 <groupId>org.apache.maven.plugins</groupId>
174217 <artifactId>maven-compiler-plugin</artifactId>
175- <version>3.5.1</version>
218+ <version>3.6.1</version>
176219 <configuration>
177220 <source>1.7</source> <!-- for NetBeans IDE -->
178221 <target>1.7</target>
179- <showDeprecation>true</showDeprecation>
180- <showWarnings>true</showWarnings>
181222 <compilerArguments>
182223 <Xlint/>
183224 </compilerArguments>
225+ <showWarnings>true</showWarnings>
226+ <showDeprecation>true</showDeprecation>
184227 </configuration>
185228 </plugin>
186229
187230 <plugin>
188231 <groupId>org.apache.maven.plugins</groupId>
189- <artifactId>maven-jar-plugin</artifactId>
190- <version>3.0.0</version>
232+ <artifactId>maven-surefire-plugin</artifactId>
233+ <version>2.19.1</version>
191234 <configuration>
192- <archive>
193- <manifestEntries>
194- <Built-By>${project.organization.name}</Built-By>
195- </manifestEntries>
196- </archive>
235+ <enableAssertions>true</enableAssertions>
197236 </configuration>
198237 </plugin>
199238
200239 <plugin>
240+ <groupId>org.jacoco</groupId>
241+ <artifactId>jacoco-maven-plugin</artifactId>
242+ <version>${jacoco-plugin.version}</version>
243+ <executions>
244+ <execution>
245+ <id>default-prepare-agent</id>
246+ <goals>
247+ <goal>prepare-agent</goal>
248+ </goals>
249+ </execution>
250+ <execution>
251+ <id>default-report</id>
252+ <phase>prepare-package</phase>
253+ <goals>
254+ <goal>report</goal>
255+ </goals>
256+ </execution>
257+ <execution>
258+ <id>default-check</id>
259+ <goals>
260+ <goal>check</goal>
261+ </goals>
262+ <configuration>
263+ <rules>
264+ <rule implementation="org.jacoco.maven.RuleConfiguration">
265+ <element>BUNDLE</element>
266+ <limits>
267+ <limit implementation="org.jacoco.report.check.Limit">
268+ <counter>COMPLEXITY</counter>
269+ <value>COVEREDRATIO</value>
270+ <minimum>0.0</minimum>
271+ </limit>
272+ </limits>
273+ </rule>
274+ </rules>
275+ </configuration>
276+ </execution>
277+ </executions>
278+ </plugin>
279+
280+ <plugin>
201281 <groupId>org.apache.maven.plugins</groupId>
202- <artifactId>maven-assembly-plugin</artifactId>
203- <version>2.6</version>
282+ <artifactId>maven-jar-plugin</artifactId>
283+ <version>3.0.2</version>
204284 <configuration>
205- <archiveBaseDirectory>.</archiveBaseDirectory>
206- <descriptors>
207- <descriptor>src/main/assembly/descriptor.xml</descriptor>
208- </descriptors>
285+ <archive>
286+ <manifest>
287+ <addDefaultImplementationEntries>
288+ true
289+ </addDefaultImplementationEntries>
290+ </manifest>
291+ <manifestEntries>
292+ <Built-By>${project.organization.name}</Built-By>
293+ </manifestEntries>
294+ </archive>
209295 </configuration>
210296 </plugin>
211297
212298 <plugin>
213299 <groupId>org.apache.maven.plugins</groupId>
214300 <artifactId>maven-source-plugin</artifactId>
215- <version>3.0.0</version>
301+ <version>3.0.1</version>
216302 <configuration>
217303 <includePom>true</includePom>
218304 <archive>
@@ -234,76 +320,46 @@
234320
235321 <plugin>
236322 <groupId>org.apache.maven.plugins</groupId>
237- <artifactId>maven-resources-plugin</artifactId>
238- <version>3.0.0</version>
323+ <artifactId>maven-install-plugin</artifactId>
324+ <version>2.5.2</version>
239325 </plugin>
240326
241327 <plugin>
242328 <groupId>org.apache.maven.plugins</groupId>
243- <artifactId>maven-surefire-plugin</artifactId>
244- <version>2.19.1</version>
245- <configuration>
246- <skipTests>false</skipTests>
247- <enableAssertions>true</enableAssertions>
248- </configuration>
329+ <artifactId>maven-deploy-plugin</artifactId>
330+ <version>2.8.2</version>
249331 </plugin>
250332
251- <plugin>
252- <groupId>org.apache.maven.plugins</groupId>
253- <artifactId>maven-site-plugin</artifactId>
254- <version>3.5.1</version>
255- <configuration>
256- <generateReports>true</generateReports>
257- <locales>ja</locales>
258- <inputEncoding>${project.build.sourceEncoding}</inputEncoding>
259- <outputEncoding>${project.reporting.outputEncoding}</outputEncoding>
260- </configuration>
261- </plugin>
262333
263- <plugin>
264- <groupId>org.apache.maven.plugins</groupId>
265- <artifactId>maven-checkstyle-plugin</artifactId>
266- <version>2.15</version>
267- <!-- config from property value -->
268- </plugin>
334+ <!-- site lifecycle -->
269335
270336 <plugin>
271337 <groupId>org.apache.maven.plugins</groupId>
272- <artifactId>maven-pmd-plugin</artifactId>
338+ <artifactId>maven-site-plugin</artifactId>
273339 <version>3.6</version>
274340 <configuration>
275- <targetJdk>${maven.compiler.target}</targetJdk>
276- <rulesets>
277- <ruleset>${project.mainconf}/pmdrules.xml</ruleset>
278- </rulesets>
341+ <locales>${site.locales}</locales>
279342 </configuration>
280343 </plugin>
281344
345+
346+ <!-- goals without lifecycle -->
347+
282348 <plugin>
283- <groupId>org.codehaus.mojo</groupId>
284- <artifactId>findbugs-maven-plugin</artifactId>
285- <version>3.0.3</version>
349+ <groupId>org.apache.maven.plugins</groupId>
350+ <artifactId>maven-assembly-plugin</artifactId>
351+ <version>3.0.0</version>
286352 <configuration>
287- <effort>Max</effort>
288- <threshold>Low</threshold>
289- <!-- for Jenkins -->
290- <findbugsXmlOutput>true</findbugsXmlOutput>
291- <findbugsXmlWithMessages>true</findbugsXmlWithMessages>
292- <xmlOutput>true</xmlOutput>
353+ <descriptors>
354+ <descriptor>src/assembly/src.xml</descriptor>
355+ </descriptors>
293356 </configuration>
294357 </plugin>
295358
296359 <plugin>
297- <groupId>org.codehaus.mojo</groupId>
298- <artifactId>cobertura-maven-plugin</artifactId>
299- <version>2.7</version>
300- <configuration>
301- <encoding>${project.build.sourceEncoding}</encoding>
302- <formats>
303- <format>html</format>
304- <format>xml</format> <!-- for Jenkins -->
305- </formats>
306- </configuration>
360+ <groupId>org.apache.maven.plugins</groupId>
361+ <artifactId>maven-checkstyle-plugin</artifactId>
362+ <version>${checkstyle-plugin.version}</version>
307363 </plugin>
308364
309365 </plugins>
@@ -342,7 +398,7 @@
342398 <exclude>**/version.properties</exclude>
343399
344400 <exclude>**/.DS_Store</exclude>
345- <exclude>**/_MACOSX</exclude>
401+ <exclude>**/__MACOSX</exclude>
346402 <exclude>**/Thumbs.db</exclude>
347403 <exclude>**/thumbs.db</exclude>
348404 <exclude>**/Desktop.ini</exclude>
@@ -373,19 +429,20 @@
373429 <report>index</report>
374430 <report>summary</report>
375431 <report>license</report>
432+ <report>dependency-info</report>
376433 <report>dependencies</report>
434+ <report>dependency-convergence</report>
377435 <report>plugins</report>
378- <report>scm</report>
436+ <report>plugin-management</report>
379437 <report>project-team</report>
438+ <report>issue-tracking</report>
439+ <report>scm</report>
380440 <!--
381- <report>dependency-convergence</report>
382- <report>dependency-info</report>
383441 <report>dependency-management</report>
384442 <report>distribution-management</report>
385- <report>issue-tracking</report>
443+ <report>cim</report>
386444 <report>mailing-list</report>
387445 <report>modules</report>
388- <report>plugin-management</report>
389446 -->
390447 </reports>
391448 </reportSet>
@@ -395,12 +452,15 @@
395452 <plugin>
396453 <groupId>org.apache.maven.plugins</groupId>
397454 <artifactId>maven-javadoc-plugin</artifactId>
398- <version>2.10.3</version>
455+ <version>2.10.4</version>
399456 <configuration>
400- <skip>false</skip>
457+ <author>false</author>
401458 <notimestamp>true</notimestamp>
402459 <quiet>true</quiet>
403460 <show>protected</show>
461+ <locale>${javadoc.locale}</locale>
462+ <header>${project.name} ${project.version} API</header>
463+ <version>true</version>
404464 </configuration>
405465 <reportSets>
406466 <reportSet>
@@ -415,48 +475,31 @@
415475 <groupId>org.apache.maven.plugins</groupId>
416476 <artifactId>maven-jxr-plugin</artifactId>
417477 <version>2.5</version>
418- <configuration>
419- <skip>false</skip>
420- </configuration>
421478 </plugin>
422479
423480 <plugin>
424481 <groupId>org.apache.maven.plugins</groupId>
425482 <artifactId>maven-surefire-report-plugin</artifactId>
426483 <version>2.19.1</version>
427- <configuration>
428- <showSuccess>false</showSuccess>
429- </configuration>
484+ </plugin>
485+
486+ <plugin>
487+ <groupId>org.jacoco</groupId>
488+ <artifactId>jacoco-maven-plugin</artifactId>
489+ <version>${jacoco-plugin.version}</version>
430490 <reportSets>
431491 <reportSet>
432492 <reports>
433- <report>report-only</report>
493+ <report>report</report>
434494 </reports>
435495 </reportSet>
436496 </reportSets>
437497 </plugin>
438498
439499 <plugin>
440- <groupId>org.codehaus.mojo</groupId>
441- <artifactId>cobertura-maven-plugin</artifactId>
442- <version>2.7</version>
443- <configuration>
444- <encoding>${project.build.sourceEncoding}</encoding>
445- <formats>
446- <format>html</format>
447- <format>xml</format> <!-- for Jenkins -->
448- </formats>
449- </configuration>
450- </plugin>
451-
452- <plugin>
453500 <groupId>org.apache.maven.plugins</groupId>
454501 <artifactId>maven-checkstyle-plugin</artifactId>
455- <version>2.15</version>
456- <configuration>
457- <skip>false</skip>
458- <!-- config from property value -->
459- </configuration>
502+ <version>${checkstyle-plugin.version}</version>
460503 <reportSets>
461504 <reportSet>
462505 <reports>
@@ -469,12 +512,10 @@
469512 <plugin>
470513 <groupId>org.apache.maven.plugins</groupId>
471514 <artifactId>maven-pmd-plugin</artifactId>
472- <version>3.6</version>
515+ <version>${pmd-plugin.version}</version>
473516 <configuration>
474- <skip>false</skip>
475- <targetJdk>${maven.compiler.target}</targetJdk>
476517 <rulesets>
477- <ruleset>${project.mainconf}/pmdrules.xml</ruleset>
518+ <ruleset>${project.basedir}/pmdrules.xml</ruleset>
478519 </rulesets>
479520 </configuration>
480521 <reportSets>
@@ -490,29 +531,7 @@
490531 <plugin>
491532 <groupId>org.codehaus.mojo</groupId>
492533 <artifactId>findbugs-maven-plugin</artifactId>
493- <version>3.0.3</version>
494- <configuration>
495- <skip>false</skip>
496- <effort>Max</effort>
497- <threshold>Low</threshold>
498- <!-- for Jenkins -->
499- <findbugsXmlOutput>true</findbugsXmlOutput>
500- <findbugsXmlWithMessages>true</findbugsXmlWithMessages>
501- <xmlOutput>true</xmlOutput>
502- <!-- excludeFilterFile/ -->
503- </configuration>
504- </plugin>
505-
506- <plugin>
507- <groupId>org.codehaus.mojo</groupId>
508- <artifactId>javancss-maven-plugin</artifactId>
509- <version>2.1</version>
510- </plugin>
511-
512- <plugin>
513- <groupId>org.codehaus.mojo</groupId>
514- <artifactId>jdepend-maven-plugin</artifactId>
515- <version>2.0</version>
534+ <version>${findbugs-plugin.version}</version>
516535 </plugin>
517536
518537 </plugins>
--- a/src/main/assembly/descriptor.xml
+++ b/src/assembly/src.xml
@@ -1,15 +1,15 @@
11 <?xml version="1.0" encoding="UTF-8" ?>
22
33 <assembly
4- xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
4+ xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
55 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6- xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3
7- http://maven.apache.org/xsd/assembly-1.1.3.xsd"
6+ xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0
7+ http://maven.apache.org/xsd/assembly-2.0.0.xsd"
88 >
99
1010 <!--
11- OSDN.JP用リリースファイル構成定義ファイル
12- Maven2(or3) assembly用
11+ OSDN.NET用リリースファイル構成定義ファイル
12+ Maven3 assembly用
1313 -->
1414
1515 <id>src</id>
@@ -20,10 +20,9 @@
2020
2121 <fileSets>
2222 <fileSet>
23- <directory>.</directory>
23+ <directory>${project.basedir}</directory>
2424 <includes>
25- <include>pom.xml</include>
26- <include>fixcrlf.xml</include>
25+ <include>*.xml</include>
2726 <include>*.txt</include>
2827 </includes>
2928 <excludes>
@@ -33,7 +32,7 @@
3332 <useDefaultExcludes>true</useDefaultExcludes>
3433 </fileSet>
3534 <fileSet>
36- <directory>src/</directory>
35+ <directory>${project.basedir}/src</directory>
3736 <useDefaultExcludes>true</useDefaultExcludes>
3837 </fileSet>
3938 </fileSets>
--- a/src/main/java/jp/sourceforge/jindolf/parser/AbstractParser.java
+++ b/src/main/java/jp/sourceforge/jindolf/parser/AbstractParser.java
@@ -192,8 +192,8 @@ public abstract class AbstractParser implements ChainedParser{
192192 */
193193 protected boolean findProbe(Pattern pattern){
194194 switchPattern(pattern);
195- if( getMatcher().find() ) return true;
196- return false;
195+ boolean result = getMatcher().find();
196+ return result;
197197 }
198198
199199 /**
@@ -203,8 +203,8 @@ public abstract class AbstractParser implements ChainedParser{
203203 */
204204 protected boolean lookingAtProbe(Pattern pattern){
205205 switchPattern(pattern);
206- if( getMatcher().lookingAt() ) return true;
207- return false;
206+ boolean result = getMatcher().lookingAt();
207+ return result;
208208 }
209209
210210 /**
@@ -214,8 +214,8 @@ public abstract class AbstractParser implements ChainedParser{
214214 */
215215 protected boolean matchesProbe(Pattern pattern){
216216 switchPattern(pattern);
217- if( getMatcher().matches() ) return true;
218- return false;
217+ boolean result = getMatcher().matches();
218+ return result;
219219 }
220220
221221 /**
@@ -266,8 +266,8 @@ public abstract class AbstractParser implements ChainedParser{
266266 * @return ヒットしていたらtrue
267267 */
268268 protected boolean isGroupMatched(int group){
269- if(matchStart(group) >= 0) return true;
270- return false;
269+ boolean result = matchStart(group) >= 0;
270+ return result;
271271 }
272272
273273 /**
@@ -355,18 +355,24 @@ public abstract class AbstractParser implements ChainedParser{
355355 for( ; regionStart < regionEnd; regionStart++){
356356 char letter = rawContent.charAt(regionStart);
357357
358+ boolean spaceCh;
358359 switch(letter){
359360 case '\u0020':
360361 case '\t':
361362 case '\n':
362363 case '\r':
363- hasSpace = true;
364- continue;
364+ spaceCh = true;
365+ break;
365366 default:
367+ spaceCh = false;
366368 break;
367369 }
368370
369- break;
371+ if(spaceCh){
372+ hasSpace = true;
373+ }else{
374+ break;
375+ }
370376 }
371377
372378 if(hasSpace){
--- a/src/main/java/jp/sourceforge/jindolf/parser/ContentBuilderSJ.java
+++ b/src/main/java/jp/sourceforge/jindolf/parser/ContentBuilderSJ.java
@@ -99,14 +99,8 @@ public class ContentBuilderSJ extends ContentBuilder{
9999 int limit = offset + length;
100100 for(int bpos = offset; bpos < limit; bpos++){
101101 byte bval = errorArray[bpos];
102- if( ! this.hasByte1st){
103- if(ShiftJis.isShiftJIS1stByte(bval)){
104- this.byte1st = bval;
105- this.hasByte1st = true;
106- }else{
107- getContent().addDecodeError(bval);
108- }
109- }else{
102+
103+ if(this.hasByte1st){
110104 if(ShiftJis.isShiftJIS2ndByte(bval)){ // 文字集合エラー
111105 getContent().addDecodeError(this.byte1st, bval);
112106 this.hasByte1st = false;
@@ -119,7 +113,15 @@ public class ContentBuilderSJ extends ContentBuilder{
119113 getContent().addDecodeError(bval);
120114 this.hasByte1st = false;
121115 }
116+ }else{
117+ if(ShiftJis.isShiftJIS1stByte(bval)){
118+ this.byte1st = bval;
119+ this.hasByte1st = true;
120+ }else{
121+ getContent().addDecodeError(bval);
122+ }
122123 }
124+
123125 }
124126
125127 return;
--- a/src/main/java/jp/sourceforge/jindolf/parser/DecodeException.java
+++ b/src/main/java/jp/sourceforge/jindolf/parser/DecodeException.java
@@ -18,6 +18,9 @@ package jp.sourceforge.jindolf.parser;
1818 @SuppressWarnings("serial")
1919 public class DecodeException extends Exception{
2020
21+ private static final char CH_SP = '\u0020';
22+
23+
2124 private final int bytePos;
2225 private final int charPos;
2326
@@ -87,15 +90,15 @@ public class DecodeException extends Exception{
8790 */
8891 @Override
8992 public String getMessage(){
90- StringBuilder result = new StringBuilder();
93+ StringBuilder result = new StringBuilder(20);
9194
9295 String message = super.getMessage();
9396 if(message != null && message.length() > 0){
94- result.append(message).append(' ');
97+ result.append(message).append(CH_SP);
9598 }
9699
97100 result.append("bytePos=").append(this.bytePos);
98- result.append(' ');
101+ result.append(CH_SP);
99102 result.append("charPos=").append(this.charPos);
100103
101104 return result.toString();
--- a/src/main/java/jp/sourceforge/jindolf/parser/EntityConverter.java
+++ b/src/main/java/jp/sourceforge/jindolf/parser/EntityConverter.java
@@ -224,7 +224,7 @@ public class EntityConverter{
224224 * @param regex 置換元パターン正規表現
225225 * @param altTxt 置換文字列。
226226 */
227- private RegexRep(String regex, String altTxt){
227+ RegexRep(String regex, String altTxt){
228228 this.regex = regex;
229229 this.altTxt = altTxt;
230230 return;
--- a/src/main/java/jp/sourceforge/jindolf/parser/ShiftJis.java
+++ b/src/main/java/jp/sourceforge/jindolf/parser/ShiftJis.java
@@ -43,11 +43,10 @@ public final class ShiftJis{
4343 * @return シフトJISの1バイト目でありうるならtrue
4444 */
4545 public static boolean isShiftJIS1stByte(byte bval){
46- if( (byte) 0x81 <= bval && bval <= (byte) 0x9f
47- || (byte) 0xe0 <= bval && bval <= (byte) 0xfc){
48- return true;
49- }
50- return false;
46+ boolean result =
47+ (byte) 0x81 <= bval && bval <= (byte) 0x9f
48+ || (byte) 0xe0 <= bval && bval <= (byte) 0xfc;
49+ return result;
5150 }
5251
5352 /**
@@ -57,11 +56,10 @@ public final class ShiftJis{
5756 * @return シフトJISの2バイト目でありうるならtrue
5857 */
5958 public static boolean isShiftJIS2ndByte(byte bval){
60- if( (byte) 0x40 <= bval && bval <= (byte) 0x7e
61- || (byte) 0x80 <= bval && bval <= (byte) 0xfc){
62- return true;
63- }
64- return false;
59+ boolean result =
60+ (byte) 0x40 <= bval && bval <= (byte) 0x7e
61+ || (byte) 0x80 <= bval && bval <= (byte) 0xfc;
62+ return result;
6563 }
6664
6765 /**
@@ -72,11 +70,10 @@ public final class ShiftJis{
7270 * @return シフトJISならtrue
7371 */
7472 public static boolean isShiftJIS(byte b1st, byte b2nd){
75- if( ShiftJis.isShiftJIS1stByte(b1st)
76- && ShiftJis.isShiftJIS2ndByte(b2nd)){
77- return true;
78- }
79- return false;
73+ boolean result =
74+ ShiftJis.isShiftJIS1stByte(b1st)
75+ && ShiftJis.isShiftJIS2ndByte(b2nd);
76+ return result;
8077 }
8178
8279 }
--- a/src/test/java/jp/sourceforge/jindolf/parser/ContentBuilderSJTest.java
+++ b/src/test/java/jp/sourceforge/jindolf/parser/ContentBuilderSJTest.java
@@ -92,6 +92,8 @@ public class ContentBuilderSJTest {
9292
9393 /**
9494 * Test of SjisDecoder & ContentBuilder.
95+ * @throws java.io.IOException
96+ * @throws jp.sourceforge.jindolf.parser.DecodeException
9597 */
9698 @Test
9799 public void testDecoding() throws IOException, DecodeException{
@@ -172,6 +174,8 @@ public class ContentBuilderSJTest {
172174
173175 /**
174176 * Test of unmappable character.
177+ * @throws java.io.IOException
178+ * @throws jp.sourceforge.jindolf.parser.DecodeException
175179 */
176180 @Test
177181 public void testUnmap() throws IOException, DecodeException{
@@ -272,6 +276,8 @@ public class ContentBuilderSJTest {
272276
273277 /**
274278 * Test of malformed character.
279+ * @throws java.io.IOException
280+ * @throws jp.sourceforge.jindolf.parser.DecodeException
275281 */
276282 @Test
277283 public void testMalform() throws IOException, DecodeException{
@@ -327,6 +333,8 @@ public class ContentBuilderSJTest {
327333
328334 /**
329335 * Test of Bounds buffering.
336+ * @throws java.io.IOException
337+ * @throws jp.sourceforge.jindolf.parser.DecodeException
330338 */
331339 @Test
332340 public void testBounds() throws IOException, DecodeException{
Show on old repository browser