Cannot add attribute into main attributes of a jar if there is no version

2018-01-21 Thread Weijun Wang
src/java.base/share/classes/java/util/jar/Attributes.java: 329 @SuppressWarnings("deprecation") 330 void writeMain(DataOutputStream out) throws IOException 331 { 332 // write out the *-Version header first, if it exists 333 String vername = Name.MANI

Microsecond support in java.time.Duration/Instant?

2018-01-21 Thread Kurt Alfred Kluever
Hi core-libs-dev, At Google, we often use microsecond precision for instants/durations (probably because of historical reasons). Therefore, we have a handful of static utility functions for creating/converting java.time types and microseconds: public static Duration ofMicros(long micros) publ