Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #38896

Re: more porting issues to Java 11

From Andreas Leitgeb <avl@logic.at>
Newsgroups comp.lang.java.programmer
Subject Re: more porting issues to Java 11
Date 2019-04-10 18:08 +0000
Organization A noiseless patient Spider
Message-ID <slrnqasc8j.cfl.avl@logic.at> (permalink)
References (1 earlier) <q82uh5$1um8$1@gioia.aioe.org> <slrnqac06q.cfl.avl@logic.at> <q86743$ee6$1@gioia.aioe.org> <slrnqamuc3.cfl.avl@logic.at> <slrnqan0bh.cfl.avl@logic.at>

Show all headers | View raw


Next update:    (tl;dr? SimpleDateFormat also changed behaviour)

Synchronous with my own sorry attempts, there was also some action on
glassfish side. Some user posted a PR that made the glassfish ORB
compileable with maven and jdk 11. (It's not yet merged, and it
depends on some other package that isn't yet released to maven repo,
thus needs some extra hoop-diving to let "mvn" find it, but there is
some progress).

For now I only succeeded in getting un-encrypted Corba working -
to use encryption I would now need a client-side keystore (didn't
need that back with an older version of JacORB).
Not ok for production, of course, but enough to allow me to check
other corners of the application:


Next obstacle was SimpleDateFormat:  jdk-8 had no problem at all with
parsing a (German style) "10.04.2019 19:44:45" string with a DateFormat
defined like this: (SSCCE and results further down)
  final int dfMed = DateFormat.MEDIUM; final Locale l_de=new Locale("de","DE");
  DateFormat df   =  DateFormat.getDateTimeInstance(dfMed,dfMed,l_de);

For jdk11, the string would now need a comma "," between date and time 
parts. the blank isn't acceptable any more.


--- snip SSCCE: Foo.java ---
import java.text.DateFormat;
import java.util.Date;
import java.text.ParseException;
import java.util.Locale;

class Foo {
   public static void main(String... args) {
      final int dfMed = DateFormat.MEDIUM;
      final Locale l_de=new Locale("de","DE");
      DateFormat     dfM = DateFormat.getDateTimeInstance(dfMed,dfMed,l_de);
      dfM.setLenient(true);

      String text = "10.04.2019 19:44:45";

      try {
         Date result = dfM.parse(text);
         System.out.println( result );
      } catch (ParseException dfe) {
         System.out.println( dfe );
      }
   }
}
--- end snip --- 
jdk-8:  Wed Apr 10 19:44:45 CEST 2019
jdk-11: java.text.ParseException: Unparseable date: "10.04.2019 19:12:04"
        (That it expected a comma, I learned from a debugging session)

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

more porting issues to Java 11 Andreas Leitgeb <avl@logic.at> - 2019-04-03 17:21 +0000
  Re: more porting issues to Java 11 Arne Vajhøj <arne@vajhoej.dk> - 2019-04-03 14:28 -0400
    Re: more porting issues to Java 11 Arne Vajhøj <arne@vajhoej.dk> - 2019-04-03 14:32 -0400
      Re: more porting issues to Java 11 Andreas Leitgeb <avl@logic.at> - 2019-04-04 12:52 +0000
        Re: more porting issues to Java 11 Andreas Leitgeb <avl@logic.at> - 2019-04-04 14:11 +0000
          Re: more porting issues to Java 11 Arne Vajhøj <arne@vajhoej.dk> - 2019-04-04 20:08 -0400
  Re: more porting issues to Java 11 Arne Vajhøj <arne@vajhoej.dk> - 2019-04-03 14:37 -0400
    Re: more porting issues to Java 11 Andreas Leitgeb <avl@logic.at> - 2019-04-04 13:04 +0000
      Re: more porting issues to Java 11 Arne Vajhøj <arne@vajhoej.dk> - 2019-04-04 20:22 -0400
        Re: more porting issues to Java 11 Andreas Leitgeb <avl@logic.at> - 2019-04-08 16:40 +0000
          Re: more porting issues to Java 11 Andreas Leitgeb <avl@logic.at> - 2019-04-08 17:14 +0000
            Re: more porting issues to Java 11 Andreas Leitgeb <avl@logic.at> - 2019-04-10 18:08 +0000
              Re: more porting issues to Java 11 Andreas Leitgeb <avl@logic.at> - 2019-04-10 18:32 +0000
              Re: more porting issues to Java 11 Sebastian <nowhere@nirvana.org> - 2019-04-11 11:05 +0200
                Re: more porting issues to Java 11 Andreas Leitgeb <avl@logic.at> - 2019-04-29 08:23 +0000
              Re: more porting issues to Java 11 Arne Vajhøj <arne@vajhoej.dk> - 2019-04-12 10:08 -0400
                Re: more porting issues to Java 11 Eric Douglas <e.d.programmer@gmail.com> - 2019-04-12 07:35 -0700
              Re: more porting issues to Java 11 Andreas Leitgeb <avl@logic.at> - 2019-04-29 08:39 +0000
                Re: more porting issues to Java 11 Andreas Leitgeb <avl@logic.at> - 2019-05-03 13:10 +0000
                Re: more porting issues to Java 11 Knute Johnson <groups@585ranch.com> - 2019-05-04 11:24 -0500
                Re: more porting issues to Java 11 Andreas Leitgeb <avl@logic.at> - 2019-05-04 21:58 +0000
                Re: more porting issues to Java 11 Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2019-05-06 11:25 -0500
                Re: more porting issues to Java 11 Andreas Leitgeb <avl@logic.at> - 2019-05-29 12:20 +0000
                Re: more porting issues to Java 11 Andreas Leitgeb <avl@logic.at> - 2020-01-30 15:07 +0000
          Re: more porting issues to Java 11 Arne Vajhøj <arne@vajhoej.dk> - 2019-04-08 18:41 -0400
            Re: more porting issues to Java 11 Sebastian <nowhere@nirvana.org> - 2019-04-10 15:46 +0200
              Re: more porting issues to Java 11 Arne Vajhøj <arne@vajhoej.dk> - 2019-04-10 12:31 -0400
            Re: more porting issues to Java 11 Andreas Leitgeb <avl@logic.at> - 2019-04-10 18:13 +0000
              Re: more porting issues to Java 11 Arne Vajhøj <arne@vajhoej.dk> - 2019-04-13 20:39 -0400

csiph-web