CORDA-1568: Change Java source files encoding for all the projects. (#3707)

* CORDA-1568: Change Java source files encoding for all the projects.

See: https://ci-master.corda.r3cev.com/viewLog.html?buildId=103073&tab=buildResultsDiv&buildTypeId=Corda_BuildWindowsTest

```
InteractiveShellJavaTest.flowStartWithComplexTypes
show details
No applicable constructor for flow. Problems were:
[party: Party]: missing parameter party
[pair: Pair]: missing parameter pair
[Amount]: Could not parse as a command: Did not recognise the currency in £10 or could not parse
```
This commit is contained in:
Viktor Kolomeyko 2018-08-06 11:59:30 +01:00 committed by GitHub
parent c24d916f5a
commit 441fe78e41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 0 deletions

View File

@ -160,6 +160,7 @@ allprojects {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" << "-Xlint:-options" << "-parameters"
options.encoding = 'UTF-8'
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {

View File

@ -0,0 +1,15 @@
package net.corda.core.contracts;
import org.junit.Test;
import static net.corda.finance.Currencies.POUNDS;
import static org.junit.Assert.assertEquals;
public class AmountParsingTest {
@Test
public void testGbpParse() {
assertEquals(POUNDS(10), Amount.parseCurrency("10 GBP"));
assertEquals(POUNDS(11), Amount.parseCurrency("£11"));
}
}

View File

@ -162,4 +162,10 @@ class AmountTests {
assertEquals(originalTotals[Pair(partyA, GBP)], newTotals3[Pair(partyA, GBP)])
assertEquals(originalTotals[Pair(partyB, GBP)], newTotals3[Pair(partyB, GBP)])
}
@Test
fun testGbpParse() {
assertEquals(POUNDS(10), Amount.parseCurrency("10 GBP"))
assertEquals(POUNDS(11), Amount.parseCurrency("£11"))
}
}