Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25913] Android: Build fails for android with java.time.DateTimeException with java 9.0.4 & crittercism

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2018-04-03T17:47:11.000+0000
Affected Version/sn/a
Fix Version/sRelease 7.1.1
ComponentsAndroid
Labelsqe-7.1.1
ReporterLokesh Choudhary
AssigneeGary Mathews
Created2018-03-28T23:12:57.000+0000
Updated2018-04-04T21:02:19.000+0000

Description

Steps to reproduce:

1. Build an android app with SDK having fix for java 9 support.

Actual results:

1. The build will fail with error:
[ERROR] Failed to compile Java source files:
[ERROR]   
[ERROR] An exception has occurred in the compiler (9.0.4). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program and the following diagnostic in your report. Thank you.
[ERROR] java.time.DateTimeException: Invalid value for MonthOfYear (valid values 1 - 12): 0
[ERROR]         at java.base/java.time.temporal.ValueRange.checkValidValue(ValueRange.java:311)
[ERROR]         at java.base/java.time.temporal.ChronoField.checkValidValue(ChronoField.java:714)
[ERROR]         at java.base/java.time.LocalDate.of(LocalDate.java:269)
[ERROR]         at java.base/java.time.LocalDateTime.of(LocalDateTime.java:336)
[ERROR]         at jdk.zipfs/jdk.nio.zipfs.ZipUtils.dosToJavaTime(ZipUtils.java:109)
[ERROR]         at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem$Entry.cen(ZipFileSystem.java:1950)
[ERROR]         at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem$Entry.readCEN(ZipFileSystem.java:1937)
[ERROR]         at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.getEntry(ZipFileSystem.java:1324)
[ERROR]         at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.getFileAttributes(ZipFileSystem.java:312)
[ERROR]         at jdk.zipfs/jdk.nio.zipfs.ZipPath.getAttributes(ZipPath.java:721)
[ERROR]         at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.readAttributes(ZipFileSystemProvider.java:293)
[ERROR]         at java.base/java.nio.file.Files.readAttributes(Files.java:1755)
[ERROR]         at java.base/java.nio.file.FileTreeWalker.getAttributes(FileTreeWalker.java:219)
[ERROR]         at java.base/java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:276)
[ERROR]         at java.base/java.nio.file.FileTreeWalker.next(FileTreeWalker.java:373)
[ERROR]         at java.base/java.nio.file.Files.walkFileTree(Files.java:2749)
[ERROR]         at jdk.compiler/com.sun.tools.javac.file.JavacFileManager$ArchiveContainer.<init>(JavacFileManager.java:523)
[ERROR]         at jdk.compiler/com.sun.tools.javac.file.JavacFileManager.getContainer(JavacFileManager.java:319)
[ERROR]         at jdk.compiler/com.sun.tools.javac.file.JavacFileManager.list(JavacFileManager.java:715)
[ERROR]         at jdk.compiler/com.sun.tools.javac.code.ClassFinder.list(ClassFinder.java:722)
[ERROR]         at jdk.compiler/com.sun.tools.javac.code.ClassFinder.scanPlatformPath(ClassFinder.java:673)
[ERROR]         at jdk.compiler/com.sun.tools.javac.code.ClassFinder.fillIn(ClassFinder.java:525)
[ERROR]         at jdk.compiler/com.sun.tools.javac.code.ClassFinder.complete(ClassFinder.java:293)
[ERROR]         at jdk.compiler/com.sun.tools.javac.code.Symbol.complete(Symbol.java:633)
[ERROR]         at jdk.compiler/com.sun.tools.javac.code.Symbol$PackageSymbol.members(Symbol.java:1120)
[ERROR]         at jdk.compiler/com.sun.tools.javac.code.Symtab.listPackageModules(Symtab.java:810)
[ERROR]         at jdk.compiler/com.sun.tools.javac.comp.Enter.visitTopLevel(Enter.java:344)
[ERROR]         at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:529)
[ERROR]         at jdk.compiler/com.sun.tools.javac.comp.Enter.classEnter(Enter.java:285)
[ERROR]         at jdk.compiler/com.sun.tools.javac.comp.Enter.classEnter(Enter.java:300)
[ERROR]         at jdk.compiler/com.sun.tools.javac.comp.Enter.complete(Enter.java:570)
[ERROR]         at jdk.compiler/com.sun.tools.javac.comp.Enter.main(Enter.java:554)
[ERROR]         at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:1052)
[ERROR]         at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:923)
[ERROR]         at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:302)
[ERROR]         at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:162)
[ERROR]         at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)
[ERROR]         at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43)

Expected result:

1. The build should be successful.

Comments

  1. Gary Mathews 2018-03-28

    appcelerator.apm: https://github.com/appcelerator-modules/appcelerator.apm/pull/32
  2. Gary Mathews 2018-03-28

    master: https://github.com/appcelerator/titanium_mobile/pull/9971 7_1_X: https://github.com/appcelerator/titanium_mobile/pull/9972
  3. Lokesh Choudhary 2018-04-03

    FR Passed. PR's merged.
  4. Lokesh Choudhary 2018-04-04

    Verified the fix with SDK 7.1.1.v20180404110450 & 7.2.0.v20180403153400 & crittercism ver 3.1.1 Closing. Studio Ver: 5.1.0 OS Ver: 10.13.2 Xcode Ver: Xcode 9.3 Appc NPM: 4.2.13-2 Appc CLI: 7.0.3-master.27 Daemon Ver: 1.0.1 Ti CLI Ver: 5.1.0 Alloy Ver: 1.11.0 Node Ver: 8.9.1 NPM Ver: 5.5.1 Java Ver: 9.0.4 Devices: ⇨ google Nexus 6P --- Android 8.0.0 ⇨ google Nexus 5 --- Android 6.0.1

JSON Source