--- /dev/null
+sonar.projectKey=japanese-charset
+sonar.projectName=Japanese charset
+sonar.projectVersion=1.0-SNAPSHOT
+sonar.sources=src/main/xoo
+sonar.language=xoo
+sonar.sourceEncoding=Shift_JIS
--- /dev/null
+package com.test;
+
+import java.io.PrintWriter;
+
+/**
+ * Hello world!
+ *
+ */
+public class App
+{
+ /**
+ * \92\8a\8fÛ\83N\83\89\83X\82ð\93±\93ü
+ *
+ *
+ *
+ */
+ public static void main( String[] args )
+ {
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ int d1;
+ int d2;
+ int d3;
+ int d4;
+ int d5;
+ int d6;
+ int d7;
+ int d8;
+ int d9;
+ int d10;
+ }
+
+ public void test(PrintWriter pw) {
+ pw.print( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ }
+
+ public void \83n\83\8d\81[\83\8f\81[\83\8b\83h() {
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ }
+}
--- /dev/null
+package com.test;
+
+/**
+ * Hello world!
+ *
+ */
+public class AppCpdBug
+{
+ /**
+ * \92\8a\8fÛ\83N\83\89\83X\82ð\93±\93ü
+ *
+ *
+ *
+ */
+ public static void main( String[] args )
+ {
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ int d1;
+ int d2;
+ int d3;
+ int d4;
+ int d5;
+ int d6;
+ int d7;
+ int d8;
+ int d9;
+ int d10;
+ }
+}
--- /dev/null
+package com.test;
+
+/**
+ * Hello world!
+ *
+ */
+public class AppDuplication
+{
+ /**
+ * \92\8a\8fÛ\83N\83\89\83X\82ð\93±\93ü
+ *
+ *
+ *
+ */
+ public static void main( String[] args )
+ {
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println( "\83n\83\8d\81[\83\8f\81[\83\8b\83h!" );
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ System.out.println("\8fØ\96¾\8f\91\83p\83X\8d\\92z\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ int d1;
+ int d2;
+ int d3;
+ int d4;
+ int d5;
+ int d6;
+ int d7;
+ int d8;
+ int d9;
+ int d10;
+ }
+}
import it.settings.PropertySetsTest;
import it.settings.SettingsTest;
import it.settings.SubCategoriesTest;
+import it.sourceCode.EncodingTest;
import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
ProjectComparisonTest.class,
AllProjectsTest.class,
ProjectWidgetsTest.class,
+ EncodingTest.class,
// settings
PropertySetsTest.class,
SubCategoriesTest.class,
--- /dev/null
+/*
+ * SonarQube
+ * Copyright (C) 2009-2016 SonarSource SA
+ * mailto:contact AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package it.sourceCode;
+
+import com.sonar.orchestrator.Orchestrator;
+import com.sonar.orchestrator.selenium.Selenese;
+import it.Category1Suite;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Test;
+
+import static util.ItUtils.runProjectAnalysis;
+
+public class EncodingTest {
+
+ @ClassRule
+ public static Orchestrator orchestrator = Category1Suite.ORCHESTRATOR;
+
+ @Before
+ public void deleteData() {
+ orchestrator.resetData();
+ }
+
+ @Test
+ public void support_japanese_charset() {
+ runProjectAnalysis(orchestrator, "sourceCode/japanese-charset", "sonar.sourceEncoding", "Shift_JIS");
+
+ Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("java-japanese-charset",
+ "/sourceCode/EncodingTest/japanese_sources.html").build();
+ orchestrator.executeSelenese(selenese);
+ }
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>japanese_sources</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+ <thead>
+ <tr>
+ <td rowspan="1" colspan="3">japanese_sources</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>open</td>
+ <td>/component/index?id=japanese-charset%3Asrc%2Fmain%2Fxoo%2Fcom%2Ftest%2FAppDuplication.xoo</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>css=.source-viewer</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForText</td>
+ <td>css=.source-table</td>
+ <td>glob:*public class AppDuplication*</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>css=.source-table</td>
+ <td>glob:*証明書パス構築に失敗しました。*</td>
+</tr>
+</tbody>
+</table>
+</body>
+</html>