changeset 869:de19dee0dd31

Merge
author Goetz
date Mon, 03 Jun 2013 15:35:22 +0200
parents 1503864858b3 abfc54516d0b
children f6a72dfe7f80
files .hgtags
diffstat 3 files changed, 79 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Tue Mar 12 09:56:43 2013 +0100
+++ b/.hgtags	Mon Jun 03 15:35:22 2013 +0200
@@ -216,6 +216,8 @@
 ec602836c4e173927911673d253bb8baa1e3d170 jdk7u9-b02
 268470f3f0d0d7e9b04c579c551571097f0b0305 jdk7u9-b04
 a5dced409c4b7f940db80846f6efabac74523b0e jdk7u9-b05
+b426254b45bcd7cdb38003497fdd4168e366d3cb jdk7u9-b31
+0fa70374aa257929e2541e57c55c4cdebec91fd4 jdk7u9-b32
 ba68d4ad02c465a36344a34eba34491466ec17d4 jdk7u10-b10
 a738921b001a92381bf355a2bb1ecd742ecee352 jdk7u10-b11
 e52708ecb2c32b366c251e4083fbb37e22a425c3 jdk7u10-b12
@@ -226,8 +228,11 @@
 57c3355153d1624fd98618097c1a82ab3ffc66f8 jdk7u10-b17
 f2a347637a55fa4de9542a8dcab72ad6fac44d2b jdk7u10-b18
 22cf8bc2ec47498fe548b308a81be0486dd7e3d0 jdk7u10-b30
+2723612f5983e7d65490d7d4a3d8577026448736 jdk7u10-b31
 e7952daece16b27d69cb78f6912407c3bbaf8e83 jdk7u11-b20
 dff0f0272891b1d53497d9525567959b73476ff9 jdk7u11-b21
+24f8cb8a0a615686f8baba4d746514bae92f064d jdk7u11-b32
+4bfef14df261d69dc32e37d189e12e3fa572a83c jdk7u11-b33
 96a3c68e5741dc9ab5cb0da426511eb15fd29ede jdk7u11-b03
 1413b173730f4796fca42c89eeb804a5935b0264 jdk7u11-b04
 5c49a17bc15f4fd4722746788f5130df132cd038 jdk7u11-b05
@@ -235,6 +240,8 @@
 9d9440d1fa2dd872c2a2b564fc5fa4d3555afab6 jdk7u11-b07
 983fac5b27376839142ac5a8770461e4e48c2dc8 jdk7u11-b08
 b192d148731916e4b1b47b7a3e6b0a1d7ddf3f14 jdk7u13-b09
+b9ab9b203a41469a274419d26be2c04558b57ce8 jdk7u13-b10
+f5ef46204dba19679edd7492b221110fd1a0bd33 jdk7u13-b30
 b9ab9b203a41469a274419d26be2c04558b57ce8 jdk7u13-b20
 353c15c4bc371f2f8258344c988d1403477cc140 jdk7u8-b01
 d17ca8d088f7cc0dd42230472f534c8d1e415bcb jdk7u8-b02
@@ -260,3 +267,39 @@
 cd7aaec5accf3f8fbb693153f8d9be846e0f8a05 jdk7u14-b13
 9e8bde2586a1a7fd95f654c7d0043d1eb18f0793 jdk7u14-b14
 70af8b7907a504f7b6e4be1882054ca9f3ad1875 ppc-aix-port-b04
