Mercurial > hg > openjdk > aarch64-port > corba
changeset 469:9e3acfd57153 preview_rc1
Merge up to jdk8-b90
author | Edward Nevill edward.nevill@linaro.org |
---|---|
date | Fri, 27 Sep 2013 15:39:38 +0100 |
parents | 9adf449c644f (current diff) c8286839d0df (diff) |
children | 4540fc0b8d8d |
files | .hgtags |
diffstat | 2 files changed, 40 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgtags Tue Aug 13 17:03:58 2013 +0100 +++ b/.hgtags Fri Sep 27 15:39:38 2013 +0100 @@ -208,3 +208,8 @@ a45bb25a67c7517b45f00c9682e317f46fecbba9 jdk8-b83 928f8b888deb785cbd7bbd5f951cd6880f11f14e jdk8-b84 410fe5f3d3a4f7f9622b90077f5c0dbdaf1f2ea5 aarch64-20130813 +9583a6431596bac1959d2d8828f5ea217843dd12 jdk8-b85 +44a8ce4a759f2668ff434661a93ff462ea472478 jdk8-b86 +f1709874d55a06bc3d5dfa02dbcdfbc59f4cba34 jdk8-b87 +4e3a881ebb1ee96ce0872508b0066d74f310dbfa jdk8-b88 +fe4150590ee597f4e125fea950aa3b352622cc2d jdk8-b89
--- a/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/UnionGen.java Tue Aug 13 17:03:58 2013 +0100 +++ b/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/UnionGen.java Fri Sep 27 15:39:38 2013 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -258,6 +258,19 @@ { Vector labels = vectorizeLabels (u.branches (), true); + if (Util.javaName(utype).equals ("boolean")) { + stream.println( "" ) ; + stream.println( " private void verifyDefault (boolean discriminator)" ) ; + stream.println( " {" ) ; + if (labels.contains ("true")) + stream.println (" if ( discriminator )"); + else + stream.println (" if ( !discriminator )"); + stream.println( " throw new org.omg.CORBA.BAD_OPERATION();" ) ; + stream.println( " }" ) ; + return; + } + stream.println( "" ) ; stream.println( " private void verifyDefault( " + Util.javaName(utype) + " value )" ) ; @@ -763,7 +776,7 @@ stream.println (indent + "if (" + disName + ')'); if (firstBranch == null) - stream.println (indent + " throw new org.omg.CORBA.BAD_OPERATION ();"); + stream.println (indent + " value._default(" + disName + ");"); else { stream.println (indent + '{'); index = readBranch (index, indent + " ", firstBranch.typedef.name (), @@ -774,7 +787,7 @@ stream.println (indent + "else"); if (secondBranch == null) - stream.println (indent + " throw new org.omg.CORBA.BAD_OPERATION ();"); + stream.println (indent + " value._default(" + disName + ");"); else { stream.println (indent + '{'); index = readBranch (index, indent + " ", secondBranch.typedef.name (), @@ -924,23 +937,25 @@ firstBranch = secondBranch; secondBranch = tmp; } - stream.println (indent + "if (" + disName + ')'); - if (firstBranch == null) - stream.println (indent + " throw new org.omg.CORBA.BAD_OPERATION ();"); - else - { - stream.println (indent + '{'); - index = writeBranch (index, indent + " ", name, firstBranch.typedef, stream); - stream.println (indent + '}'); - } - stream.println (indent + "else"); - if (secondBranch == null) - stream.println (indent + " throw new org.omg.CORBA.BAD_OPERATION ();"); - else - { - stream.println (indent + '{'); - index = writeBranch (index, indent + " ", name, secondBranch.typedef, stream); - stream.println (indent + '}'); + if (firstBranch != null && secondBranch != null) { + stream.println (indent + "if (" + disName + ')'); + stream.println (indent + '{'); + index = writeBranch (index, indent + " ", name, firstBranch.typedef, stream); + stream.println (indent + '}'); + stream.println (indent + "else"); + stream.println (indent + '{'); + index = writeBranch (index, indent + " ", name, secondBranch.typedef, stream); + stream.println (indent + '}'); + } else if (firstBranch != null) { + stream.println (indent + "if (" + disName + ')'); + stream.println (indent + '{'); + index = writeBranch (index, indent + " ", name, firstBranch.typedef, stream); + stream.println (indent + '}'); + } else { + stream.println (indent + "if (!" + disName + ')'); + stream.println (indent + '{'); + index = writeBranch (index, indent + " ", name, secondBranch.typedef, stream); + stream.println (indent + '}'); } } return index;