+2b1fcbe4e78557822b2269b43c8b589aa1f0b522 jdk7u14-b15
+622e370c2d1e8c5f48d8f520f486dc6fcc1239c5 jdk7u15-b01
+30188388048333e213a839363329ac2cb0cf0e0d jdk7u15-b02
+7f0e7ce088ff554f64e2c102ae3718ae4d580c34 jdk7u15-b30
+3714b558333e1089e2649ead8586873abd9c0ed1 jdk7u15-b31
+f0c038610b6da1a0d4214b730aa6cb17b64d0a3b jdk7u15-b33
+e5b996dabec6ac6aa12705ce678642605ea9d476 jdk7u15-b03
+b192d148731916e4b1b47b7a3e6b0a1d7ddf3f14 jdk7u15-b32
+94e8b9b0e0ef1685e2f2fcc886e08a42a85c8e03 jdk7u17-b01
+e82d31e1f1189ae6f02d6855f0cd78074599b2e1 jdk7u17-b02
+d4366e557c4c5af62a94fc9885aed87c99abc848 jdk7u17-b30
+a6f066dd2cd526da73070d1e46c9b1e1ab1a6756 jdk7u17-b31
+f5ef46204dba19679edd7492b221110fd1a0bd33 jdk7u21-b01
+17ecd70a2247ed86a095aae9f1a201fa7feea861 jdk7u21-b02
+bf0877613aeba816d5f18ea6316d535819f628e9 jdk7u21-b03
+3e39240d7314e82b3ccff3b2a64413be9c0b6665 jdk7u21-b04
+f5a291dc9d219f68a2d4bcc72c65c014e9ec3b8b jdk7u21-b05
+94f2ebfccc5e057169284bb2c858296b235868ea jdk7u21-b06
+23a57aceeb69e688f8ce8b8361fad3a49cf4ac5f jdk7u21-b07
+ebedf04bfffe289e8bf9661b38f73ca6c0dad17c jdk7u21-b08
+b8f92ad1f0cc86d8571a0e23192e667f0ef8e421 jdk7u21-b09
+b2adfd931a2504948d4fee780e4175122be10484 jdk7u21-b10
+61e2e2d9cfcea20132b50d8fb7ead66a8a373db7 jdk7u21-b11
+3c774492beaaff241c654add2c4e683b9ff002f2 jdk7u21-b30
+fa2a377ce52dfa88fca858d735d78b53f2b5b754 jdk7u21-b12
+38282b734daefcbb8155b7d7ef9664130330ed14 jdk7u14-b16
+8b1d77697ca4d2a9c29d67fd2ff03aded9b06012 jdk7u14-b17
+862b43d26e03bbceb3465f93354860e0d17eb324 jdk7u14-b18
+bfbaab73969d4d978d0280d6ad51bac8c47dbaf8 jdk7u14-b19
+bfbaab73969d4d978d0280d6ad51bac8c47dbaf8 jdk7u14-b19
+a921b45a1f9086a7d598a76f920639050386f996 jdk7u14-b19
+54320e5d9da60df24f0e2c57c011809911dc06e1 jdk7u14-b20
+fb590ca4de9aaf1f6bca945be040dffc55b5e8d2 jdk7u14-b21
+e5d89aa2c1a11dba841a646858dda9ea18dc8f57 jdk7u14-b22
+d85df1552f877a1cc51f43bc07a42a0c48f18e0b jdk7u40-b23
+d3ab3b19caa02ee85359cfe07b6e0b74eb7b3d74 jdk7u40-b24
--- a/src/share/classes/com/sun/corba/se/impl/corba/TypeCodeImpl.java	Tue Mar 12 09:56:43 2013 +0100
+++ b/src/share/classes/com/sun/corba/se/impl/corba/TypeCodeImpl.java	Mon Jun 03 15:35:22 2013 +0200
@@ -2189,10 +2189,7 @@
 
                 if (labelIndex == _unionLabels.length) {
                     // check if label has not been found
-                    if (_defaultIndex == -1)
-                        // throw exception if default was not expected
-                        throw wrapper.unexpectedUnionDefault() ;
-                    else
+                    if (_defaultIndex != -1)
                         // must be of the default branch type
                         _memberTypes[_defaultIndex].copy(src, dst);
                 }
--- a/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/UnionGen.java	Tue Mar 12 09:56:43 2013 +0100
+++ b/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/UnionGen.java	Mon Jun 03 15:35:22 2013 +0200
@@ -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;