diff --git a/.hgtags-top-repo b/.hgtags-top-repo index 8d5bee022fb..b02fce8ab91 100644 --- a/.hgtags-top-repo +++ b/.hgtags-top-repo @@ -111,3 +111,4 @@ c6f380693342feadccc5fe2c5adf500e861361aa jdk7-b133 ddc2fcb3682ffd27f44354db666128827be7e3c3 jdk7-b134 783bd02b4ab4596059c74b10a1793d7bd2f1c157 jdk7-b135 2fe76e73adaa5133ac559f0b3c2c0707eca04580 jdk7-b136 +7654afc6a29e43cb0a1343ce7f1287bf690d5e5f jdk7-b137 diff --git a/Makefile b/Makefile index 04207005ad6..1d20f79bf83 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1995, 2011, 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 diff --git a/hotspot/.hgtags b/hotspot/.hgtags index fcb97013f75..cc91bc1d1a5 100644 --- a/hotspot/.hgtags +++ b/hotspot/.hgtags @@ -160,3 +160,5 @@ b898f0fc3cedc972d884d31a751afd75969531cf jdk7-b135 b898f0fc3cedc972d884d31a751afd75969531cf hs21-b05 bd586e392d93b7ed7a1636dcc8da2b6a4203a102 jdk7-b136 bd586e392d93b7ed7a1636dcc8da2b6a4203a102 hs21-b06 +2dbcb4a4d8dace5fe78ceb563b134f1fb296cd8f jdk7-b137 +2dbcb4a4d8dace5fe78ceb563b134f1fb296cd8f hs21-b07 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/CommandProcessor.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/CommandProcessor.java index e4a6b6b9879..eacc59d8226 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/CommandProcessor.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/CommandProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java index fcaf4766811..fd35915831f 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/interpreter/BytecodeLoadConstant.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/interpreter/BytecodeLoadConstant.java index 67962adefb6..d1f9f70dbec 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/interpreter/BytecodeLoadConstant.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/interpreter/BytecodeLoadConstant.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/interpreter/BytecodeWithKlass.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/interpreter/BytecodeWithKlass.java index 3a62c2dad0c..dab8fc7cff4 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/interpreter/BytecodeWithKlass.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/interpreter/BytecodeWithKlass.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/DictionaryEntry.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/DictionaryEntry.java index a42479d5385..14edf8f74ec 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/DictionaryEntry.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/DictionaryEntry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/LoaderConstraintEntry.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/LoaderConstraintEntry.java index a6b2a743ec2..248308baa7f 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/LoaderConstraintEntry.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/LoaderConstraintEntry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/PlaceholderEntry.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/PlaceholderEntry.java index 5574910a320..be9ee583868 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/PlaceholderEntry.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/PlaceholderEntry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/StringTable.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/StringTable.java index bfbeb26cc1a..8bf42f0415e 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/StringTable.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/StringTable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/SymbolTable.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/SymbolTable.java index cfee9fbe004..1c0a676810a 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/SymbolTable.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/SymbolTable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2011, 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ConstantPool.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ConstantPool.java index f1babff8cb6..9bb918b8765 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ConstantPool.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ConstantPool.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/GenerateOopMap.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/GenerateOopMap.java index 35a9d194037..30f3497e53d 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/GenerateOopMap.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/GenerateOopMap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2011, 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Klass.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Klass.java index ccb5e5b46b0..506d4d3ae0c 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Klass.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Klass.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Method.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Method.java index ed551bc74e4..3a4061937e1 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Method.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Method.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Symbol.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Symbol.java index 964e3a8de3f..ed4ea43d8a0 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Symbol.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Symbol.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java index 3896c67d77c..e9202edb8e5 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/Field.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/Field.java index 2ef0e48c958..c6794b7f143 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/Field.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/types/Field.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java index 147e3bd5590..1b01316cbf6 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/Hashtable.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/Hashtable.java index 65437b7082f..3c2e0f965c2 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/Hashtable.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/Hashtable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/HashtableEntry.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/HashtableEntry.java index 1ae9dfaf48a..73932a43033 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/HashtableEntry.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/HashtableEntry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/make/hotspot_version b/hotspot/make/hotspot_version index b5312a500ae..bd9d89e0bef 100644 --- a/hotspot/make/hotspot_version +++ b/hotspot/make/hotspot_version @@ -35,7 +35,7 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2011 HS_MAJOR_VER=21 HS_MINOR_VER=0 -HS_BUILD_NUMBER=07 +HS_BUILD_NUMBER=08 JDK_MAJOR_VER=1 JDK_MINOR_VER=7 diff --git a/hotspot/make/linux/Makefile b/hotspot/make/linux/Makefile index ec1e60b7c2d..49ac97c199e 100644 --- a/hotspot/make/linux/Makefile +++ b/hotspot/make/linux/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2011, 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 diff --git a/hotspot/make/linux/makefiles/arm.make b/hotspot/make/linux/makefiles/arm.make index 3c5dc2ca151..e210303dc98 100644 --- a/hotspot/make/linux/makefiles/arm.make +++ b/hotspot/make/linux/makefiles/arm.make @@ -1,5 +1,5 @@ # -# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. # ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. # diff --git a/hotspot/make/linux/makefiles/gcc.make b/hotspot/make/linux/makefiles/gcc.make index 28105c41a1a..d7537331e4c 100644 --- a/hotspot/make/linux/makefiles/gcc.make +++ b/hotspot/make/linux/makefiles/gcc.make @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2011, 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 diff --git a/hotspot/make/linux/makefiles/mapfile-vers-debug b/hotspot/make/linux/makefiles/mapfile-vers-debug index 7022aba2e39..332c8af9329 100644 --- a/hotspot/make/linux/makefiles/mapfile-vers-debug +++ b/hotspot/make/linux/makefiles/mapfile-vers-debug @@ -3,7 +3,7 @@ # # -# Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2002, 2011, 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 diff --git a/hotspot/make/linux/makefiles/mapfile-vers-product b/hotspot/make/linux/makefiles/mapfile-vers-product index 201252d2d29..052da7c3c7e 100644 --- a/hotspot/make/linux/makefiles/mapfile-vers-product +++ b/hotspot/make/linux/makefiles/mapfile-vers-product @@ -3,7 +3,7 @@ # # -# Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2002, 2011, 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 diff --git a/hotspot/make/linux/makefiles/ppc.make b/hotspot/make/linux/makefiles/ppc.make index 50ac9fe0d8c..a3a19bc246a 100644 --- a/hotspot/make/linux/makefiles/ppc.make +++ b/hotspot/make/linux/makefiles/ppc.make @@ -1,5 +1,5 @@ # -# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. # ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. # diff --git a/hotspot/make/linux/makefiles/sparcWorks.make b/hotspot/make/linux/makefiles/sparcWorks.make index 818ef42b088..6e6c8418d6f 100644 --- a/hotspot/make/linux/makefiles/sparcWorks.make +++ b/hotspot/make/linux/makefiles/sparcWorks.make @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2011, 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 diff --git a/hotspot/make/linux/makefiles/top.make b/hotspot/make/linux/makefiles/top.make index 41c50940d25..1b674dce957 100644 --- a/hotspot/make/linux/makefiles/top.make +++ b/hotspot/make/linux/makefiles/top.make @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2011, 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 diff --git a/hotspot/make/linux/makefiles/vm.make b/hotspot/make/linux/makefiles/vm.make index d564055c539..ff6f527eeb2 100644 --- a/hotspot/make/linux/makefiles/vm.make +++ b/hotspot/make/linux/makefiles/vm.make @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2011, 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 diff --git a/hotspot/make/solaris/makefiles/adlc.make b/hotspot/make/solaris/makefiles/adlc.make index 981e187f729..4bcecf607cd 100644 --- a/hotspot/make/solaris/makefiles/adlc.make +++ b/hotspot/make/solaris/makefiles/adlc.make @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2011, 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 diff --git a/hotspot/make/solaris/makefiles/buildtree.make b/hotspot/make/solaris/makefiles/buildtree.make index 8cca8a07ebb..591ae3c5855 100644 --- a/hotspot/make/solaris/makefiles/buildtree.make +++ b/hotspot/make/solaris/makefiles/buildtree.make @@ -1,5 +1,5 @@ # -# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2000, 2011, 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 diff --git a/hotspot/make/solaris/makefiles/rules.make b/hotspot/make/solaris/makefiles/rules.make index 4f2cc860805..c5bd00f957c 100644 --- a/hotspot/make/solaris/makefiles/rules.make +++ b/hotspot/make/solaris/makefiles/rules.make @@ -1,5 +1,5 @@ # -# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2000, 2011, 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 diff --git a/hotspot/make/solaris/makefiles/top.make b/hotspot/make/solaris/makefiles/top.make index 893e9c00cab..64797bbb2fd 100644 --- a/hotspot/make/solaris/makefiles/top.make +++ b/hotspot/make/solaris/makefiles/top.make @@ -1,5 +1,5 @@ # -# Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2011, 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 diff --git a/hotspot/make/solaris/makefiles/vm.make b/hotspot/make/solaris/makefiles/vm.make index 5ad02c00c53..5db3daeda64 100644 --- a/hotspot/make/solaris/makefiles/vm.make +++ b/hotspot/make/solaris/makefiles/vm.make @@ -1,5 +1,5 @@ # -# Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2011, 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 diff --git a/hotspot/make/windows/create_obj_files.sh b/hotspot/make/windows/create_obj_files.sh index 0c8276962e6..59fe3a6932c 100644 --- a/hotspot/make/windows/create_obj_files.sh +++ b/hotspot/make/windows/create_obj_files.sh @@ -1,5 +1,5 @@ # -# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2010, 2011, 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 diff --git a/hotspot/make/windows/makefiles/launcher.make b/hotspot/make/windows/makefiles/launcher.make index 7868032d590..2a5df63bdac 100644 --- a/hotspot/make/windows/makefiles/launcher.make +++ b/hotspot/make/windows/makefiles/launcher.make @@ -1,5 +1,5 @@ # -# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2010, 2011, 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 diff --git a/hotspot/make/windows/makefiles/vm.make b/hotspot/make/windows/makefiles/vm.make index 4bcdd4a3bbe..1ee86646137 100644 --- a/hotspot/make/windows/makefiles/vm.make +++ b/hotspot/make/windows/makefiles/vm.make @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp b/hotspot/src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp index c3556e2147e..2905687ebce 100644 --- a/hotspot/src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/hotspot/src/cpu/sparc/vm/dump_sparc.cpp b/hotspot/src/cpu/sparc/vm/dump_sparc.cpp index afe0d4f5952..19929f52ba0 100644 --- a/hotspot/src/cpu/sparc/vm/dump_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/dump_sparc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2011, 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 diff --git a/hotspot/src/cpu/sparc/vm/jni_sparc.h b/hotspot/src/cpu/sparc/vm/jni_sparc.h index 2e177a8692e..5cb443ba943 100644 --- a/hotspot/src/cpu/sparc/vm/jni_sparc.h +++ b/hotspot/src/cpu/sparc/vm/jni_sparc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/cpu/sparc/vm/nativeInst_sparc.cpp b/hotspot/src/cpu/sparc/vm/nativeInst_sparc.cpp index a5bcc5e7738..93fa1fc87ca 100644 --- a/hotspot/src/cpu/sparc/vm/nativeInst_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/nativeInst_sparc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/cpu/sparc/vm/nativeInst_sparc.hpp b/hotspot/src/cpu/sparc/vm/nativeInst_sparc.hpp index 7549281f0ba..6ee9c6239d5 100644 --- a/hotspot/src/cpu/sparc/vm/nativeInst_sparc.hpp +++ b/hotspot/src/cpu/sparc/vm/nativeInst_sparc.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/cpu/sparc/vm/relocInfo_sparc.cpp b/hotspot/src/cpu/sparc/vm/relocInfo_sparc.cpp index a2913f6f055..16196cd3609 100644 --- a/hotspot/src/cpu/sparc/vm/relocInfo_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/relocInfo_sparc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2011, 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 diff --git a/hotspot/src/cpu/x86/vm/jni_x86.h b/hotspot/src/cpu/x86/vm/jni_x86.h index 9715d0e3237..d06bb5ca247 100644 --- a/hotspot/src/cpu/x86/vm/jni_x86.h +++ b/hotspot/src/cpu/x86/vm/jni_x86.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/cpu/x86/vm/vm_version_x86.cpp b/hotspot/src/cpu/x86/vm/vm_version_x86.cpp index 9f352e3e9af..fa2084450ba 100644 --- a/hotspot/src/cpu/x86/vm/vm_version_x86.cpp +++ b/hotspot/src/cpu/x86/vm/vm_version_x86.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All Rights Reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/cpu/zero/vm/jni_zero.h b/hotspot/src/cpu/zero/vm/jni_zero.h index 132a6bbb60d..6ac4f63ead3 100644 --- a/hotspot/src/cpu/zero/vm/jni_zero.h +++ b/hotspot/src/cpu/zero/vm/jni_zero.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright 2009 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * diff --git a/hotspot/src/os/linux/vm/jvm_linux.cpp b/hotspot/src/os/linux/vm/jvm_linux.cpp index 6e305b80211..ba84788a1b7 100644 --- a/hotspot/src/os/linux/vm/jvm_linux.cpp +++ b/hotspot/src/os/linux/vm/jvm_linux.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/hotspot/src/os/linux/vm/osThread_linux.cpp b/hotspot/src/os/linux/vm/osThread_linux.cpp index bf454ff9003..8ff88a9e34f 100644 --- a/hotspot/src/os/linux/vm/osThread_linux.cpp +++ b/hotspot/src/os/linux/vm/osThread_linux.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/hotspot/src/os/linux/vm/os_linux.inline.hpp b/hotspot/src/os/linux/vm/os_linux.inline.hpp index c2301be5052..0bddce86bcc 100644 --- a/hotspot/src/os/linux/vm/os_linux.inline.hpp +++ b/hotspot/src/os/linux/vm/os_linux.inline.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/hotspot/src/os/linux/vm/thread_linux.inline.hpp b/hotspot/src/os/linux/vm/thread_linux.inline.hpp index 93e1d481ef7..2a5dcddb7ca 100644 --- a/hotspot/src/os/linux/vm/thread_linux.inline.hpp +++ b/hotspot/src/os/linux/vm/thread_linux.inline.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 diff --git a/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp b/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp index adfd1718538..022643161a1 100644 --- a/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp +++ b/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/src/os/solaris/dtrace/jhelper.d b/hotspot/src/os/solaris/dtrace/jhelper.d index 0a93d25cc35..75e74269576 100644 --- a/hotspot/src/os/solaris/dtrace/jhelper.d +++ b/hotspot/src/os/solaris/dtrace/jhelper.d @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/src/os/solaris/dtrace/libjvm_db.c b/hotspot/src/os/solaris/dtrace/libjvm_db.c index 82cef0912bc..8caac23e9e2 100644 --- a/hotspot/src/os/solaris/dtrace/libjvm_db.c +++ b/hotspot/src/os/solaris/dtrace/libjvm_db.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/src/os/solaris/vm/dtraceJSDT_solaris.cpp b/hotspot/src/os/solaris/vm/dtraceJSDT_solaris.cpp index c88d4fadea0..60baff5066c 100644 --- a/hotspot/src/os/solaris/vm/dtraceJSDT_solaris.cpp +++ b/hotspot/src/os/solaris/vm/dtraceJSDT_solaris.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp b/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp index a9984d0e615..62131ee6f10 100644 --- a/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp +++ b/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp b/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp index b5e159076d5..ba484b9fde5 100644 --- a/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp +++ b/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp b/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp index afeb60a93f4..32c2d0a5191 100644 --- a/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp +++ b/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * diff --git a/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp b/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp index e9724f1cd8e..971f600fe30 100644 --- a/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp +++ b/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp b/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp index 2de4d6969bd..78e93ea6652 100644 --- a/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp +++ b/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/hotspot/src/share/tools/hsdis/hsdis-demo.c b/hotspot/src/share/tools/hsdis/hsdis-demo.c index 9981a71e33a..e83a0425c50 100644 --- a/hotspot/src/share/tools/hsdis/hsdis-demo.c +++ b/hotspot/src/share/tools/hsdis/hsdis-demo.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/hotspot/src/share/tools/hsdis/hsdis.c b/hotspot/src/share/tools/hsdis/hsdis.c index 189eecde3e1..daea404f955 100644 --- a/hotspot/src/share/tools/hsdis/hsdis.c +++ b/hotspot/src/share/tools/hsdis/hsdis.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/hotspot/src/share/vm/adlc/main.cpp b/hotspot/src/share/vm/adlc/main.cpp index 88a75e684b1..47e207a4b13 100644 --- a/hotspot/src/share/vm/adlc/main.cpp +++ b/hotspot/src/share/vm/adlc/main.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/adlc/output_c.cpp b/hotspot/src/share/vm/adlc/output_c.cpp index ddf1f99343b..c0ef3894622 100644 --- a/hotspot/src/share/vm/adlc/output_c.cpp +++ b/hotspot/src/share/vm/adlc/output_c.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2011, 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 diff --git a/hotspot/src/share/vm/asm/assembler.cpp b/hotspot/src/share/vm/asm/assembler.cpp index 2f739393f58..86011e97496 100644 --- a/hotspot/src/share/vm/asm/assembler.cpp +++ b/hotspot/src/share/vm/asm/assembler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/asm/assembler.hpp b/hotspot/src/share/vm/asm/assembler.hpp index db0fbadbd5c..829e5618413 100644 --- a/hotspot/src/share/vm/asm/assembler.hpp +++ b/hotspot/src/share/vm/asm/assembler.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/asm/codeBuffer.hpp b/hotspot/src/share/vm/asm/codeBuffer.hpp index dfcd1cf0a27..e9b2950b98c 100644 --- a/hotspot/src/share/vm/asm/codeBuffer.hpp +++ b/hotspot/src/share/vm/asm/codeBuffer.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/c1/c1_Compilation.hpp b/hotspot/src/share/vm/c1/c1_Compilation.hpp index 0d0fe1d3017..376b6f3372e 100644 --- a/hotspot/src/share/vm/c1/c1_Compilation.hpp +++ b/hotspot/src/share/vm/c1/c1_Compilation.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/hotspot/src/share/vm/c1/c1_Defs.hpp b/hotspot/src/share/vm/c1/c1_Defs.hpp index 564e7b3cb5f..bebb3b0bebe 100644 --- a/hotspot/src/share/vm/c1/c1_Defs.hpp +++ b/hotspot/src/share/vm/c1/c1_Defs.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/hotspot/src/share/vm/c1/c1_FpuStackSim.hpp b/hotspot/src/share/vm/c1/c1_FpuStackSim.hpp index 3e8adbe14c4..a1e4c383204 100644 --- a/hotspot/src/share/vm/c1/c1_FpuStackSim.hpp +++ b/hotspot/src/share/vm/c1/c1_FpuStackSim.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/hotspot/src/share/vm/c1/c1_FrameMap.cpp b/hotspot/src/share/vm/c1/c1_FrameMap.cpp index 74eab9bd08e..ea50b276f44 100644 --- a/hotspot/src/share/vm/c1/c1_FrameMap.cpp +++ b/hotspot/src/share/vm/c1/c1_FrameMap.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/hotspot/src/share/vm/c1/c1_FrameMap.hpp b/hotspot/src/share/vm/c1/c1_FrameMap.hpp index 266ae094057..288fc5c1bf4 100644 --- a/hotspot/src/share/vm/c1/c1_FrameMap.hpp +++ b/hotspot/src/share/vm/c1/c1_FrameMap.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp b/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp index 510bf2f92a5..3417bda7830 100644 --- a/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp +++ b/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp b/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp index 074027a8719..857b663f7cf 100644 --- a/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp +++ b/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/hotspot/src/share/vm/c1/c1_LinearScan.cpp b/hotspot/src/share/vm/c1/c1_LinearScan.cpp index 043ea39cdb5..ef41cfd3224 100644 --- a/hotspot/src/share/vm/c1/c1_LinearScan.cpp +++ b/hotspot/src/share/vm/c1/c1_LinearScan.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/hotspot/src/share/vm/c1/c1_LinearScan.hpp b/hotspot/src/share/vm/c1/c1_LinearScan.hpp index 3436cb5c2be..51789ebd85d 100644 --- a/hotspot/src/share/vm/c1/c1_LinearScan.hpp +++ b/hotspot/src/share/vm/c1/c1_LinearScan.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/hotspot/src/share/vm/c1/c1_MacroAssembler.hpp b/hotspot/src/share/vm/c1/c1_MacroAssembler.hpp index 9887c2af61d..55d98035016 100644 --- a/hotspot/src/share/vm/c1/c1_MacroAssembler.hpp +++ b/hotspot/src/share/vm/c1/c1_MacroAssembler.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/hotspot/src/share/vm/c1/c1_globals.hpp b/hotspot/src/share/vm/c1/c1_globals.hpp index fd890cf7e47..110371d19e2 100644 --- a/hotspot/src/share/vm/c1/c1_globals.hpp +++ b/hotspot/src/share/vm/c1/c1_globals.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/hotspot/src/share/vm/ci/ciClassList.hpp b/hotspot/src/share/vm/ci/ciClassList.hpp index 01deadd7ef3..bc96594a3eb 100644 --- a/hotspot/src/share/vm/ci/ciClassList.hpp +++ b/hotspot/src/share/vm/ci/ciClassList.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/hotspot/src/share/vm/ci/ciEnv.cpp b/hotspot/src/share/vm/ci/ciEnv.cpp index 14018b4729c..66e23490c09 100644 --- a/hotspot/src/share/vm/ci/ciEnv.cpp +++ b/hotspot/src/share/vm/ci/ciEnv.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/hotspot/src/share/vm/ci/ciEnv.hpp b/hotspot/src/share/vm/ci/ciEnv.hpp index 53c3ee15d9d..17b556fc4b5 100644 --- a/hotspot/src/share/vm/ci/ciEnv.hpp +++ b/hotspot/src/share/vm/ci/ciEnv.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/hotspot/src/share/vm/ci/ciKlass.cpp b/hotspot/src/share/vm/ci/ciKlass.cpp index 03aeff4f265..2169b376c51 100644 --- a/hotspot/src/share/vm/ci/ciKlass.cpp +++ b/hotspot/src/share/vm/ci/ciKlass.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/hotspot/src/share/vm/ci/ciObjArrayKlass.cpp b/hotspot/src/share/vm/ci/ciObjArrayKlass.cpp index c5cd7009c47..2fcf2c9be6d 100644 --- a/hotspot/src/share/vm/ci/ciObjArrayKlass.cpp +++ b/hotspot/src/share/vm/ci/ciObjArrayKlass.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/hotspot/src/share/vm/ci/ciObject.hpp b/hotspot/src/share/vm/ci/ciObject.hpp index 0a93d9f1149..2542d150b6b 100644 --- a/hotspot/src/share/vm/ci/ciObject.hpp +++ b/hotspot/src/share/vm/ci/ciObject.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/hotspot/src/share/vm/ci/ciObjectFactory.hpp b/hotspot/src/share/vm/ci/ciObjectFactory.hpp index 50f585f47a9..12185f2262f 100644 --- a/hotspot/src/share/vm/ci/ciObjectFactory.hpp +++ b/hotspot/src/share/vm/ci/ciObjectFactory.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/hotspot/src/share/vm/ci/ciSignature.cpp b/hotspot/src/share/vm/ci/ciSignature.cpp index b68f3f8caf2..037ba8a8fef 100644 --- a/hotspot/src/share/vm/ci/ciSignature.cpp +++ b/hotspot/src/share/vm/ci/ciSignature.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/hotspot/src/share/vm/ci/ciSignature.hpp b/hotspot/src/share/vm/ci/ciSignature.hpp index 5ac1170eeee..f455600e7ac 100644 --- a/hotspot/src/share/vm/ci/ciSignature.hpp +++ b/hotspot/src/share/vm/ci/ciSignature.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/hotspot/src/share/vm/ci/ciSymbol.cpp b/hotspot/src/share/vm/ci/ciSymbol.cpp index e1fe49f1e75..d253e596af3 100644 --- a/hotspot/src/share/vm/ci/ciSymbol.cpp +++ b/hotspot/src/share/vm/ci/ciSymbol.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/hotspot/src/share/vm/ci/ciSymbol.hpp b/hotspot/src/share/vm/ci/ciSymbol.hpp index ec2a588cbf1..aae171a01d3 100644 --- a/hotspot/src/share/vm/ci/ciSymbol.hpp +++ b/hotspot/src/share/vm/ci/ciSymbol.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/hotspot/src/share/vm/ci/compilerInterface.hpp b/hotspot/src/share/vm/ci/compilerInterface.hpp index b3a7d75fc08..66abdbdc513 100644 --- a/hotspot/src/share/vm/ci/compilerInterface.hpp +++ b/hotspot/src/share/vm/ci/compilerInterface.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/hotspot/src/share/vm/classfile/classFileError.cpp b/hotspot/src/share/vm/classfile/classFileError.cpp index f72ec11996d..a9c55fb73a5 100644 --- a/hotspot/src/share/vm/classfile/classFileError.cpp +++ b/hotspot/src/share/vm/classfile/classFileError.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/hotspot/src/share/vm/classfile/classFileStream.hpp b/hotspot/src/share/vm/classfile/classFileStream.hpp index 3c94a1edf1e..cf6f0e5f3bf 100644 --- a/hotspot/src/share/vm/classfile/classFileStream.hpp +++ b/hotspot/src/share/vm/classfile/classFileStream.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/classfile/classLoader.cpp b/hotspot/src/share/vm/classfile/classLoader.cpp index 3536352979c..88dd6166856 100644 --- a/hotspot/src/share/vm/classfile/classLoader.cpp +++ b/hotspot/src/share/vm/classfile/classLoader.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/classfile/classLoader.hpp b/hotspot/src/share/vm/classfile/classLoader.hpp index 95c36bd87f1..6f816837ae7 100644 --- a/hotspot/src/share/vm/classfile/classLoader.hpp +++ b/hotspot/src/share/vm/classfile/classLoader.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/classfile/dictionary.cpp b/hotspot/src/share/vm/classfile/dictionary.cpp index f3e8be25cfa..b15446c6f19 100644 --- a/hotspot/src/share/vm/classfile/dictionary.cpp +++ b/hotspot/src/share/vm/classfile/dictionary.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/src/share/vm/classfile/dictionary.hpp b/hotspot/src/share/vm/classfile/dictionary.hpp index 157ce15c0a6..98e01695001 100644 --- a/hotspot/src/share/vm/classfile/dictionary.hpp +++ b/hotspot/src/share/vm/classfile/dictionary.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/src/share/vm/classfile/javaAssertions.cpp b/hotspot/src/share/vm/classfile/javaAssertions.cpp index e56b617c53d..7884881dedc 100644 --- a/hotspot/src/share/vm/classfile/javaAssertions.cpp +++ b/hotspot/src/share/vm/classfile/javaAssertions.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/hotspot/src/share/vm/classfile/loaderConstraints.cpp b/hotspot/src/share/vm/classfile/loaderConstraints.cpp index 97ab80b3cae..5e25e4cbd02 100644 --- a/hotspot/src/share/vm/classfile/loaderConstraints.cpp +++ b/hotspot/src/share/vm/classfile/loaderConstraints.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/src/share/vm/classfile/loaderConstraints.hpp b/hotspot/src/share/vm/classfile/loaderConstraints.hpp index 1efec51d5d5..60612f5dba3 100644 --- a/hotspot/src/share/vm/classfile/loaderConstraints.hpp +++ b/hotspot/src/share/vm/classfile/loaderConstraints.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/src/share/vm/classfile/placeholders.cpp b/hotspot/src/share/vm/classfile/placeholders.cpp index 9099f28cb51..ef877b1033e 100644 --- a/hotspot/src/share/vm/classfile/placeholders.cpp +++ b/hotspot/src/share/vm/classfile/placeholders.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/src/share/vm/classfile/placeholders.hpp b/hotspot/src/share/vm/classfile/placeholders.hpp index 852bf769426..667c59b8c70 100644 --- a/hotspot/src/share/vm/classfile/placeholders.hpp +++ b/hotspot/src/share/vm/classfile/placeholders.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/src/share/vm/classfile/resolutionErrors.cpp b/hotspot/src/share/vm/classfile/resolutionErrors.cpp index c61c6689b39..ed31224e010 100644 --- a/hotspot/src/share/vm/classfile/resolutionErrors.cpp +++ b/hotspot/src/share/vm/classfile/resolutionErrors.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/hotspot/src/share/vm/classfile/resolutionErrors.hpp b/hotspot/src/share/vm/classfile/resolutionErrors.hpp index fed9c083ddf..03fcf4957bb 100644 --- a/hotspot/src/share/vm/classfile/resolutionErrors.hpp +++ b/hotspot/src/share/vm/classfile/resolutionErrors.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/hotspot/src/share/vm/classfile/stackMapFrame.cpp b/hotspot/src/share/vm/classfile/stackMapFrame.cpp index 38fe483fb96..19f903c662f 100644 --- a/hotspot/src/share/vm/classfile/stackMapFrame.cpp +++ b/hotspot/src/share/vm/classfile/stackMapFrame.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/src/share/vm/classfile/stackMapFrame.hpp b/hotspot/src/share/vm/classfile/stackMapFrame.hpp index a07df0ce56f..d99808bce10 100644 --- a/hotspot/src/share/vm/classfile/stackMapFrame.hpp +++ b/hotspot/src/share/vm/classfile/stackMapFrame.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/src/share/vm/classfile/stackMapTable.cpp b/hotspot/src/share/vm/classfile/stackMapTable.cpp index f6a0b427386..41de52d8b2d 100644 --- a/hotspot/src/share/vm/classfile/stackMapTable.cpp +++ b/hotspot/src/share/vm/classfile/stackMapTable.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/src/share/vm/classfile/stackMapTable.hpp b/hotspot/src/share/vm/classfile/stackMapTable.hpp index 2d2798a717a..08e9bd25465 100644 --- a/hotspot/src/share/vm/classfile/stackMapTable.hpp +++ b/hotspot/src/share/vm/classfile/stackMapTable.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/src/share/vm/classfile/verificationType.cpp b/hotspot/src/share/vm/classfile/verificationType.cpp index 0e994fcf4be..3e204f7940b 100644 --- a/hotspot/src/share/vm/classfile/verificationType.cpp +++ b/hotspot/src/share/vm/classfile/verificationType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/src/share/vm/classfile/verificationType.hpp b/hotspot/src/share/vm/classfile/verificationType.hpp index dcf8927f9ef..260d8cea509 100644 --- a/hotspot/src/share/vm/classfile/verificationType.hpp +++ b/hotspot/src/share/vm/classfile/verificationType.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/src/share/vm/classfile/verifier.hpp b/hotspot/src/share/vm/classfile/verifier.hpp index 97f51c9579f..66868587ea0 100644 --- a/hotspot/src/share/vm/classfile/verifier.hpp +++ b/hotspot/src/share/vm/classfile/verifier.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2011, 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 diff --git a/hotspot/src/share/vm/code/codeBlob.cpp b/hotspot/src/share/vm/code/codeBlob.cpp index b90ed8cbdda..dead37cc336 100644 --- a/hotspot/src/share/vm/code/codeBlob.cpp +++ b/hotspot/src/share/vm/code/codeBlob.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2011, 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 diff --git a/hotspot/src/share/vm/code/codeCache.hpp b/hotspot/src/share/vm/code/codeCache.hpp index 42ea1b68940..9107bbcc167 100644 --- a/hotspot/src/share/vm/code/codeCache.hpp +++ b/hotspot/src/share/vm/code/codeCache.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/code/compiledIC.cpp b/hotspot/src/share/vm/code/compiledIC.cpp index b374257061e..3496f70debc 100644 --- a/hotspot/src/share/vm/code/compiledIC.cpp +++ b/hotspot/src/share/vm/code/compiledIC.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/code/compiledIC.hpp b/hotspot/src/share/vm/code/compiledIC.hpp index 979dcd52300..fe1cfb30bf8 100644 --- a/hotspot/src/share/vm/code/compiledIC.hpp +++ b/hotspot/src/share/vm/code/compiledIC.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/code/dependencies.cpp b/hotspot/src/share/vm/code/dependencies.cpp index fb0d1cf42ee..c1529652053 100644 --- a/hotspot/src/share/vm/code/dependencies.cpp +++ b/hotspot/src/share/vm/code/dependencies.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/hotspot/src/share/vm/code/icBuffer.cpp b/hotspot/src/share/vm/code/icBuffer.cpp index 90dbf934a47..ed704575ede 100644 --- a/hotspot/src/share/vm/code/icBuffer.cpp +++ b/hotspot/src/share/vm/code/icBuffer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/code/relocInfo.cpp b/hotspot/src/share/vm/code/relocInfo.cpp index 0264f20607f..43a8eef0625 100644 --- a/hotspot/src/share/vm/code/relocInfo.cpp +++ b/hotspot/src/share/vm/code/relocInfo.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/code/relocInfo.hpp b/hotspot/src/share/vm/code/relocInfo.hpp index 7dc11fee084..9f5ad21d940 100644 --- a/hotspot/src/share/vm/code/relocInfo.hpp +++ b/hotspot/src/share/vm/code/relocInfo.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/code/vmreg.hpp b/hotspot/src/share/vm/code/vmreg.hpp index cd00dd42836..d57e6f89bb0 100644 --- a/hotspot/src/share/vm/code/vmreg.hpp +++ b/hotspot/src/share/vm/code/vmreg.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2011, 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 diff --git a/hotspot/src/share/vm/compiler/compileLog.hpp b/hotspot/src/share/vm/compiler/compileLog.hpp index ae7d01c724c..0c997cecc6c 100644 --- a/hotspot/src/share/vm/compiler/compileLog.hpp +++ b/hotspot/src/share/vm/compiler/compileLog.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 diff --git a/hotspot/src/share/vm/compiler/compilerOracle.cpp b/hotspot/src/share/vm/compiler/compilerOracle.cpp index 178a045dcfd..6ac45b41345 100644 --- a/hotspot/src/share/vm/compiler/compilerOracle.cpp +++ b/hotspot/src/share/vm/compiler/compilerOracle.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2011, 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 diff --git a/hotspot/src/share/vm/compiler/compilerOracle.hpp b/hotspot/src/share/vm/compiler/compilerOracle.hpp index 7e6b5cf09a6..7a32967b920 100644 --- a/hotspot/src/share/vm/compiler/compilerOracle.hpp +++ b/hotspot/src/share/vm/compiler/compilerOracle.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2011, 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 diff --git a/hotspot/src/share/vm/compiler/disassembler.cpp b/hotspot/src/share/vm/compiler/disassembler.cpp index 4b1ad9ab8bf..48813b6cb89 100644 --- a/hotspot/src/share/vm/compiler/disassembler.cpp +++ b/hotspot/src/share/vm/compiler/disassembler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/hotspot/src/share/vm/compiler/disassembler.hpp b/hotspot/src/share/vm/compiler/disassembler.hpp index 03b377065b7..376154075bb 100644 --- a/hotspot/src/share/vm/compiler/disassembler.hpp +++ b/hotspot/src/share/vm/compiler/disassembler.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp index 67cf3c70464..50e073d24aa 100644 --- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp +++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2011, 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 diff --git a/hotspot/src/share/vm/gc_implementation/g1/collectionSetChooser.cpp b/hotspot/src/share/vm/gc_implementation/g1/collectionSetChooser.cpp index 585ff2d3468..7e18ec6376c 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/collectionSetChooser.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/collectionSetChooser.cpp @@ -262,38 +262,17 @@ CollectionSetChooser::sortMarkedHeapRegions() { for (int i = 0; i < _numMarkedRegions; i++) { assert(_markedRegions.at(i) != NULL, "Should be true by sorting!"); _markedRegions.at(i)->set_sort_index(i); - if (G1PrintRegionLivenessInfo > 0) { - if (i == 0) gclog_or_tty->print_cr("Sorted marked regions:"); - if (i < G1PrintRegionLivenessInfo || - (_numMarkedRegions-i) < G1PrintRegionLivenessInfo) { - HeapRegion* hr = _markedRegions.at(i); - size_t u = hr->used(); - gclog_or_tty->print_cr(" Region %d: %d used, %d max live, %5.2f%%.", - i, u, hr->max_live_bytes(), - 100.0*(float)hr->max_live_bytes()/(float)u); - } + } + if (G1PrintRegionLivenessInfo) { + G1PrintRegionLivenessInfoClosure cl(gclog_or_tty, "Post-Sorting"); + for (int i = 0; i < _numMarkedRegions; ++i) { + HeapRegion* r = _markedRegions.at(i); + cl.doHeapRegion(r); } } - if (G1PolicyVerbose > 1) - printSortedHeapRegions(); assert(verify(), "should now be sorted"); } -void -printHeapRegion(HeapRegion *hr) { - if (hr->isHumongous()) - gclog_or_tty->print("H: "); - if (hr->in_collection_set()) - gclog_or_tty->print("CS: "); - gclog_or_tty->print_cr("Region " PTR_FORMAT " (%s%s) " - "[" PTR_FORMAT ", " PTR_FORMAT"] " - "Used: " SIZE_FORMAT "K, garbage: " SIZE_FORMAT "K.", - hr, hr->is_young() ? "Y " : " ", - hr->is_marked()? "M1" : "M0", - hr->bottom(), hr->end(), - hr->used()/K, hr->garbage_bytes()/K); -} - void CollectionSetChooser::addMarkedHeapRegion(HeapRegion* hr) { assert(!hr->isHumongous(), @@ -351,27 +330,9 @@ CollectionSetChooser::clearMarkedHeapRegions(){ void CollectionSetChooser::updateAfterFullCollection() { - G1CollectedHeap* g1h = G1CollectedHeap::heap(); clearMarkedHeapRegions(); } -void -CollectionSetChooser::printSortedHeapRegions() { - gclog_or_tty->print_cr("Printing %d Heap Regions sorted by amount of known garbage", - _numMarkedRegions); - - DEBUG_ONLY(int marked_count = 0;) - for (int i = 0; i < _markedRegions.length(); i++) { - HeapRegion* r = _markedRegions.at(i); - if (r != NULL) { - printHeapRegion(r); - DEBUG_ONLY(marked_count++;) - } - } - assert(marked_count == _numMarkedRegions, "must be"); - gclog_or_tty->print_cr("Done sorted heap region print"); -} - void CollectionSetChooser::removeRegion(HeapRegion *hr) { int si = hr->sort_index(); assert(si == -1 || hr->is_marked(), "Sort index not valid."); diff --git a/hotspot/src/share/vm/gc_implementation/g1/collectionSetChooser.hpp b/hotspot/src/share/vm/gc_implementation/g1/collectionSetChooser.hpp index 04ceba27921..c8e22339e35 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/collectionSetChooser.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/collectionSetChooser.hpp @@ -100,8 +100,6 @@ public: CollectionSetChooser(); - void printSortedHeapRegions(); - void sortMarkedHeapRegions(); void fillCache(); bool addRegionToCache(void); diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp index 09279048e90..a7b24607064 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp @@ -31,23 +31,31 @@ #include "gc_implementation/g1/heapRegionSeq.inline.hpp" #include "memory/space.inline.hpp" #include "runtime/atomic.hpp" +#include "runtime/java.hpp" #include "utilities/copy.hpp" // Possible sizes for the card counts cache: odd primes that roughly double in size. // (See jvmtiTagMap.cpp). -int ConcurrentG1Refine::_cc_cache_sizes[] = { - 16381, 32771, 76831, 150001, 307261, - 614563, 1228891, 2457733, 4915219, 9830479, - 19660831, 39321619, 78643219, 157286461, -1 + +#define MAX_SIZE ((size_t) -1) + +size_t ConcurrentG1Refine::_cc_cache_sizes[] = { + 16381, 32771, 76831, 150001, 307261, + 614563, 1228891, 2457733, 4915219, 9830479, + 19660831, 39321619, 78643219, 157286461, MAX_SIZE }; ConcurrentG1Refine::ConcurrentG1Refine() : _card_counts(NULL), _card_epochs(NULL), - _n_card_counts(0), _max_n_card_counts(0), + _n_card_counts(0), _max_cards(0), _max_n_card_counts(0), _cache_size_index(0), _expand_card_counts(false), _hot_cache(NULL), _def_use_cache(false), _use_cache(false), - _n_periods(0), + // We initialize the epochs of the array to 0. By initializing + // _n_periods to 1 and not 0 we automatically invalidate all the + // entries on the array. Otherwise we might accidentally think that + // we claimed a card that was in fact never set (see CR7033292). + _n_periods(1), _threads(NULL), _n_threads(0) { @@ -98,27 +106,44 @@ int ConcurrentG1Refine::thread_num() { void ConcurrentG1Refine::init() { if (G1ConcRSLogCacheSize > 0) { _g1h = G1CollectedHeap::heap(); - _max_n_card_counts = - (unsigned) (_g1h->max_capacity() >> CardTableModRefBS::card_shift); + + _max_cards = _g1h->max_capacity() >> CardTableModRefBS::card_shift; + _max_n_card_counts = _max_cards * G1MaxHotCardCountSizePercent / 100; size_t max_card_num = ((size_t)1 << (sizeof(unsigned)*BitsPerByte-1)) - 1; - guarantee(_max_n_card_counts < max_card_num, "card_num representation"); + guarantee(_max_cards < max_card_num, "card_num representation"); - int desired = _max_n_card_counts / InitialCacheFraction; - for (_cache_size_index = 0; - _cc_cache_sizes[_cache_size_index] >= 0; _cache_size_index++) { - if (_cc_cache_sizes[_cache_size_index] >= desired) break; + // We need _n_card_counts to be less than _max_n_card_counts here + // so that the expansion call (below) actually allocates the + // _counts and _epochs arrays. + assert(_n_card_counts == 0, "pre-condition"); + assert(_max_n_card_counts > 0, "pre-condition"); + + // Find the index into cache size array that is of a size that's + // large enough to hold desired_sz. + size_t desired_sz = _max_cards / InitialCacheFraction; + int desired_sz_index = 0; + while (_cc_cache_sizes[desired_sz_index] < desired_sz) { + desired_sz_index += 1; + assert(desired_sz_index < MAX_CC_CACHE_INDEX, "invariant"); } - _cache_size_index = MAX2(0, (_cache_size_index - 1)); + assert(desired_sz_index < MAX_CC_CACHE_INDEX, "invariant"); - int initial_size = _cc_cache_sizes[_cache_size_index]; - if (initial_size < 0) initial_size = _max_n_card_counts; + // If the desired_sz value is between two sizes then + // _cc_cache_sizes[desired_sz_index-1] < desired_sz <= _cc_cache_sizes[desired_sz_index] + // we will start with the lower size in the optimistic expectation that + // we will not need to expand up. Note desired_sz_index could also be 0. + if (desired_sz_index > 0 && + _cc_cache_sizes[desired_sz_index] > desired_sz) { + desired_sz_index -= 1; + } - // Make sure we don't go bigger than we will ever need - _n_card_counts = MIN2((unsigned) initial_size, _max_n_card_counts); - - _card_counts = NEW_C_HEAP_ARRAY(CardCountCacheEntry, _n_card_counts); - _card_epochs = NEW_C_HEAP_ARRAY(CardEpochCacheEntry, _n_card_counts); + if (!expand_card_count_cache(desired_sz_index)) { + // Allocation was unsuccessful - exit + vm_exit_during_initialization("Could not reserve enough space for card count cache"); + } + assert(_n_card_counts > 0, "post-condition"); + assert(_cache_size_index == desired_sz_index, "post-condition"); Copy::fill_to_bytes(&_card_counts[0], _n_card_counts * sizeof(CardCountCacheEntry)); @@ -163,10 +188,13 @@ void ConcurrentG1Refine::reinitialize_threads() { ConcurrentG1Refine::~ConcurrentG1Refine() { if (G1ConcRSLogCacheSize > 0) { + // Please see the comment in allocate_card_count_cache + // for why we call os::malloc() and os::free() directly. assert(_card_counts != NULL, "Logic"); - FREE_C_HEAP_ARRAY(CardCountCacheEntry, _card_counts); + os::free(_card_counts); assert(_card_epochs != NULL, "Logic"); - FREE_C_HEAP_ARRAY(CardEpochCacheEntry, _card_epochs); + os::free(_card_epochs); + assert(_hot_cache != NULL, "Logic"); FREE_C_HEAP_ARRAY(jbyte*, _hot_cache); } @@ -382,29 +410,93 @@ void ConcurrentG1Refine::clean_up_cache(int worker_i, } } -void ConcurrentG1Refine::expand_card_count_cache() { +// The arrays used to hold the card counts and the epochs must have +// a 1:1 correspondence. Hence they are allocated and freed together +// Returns true if the allocations of both the counts and epochs +// were successful; false otherwise. +bool ConcurrentG1Refine::allocate_card_count_cache(size_t n, + CardCountCacheEntry** counts, + CardEpochCacheEntry** epochs) { + // We call the allocation/free routines directly for the counts + // and epochs arrays. The NEW_C_HEAP_ARRAY/FREE_C_HEAP_ARRAY + // macros call AllocateHeap and FreeHeap respectively. + // AllocateHeap will call vm_exit_out_of_memory in the event + // of an allocation failure and abort the JVM. With the + // _counts/epochs arrays we only need to abort the JVM if the + // initial allocation of these arrays fails. + // + // Additionally AllocateHeap/FreeHeap do some tracing of + // allocate/free calls so calling one without calling the + // other can cause inconsistencies in the tracing. So we + // call neither. + + assert(*counts == NULL, "out param"); + assert(*epochs == NULL, "out param"); + + size_t counts_size = n * sizeof(CardCountCacheEntry); + size_t epochs_size = n * sizeof(CardEpochCacheEntry); + + *counts = (CardCountCacheEntry*) os::malloc(counts_size); + if (*counts == NULL) { + // allocation was unsuccessful + return false; + } + + *epochs = (CardEpochCacheEntry*) os::malloc(epochs_size); + if (*epochs == NULL) { + // allocation was unsuccessful - free counts array + assert(*counts != NULL, "must be"); + os::free(*counts); + *counts = NULL; + return false; + } + + // We successfully allocated both counts and epochs + return true; +} + +// Returns true if the card counts/epochs cache was +// successfully expanded; false otherwise. +bool ConcurrentG1Refine::expand_card_count_cache(int cache_size_idx) { + // Can we expand the card count and epoch tables? if (_n_card_counts < _max_n_card_counts) { - int new_idx = _cache_size_index+1; - int new_size = _cc_cache_sizes[new_idx]; - if (new_size < 0) new_size = _max_n_card_counts; + assert(cache_size_idx >= 0 && cache_size_idx < MAX_CC_CACHE_INDEX, "oob"); + size_t cache_size = _cc_cache_sizes[cache_size_idx]; // Make sure we don't go bigger than we will ever need - new_size = MIN2((unsigned) new_size, _max_n_card_counts); + cache_size = MIN2(cache_size, _max_n_card_counts); - // Expand the card count and card epoch tables - if (new_size > (int)_n_card_counts) { - // We can just free and allocate a new array as we're - // not interested in preserving the contents - assert(_card_counts != NULL, "Logic!"); - assert(_card_epochs != NULL, "Logic!"); - FREE_C_HEAP_ARRAY(CardCountCacheEntry, _card_counts); - FREE_C_HEAP_ARRAY(CardEpochCacheEntry, _card_epochs); - _n_card_counts = new_size; - _card_counts = NEW_C_HEAP_ARRAY(CardCountCacheEntry, _n_card_counts); - _card_epochs = NEW_C_HEAP_ARRAY(CardEpochCacheEntry, _n_card_counts); - _cache_size_index = new_idx; + // Should we expand the card count and card epoch tables? + if (cache_size > _n_card_counts) { + // We have been asked to allocate new, larger, arrays for + // the card counts and the epochs. Attempt the allocation + // of both before we free the existing arrays in case + // the allocation is unsuccessful... + CardCountCacheEntry* counts = NULL; + CardEpochCacheEntry* epochs = NULL; + + if (allocate_card_count_cache(cache_size, &counts, &epochs)) { + // Allocation was successful. + // We can just free the old arrays; we're + // not interested in preserving the contents + if (_card_counts != NULL) os::free(_card_counts); + if (_card_epochs != NULL) os::free(_card_epochs); + + // Cache the size of the arrays and the index that got us there. + _n_card_counts = cache_size; + _cache_size_index = cache_size_idx; + + _card_counts = counts; + _card_epochs = epochs; + + // We successfully allocated/expanded the caches. + return true; + } } } + + // We did not successfully expand the caches. + return false; } void ConcurrentG1Refine::clear_and_record_card_counts() { @@ -415,10 +507,16 @@ void ConcurrentG1Refine::clear_and_record_card_counts() { #endif if (_expand_card_counts) { - expand_card_count_cache(); + int new_idx = _cache_size_index + 1; + + if (expand_card_count_cache(new_idx)) { + // Allocation was successful and _n_card_counts has + // been updated to the new size. We only need to clear + // the epochs so we don't read a bogus epoch value + // when inserting a card into the hot card cache. + Copy::fill_to_bytes(&_card_epochs[0], _n_card_counts * sizeof(CardEpochCacheEntry)); + } _expand_card_counts = false; - // Only need to clear the epochs. - Copy::fill_to_bytes(&_card_epochs[0], _n_card_counts * sizeof(CardEpochCacheEntry)); } int this_epoch = (int) _n_periods; diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.hpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.hpp index 50ea5e9e6f6..68a9407a2f3 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2011, 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 @@ -94,7 +94,7 @@ class ConcurrentG1Refine: public CHeapObj { } CardEpochCacheEntry; julong make_epoch_entry(unsigned int card_num, unsigned int epoch) { - assert(0 <= card_num && card_num < _max_n_card_counts, "Bounds"); + assert(0 <= card_num && card_num < _max_cards, "Bounds"); assert(0 <= epoch && epoch <= _n_periods, "must be"); return ((julong) card_num << card_num_shift) | epoch; @@ -117,15 +117,24 @@ class ConcurrentG1Refine: public CHeapObj { CardEpochCacheEntry* _card_epochs; // The current number of buckets in the card count cache - unsigned _n_card_counts; + size_t _n_card_counts; - // The max number of buckets required for the number of - // cards for the entire reserved heap - unsigned _max_n_card_counts; + // The number of cards for the entire reserved heap + size_t _max_cards; + + // The max number of buckets for the card counts and epochs caches. + // This is the maximum that the counts and epochs will grow to. + // It is specified as a fraction or percentage of _max_cards using + // G1MaxHotCardCountSizePercent. + size_t _max_n_card_counts; // Possible sizes of the cache: odd primes that roughly double in size. // (See jvmtiTagMap.cpp). - static int _cc_cache_sizes[]; + enum { + MAX_CC_CACHE_INDEX = 15 // maximum index into the cache size array. + }; + + static size_t _cc_cache_sizes[MAX_CC_CACHE_INDEX]; // The index in _cc_cache_sizes corresponding to the size of // _card_counts. @@ -147,11 +156,22 @@ class ConcurrentG1Refine: public CHeapObj { CardTableModRefBS* _ct_bs; G1CollectedHeap* _g1h; - // Expands the array that holds the card counts to the next size up - void expand_card_count_cache(); + // Helper routine for expand_card_count_cache(). + // The arrays used to hold the card counts and the epochs must have + // a 1:1 correspondence. Hence they are allocated and freed together. + // Returns true if the allocations of both the counts and epochs + // were successful; false otherwise. + bool allocate_card_count_cache(size_t n, + CardCountCacheEntry** counts, + CardEpochCacheEntry** epochs); + + // Expands the arrays that hold the card counts and epochs + // to the cache size at index. Returns true if the expansion/ + // allocation was successful; false otherwise. + bool expand_card_count_cache(int index); // hash a given key (index of card_ptr) with the specified size - static unsigned int hash(size_t key, int size) { + static unsigned int hash(size_t key, size_t size) { return (unsigned int) key % size; } diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp index e453b91c35a..7cf1a9ddc39 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp @@ -1204,7 +1204,6 @@ void ConcurrentMark::checkpointRootsFinal(bool clear_all_soft_refs) { g1p->record_concurrent_mark_remark_end(); } - #define CARD_BM_TEST_MODE 0 class CalcLiveObjectsClosure: public HeapRegionClosure { @@ -1726,6 +1725,11 @@ void ConcurrentMark::cleanup() { } _total_counting_time += this_final_counting_time; + if (G1PrintRegionLivenessInfo) { + G1PrintRegionLivenessInfoClosure cl(gclog_or_tty, "Post-Marking"); + _g1h->heap_region_iterate(&cl); + } + // Install newly created mark bitMap as "prev". swapMarkBitMaps(); @@ -3199,8 +3203,12 @@ public: CMTask* task) : _g1h(g1h), _cm(cm), _task(task) { - _ref_processor = g1h->ref_processor(); - assert(_ref_processor != NULL, "should not be NULL"); + assert(_ref_processor == NULL, "should be initialized to NULL"); + + if (G1UseConcMarkReferenceProcessing) { + _ref_processor = g1h->ref_processor(); + assert(_ref_processor != NULL, "should not be NULL"); + } } }; @@ -4423,3 +4431,175 @@ CMTask::CMTask(int task_id, _marking_step_diffs_ms.add(0.5); } + +// These are formatting macros that are used below to ensure +// consistent formatting. The *_H_* versions are used to format the +// header for a particular value and they should be kept consistent +// with the corresponding macro. Also note that most of the macros add +// the necessary white space (as a prefix) which makes them a bit +// easier to compose. + +// All the output lines are prefixed with this string to be able to +// identify them easily in a large log file. +#define G1PPRL_LINE_PREFIX "###" + +#define G1PPRL_ADDR_BASE_FORMAT " "PTR_FORMAT"-"PTR_FORMAT +#ifdef _LP64 +#define G1PPRL_ADDR_BASE_H_FORMAT " %37s" +#else // _LP64 +#define G1PPRL_ADDR_BASE_H_FORMAT " %21s" +#endif // _LP64 + +// For per-region info +#define G1PPRL_TYPE_FORMAT " %-4s" +#define G1PPRL_TYPE_H_FORMAT " %4s" +#define G1PPRL_BYTE_FORMAT " "SIZE_FORMAT_W(9) +#define G1PPRL_BYTE_H_FORMAT " %9s" +#define G1PPRL_DOUBLE_FORMAT " %14.1f" +#define G1PPRL_DOUBLE_H_FORMAT " %14s" + +// For summary info +#define G1PPRL_SUM_ADDR_FORMAT(tag) " "tag":"G1PPRL_ADDR_BASE_FORMAT +#define G1PPRL_SUM_BYTE_FORMAT(tag) " "tag": "SIZE_FORMAT +#define G1PPRL_SUM_MB_FORMAT(tag) " "tag": %1.2f MB" +#define G1PPRL_SUM_MB_PERC_FORMAT(tag) G1PPRL_SUM_MB_FORMAT(tag)" / %1.2f %%" + +G1PrintRegionLivenessInfoClosure:: +G1PrintRegionLivenessInfoClosure(outputStream* out, const char* phase_name) + : _out(out), + _total_used_bytes(0), _total_capacity_bytes(0), + _total_prev_live_bytes(0), _total_next_live_bytes(0), + _hum_used_bytes(0), _hum_capacity_bytes(0), + _hum_prev_live_bytes(0), _hum_next_live_bytes(0) { + G1CollectedHeap* g1h = G1CollectedHeap::heap(); + MemRegion g1_committed = g1h->g1_committed(); + MemRegion g1_reserved = g1h->g1_reserved(); + double now = os::elapsedTime(); + + // Print the header of the output. + _out->cr(); + _out->print_cr(G1PPRL_LINE_PREFIX" PHASE %s @ %1.3f", phase_name, now); + _out->print_cr(G1PPRL_LINE_PREFIX" HEAP" + G1PPRL_SUM_ADDR_FORMAT("committed") + G1PPRL_SUM_ADDR_FORMAT("reserved") + G1PPRL_SUM_BYTE_FORMAT("region-size"), + g1_committed.start(), g1_committed.end(), + g1_reserved.start(), g1_reserved.end(), + HeapRegion::GrainBytes); + _out->print_cr(G1PPRL_LINE_PREFIX); + _out->print_cr(G1PPRL_LINE_PREFIX + G1PPRL_TYPE_H_FORMAT + G1PPRL_ADDR_BASE_H_FORMAT + G1PPRL_BYTE_H_FORMAT + G1PPRL_BYTE_H_FORMAT + G1PPRL_BYTE_H_FORMAT + G1PPRL_DOUBLE_H_FORMAT, + "type", "address-range", + "used", "prev-live", "next-live", "gc-eff"); +} + +// It takes as a parameter a reference to one of the _hum_* fields, it +// deduces the corresponding value for a region in a humongous region +// series (either the region size, or what's left if the _hum_* field +// is < the region size), and updates the _hum_* field accordingly. +size_t G1PrintRegionLivenessInfoClosure::get_hum_bytes(size_t* hum_bytes) { + size_t bytes = 0; + // The > 0 check is to deal with the prev and next live bytes which + // could be 0. + if (*hum_bytes > 0) { + bytes = MIN2((size_t) HeapRegion::GrainBytes, *hum_bytes); + *hum_bytes -= bytes; + } + return bytes; +} + +// It deduces the values for a region in a humongous region series +// from the _hum_* fields and updates those accordingly. It assumes +// that that _hum_* fields have already been set up from the "starts +// humongous" region and we visit the regions in address order. +void G1PrintRegionLivenessInfoClosure::get_hum_bytes(size_t* used_bytes, + size_t* capacity_bytes, + size_t* prev_live_bytes, + size_t* next_live_bytes) { + assert(_hum_used_bytes > 0 && _hum_capacity_bytes > 0, "pre-condition"); + *used_bytes = get_hum_bytes(&_hum_used_bytes); + *capacity_bytes = get_hum_bytes(&_hum_capacity_bytes); + *prev_live_bytes = get_hum_bytes(&_hum_prev_live_bytes); + *next_live_bytes = get_hum_bytes(&_hum_next_live_bytes); +} + +bool G1PrintRegionLivenessInfoClosure::doHeapRegion(HeapRegion* r) { + const char* type = ""; + HeapWord* bottom = r->bottom(); + HeapWord* end = r->end(); + size_t capacity_bytes = r->capacity(); + size_t used_bytes = r->used(); + size_t prev_live_bytes = r->live_bytes(); + size_t next_live_bytes = r->next_live_bytes(); + double gc_eff = r->gc_efficiency(); + if (r->used() == 0) { + type = "FREE"; + } else if (r->is_survivor()) { + type = "SURV"; + } else if (r->is_young()) { + type = "EDEN"; + } else if (r->startsHumongous()) { + type = "HUMS"; + + assert(_hum_used_bytes == 0 && _hum_capacity_bytes == 0 && + _hum_prev_live_bytes == 0 && _hum_next_live_bytes == 0, + "they should have been zeroed after the last time we used them"); + // Set up the _hum_* fields. + _hum_capacity_bytes = capacity_bytes; + _hum_used_bytes = used_bytes; + _hum_prev_live_bytes = prev_live_bytes; + _hum_next_live_bytes = next_live_bytes; + get_hum_bytes(&used_bytes, &capacity_bytes, + &prev_live_bytes, &next_live_bytes); + end = bottom + HeapRegion::GrainWords; + } else if (r->continuesHumongous()) { + type = "HUMC"; + get_hum_bytes(&used_bytes, &capacity_bytes, + &prev_live_bytes, &next_live_bytes); + assert(end == bottom + HeapRegion::GrainWords, "invariant"); + } else { + type = "OLD"; + } + + _total_used_bytes += used_bytes; + _total_capacity_bytes += capacity_bytes; + _total_prev_live_bytes += prev_live_bytes; + _total_next_live_bytes += next_live_bytes; + + // Print a line for this particular region. + _out->print_cr(G1PPRL_LINE_PREFIX + G1PPRL_TYPE_FORMAT + G1PPRL_ADDR_BASE_FORMAT + G1PPRL_BYTE_FORMAT + G1PPRL_BYTE_FORMAT + G1PPRL_BYTE_FORMAT + G1PPRL_DOUBLE_FORMAT, + type, bottom, end, + used_bytes, prev_live_bytes, next_live_bytes, gc_eff); + + return false; +} + +G1PrintRegionLivenessInfoClosure::~G1PrintRegionLivenessInfoClosure() { + // Print the footer of the output. + _out->print_cr(G1PPRL_LINE_PREFIX); + _out->print_cr(G1PPRL_LINE_PREFIX + " SUMMARY" + G1PPRL_SUM_MB_FORMAT("capacity") + G1PPRL_SUM_MB_PERC_FORMAT("used") + G1PPRL_SUM_MB_PERC_FORMAT("prev-live") + G1PPRL_SUM_MB_PERC_FORMAT("next-live"), + bytes_to_mb(_total_capacity_bytes), + bytes_to_mb(_total_used_bytes), + perc(_total_used_bytes, _total_capacity_bytes), + bytes_to_mb(_total_prev_live_bytes), + perc(_total_prev_live_bytes, _total_capacity_bytes), + bytes_to_mb(_total_next_live_bytes), + perc(_total_next_live_bytes, _total_capacity_bytes)); + _out->cr(); +} diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp index e256d4e1f83..b85969786ac 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp @@ -1149,4 +1149,54 @@ public: #endif // _MARKING_STATS_ }; +// Class that's used to to print out per-region liveness +// information. It's currently used at the end of marking and also +// after we sort the old regions at the end of the cleanup operation. +class G1PrintRegionLivenessInfoClosure: public HeapRegionClosure { +private: + outputStream* _out; + + // Accumulators for these values. + size_t _total_used_bytes; + size_t _total_capacity_bytes; + size_t _total_prev_live_bytes; + size_t _total_next_live_bytes; + + // These are set up when we come across a "stars humongous" region + // (as this is where most of this information is stored, not in the + // subsequent "continues humongous" regions). After that, for every + // region in a given humongous region series we deduce the right + // values for it by simply subtracting the appropriate amount from + // these fields. All these values should reach 0 after we've visited + // the last region in the series. + size_t _hum_used_bytes; + size_t _hum_capacity_bytes; + size_t _hum_prev_live_bytes; + size_t _hum_next_live_bytes; + + static double perc(size_t val, size_t total) { + if (total == 0) { + return 0.0; + } else { + return 100.0 * ((double) val / (double) total); + } + } + + static double bytes_to_mb(size_t val) { + return (double) val / (double) M; + } + + // See the .cpp file. + size_t get_hum_bytes(size_t* hum_bytes); + void get_hum_bytes(size_t* used_bytes, size_t* capacity_bytes, + size_t* prev_live_bytes, size_t* next_live_bytes); + +public: + // The header and footer are printed in the constructor and + // destructor respectively. + G1PrintRegionLivenessInfoClosure(outputStream* out, const char* phase_name); + virtual bool doHeapRegion(HeapRegion* r); + ~G1PrintRegionLivenessInfoClosure(); +}; + #endif // SHARE_VM_GC_IMPLEMENTATION_G1_CONCURRENTMARK_HPP diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1AllocRegion.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1AllocRegion.cpp new file mode 100644 index 00000000000..5d0d916c48d --- /dev/null +++ b/hotspot/src/share/vm/gc_implementation/g1/g1AllocRegion.cpp @@ -0,0 +1,208 @@ +/* + * Copyright (c) 2011, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#include "precompiled.hpp" +#include "gc_implementation/g1/g1AllocRegion.inline.hpp" +#include "gc_implementation/g1/g1CollectedHeap.inline.hpp" + +G1CollectedHeap* G1AllocRegion::_g1h = NULL; +HeapRegion* G1AllocRegion::_dummy_region = NULL; + +void G1AllocRegion::setup(G1CollectedHeap* g1h, HeapRegion* dummy_region) { + assert(_dummy_region == NULL, "should be set once"); + assert(dummy_region != NULL, "pre-condition"); + assert(dummy_region->free() == 0, "pre-condition"); + + // Make sure that any allocation attempt on this region will fail + // and will not trigger any asserts. + assert(allocate(dummy_region, 1, false) == NULL, "should fail"); + assert(par_allocate(dummy_region, 1, false) == NULL, "should fail"); + assert(allocate(dummy_region, 1, true) == NULL, "should fail"); + assert(par_allocate(dummy_region, 1, true) == NULL, "should fail"); + + _g1h = g1h; + _dummy_region = dummy_region; +} + +void G1AllocRegion::fill_up_remaining_space(HeapRegion* alloc_region, + bool bot_updates) { + assert(alloc_region != NULL && alloc_region != _dummy_region, + "pre-condition"); + + // Other threads might still be trying to allocate using a CAS out + // of the region we are trying to retire, as they can do so without + // holding the lock. So, we first have to make sure that noone else + // can allocate out of it by doing a maximal allocation. Even if our + // CAS attempt fails a few times, we'll succeed sooner or later + // given that failed CAS attempts mean that the region is getting + // closed to being full. + size_t free_word_size = alloc_region->free() / HeapWordSize; + + // This is the minimum free chunk we can turn into a dummy + // object. If the free space falls below this, then noone can + // allocate in this region anyway (all allocation requests will be + // of a size larger than this) so we won't have to perform the dummy + // allocation. + size_t min_word_size_to_fill = CollectedHeap::min_fill_size(); + + while (free_word_size >= min_word_size_to_fill) { + HeapWord* dummy = par_allocate(alloc_region, free_word_size, bot_updates); + if (dummy != NULL) { + // If the allocation was successful we should fill in the space. + CollectedHeap::fill_with_object(dummy, free_word_size); + alloc_region->set_pre_dummy_top(dummy); + break; + } + + free_word_size = alloc_region->free() / HeapWordSize; + // It's also possible that someone else beats us to the + // allocation and they fill up the region. In that case, we can + // just get out of the loop. + } + assert(alloc_region->free() / HeapWordSize < min_word_size_to_fill, + "post-condition"); +} + +void G1AllocRegion::retire(bool fill_up) { + assert(_alloc_region != NULL, ar_ext_msg(this, "not initialized properly")); + + trace("retiring"); + HeapRegion* alloc_region = _alloc_region; + if (alloc_region != _dummy_region) { + // We never have to check whether the active region is empty or not, + // and potentially free it if it is, given that it's guaranteed that + // it will never be empty. + assert(!alloc_region->is_empty(), + ar_ext_msg(this, "the alloc region should never be empty")); + + if (fill_up) { + fill_up_remaining_space(alloc_region, _bot_updates); + } + + assert(alloc_region->used() >= _used_bytes_before, + ar_ext_msg(this, "invariant")); + size_t allocated_bytes = alloc_region->used() - _used_bytes_before; + retire_region(alloc_region, allocated_bytes); + _used_bytes_before = 0; + _alloc_region = _dummy_region; + } + trace("retired"); +} + +HeapWord* G1AllocRegion::new_alloc_region_and_allocate(size_t word_size, + bool force) { + assert(_alloc_region == _dummy_region, ar_ext_msg(this, "pre-condition")); + assert(_used_bytes_before == 0, ar_ext_msg(this, "pre-condition")); + + trace("attempting region allocation"); + HeapRegion* new_alloc_region = allocate_new_region(word_size, force); + if (new_alloc_region != NULL) { + new_alloc_region->reset_pre_dummy_top(); + // Need to do this before the allocation + _used_bytes_before = new_alloc_region->used(); + HeapWord* result = allocate(new_alloc_region, word_size, _bot_updates); + assert(result != NULL, ar_ext_msg(this, "the allocation should succeeded")); + + OrderAccess::storestore(); + // Note that we first perform the allocation and then we store the + // region in _alloc_region. This is the reason why an active region + // can never be empty. + _alloc_region = new_alloc_region; + trace("region allocation successful"); + return result; + } else { + trace("region allocation failed"); + return NULL; + } + ShouldNotReachHere(); +} + +void G1AllocRegion::fill_in_ext_msg(ar_ext_msg* msg, const char* message) { + msg->append("[%s] %s b: %s r: "PTR_FORMAT" u: "SIZE_FORMAT, + _name, message, BOOL_TO_STR(_bot_updates), + _alloc_region, _used_bytes_before); +} + +void G1AllocRegion::init() { + trace("initializing"); + assert(_alloc_region == NULL && _used_bytes_before == 0, + ar_ext_msg(this, "pre-condition")); + assert(_dummy_region != NULL, "should have been set"); + _alloc_region = _dummy_region; + trace("initialized"); +} + +HeapRegion* G1AllocRegion::release() { + trace("releasing"); + HeapRegion* alloc_region = _alloc_region; + retire(false /* fill_up */); + assert(_alloc_region == _dummy_region, "post-condition of retire()"); + _alloc_region = NULL; + trace("released"); + return (alloc_region == _dummy_region) ? NULL : alloc_region; +} + +#if G1_ALLOC_REGION_TRACING +void G1AllocRegion::trace(const char* str, size_t word_size, HeapWord* result) { + // All the calls to trace that set either just the size or the size + // and the result are considered part of level 2 tracing and are + // skipped during level 1 tracing. + if ((word_size == 0 && result == NULL) || (G1_ALLOC_REGION_TRACING > 1)) { + const size_t buffer_length = 128; + char hr_buffer[buffer_length]; + char rest_buffer[buffer_length]; + + HeapRegion* alloc_region = _alloc_region; + if (alloc_region == NULL) { + jio_snprintf(hr_buffer, buffer_length, "NULL"); + } else if (alloc_region == _dummy_region) { + jio_snprintf(hr_buffer, buffer_length, "DUMMY"); + } else { + jio_snprintf(hr_buffer, buffer_length, + HR_FORMAT, HR_FORMAT_PARAMS(alloc_region)); + } + + if (G1_ALLOC_REGION_TRACING > 1) { + if (result != NULL) { + jio_snprintf(rest_buffer, buffer_length, SIZE_FORMAT" "PTR_FORMAT, + word_size, result); + } else if (word_size != 0) { + jio_snprintf(rest_buffer, buffer_length, SIZE_FORMAT, word_size); + } else { + jio_snprintf(rest_buffer, buffer_length, ""); + } + } else { + jio_snprintf(rest_buffer, buffer_length, ""); + } + + tty->print_cr("[%s] %s : %s %s", _name, hr_buffer, str, rest_buffer); + } +} +#endif // G1_ALLOC_REGION_TRACING + +G1AllocRegion::G1AllocRegion(const char* name, + bool bot_updates) + : _name(name), _bot_updates(bot_updates), + _alloc_region(NULL), _used_bytes_before(0) { } + diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1AllocRegion.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1AllocRegion.hpp new file mode 100644 index 00000000000..d329d1ed543 --- /dev/null +++ b/hotspot/src/share/vm/gc_implementation/g1/g1AllocRegion.hpp @@ -0,0 +1,174 @@ +/* + * Copyright (c) 2011, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef SHARE_VM_GC_IMPLEMENTATION_G1_G1ALLOCREGION_HPP +#define SHARE_VM_GC_IMPLEMENTATION_G1_G1ALLOCREGION_HPP + +#include "gc_implementation/g1/heapRegion.hpp" + +class G1CollectedHeap; + +// 0 -> no tracing, 1 -> basic tracing, 2 -> basic + allocation tracing +#define G1_ALLOC_REGION_TRACING 0 + +class ar_ext_msg; + +// A class that holds a region that is active in satisfying allocation +// requests, potentially issued in parallel. When the active region is +// full it will be retired it replaced with a new one. The +// implementation assumes that fast-path allocations will be lock-free +// and a lock will need to be taken when the active region needs to be +// replaced. + +class G1AllocRegion VALUE_OBJ_CLASS_SPEC { + friend class ar_ext_msg; + +private: + // The active allocating region we are currently allocating out + // of. The invariant is that if this object is initialized (i.e., + // init() has been called and release() has not) then _alloc_region + // is either an active allocating region or the dummy region (i.e., + // it can never be NULL) and this object can be used to satisfy + // allocation requests. If this object is not initialized + // (i.e. init() has not been called or release() has been called) + // then _alloc_region is NULL and this object should not be used to + // satisfy allocation requests (it was done this way to force the + // correct use of init() and release()). + HeapRegion* _alloc_region; + + // When we set up a new active region we save its used bytes in this + // field so that, when we retire it, we can calculate how much space + // we allocated in it. + size_t _used_bytes_before; + + // Specifies whether the allocate calls will do BOT updates or not. + bool _bot_updates; + + // Useful for debugging and tracing. + const char* _name; + + // A dummy region (i.e., it's been allocated specially for this + // purpose and it is not part of the heap) that is full (i.e., top() + // == end()). When we don't have a valid active region we make + // _alloc_region point to this. This allows us to skip checking + // whether the _alloc_region is NULL or not. + static HeapRegion* _dummy_region; + + // Some of the methods below take a bot_updates parameter. Its value + // should be the same as the _bot_updates field. The idea is that + // the parameter will be a constant for a particular alloc region + // and, given that these methods will be hopefully inlined, the + // compiler should compile out the test. + + // Perform a non-MT-safe allocation out of the given region. + static inline HeapWord* allocate(HeapRegion* alloc_region, + size_t word_size, + bool bot_updates); + + // Perform a MT-safe allocation out of the given region. + static inline HeapWord* par_allocate(HeapRegion* alloc_region, + size_t word_size, + bool bot_updates); + + // Ensure that the region passed as a parameter has been filled up + // so that noone else can allocate out of it any more. + static void fill_up_remaining_space(HeapRegion* alloc_region, + bool bot_updates); + + // Retire the active allocating region. If fill_up is true then make + // sure that the region is full before we retire it so that noone + // else can allocate out of it. + void retire(bool fill_up); + + // Allocate a new active region and use it to perform a word_size + // allocation. The force parameter will be passed on to + // G1CollectedHeap::allocate_new_alloc_region() and tells it to try + // to allocate a new region even if the max has been reached. + HeapWord* new_alloc_region_and_allocate(size_t word_size, bool force); + + void fill_in_ext_msg(ar_ext_msg* msg, const char* message); + +protected: + // For convenience as subclasses use it. + static G1CollectedHeap* _g1h; + + virtual HeapRegion* allocate_new_region(size_t word_size, bool force) = 0; + virtual void retire_region(HeapRegion* alloc_region, + size_t allocated_bytes) = 0; + + G1AllocRegion(const char* name, bool bot_updates); + +public: + static void setup(G1CollectedHeap* g1h, HeapRegion* dummy_region); + + HeapRegion* get() const { + // Make sure that the dummy region does not escape this class. + return (_alloc_region == _dummy_region) ? NULL : _alloc_region; + } + + // The following two are the building blocks for the allocation method. + + // First-level allocation: Should be called without holding a + // lock. It will try to allocate lock-free out of the active region, + // or return NULL if it was unable to. + inline HeapWord* attempt_allocation(size_t word_size, bool bot_updates); + + // Second-level allocation: Should be called while holding a + // lock. It will try to first allocate lock-free out of the active + // region or, if it's unable to, it will try to replace the active + // alloc region with a new one. We require that the caller takes the + // appropriate lock before calling this so that it is easier to make + // it conform to its locking protocol. + inline HeapWord* attempt_allocation_locked(size_t word_size, + bool bot_updates); + + // Should be called to allocate a new region even if the max of this + // type of regions has been reached. Should only be called if other + // allocation attempts have failed and we are not holding a valid + // active region. + inline HeapWord* attempt_allocation_force(size_t word_size, + bool bot_updates); + + // Should be called before we start using this object. + void init(); + + // Should be called when we want to release the active region which + // is returned after it's been retired. + HeapRegion* release(); + +#if G1_ALLOC_REGION_TRACING + void trace(const char* str, size_t word_size = 0, HeapWord* result = NULL); +#else // G1_ALLOC_REGION_TRACING + void trace(const char* str, size_t word_size = 0, HeapWord* result = NULL) { } +#endif // G1_ALLOC_REGION_TRACING +}; + +class ar_ext_msg : public err_msg { +public: + ar_ext_msg(G1AllocRegion* alloc_region, const char *message) : err_msg("") { + alloc_region->fill_in_ext_msg(this, message); + } +}; + +#endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1ALLOCREGION_HPP diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1AllocRegion.inline.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1AllocRegion.inline.hpp new file mode 100644 index 00000000000..c096de3837a --- /dev/null +++ b/hotspot/src/share/vm/gc_implementation/g1/g1AllocRegion.inline.hpp @@ -0,0 +1,106 @@ +/* + * Copyright (c) 2011, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef SHARE_VM_GC_IMPLEMENTATION_G1_G1ALLOCREGION_INLINE_HPP +#define SHARE_VM_GC_IMPLEMENTATION_G1_G1ALLOCREGION_INLINE_HPP + +#include "gc_implementation/g1/g1AllocRegion.hpp" + +inline HeapWord* G1AllocRegion::allocate(HeapRegion* alloc_region, + size_t word_size, + bool bot_updates) { + assert(alloc_region != NULL, err_msg("pre-condition")); + + if (!bot_updates) { + return alloc_region->allocate_no_bot_updates(word_size); + } else { + return alloc_region->allocate(word_size); + } +} + +inline HeapWord* G1AllocRegion::par_allocate(HeapRegion* alloc_region, + size_t word_size, + bool bot_updates) { + assert(alloc_region != NULL, err_msg("pre-condition")); + assert(!alloc_region->is_empty(), err_msg("pre-condition")); + + if (!bot_updates) { + return alloc_region->par_allocate_no_bot_updates(word_size); + } else { + return alloc_region->par_allocate(word_size); + } +} + +inline HeapWord* G1AllocRegion::attempt_allocation(size_t word_size, + bool bot_updates) { + assert(bot_updates == _bot_updates, ar_ext_msg(this, "pre-condition")); + + HeapRegion* alloc_region = _alloc_region; + assert(alloc_region != NULL, ar_ext_msg(this, "not initialized properly")); + + HeapWord* result = par_allocate(alloc_region, word_size, bot_updates); + if (result != NULL) { + trace("alloc", word_size, result); + return result; + } + trace("alloc failed", word_size); + return NULL; +} + +inline HeapWord* G1AllocRegion::attempt_allocation_locked(size_t word_size, + bool bot_updates) { + // First we have to tedo the allocation, assuming we're holding the + // appropriate lock, in case another thread changed the region while + // we were waiting to get the lock. + HeapWord* result = attempt_allocation(word_size, bot_updates); + if (result != NULL) { + return result; + } + + retire(true /* fill_up */); + result = new_alloc_region_and_allocate(word_size, false /* force */); + if (result != NULL) { + trace("alloc locked (second attempt)", word_size, result); + return result; + } + trace("alloc locked failed", word_size); + return NULL; +} + +inline HeapWord* G1AllocRegion::attempt_allocation_force(size_t word_size, + bool bot_updates) { + assert(bot_updates == _bot_updates, ar_ext_msg(this, "pre-condition")); + assert(_alloc_region != NULL, ar_ext_msg(this, "not initialized properly")); + + trace("forcing alloc"); + HeapWord* result = new_alloc_region_and_allocate(word_size, true /* force */); + if (result != NULL) { + trace("alloc forced", word_size, result); + return result; + } + trace("alloc forced failed", word_size); + return NULL; +} + +#endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1ALLOCREGION_INLINE_HPP diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp index f82eec43b6c..1c2b116a5ba 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @@ -28,6 +28,7 @@ #include "gc_implementation/g1/concurrentG1Refine.hpp" #include "gc_implementation/g1/concurrentG1RefineThread.hpp" #include "gc_implementation/g1/concurrentMarkThread.inline.hpp" +#include "gc_implementation/g1/g1AllocRegion.inline.hpp" #include "gc_implementation/g1/g1CollectedHeap.inline.hpp" #include "gc_implementation/g1/g1CollectorPolicy.hpp" #include "gc_implementation/g1/g1MarkSweep.hpp" @@ -517,8 +518,7 @@ G1CollectedHeap::new_region_try_secondary_free_list() { return NULL; } -HeapRegion* G1CollectedHeap::new_region_work(size_t word_size, - bool do_expand) { +HeapRegion* G1CollectedHeap::new_region(size_t word_size, bool do_expand) { assert(!isHumongous(word_size) || word_size <= (size_t) HeapRegion::GrainWords, "the only time we use this to allocate a humongous region is " @@ -566,7 +566,7 @@ HeapRegion* G1CollectedHeap::new_gc_alloc_region(int purpose, size_t word_size) { HeapRegion* alloc_region = NULL; if (_gc_alloc_region_counts[purpose] < g1_policy()->max_regions(purpose)) { - alloc_region = new_region_work(word_size, true /* do_expand */); + alloc_region = new_region(word_size, true /* do_expand */); if (purpose == GCAllocForSurvived && alloc_region != NULL) { alloc_region->set_survivor(); } @@ -587,7 +587,7 @@ int G1CollectedHeap::humongous_obj_allocate_find_first(size_t num_regions, // Only one region to allocate, no need to go through the slower // path. The caller will attempt the expasion if this fails, so // let's not try to expand here too. - HeapRegion* hr = new_region_work(word_size, false /* do_expand */); + HeapRegion* hr = new_region(word_size, false /* do_expand */); if (hr != NULL) { first = hr->hrs_index(); } else { @@ -788,407 +788,12 @@ HeapWord* G1CollectedHeap::humongous_obj_allocate(size_t word_size) { return result; } -void -G1CollectedHeap::retire_cur_alloc_region(HeapRegion* cur_alloc_region) { - // Other threads might still be trying to allocate using CASes out - // of the region we are retiring, as they can do so without holding - // the Heap_lock. So we first have to make sure that noone else can - // allocate in it by doing a maximal allocation. Even if our CAS - // attempt fails a few times, we'll succeed sooner or later given - // that a failed CAS attempt mean that the region is getting closed - // to being full (someone else succeeded in allocating into it). - size_t free_word_size = cur_alloc_region->free() / HeapWordSize; - - // This is the minimum free chunk we can turn into a dummy - // object. If the free space falls below this, then noone can - // allocate in this region anyway (all allocation requests will be - // of a size larger than this) so we won't have to perform the dummy - // allocation. - size_t min_word_size_to_fill = CollectedHeap::min_fill_size(); - - while (free_word_size >= min_word_size_to_fill) { - HeapWord* dummy = - cur_alloc_region->par_allocate_no_bot_updates(free_word_size); - if (dummy != NULL) { - // If the allocation was successful we should fill in the space. - CollectedHeap::fill_with_object(dummy, free_word_size); - break; - } - - free_word_size = cur_alloc_region->free() / HeapWordSize; - // It's also possible that someone else beats us to the - // allocation and they fill up the region. In that case, we can - // just get out of the loop - } - assert(cur_alloc_region->free() / HeapWordSize < min_word_size_to_fill, - "sanity"); - - retire_cur_alloc_region_common(cur_alloc_region); - assert(_cur_alloc_region == NULL, "post-condition"); -} - -// See the comment in the .hpp file about the locking protocol and -// assumptions of this method (and other related ones). -HeapWord* -G1CollectedHeap::replace_cur_alloc_region_and_allocate(size_t word_size, - bool at_safepoint, - bool do_dirtying, - bool can_expand) { - assert_heap_locked_or_at_safepoint(true /* should_be_vm_thread */); - assert(_cur_alloc_region == NULL, - "replace_cur_alloc_region_and_allocate() should only be called " - "after retiring the previous current alloc region"); - assert(SafepointSynchronize::is_at_safepoint() == at_safepoint, - "at_safepoint and is_at_safepoint() should be a tautology"); - assert(!can_expand || g1_policy()->can_expand_young_list(), - "we should not call this method with can_expand == true if " - "we are not allowed to expand the young gen"); - - if (can_expand || !g1_policy()->is_young_list_full()) { - HeapRegion* new_cur_alloc_region = new_alloc_region(word_size); - if (new_cur_alloc_region != NULL) { - assert(new_cur_alloc_region->is_empty(), - "the newly-allocated region should be empty, " - "as right now we only allocate new regions out of the free list"); - g1_policy()->update_region_num(true /* next_is_young */); - set_region_short_lived_locked(new_cur_alloc_region); - - assert(!new_cur_alloc_region->isHumongous(), - "Catch a regression of this bug."); - - // We need to ensure that the stores to _cur_alloc_region and, - // subsequently, to top do not float above the setting of the - // young type. - OrderAccess::storestore(); - - // Now, perform the allocation out of the region we just - // allocated. Note that noone else can access that region at - // this point (as _cur_alloc_region has not been updated yet), - // so we can just go ahead and do the allocation without any - // atomics (and we expect this allocation attempt to - // suceeded). Given that other threads can attempt an allocation - // with a CAS and without needing the Heap_lock, if we assigned - // the new region to _cur_alloc_region before first allocating - // into it other threads might have filled up the new region - // before we got a chance to do the allocation ourselves. In - // that case, we would have needed to retire the region, grab a - // new one, and go through all this again. Allocating out of the - // new region before assigning it to _cur_alloc_region avoids - // all this. - HeapWord* result = - new_cur_alloc_region->allocate_no_bot_updates(word_size); - assert(result != NULL, "we just allocate out of an empty region " - "so allocation should have been successful"); - assert(is_in(result), "result should be in the heap"); - - // Now make sure that the store to _cur_alloc_region does not - // float above the store to top. - OrderAccess::storestore(); - _cur_alloc_region = new_cur_alloc_region; - - if (!at_safepoint) { - Heap_lock->unlock(); - } - - // do the dirtying, if necessary, after we release the Heap_lock - if (do_dirtying) { - dirty_young_block(result, word_size); - } - return result; - } - } - - assert(_cur_alloc_region == NULL, "we failed to allocate a new current " - "alloc region, it should still be NULL"); - assert_heap_locked_or_at_safepoint(true /* should_be_vm_thread */); - return NULL; -} - -// See the comment in the .hpp file about the locking protocol and -// assumptions of this method (and other related ones). -HeapWord* -G1CollectedHeap::attempt_allocation_slow(size_t word_size) { - assert_heap_locked_and_not_at_safepoint(); - assert(!isHumongous(word_size), "attempt_allocation_slow() should not be " - "used for humongous allocations"); - - // We should only reach here when we were unable to allocate - // otherwise. So, we should have not active current alloc region. - assert(_cur_alloc_region == NULL, "current alloc region should be NULL"); - - // We will loop while succeeded is false, which means that we tried - // to do a collection, but the VM op did not succeed. So, when we - // exit the loop, either one of the allocation attempts was - // successful, or we succeeded in doing the VM op but which was - // unable to allocate after the collection. - for (int try_count = 1; /* we'll return or break */; try_count += 1) { - bool succeeded = true; - - // Every time we go round the loop we should be holding the Heap_lock. - assert_heap_locked(); - - if (GC_locker::is_active_and_needs_gc()) { - // We are locked out of GC because of the GC locker. We can - // allocate a new region only if we can expand the young gen. - - if (g1_policy()->can_expand_young_list()) { - // Yes, we are allowed to expand the young gen. Let's try to - // allocate a new current alloc region. - HeapWord* result = - replace_cur_alloc_region_and_allocate(word_size, - false, /* at_safepoint */ - true, /* do_dirtying */ - true /* can_expand */); - if (result != NULL) { - assert_heap_not_locked(); - return result; - } - } - // We could not expand the young gen further (or we could but we - // failed to allocate a new region). We'll stall until the GC - // locker forces a GC. - - // If this thread is not in a jni critical section, we stall - // the requestor until the critical section has cleared and - // GC allowed. When the critical section clears, a GC is - // initiated by the last thread exiting the critical section; so - // we retry the allocation sequence from the beginning of the loop, - // rather than causing more, now probably unnecessary, GC attempts. - JavaThread* jthr = JavaThread::current(); - assert(jthr != NULL, "sanity"); - if (jthr->in_critical()) { - if (CheckJNICalls) { - fatal("Possible deadlock due to allocating while" - " in jni critical section"); - } - // We are returning NULL so the protocol is that we're still - // holding the Heap_lock. - assert_heap_locked(); - return NULL; - } - - Heap_lock->unlock(); - GC_locker::stall_until_clear(); - - // No need to relock the Heap_lock. We'll fall off to the code - // below the else-statement which assumes that we are not - // holding the Heap_lock. - } else { - // We are not locked out. So, let's try to do a GC. The VM op - // will retry the allocation before it completes. - - // Read the GC count while holding the Heap_lock - unsigned int gc_count_before = SharedHeap::heap()->total_collections(); - - Heap_lock->unlock(); - - HeapWord* result = - do_collection_pause(word_size, gc_count_before, &succeeded); - assert_heap_not_locked(); - if (result != NULL) { - assert(succeeded, "the VM op should have succeeded"); - - // Allocations that take place on VM operations do not do any - // card dirtying and we have to do it here. - dirty_young_block(result, word_size); - return result; - } - } - - // Both paths that get us here from above unlock the Heap_lock. - assert_heap_not_locked(); - - // We can reach here when we were unsuccessful in doing a GC, - // because another thread beat us to it, or because we were locked - // out of GC due to the GC locker. In either case a new alloc - // region might be available so we will retry the allocation. - HeapWord* result = attempt_allocation(word_size); - if (result != NULL) { - assert_heap_not_locked(); - return result; - } - - // So far our attempts to allocate failed. The only time we'll go - // around the loop and try again is if we tried to do a GC and the - // VM op that we tried to schedule was not successful because - // another thread beat us to it. If that happened it's possible - // that by the time we grabbed the Heap_lock again and tried to - // allocate other threads filled up the young generation, which - // means that the allocation attempt after the GC also failed. So, - // it's worth trying to schedule another GC pause. - if (succeeded) { - break; - } - - // Give a warning if we seem to be looping forever. - if ((QueuedAllocationWarningCount > 0) && - (try_count % QueuedAllocationWarningCount == 0)) { - warning("G1CollectedHeap::attempt_allocation_slow() " - "retries %d times", try_count); - } - } - - assert_heap_locked(); - return NULL; -} - -// See the comment in the .hpp file about the locking protocol and -// assumptions of this method (and other related ones). -HeapWord* -G1CollectedHeap::attempt_allocation_humongous(size_t word_size, - bool at_safepoint) { - // This is the method that will allocate a humongous object. All - // allocation paths that attempt to allocate a humongous object - // should eventually reach here. Currently, the only paths are from - // mem_allocate() and attempt_allocation_at_safepoint(). - assert_heap_locked_or_at_safepoint(true /* should_be_vm_thread */); - assert(isHumongous(word_size), "attempt_allocation_humongous() " - "should only be used for humongous allocations"); - assert(SafepointSynchronize::is_at_safepoint() == at_safepoint, - "at_safepoint and is_at_safepoint() should be a tautology"); - - HeapWord* result = NULL; - - // We will loop while succeeded is false, which means that we tried - // to do a collection, but the VM op did not succeed. So, when we - // exit the loop, either one of the allocation attempts was - // successful, or we succeeded in doing the VM op but which was - // unable to allocate after the collection. - for (int try_count = 1; /* we'll return or break */; try_count += 1) { - bool succeeded = true; - - // Given that humongous objects are not allocated in young - // regions, we'll first try to do the allocation without doing a - // collection hoping that there's enough space in the heap. - result = humongous_obj_allocate(word_size); - assert(_cur_alloc_region == NULL || !_cur_alloc_region->isHumongous(), - "catch a regression of this bug."); - if (result != NULL) { - if (!at_safepoint) { - // If we're not at a safepoint, unlock the Heap_lock. - Heap_lock->unlock(); - } - return result; - } - - // If we failed to allocate the humongous object, we should try to - // do a collection pause (if we're allowed) in case it reclaims - // enough space for the allocation to succeed after the pause. - if (!at_safepoint) { - // Read the GC count while holding the Heap_lock - unsigned int gc_count_before = SharedHeap::heap()->total_collections(); - - // If we're allowed to do a collection we're not at a - // safepoint, so it is safe to unlock the Heap_lock. - Heap_lock->unlock(); - - result = do_collection_pause(word_size, gc_count_before, &succeeded); - assert_heap_not_locked(); - if (result != NULL) { - assert(succeeded, "the VM op should have succeeded"); - return result; - } - - // If we get here, the VM operation either did not succeed - // (i.e., another thread beat us to it) or it succeeded but - // failed to allocate the object. - - // If we're allowed to do a collection we're not at a - // safepoint, so it is safe to lock the Heap_lock. - Heap_lock->lock(); - } - - assert(result == NULL, "otherwise we should have exited the loop earlier"); - - // So far our attempts to allocate failed. The only time we'll go - // around the loop and try again is if we tried to do a GC and the - // VM op that we tried to schedule was not successful because - // another thread beat us to it. That way it's possible that some - // space was freed up by the thread that successfully scheduled a - // GC. So it's worth trying to allocate again. - if (succeeded) { - break; - } - - // Give a warning if we seem to be looping forever. - if ((QueuedAllocationWarningCount > 0) && - (try_count % QueuedAllocationWarningCount == 0)) { - warning("G1CollectedHeap::attempt_allocation_humongous " - "retries %d times", try_count); - } - } - - assert_heap_locked_or_at_safepoint(true /* should_be_vm_thread */); - return NULL; -} - -HeapWord* G1CollectedHeap::attempt_allocation_at_safepoint(size_t word_size, - bool expect_null_cur_alloc_region) { - assert_at_safepoint(true /* should_be_vm_thread */); - assert(_cur_alloc_region == NULL || !expect_null_cur_alloc_region, - err_msg("the current alloc region was unexpectedly found " - "to be non-NULL, cur alloc region: "PTR_FORMAT" " - "expect_null_cur_alloc_region: %d word_size: "SIZE_FORMAT, - _cur_alloc_region, expect_null_cur_alloc_region, word_size)); - - if (!isHumongous(word_size)) { - if (!expect_null_cur_alloc_region) { - HeapRegion* cur_alloc_region = _cur_alloc_region; - if (cur_alloc_region != NULL) { - // We are at a safepoint so no reason to use the MT-safe version. - HeapWord* result = cur_alloc_region->allocate_no_bot_updates(word_size); - if (result != NULL) { - assert(is_in(result), "result should be in the heap"); - - // We will not do any dirtying here. This is guaranteed to be - // called during a safepoint and the thread that scheduled the - // pause will do the dirtying if we return a non-NULL result. - return result; - } - - retire_cur_alloc_region_common(cur_alloc_region); - } - } - - assert(_cur_alloc_region == NULL, - "at this point we should have no cur alloc region"); - return replace_cur_alloc_region_and_allocate(word_size, - true, /* at_safepoint */ - false /* do_dirtying */, - false /* can_expand */); - } else { - return attempt_allocation_humongous(word_size, - true /* at_safepoint */); - } - - ShouldNotReachHere(); -} - HeapWord* G1CollectedHeap::allocate_new_tlab(size_t word_size) { assert_heap_not_locked_and_not_at_safepoint(); - assert(!isHumongous(word_size), "we do not allow TLABs of humongous size"); + assert(!isHumongous(word_size), "we do not allow humongous TLABs"); - // First attempt: Try allocating out of the current alloc region - // using a CAS. If that fails, take the Heap_lock and retry the - // allocation, potentially replacing the current alloc region. - HeapWord* result = attempt_allocation(word_size); - if (result != NULL) { - assert_heap_not_locked(); - return result; - } - - // Second attempt: Go to the slower path where we might try to - // schedule a collection. - result = attempt_allocation_slow(word_size); - if (result != NULL) { - assert_heap_not_locked(); - return result; - } - - assert_heap_locked(); - // Need to unlock the Heap_lock before returning. - Heap_lock->unlock(); - return NULL; + unsigned int dummy_gc_count_before; + return attempt_allocation(word_size, &dummy_gc_count_before); } HeapWord* @@ -1200,48 +805,18 @@ G1CollectedHeap::mem_allocate(size_t word_size, assert(!is_tlab, "mem_allocate() this should not be called directly " "to allocate TLABs"); - // Loop until the allocation is satisified, - // or unsatisfied after GC. + // Loop until the allocation is satisified, or unsatisfied after GC. for (int try_count = 1; /* we'll return */; try_count += 1) { unsigned int gc_count_before; - { - if (!isHumongous(word_size)) { - // First attempt: Try allocating out of the current alloc region - // using a CAS. If that fails, take the Heap_lock and retry the - // allocation, potentially replacing the current alloc region. - HeapWord* result = attempt_allocation(word_size); - if (result != NULL) { - assert_heap_not_locked(); - return result; - } - assert_heap_locked(); - - // Second attempt: Go to the slower path where we might try to - // schedule a collection. - result = attempt_allocation_slow(word_size); - if (result != NULL) { - assert_heap_not_locked(); - return result; - } - } else { - // attempt_allocation_humongous() requires the Heap_lock to be held. - Heap_lock->lock(); - - HeapWord* result = attempt_allocation_humongous(word_size, - false /* at_safepoint */); - if (result != NULL) { - assert_heap_not_locked(); - return result; - } - } - - assert_heap_locked(); - // Read the gc count while the heap lock is held. - gc_count_before = SharedHeap::heap()->total_collections(); - - // Release the Heap_lock before attempting the collection. - Heap_lock->unlock(); + HeapWord* result = NULL; + if (!isHumongous(word_size)) { + result = attempt_allocation(word_size, &gc_count_before); + } else { + result = attempt_allocation_humongous(word_size, &gc_count_before); + } + if (result != NULL) { + return result; } // Create the garbage collection operation... @@ -1249,7 +824,6 @@ G1CollectedHeap::mem_allocate(size_t word_size, // ...and get the VM thread to execute it. VMThread::execute(&op); - assert_heap_not_locked(); if (op.prologue_succeeded() && op.pause_succeeded()) { // If the operation was successful we'll return the result even // if it is NULL. If the allocation attempt failed immediately @@ -1275,21 +849,207 @@ G1CollectedHeap::mem_allocate(size_t word_size, } ShouldNotReachHere(); + return NULL; } -void G1CollectedHeap::abandon_cur_alloc_region() { - assert_at_safepoint(true /* should_be_vm_thread */); +HeapWord* G1CollectedHeap::attempt_allocation_slow(size_t word_size, + unsigned int *gc_count_before_ret) { + // Make sure you read the note in attempt_allocation_humongous(). - HeapRegion* cur_alloc_region = _cur_alloc_region; - if (cur_alloc_region != NULL) { - assert(!cur_alloc_region->is_empty(), - "the current alloc region can never be empty"); - assert(cur_alloc_region->is_young(), - "the current alloc region should be young"); + assert_heap_not_locked_and_not_at_safepoint(); + assert(!isHumongous(word_size), "attempt_allocation_slow() should not " + "be called for humongous allocation requests"); - retire_cur_alloc_region_common(cur_alloc_region); + // We should only get here after the first-level allocation attempt + // (attempt_allocation()) failed to allocate. + + // We will loop until a) we manage to successfully perform the + // allocation or b) we successfully schedule a collection which + // fails to perform the allocation. b) is the only case when we'll + // return NULL. + HeapWord* result = NULL; + for (int try_count = 1; /* we'll return */; try_count += 1) { + bool should_try_gc; + unsigned int gc_count_before; + + { + MutexLockerEx x(Heap_lock); + + result = _mutator_alloc_region.attempt_allocation_locked(word_size, + false /* bot_updates */); + if (result != NULL) { + return result; + } + + // If we reach here, attempt_allocation_locked() above failed to + // allocate a new region. So the mutator alloc region should be NULL. + assert(_mutator_alloc_region.get() == NULL, "only way to get here"); + + if (GC_locker::is_active_and_needs_gc()) { + if (g1_policy()->can_expand_young_list()) { + result = _mutator_alloc_region.attempt_allocation_force(word_size, + false /* bot_updates */); + if (result != NULL) { + return result; + } + } + should_try_gc = false; + } else { + // Read the GC count while still holding the Heap_lock. + gc_count_before = SharedHeap::heap()->total_collections(); + should_try_gc = true; + } + } + + if (should_try_gc) { + bool succeeded; + result = do_collection_pause(word_size, gc_count_before, &succeeded); + if (result != NULL) { + assert(succeeded, "only way to get back a non-NULL result"); + return result; + } + + if (succeeded) { + // If we get here we successfully scheduled a collection which + // failed to allocate. No point in trying to allocate + // further. We'll just return NULL. + MutexLockerEx x(Heap_lock); + *gc_count_before_ret = SharedHeap::heap()->total_collections(); + return NULL; + } + } else { + GC_locker::stall_until_clear(); + } + + // We can reach here if we were unsuccessul in scheduling a + // collection (because another thread beat us to it) or if we were + // stalled due to the GC locker. In either can we should retry the + // allocation attempt in case another thread successfully + // performed a collection and reclaimed enough space. We do the + // first attempt (without holding the Heap_lock) here and the + // follow-on attempt will be at the start of the next loop + // iteration (after taking the Heap_lock). + result = _mutator_alloc_region.attempt_allocation(word_size, + false /* bot_updates */); + if (result != NULL ){ + return result; + } + + // Give a warning if we seem to be looping forever. + if ((QueuedAllocationWarningCount > 0) && + (try_count % QueuedAllocationWarningCount == 0)) { + warning("G1CollectedHeap::attempt_allocation_slow() " + "retries %d times", try_count); + } } - assert(_cur_alloc_region == NULL, "post-condition"); + + ShouldNotReachHere(); + return NULL; +} + +HeapWord* G1CollectedHeap::attempt_allocation_humongous(size_t word_size, + unsigned int * gc_count_before_ret) { + // The structure of this method has a lot of similarities to + // attempt_allocation_slow(). The reason these two were not merged + // into a single one is that such a method would require several "if + // allocation is not humongous do this, otherwise do that" + // conditional paths which would obscure its flow. In fact, an early + // version of this code did use a unified method which was harder to + // follow and, as a result, it had subtle bugs that were hard to + // track down. So keeping these two methods separate allows each to + // be more readable. It will be good to keep these two in sync as + // much as possible. + + assert_heap_not_locked_and_not_at_safepoint(); + assert(isHumongous(word_size), "attempt_allocation_humongous() " + "should only be called for humongous allocations"); + + // We will loop until a) we manage to successfully perform the + // allocation or b) we successfully schedule a collection which + // fails to perform the allocation. b) is the only case when we'll + // return NULL. + HeapWord* result = NULL; + for (int try_count = 1; /* we'll return */; try_count += 1) { + bool should_try_gc; + unsigned int gc_count_before; + + { + MutexLockerEx x(Heap_lock); + + // Given that humongous objects are not allocated in young + // regions, we'll first try to do the allocation without doing a + // collection hoping that there's enough space in the heap. + result = humongous_obj_allocate(word_size); + if (result != NULL) { + return result; + } + + if (GC_locker::is_active_and_needs_gc()) { + should_try_gc = false; + } else { + // Read the GC count while still holding the Heap_lock. + gc_count_before = SharedHeap::heap()->total_collections(); + should_try_gc = true; + } + } + + if (should_try_gc) { + // If we failed to allocate the humongous object, we should try to + // do a collection pause (if we're allowed) in case it reclaims + // enough space for the allocation to succeed after the pause. + + bool succeeded; + result = do_collection_pause(word_size, gc_count_before, &succeeded); + if (result != NULL) { + assert(succeeded, "only way to get back a non-NULL result"); + return result; + } + + if (succeeded) { + // If we get here we successfully scheduled a collection which + // failed to allocate. No point in trying to allocate + // further. We'll just return NULL. + MutexLockerEx x(Heap_lock); + *gc_count_before_ret = SharedHeap::heap()->total_collections(); + return NULL; + } + } else { + GC_locker::stall_until_clear(); + } + + // We can reach here if we were unsuccessul in scheduling a + // collection (because another thread beat us to it) or if we were + // stalled due to the GC locker. In either can we should retry the + // allocation attempt in case another thread successfully + // performed a collection and reclaimed enough space. Give a + // warning if we seem to be looping forever. + + if ((QueuedAllocationWarningCount > 0) && + (try_count % QueuedAllocationWarningCount == 0)) { + warning("G1CollectedHeap::attempt_allocation_humongous() " + "retries %d times", try_count); + } + } + + ShouldNotReachHere(); + return NULL; +} + +HeapWord* G1CollectedHeap::attempt_allocation_at_safepoint(size_t word_size, + bool expect_null_mutator_alloc_region) { + assert_at_safepoint(true /* should_be_vm_thread */); + assert(_mutator_alloc_region.get() == NULL || + !expect_null_mutator_alloc_region, + "the current alloc region was unexpectedly found to be non-NULL"); + + if (!isHumongous(word_size)) { + return _mutator_alloc_region.attempt_allocation_locked(word_size, + false /* bot_updates */); + } else { + return humongous_obj_allocate(word_size); + } + + ShouldNotReachHere(); } void G1CollectedHeap::abandon_gc_alloc_regions() { @@ -1417,8 +1177,8 @@ bool G1CollectedHeap::do_collection(bool explicit_gc, if (VerifyBeforeGC && total_collections() >= VerifyGCStartAt) { HandleMark hm; // Discard invalid handles created during verification - prepare_for_verify(); gclog_or_tty->print(" VerifyBeforeGC:"); + prepare_for_verify(); Universe::verify(true); } @@ -1439,9 +1199,8 @@ bool G1CollectedHeap::do_collection(bool explicit_gc, concurrent_mark()->abort(); // Make sure we'll choose a new allocation region afterwards. - abandon_cur_alloc_region(); + release_mutator_alloc_region(); abandon_gc_alloc_regions(); - assert(_cur_alloc_region == NULL, "Invariant."); g1_rem_set()->cleanupHRRS(); tear_down_region_lists(); @@ -1547,6 +1306,8 @@ bool G1CollectedHeap::do_collection(bool explicit_gc, // evacuation pause. clear_cset_fast_test(); + init_mutator_alloc_region(); + double end = os::elapsedTime(); g1_policy()->record_full_collection_end(); @@ -1720,8 +1481,9 @@ G1CollectedHeap::satisfy_failed_allocation(size_t word_size, *succeeded = true; // Let's attempt the allocation first. - HeapWord* result = attempt_allocation_at_safepoint(word_size, - false /* expect_null_cur_alloc_region */); + HeapWord* result = + attempt_allocation_at_safepoint(word_size, + false /* expect_null_mutator_alloc_region */); if (result != NULL) { assert(*succeeded, "sanity"); return result; @@ -1748,7 +1510,7 @@ G1CollectedHeap::satisfy_failed_allocation(size_t word_size, // Retry the allocation result = attempt_allocation_at_safepoint(word_size, - true /* expect_null_cur_alloc_region */); + true /* expect_null_mutator_alloc_region */); if (result != NULL) { assert(*succeeded, "sanity"); return result; @@ -1765,7 +1527,7 @@ G1CollectedHeap::satisfy_failed_allocation(size_t word_size, // Retry the allocation once more result = attempt_allocation_at_safepoint(word_size, - true /* expect_null_cur_alloc_region */); + true /* expect_null_mutator_alloc_region */); if (result != NULL) { assert(*succeeded, "sanity"); return result; @@ -1796,7 +1558,7 @@ HeapWord* G1CollectedHeap::expand_and_allocate(size_t word_size) { if (expand(expand_bytes)) { verify_region_sets_optional(); return attempt_allocation_at_safepoint(word_size, - false /* expect_null_cur_alloc_region */); + false /* expect_null_mutator_alloc_region */); } return NULL; } @@ -1940,7 +1702,6 @@ G1CollectedHeap::G1CollectedHeap(G1CollectorPolicy* policy_) : _evac_failure_scan_stack(NULL) , _mark_in_progress(false), _cg1r(NULL), _summary_bytes_used(0), - _cur_alloc_region(NULL), _refine_cte_cl(NULL), _full_collection(false), _free_list("Master Free List"), @@ -2099,7 +1860,6 @@ jint G1CollectedHeap::initialize() { _g1_max_committed = _g1_committed; _hrs = new HeapRegionSeq(_expansion_regions); guarantee(_hrs != NULL, "Couldn't allocate HeapRegionSeq"); - guarantee(_cur_alloc_region == NULL, "from constructor"); // 6843694 - ensure that the maximum region index can fit // in the remembered set structures. @@ -2195,6 +1955,22 @@ jint G1CollectedHeap::initialize() { // Do later initialization work for concurrent refinement. _cg1r->init(); + // Here we allocate the dummy full region that is required by the + // G1AllocRegion class. If we don't pass an address in the reserved + // space here, lots of asserts fire. + MemRegion mr(_g1_reserved.start(), HeapRegion::GrainWords); + HeapRegion* dummy_region = new HeapRegion(_bot_shared, mr, true); + // We'll re-use the same region whether the alloc region will + // require BOT updates or not and, if it doesn't, then a non-young + // region will complain that it cannot support allocations without + // BOT updates. So we'll tag the dummy region as young to avoid that. + dummy_region->set_young(); + // Make sure it's full. + dummy_region->set_top(dummy_region->end()); + G1AllocRegion::setup(this, dummy_region); + + init_mutator_alloc_region(); + return JNI_OK; } @@ -2261,7 +2037,7 @@ size_t G1CollectedHeap::used() const { "Should be owned on this thread's behalf."); size_t result = _summary_bytes_used; // Read only once in case it is set to NULL concurrently - HeapRegion* hr = _cur_alloc_region; + HeapRegion* hr = _mutator_alloc_region.get(); if (hr != NULL) result += hr->used(); return result; @@ -2324,13 +2100,11 @@ size_t G1CollectedHeap::unsafe_max_alloc() { // to free(), resulting in a SIGSEGV. Note that this doesn't appear // to be a problem in the optimized build, since the two loads of the // current allocation region field are optimized away. - HeapRegion* car = _cur_alloc_region; - - // FIXME: should iterate over all regions? - if (car == NULL) { + HeapRegion* hr = _mutator_alloc_region.get(); + if (hr == NULL) { return 0; } - return car->free(); + return hr->free(); } bool G1CollectedHeap::should_do_concurrent_full_gc(GCCause::Cause cause) { @@ -2781,16 +2555,12 @@ size_t G1CollectedHeap::unsafe_max_tlab_alloc(Thread* ignored) const { // since we can't allow tlabs to grow big enough to accomodate // humongous objects. - // We need to store the cur alloc region locally, since it might change - // between when we test for NULL and when we use it later. - ContiguousSpace* cur_alloc_space = _cur_alloc_region; + HeapRegion* hr = _mutator_alloc_region.get(); size_t max_tlab_size = _humongous_object_threshold_in_words * wordSize; - - if (cur_alloc_space == NULL) { + if (hr == NULL) { return max_tlab_size; } else { - return MIN2(MAX2(cur_alloc_space->free(), (size_t)MinTLABSize), - max_tlab_size); + return MIN2(MAX2(hr->free(), (size_t) MinTLABSize), max_tlab_size); } } @@ -3364,6 +3134,7 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) { } verify_region_sets_optional(); + verify_dirty_young_regions(); { // This call will decide whether this pause is an initial-mark @@ -3425,8 +3196,8 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) { if (VerifyBeforeGC && total_collections() >= VerifyGCStartAt) { HandleMark hm; // Discard invalid handles created during verification - prepare_for_verify(); gclog_or_tty->print(" VerifyBeforeGC:"); + prepare_for_verify(); Universe::verify(false); } @@ -3442,7 +3213,7 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) { // Forget the current alloc region (we might even choose it to be part // of the collection set!). - abandon_cur_alloc_region(); + release_mutator_alloc_region(); // The elapsed time induced by the start time below deliberately elides // the possible verification above. @@ -3573,6 +3344,8 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) { g1_policy()->print_collection_set(g1_policy()->inc_cset_head(), gclog_or_tty); #endif // YOUNG_LIST_VERBOSE + init_mutator_alloc_region(); + double end_time_sec = os::elapsedTime(); double pause_time_ms = (end_time_sec - start_time_sec) * MILLIUNITS; g1_policy()->record_pause_time_ms(pause_time_ms); @@ -3655,6 +3428,15 @@ size_t G1CollectedHeap::desired_plab_sz(GCAllocPurpose purpose) return gclab_word_size; } +void G1CollectedHeap::init_mutator_alloc_region() { + assert(_mutator_alloc_region.get() == NULL, "pre-condition"); + _mutator_alloc_region.init(); +} + +void G1CollectedHeap::release_mutator_alloc_region() { + _mutator_alloc_region.release(); + assert(_mutator_alloc_region.get() == NULL, "post-condition"); +} void G1CollectedHeap::set_gc_alloc_region(int purpose, HeapRegion* r) { assert(purpose >= 0 && purpose < GCAllocPurposeCount, "invalid purpose"); @@ -3879,7 +3661,7 @@ void G1CollectedHeap::release_gc_alloc_regions(bool totally) { if (r->is_empty()) { // We didn't actually allocate anything in it; let's just put // it back on the free list. - _free_list.add_as_tail(r); + _free_list.add_as_head(r); } else if (_retain_gc_alloc_region[ap] && !totally) { // retain it so that we can use it at the beginning of the next GC _retained_gc_alloc_regions[ap] = r; @@ -5013,7 +4795,7 @@ void G1CollectedHeap::free_region(HeapRegion* hr, *pre_used += hr->used(); hr->hr_clear(par, true /* clear_space */); - free_list->add_as_tail(hr); + free_list->add_as_head(hr); } void G1CollectedHeap::free_humongous_region(HeapRegion* hr, @@ -5065,7 +4847,7 @@ void G1CollectedHeap::update_sets_after_freeing_regions(size_t pre_used, } if (free_list != NULL && !free_list->is_empty()) { MutexLockerEx x(FreeList_lock, Mutex::_no_safepoint_check_flag); - _free_list.add_as_tail(free_list); + _free_list.add_as_head(free_list); } if (humongous_proxy_set != NULL && !humongous_proxy_set->is_empty()) { MutexLockerEx x(OldSets_lock, Mutex::_no_safepoint_check_flag); @@ -5140,10 +4922,8 @@ class G1VerifyCardTableCleanup: public HeapRegionClosure { CardTableModRefBS* _ct_bs; public: G1VerifyCardTableCleanup(CardTableModRefBS* ct_bs) - : _ct_bs(ct_bs) - { } - virtual bool doHeapRegion(HeapRegion* r) - { + : _ct_bs(ct_bs) { } + virtual bool doHeapRegion(HeapRegion* r) { MemRegion mr(r->bottom(), r->end()); if (r->is_survivor()) { _ct_bs->verify_dirty_region(mr); @@ -5153,6 +4933,29 @@ public: return false; } }; + +void G1CollectedHeap::verify_dirty_young_list(HeapRegion* head) { + CardTableModRefBS* ct_bs = (CardTableModRefBS*) (barrier_set()); + for (HeapRegion* hr = head; hr != NULL; hr = hr->get_next_young_region()) { + // We cannot guarantee that [bottom(),end()] is dirty. Threads + // dirty allocated blocks as they allocate them. The thread that + // retires each region and replaces it with a new one will do a + // maximal allocation to fill in [pre_dummy_top(),end()] but will + // not dirty that area (one less thing to have to do while holding + // a lock). So we can only verify that [bottom(),pre_dummy_top()] + // is dirty. Also note that verify_dirty_region() requires + // mr.start() and mr.end() to be card aligned and pre_dummy_top() + // is not guaranteed to be. + MemRegion mr(hr->bottom(), + ct_bs->align_to_card_boundary(hr->pre_dummy_top())); + ct_bs->verify_dirty_region(mr); + } +} + +void G1CollectedHeap::verify_dirty_young_regions() { + verify_dirty_young_list(_young_list->first_region()); + verify_dirty_young_list(_young_list->first_survivor_region()); +} #endif void G1CollectedHeap::cleanUpCardTable() { @@ -5500,6 +5303,44 @@ bool G1CollectedHeap::is_in_closed_subset(const void* p) const { } } +HeapRegion* G1CollectedHeap::new_mutator_alloc_region(size_t word_size, + bool force) { + assert_heap_locked_or_at_safepoint(true /* should_be_vm_thread */); + assert(!force || g1_policy()->can_expand_young_list(), + "if force is true we should be able to expand the young list"); + if (force || !g1_policy()->is_young_list_full()) { + HeapRegion* new_alloc_region = new_region(word_size, + false /* do_expand */); + if (new_alloc_region != NULL) { + g1_policy()->update_region_num(true /* next_is_young */); + set_region_short_lived_locked(new_alloc_region); + return new_alloc_region; + } + } + return NULL; +} + +void G1CollectedHeap::retire_mutator_alloc_region(HeapRegion* alloc_region, + size_t allocated_bytes) { + assert_heap_locked_or_at_safepoint(true /* should_be_vm_thread */); + assert(alloc_region->is_young(), "all mutator alloc regions should be young"); + + g1_policy()->add_region_to_incremental_cset_lhs(alloc_region); + _summary_bytes_used += allocated_bytes; +} + +HeapRegion* MutatorAllocRegion::allocate_new_region(size_t word_size, + bool force) { + return _g1h->new_mutator_alloc_region(word_size, force); +} + +void MutatorAllocRegion::retire_region(HeapRegion* alloc_region, + size_t allocated_bytes) { + _g1h->retire_mutator_alloc_region(alloc_region, allocated_bytes); +} + +// Heap region set verification + class VerifyRegionListsClosure : public HeapRegionClosure { private: HumongousRegionSet* _humongous_set; diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp index 5863e7c9860..a9412774486 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp @@ -26,6 +26,7 @@ #define SHARE_VM_GC_IMPLEMENTATION_G1_G1COLLECTEDHEAP_HPP #include "gc_implementation/g1/concurrentMark.hpp" +#include "gc_implementation/g1/g1AllocRegion.hpp" #include "gc_implementation/g1/g1RemSet.hpp" #include "gc_implementation/g1/heapRegionSets.hpp" #include "gc_implementation/parNew/parGCAllocBuffer.hpp" @@ -128,6 +129,15 @@ public: void print(); }; +class MutatorAllocRegion : public G1AllocRegion { +protected: + virtual HeapRegion* allocate_new_region(size_t word_size, bool force); + virtual void retire_region(HeapRegion* alloc_region, size_t allocated_bytes); +public: + MutatorAllocRegion() + : G1AllocRegion("Mutator Alloc Region", false /* bot_updates */) { } +}; + class RefineCardTableEntryClosure; class G1CollectedHeap : public SharedHeap { friend class VM_G1CollectForAllocation; @@ -135,6 +145,7 @@ class G1CollectedHeap : public SharedHeap { friend class VM_G1CollectFull; friend class VM_G1IncCollectionPause; friend class VMStructs; + friend class MutatorAllocRegion; // Closures used in implementation. friend class G1ParCopyHelper; @@ -197,12 +208,15 @@ private: // The sequence of all heap regions in the heap. HeapRegionSeq* _hrs; - // The region from which normal-sized objects are currently being - // allocated. May be NULL. - HeapRegion* _cur_alloc_region; + // Alloc region used to satisfy mutator allocation requests. + MutatorAllocRegion _mutator_alloc_region; + + // It resets the mutator alloc region before new allocations can take place. + void init_mutator_alloc_region(); + + // It releases the mutator alloc region. + void release_mutator_alloc_region(); - // Postcondition: cur_alloc_region == NULL. - void abandon_cur_alloc_region(); void abandon_gc_alloc_regions(); // The to-space memory regions into which objects are being copied during @@ -360,27 +374,21 @@ protected: G1CollectorPolicy* _g1_policy; // This is the second level of trying to allocate a new region. If - // new_region_work didn't find a region in the free_list, this call - // will check whether there's anything available in the - // secondary_free_list and/or wait for more regions to appear in that - // list, if _free_regions_coming is set. + // new_region() didn't find a region on the free_list, this call will + // check whether there's anything available on the + // secondary_free_list and/or wait for more regions to appear on + // that list, if _free_regions_coming is set. HeapRegion* new_region_try_secondary_free_list(); // Try to allocate a single non-humongous HeapRegion sufficient for // an allocation of the given word_size. If do_expand is true, // attempt to expand the heap if necessary to satisfy the allocation // request. - HeapRegion* new_region_work(size_t word_size, bool do_expand); + HeapRegion* new_region(size_t word_size, bool do_expand); - // Try to allocate a new region to be used for allocation by a - // mutator thread. Attempt to expand the heap if no region is + // Try to allocate a new region to be used for allocation by + // a GC thread. It will try to expand the heap if no region is // available. - HeapRegion* new_alloc_region(size_t word_size) { - return new_region_work(word_size, false /* do_expand */); - } - - // Try to allocate a new region to be used for allocation by a GC - // thread. Attempt to expand the heap if no region is available. HeapRegion* new_gc_alloc_region(int purpose, size_t word_size); // Attempt to satisfy a humongous allocation request of the given @@ -415,10 +423,6 @@ protected: // * All non-TLAB allocation requests should go to mem_allocate() // and mem_allocate() should never be called with is_tlab == true. // - // * If the GC locker is active we currently stall until we can - // allocate a new young region. This will be changed in the - // near future (see CR 6994056). - // // * If either call cannot satisfy the allocation request using the // current allocating region, they will try to get a new one. If // this fails, they will attempt to do an evacuation pause and @@ -441,122 +445,38 @@ protected: bool is_tlab, /* expected to be false */ bool* gc_overhead_limit_was_exceeded); - // The following methods, allocate_from_cur_allocation_region(), - // attempt_allocation(), attempt_allocation_locked(), - // replace_cur_alloc_region_and_allocate(), - // attempt_allocation_slow(), and attempt_allocation_humongous() - // have very awkward pre- and post-conditions with respect to - // locking: - // - // If they are called outside a safepoint they assume the caller - // holds the Heap_lock when it calls them. However, on exit they - // will release the Heap_lock if they return a non-NULL result, but - // keep holding the Heap_lock if they return a NULL result. The - // reason for this is that we need to dirty the cards that span - // allocated blocks on young regions to avoid having to take the - // slow path of the write barrier (for performance reasons we don't - // update RSets for references whose source is a young region, so we - // don't need to look at dirty cards on young regions). But, doing - // this card dirtying while holding the Heap_lock can be a - // scalability bottleneck, especially given that some allocation - // requests might be of non-trivial size (and the larger the region - // size is, the fewer allocations requests will be considered - // humongous, as the humongous size limit is a fraction of the - // region size). So, when one of these calls succeeds in allocating - // a block it does the card dirtying after it releases the Heap_lock - // which is why it will return without holding it. - // - // The above assymetry is the reason why locking / unlocking is done - // explicitly (i.e., with Heap_lock->lock() and - // Heap_lock->unlocked()) instead of using MutexLocker and - // MutexUnlocker objects. The latter would ensure that the lock is - // unlocked / re-locked at every possible exit out of the basic - // block. However, we only want that action to happen in selected - // places. - // - // Further, if the above methods are called during a safepoint, then - // naturally there's no assumption about the Heap_lock being held or - // there's no attempt to unlock it. The parameter at_safepoint - // indicates whether the call is made during a safepoint or not (as - // an optimization, to avoid reading the global flag with - // SafepointSynchronize::is_at_safepoint()). - // - // The methods share these parameters: - // - // * word_size : the size of the allocation request in words - // * at_safepoint : whether the call is done at a safepoint; this - // also determines whether a GC is permitted - // (at_safepoint == false) or not (at_safepoint == true) - // * do_dirtying : whether the method should dirty the allocated - // block before returning - // - // They all return either the address of the block, if they - // successfully manage to allocate it, or NULL. + // The following three methods take a gc_count_before_ret + // parameter which is used to return the GC count if the method + // returns NULL. Given that we are required to read the GC count + // while holding the Heap_lock, and these paths will take the + // Heap_lock at some point, it's easier to get them to read the GC + // count while holding the Heap_lock before they return NULL instead + // of the caller (namely: mem_allocate()) having to also take the + // Heap_lock just to read the GC count. - // It tries to satisfy an allocation request out of the current - // alloc region, which is passed as a parameter. It assumes that the - // caller has checked that the current alloc region is not NULL. - // Given that the caller has to check the current alloc region for - // at least NULL, it might as well pass it as the first parameter so - // that the method doesn't have to read it from the - // _cur_alloc_region field again. It is called from both - // attempt_allocation() and attempt_allocation_locked() and the - // with_heap_lock parameter indicates whether the caller was holding - // the heap lock when it called it or not. - inline HeapWord* allocate_from_cur_alloc_region(HeapRegion* cur_alloc_region, - size_t word_size, - bool with_heap_lock); + // First-level mutator allocation attempt: try to allocate out of + // the mutator alloc region without taking the Heap_lock. This + // should only be used for non-humongous allocations. + inline HeapWord* attempt_allocation(size_t word_size, + unsigned int* gc_count_before_ret); - // First-level of allocation slow path: it attempts to allocate out - // of the current alloc region in a lock-free manner using a CAS. If - // that fails it takes the Heap_lock and calls - // attempt_allocation_locked() for the second-level slow path. - inline HeapWord* attempt_allocation(size_t word_size); + // Second-level mutator allocation attempt: take the Heap_lock and + // retry the allocation attempt, potentially scheduling a GC + // pause. This should only be used for non-humongous allocations. + HeapWord* attempt_allocation_slow(size_t word_size, + unsigned int* gc_count_before_ret); - // Second-level of allocation slow path: while holding the Heap_lock - // it tries to allocate out of the current alloc region and, if that - // fails, tries to allocate out of a new current alloc region. - inline HeapWord* attempt_allocation_locked(size_t word_size); - - // It assumes that the current alloc region has been retired and - // tries to allocate a new one. If it's successful, it performs the - // allocation out of the new current alloc region and updates - // _cur_alloc_region. Normally, it would try to allocate a new - // region if the young gen is not full, unless can_expand is true in - // which case it would always try to allocate a new region. - HeapWord* replace_cur_alloc_region_and_allocate(size_t word_size, - bool at_safepoint, - bool do_dirtying, - bool can_expand); - - // Third-level of allocation slow path: when we are unable to - // allocate a new current alloc region to satisfy an allocation - // request (i.e., when attempt_allocation_locked() fails). It will - // try to do an evacuation pause, which might stall due to the GC - // locker, and retry the allocation attempt when appropriate. - HeapWord* attempt_allocation_slow(size_t word_size); - - // The method that tries to satisfy a humongous allocation - // request. If it cannot satisfy it it will try to do an evacuation - // pause to perhaps reclaim enough space to be able to satisfy the - // allocation request afterwards. + // Takes the Heap_lock and attempts a humongous allocation. It can + // potentially schedule a GC pause. HeapWord* attempt_allocation_humongous(size_t word_size, - bool at_safepoint); + unsigned int* gc_count_before_ret); - // It does the common work when we are retiring the current alloc region. - inline void retire_cur_alloc_region_common(HeapRegion* cur_alloc_region); - - // It retires the current alloc region, which is passed as a - // parameter (since, typically, the caller is already holding on to - // it). It sets _cur_alloc_region to NULL. - void retire_cur_alloc_region(HeapRegion* cur_alloc_region); - - // It attempts to do an allocation immediately before or after an - // evacuation pause and can only be called by the VM thread. It has - // slightly different assumptions that the ones before (i.e., - // assumes that the current alloc region has been retired). + // Allocation attempt that should be called during safepoints (e.g., + // at the end of a successful GC). expect_null_mutator_alloc_region + // specifies whether the mutator alloc region is expected to be NULL + // or not. HeapWord* attempt_allocation_at_safepoint(size_t word_size, - bool expect_null_cur_alloc_region); + bool expect_null_mutator_alloc_region); // It dirties the cards that cover the block so that so that the post // write barrier never queues anything when updating objects on this @@ -583,6 +503,12 @@ protected: // GC pause. void retire_alloc_region(HeapRegion* alloc_region, bool par); + // These two methods are the "callbacks" from the G1AllocRegion class. + + HeapRegion* new_mutator_alloc_region(size_t word_size, bool force); + void retire_mutator_alloc_region(HeapRegion* alloc_region, + size_t allocated_bytes); + // - if explicit_gc is true, the GC is for a System.gc() or a heap // inspection request and should collect the entire heap // - if clear_all_soft_refs is true, all soft references should be @@ -1027,6 +953,9 @@ public: // The number of regions available for "regular" expansion. size_t expansion_regions() { return _expansion_regions; } + void verify_dirty_young_list(HeapRegion* head) PRODUCT_RETURN; + void verify_dirty_young_regions() PRODUCT_RETURN; + // verify_region_sets() performs verification over the region // lists. It will be compiled in the product code to be used when // necessary (i.e., during heap verification). @@ -1061,7 +990,7 @@ public: } void append_secondary_free_list() { - _free_list.add_as_tail(&_secondary_free_list); + _free_list.add_as_head(&_secondary_free_list); } void append_secondary_free_list_if_not_empty_with_lock() { @@ -1128,7 +1057,13 @@ public: return _g1_reserved.contains(p); } - // Returns a MemRegion that corresponds to the space that has been + // Returns a MemRegion that corresponds to the space that has been + // reserved for the heap + MemRegion g1_reserved() { + return _g1_reserved; + } + + // Returns a MemRegion that corresponds to the space that has been // committed in the heap MemRegion g1_committed() { return _g1_committed; diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp index 43c12272c7e..185d0a318cc 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp @@ -27,6 +27,7 @@ #include "gc_implementation/g1/concurrentMark.hpp" #include "gc_implementation/g1/g1CollectedHeap.hpp" +#include "gc_implementation/g1/g1AllocRegion.inline.hpp" #include "gc_implementation/g1/g1CollectorPolicy.hpp" #include "gc_implementation/g1/heapRegionSeq.inline.hpp" #include "utilities/taskqueue.hpp" @@ -59,131 +60,23 @@ inline bool G1CollectedHeap::obj_in_cs(oop obj) { return r != NULL && r->in_collection_set(); } -// See the comment in the .hpp file about the locking protocol and -// assumptions of this method (and other related ones). inline HeapWord* -G1CollectedHeap::allocate_from_cur_alloc_region(HeapRegion* cur_alloc_region, - size_t word_size, - bool with_heap_lock) { - assert_not_at_safepoint(); - assert(with_heap_lock == Heap_lock->owned_by_self(), - "with_heap_lock and Heap_lock->owned_by_self() should be a tautology"); - assert(cur_alloc_region != NULL, "pre-condition of the method"); - assert(cur_alloc_region->is_young(), - "we only support young current alloc regions"); - assert(!isHumongous(word_size), "allocate_from_cur_alloc_region() " - "should not be used for humongous allocations"); - assert(!cur_alloc_region->isHumongous(), "Catch a regression of this bug."); - - assert(!cur_alloc_region->is_empty(), - err_msg("region ["PTR_FORMAT","PTR_FORMAT"] should not be empty", - cur_alloc_region->bottom(), cur_alloc_region->end())); - HeapWord* result = cur_alloc_region->par_allocate_no_bot_updates(word_size); - if (result != NULL) { - assert(is_in(result), "result should be in the heap"); - - if (with_heap_lock) { - Heap_lock->unlock(); - } - assert_heap_not_locked(); - // Do the dirtying after we release the Heap_lock. - dirty_young_block(result, word_size); - return result; - } - - if (with_heap_lock) { - assert_heap_locked(); - } else { - assert_heap_not_locked(); - } - return NULL; -} - -// See the comment in the .hpp file about the locking protocol and -// assumptions of this method (and other related ones). -inline HeapWord* -G1CollectedHeap::attempt_allocation(size_t word_size) { +G1CollectedHeap::attempt_allocation(size_t word_size, + unsigned int* gc_count_before_ret) { assert_heap_not_locked_and_not_at_safepoint(); - assert(!isHumongous(word_size), "attempt_allocation() should not be called " - "for humongous allocation requests"); + assert(!isHumongous(word_size), "attempt_allocation() should not " + "be called for humongous allocation requests"); - HeapRegion* cur_alloc_region = _cur_alloc_region; - if (cur_alloc_region != NULL) { - HeapWord* result = allocate_from_cur_alloc_region(cur_alloc_region, - word_size, - false /* with_heap_lock */); - assert_heap_not_locked(); - if (result != NULL) { - return result; - } + HeapWord* result = _mutator_alloc_region.attempt_allocation(word_size, + false /* bot_updates */); + if (result == NULL) { + result = attempt_allocation_slow(word_size, gc_count_before_ret); } - - // Our attempt to allocate lock-free failed as the current - // allocation region is either NULL or full. So, we'll now take the - // Heap_lock and retry. - Heap_lock->lock(); - - HeapWord* result = attempt_allocation_locked(word_size); + assert_heap_not_locked(); if (result != NULL) { - assert_heap_not_locked(); - return result; + dirty_young_block(result, word_size); } - - assert_heap_locked(); - return NULL; -} - -inline void -G1CollectedHeap::retire_cur_alloc_region_common(HeapRegion* cur_alloc_region) { - assert_heap_locked_or_at_safepoint(true /* should_be_vm_thread */); - assert(cur_alloc_region != NULL && cur_alloc_region == _cur_alloc_region, - "pre-condition of the call"); - assert(cur_alloc_region->is_young(), - "we only support young current alloc regions"); - - // The region is guaranteed to be young - g1_policy()->add_region_to_incremental_cset_lhs(cur_alloc_region); - _summary_bytes_used += cur_alloc_region->used(); - _cur_alloc_region = NULL; -} - -inline HeapWord* -G1CollectedHeap::attempt_allocation_locked(size_t word_size) { - assert_heap_locked_and_not_at_safepoint(); - assert(!isHumongous(word_size), "attempt_allocation_locked() " - "should not be called for humongous allocation requests"); - - // First, reread the current alloc region and retry the allocation - // in case somebody replaced it while we were waiting to get the - // Heap_lock. - HeapRegion* cur_alloc_region = _cur_alloc_region; - if (cur_alloc_region != NULL) { - HeapWord* result = allocate_from_cur_alloc_region( - cur_alloc_region, word_size, - true /* with_heap_lock */); - if (result != NULL) { - assert_heap_not_locked(); - return result; - } - - // We failed to allocate out of the current alloc region, so let's - // retire it before getting a new one. - retire_cur_alloc_region(cur_alloc_region); - } - - assert_heap_locked(); - // Try to get a new region and allocate out of it - HeapWord* result = replace_cur_alloc_region_and_allocate(word_size, - false, /* at_safepoint */ - true, /* do_dirtying */ - false /* can_expand */); - if (result != NULL) { - assert_heap_not_locked(); - return result; - } - - assert_heap_locked(); - return NULL; + return result; } // It dirties the cards that cover the block so that so that the post diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp index 18f11076996..1421e2d2e57 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp @@ -307,6 +307,7 @@ G1CollectorPolicy::G1CollectorPolicy() : _par_last_termination_times_ms = new double[_parallel_gc_threads]; _par_last_termination_attempts = new double[_parallel_gc_threads]; _par_last_gc_worker_end_times_ms = new double[_parallel_gc_threads]; + _par_last_gc_worker_times_ms = new double[_parallel_gc_threads]; // start conservatively _expensive_region_limit_ms = 0.5 * (double) MaxGCPauseMillis; @@ -911,6 +912,7 @@ void G1CollectorPolicy::record_collection_pause_start(double start_time_sec, _par_last_termination_times_ms[i] = -1234.0; _par_last_termination_attempts[i] = -1234.0; _par_last_gc_worker_end_times_ms[i] = -1234.0; + _par_last_gc_worker_times_ms[i] = -1234.0; } #endif @@ -1063,8 +1065,7 @@ T sum_of(T* sum_arr, int start, int n, int N) { void G1CollectorPolicy::print_par_stats(int level, const char* str, - double* data, - bool summary) { + double* data) { double min = data[0], max = data[0]; double total = 0.0; LineBuffer buf(level); @@ -1078,20 +1079,15 @@ void G1CollectorPolicy::print_par_stats(int level, total += val; buf.append(" %3.1lf", val); } - if (summary) { - buf.append_and_print_cr(""); - double avg = total / (double) ParallelGCThreads; - buf.append(" "); - buf.append("Avg: %5.1lf, Min: %5.1lf, Max: %5.1lf", - avg, min, max); - } - buf.append_and_print_cr("]"); + buf.append_and_print_cr(""); + double avg = total / (double) ParallelGCThreads; + buf.append_and_print_cr(" Avg: %5.1lf, Min: %5.1lf, Max: %5.1lf, Diff: %5.1lf]", + avg, min, max, max - min); } void G1CollectorPolicy::print_par_sizes(int level, const char* str, - double* data, - bool summary) { + double* data) { double min = data[0], max = data[0]; double total = 0.0; LineBuffer buf(level); @@ -1105,14 +1101,10 @@ void G1CollectorPolicy::print_par_sizes(int level, total += val; buf.append(" %d", (int) val); } - if (summary) { - buf.append_and_print_cr(""); - double avg = total / (double) ParallelGCThreads; - buf.append(" "); - buf.append("Sum: %d, Avg: %d, Min: %d, Max: %d", - (int)total, (int)avg, (int)min, (int)max); - } - buf.append_and_print_cr("]"); + buf.append_and_print_cr(""); + double avg = total / (double) ParallelGCThreads; + buf.append_and_print_cr(" Sum: %d, Avg: %d, Min: %d, Max: %d, Diff: %d]", + (int)total, (int)avg, (int)min, (int)max, (int)max - (int)min); } void G1CollectorPolicy::print_stats (int level, @@ -1421,22 +1413,22 @@ void G1CollectorPolicy::record_collection_pause_end() { } if (parallel) { print_stats(1, "Parallel Time", _cur_collection_par_time_ms); - print_par_stats(2, "GC Worker Start Time", - _par_last_gc_worker_start_times_ms, false); + print_par_stats(2, "GC Worker Start Time", _par_last_gc_worker_start_times_ms); print_par_stats(2, "Update RS", _par_last_update_rs_times_ms); - print_par_sizes(3, "Processed Buffers", - _par_last_update_rs_processed_buffers, true); - print_par_stats(2, "Ext Root Scanning", - _par_last_ext_root_scan_times_ms); - print_par_stats(2, "Mark Stack Scanning", - _par_last_mark_stack_scan_times_ms); + print_par_sizes(3, "Processed Buffers", _par_last_update_rs_processed_buffers); + print_par_stats(2, "Ext Root Scanning", _par_last_ext_root_scan_times_ms); + print_par_stats(2, "Mark Stack Scanning", _par_last_mark_stack_scan_times_ms); print_par_stats(2, "Scan RS", _par_last_scan_rs_times_ms); print_par_stats(2, "Object Copy", _par_last_obj_copy_times_ms); print_par_stats(2, "Termination", _par_last_termination_times_ms); - print_par_sizes(3, "Termination Attempts", - _par_last_termination_attempts, true); - print_par_stats(2, "GC Worker End Time", - _par_last_gc_worker_end_times_ms, false); + print_par_sizes(3, "Termination Attempts", _par_last_termination_attempts); + print_par_stats(2, "GC Worker End Time", _par_last_gc_worker_end_times_ms); + + for (int i = 0; i < _parallel_gc_threads; i++) { + _par_last_gc_worker_times_ms[i] = _par_last_gc_worker_end_times_ms[i] - _par_last_gc_worker_start_times_ms[i]; + } + print_par_stats(2, "GC Worker Times", _par_last_gc_worker_times_ms); + print_stats(2, "Other", parallel_other_time); print_stats(1, "Clear CT", _cur_clear_ct_time_ms); } else { diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp index f7375d6a48e..79c5ee225db 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp @@ -182,6 +182,7 @@ protected: double* _par_last_termination_times_ms; double* _par_last_termination_attempts; double* _par_last_gc_worker_end_times_ms; + double* _par_last_gc_worker_times_ms; // indicates that we are in young GC mode bool _in_young_gc_mode; @@ -569,11 +570,8 @@ protected: void print_stats(int level, const char* str, double value); void print_stats(int level, const char* str, int value); - void print_par_stats(int level, const char* str, double* data) { - print_par_stats(level, str, data, true); - } - void print_par_stats(int level, const char* str, double* data, bool summary); - void print_par_sizes(int level, const char* str, double* data, bool summary); + void print_par_stats(int level, const char* str, double* data); + void print_par_sizes(int level, const char* str, double* data); void check_other_times(int level, NumberSeq* other_times_ms, diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.hpp index a8c7e7e9a2e..50cc99d0994 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1SATBCardTableModRefBS.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2011, 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 diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1_globals.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1_globals.hpp index 19a8338c6e6..b42949f22a1 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1_globals.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1_globals.hpp @@ -89,6 +89,11 @@ "The number of discovered reference objects to process before " \ "draining concurrent marking work queues.") \ \ + experimental(bool, G1UseConcMarkReferenceProcessing, false, \ + "If true, enable reference discovery during concurrent " \ + "marking and reference processing at the end of remark " \ + "(unsafe).") \ + \ develop(bool, G1SATBBarrierPrintNullPreVals, false, \ "If true, count frac of ptr writes with null pre-vals.") \ \ @@ -138,9 +143,9 @@ develop(bool, G1RSCountHisto, false, \ "If true, print a histogram of RS occupancies after each pause") \ \ - develop(intx, G1PrintRegionLivenessInfo, 0, \ - "When > 0, print the occupancies of the best and worst" \ - "regions.") \ + product(bool, G1PrintRegionLivenessInfo, false, \ + "Prints the liveness information for all regions in the heap " \ + "at the end of a marking cycle.") \ \ develop(bool, G1PrintParCleanupStats, false, \ "When true, print extra stats about parallel cleanup.") \ @@ -193,6 +198,10 @@ develop(intx, G1ConcRSHotCardLimit, 4, \ "The threshold that defines (>=) a hot card.") \ \ + develop(intx, G1MaxHotCardCountSizePercent, 25, \ + "The maximum size of the hot card count cache as a " \ + "percentage of the number of cards for the maximum heap.") \ + \ develop(bool, G1PrintOopAppls, false, \ "When true, print applications of closures to external locs.") \ \ diff --git a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp index b25f7cf5290..65d9b7c4d97 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp @@ -360,6 +360,7 @@ void HeapRegion::hr_clear(bool par, bool clear_space) { set_young_index_in_cset(-1); uninstall_surv_rate_group(); set_young_type(NotYoung); + reset_pre_dummy_top(); if (!par) { // If this is parallel, this will be done later. @@ -923,11 +924,11 @@ void G1OffsetTableContigSpace::set_saved_mark() { ContiguousSpace::set_saved_mark(); OrderAccess::storestore(); _gc_time_stamp = curr_gc_time_stamp; - // The following fence is to force a flush of the writes above, but - // is strictly not needed because when an allocating worker thread - // calls set_saved_mark() it does so under the ParGCRareEvent_lock; - // when the lock is released, the write will be flushed. - // OrderAccess::fence(); + // No need to do another barrier to flush the writes above. If + // this is called in parallel with other threads trying to + // allocate into the region, the caller should call this while + // holding a lock and when the lock is released the writes will be + // flushed. } } diff --git a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.hpp b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.hpp index 2d7385ef9b7..6c307f942de 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.hpp @@ -149,6 +149,13 @@ class G1OffsetTableContigSpace: public ContiguousSpace { G1BlockOffsetArrayContigSpace _offsets; Mutex _par_alloc_lock; volatile unsigned _gc_time_stamp; + // When we need to retire an allocation region, while other threads + // are also concurrently trying to allocate into it, we typically + // allocate a dummy object at the end of the region to ensure that + // no more allocations can take place in it. However, sometimes we + // want to know where the end of the last "real" object we allocated + // into the region was and this is what this keeps track. + HeapWord* _pre_dummy_top; public: // Constructor. If "is_zeroed" is true, the MemRegion "mr" may be @@ -163,6 +170,17 @@ class G1OffsetTableContigSpace: public ContiguousSpace { virtual void set_saved_mark(); void reset_gc_time_stamp() { _gc_time_stamp = 0; } + // See the comment above in the declaration of _pre_dummy_top for an + // explanation of what it is. + void set_pre_dummy_top(HeapWord* pre_dummy_top) { + assert(is_in(pre_dummy_top) && pre_dummy_top <= top(), "pre-condition"); + _pre_dummy_top = pre_dummy_top; + } + HeapWord* pre_dummy_top() { + return (_pre_dummy_top == NULL) ? top() : _pre_dummy_top; + } + void reset_pre_dummy_top() { _pre_dummy_top = NULL; } + virtual void initialize(MemRegion mr, bool clear_space, bool mangle_space); virtual void clear(bool mangle_space); @@ -380,13 +398,16 @@ class HeapRegion: public G1OffsetTableContigSpace { // The number of bytes marked live in the region in the last marking phase. size_t marked_bytes() { return _prev_marked_bytes; } + size_t live_bytes() { + return (top() - prev_top_at_mark_start()) * HeapWordSize + marked_bytes(); + } + // The number of bytes counted in the next marking. size_t next_marked_bytes() { return _next_marked_bytes; } // The number of bytes live wrt the next marking. size_t next_live_bytes() { - return (top() - next_top_at_mark_start()) - * HeapWordSize - + next_marked_bytes(); + return + (top() - next_top_at_mark_start()) * HeapWordSize + next_marked_bytes(); } // A lower bound on the amount of garbage bytes in the region. diff --git a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.inline.hpp b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.inline.hpp index 3750bdae37c..93cad742435 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.inline.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.inline.hpp @@ -38,15 +38,8 @@ inline HeapWord* G1OffsetTableContigSpace::allocate(size_t size) { // this is used for larger LAB allocations only. inline HeapWord* G1OffsetTableContigSpace::par_allocate(size_t size) { MutexLocker x(&_par_alloc_lock); - // This ought to be just "allocate", because of the lock above, but that - // ContiguousSpace::allocate asserts that either the allocating thread - // holds the heap lock or it is the VM thread and we're at a safepoint. - // The best I (dld) could figure was to put a field in ContiguousSpace - // meaning "locking at safepoint taken care of", and set/reset that - // here. But this will do for now, especially in light of the comment - // above. Perhaps in the future some lock-free manner of keeping the - // coordination. - HeapWord* res = ContiguousSpace::par_allocate(size); + // Given that we take the lock no need to use par_allocate() here. + HeapWord* res = ContiguousSpace::allocate(size); if (res != NULL) { _offsets.alloc_block(res, size); } diff --git a/hotspot/src/share/vm/gc_implementation/g1/heapRegionSet.cpp b/hotspot/src/share/vm/gc_implementation/g1/heapRegionSet.cpp index be80cd2201a..5f35e2f0520 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/heapRegionSet.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegionSet.cpp @@ -261,6 +261,45 @@ void HeapRegionLinkedList::fill_in_ext_msg_extra(hrs_ext_msg* msg) { msg->append(" hd: "PTR_FORMAT" tl: "PTR_FORMAT, head(), tail()); } +void HeapRegionLinkedList::add_as_head(HeapRegionLinkedList* from_list) { + hrs_assert_mt_safety_ok(this); + hrs_assert_mt_safety_ok(from_list); + + verify_optional(); + from_list->verify_optional(); + + if (from_list->is_empty()) return; + +#ifdef ASSERT + HeapRegionLinkedListIterator iter(from_list); + while (iter.more_available()) { + HeapRegion* hr = iter.get_next(); + // In set_containing_set() we check that we either set the value + // from NULL to non-NULL or vice versa to catch bugs. So, we have + // to NULL it first before setting it to the value. + hr->set_containing_set(NULL); + hr->set_containing_set(this); + } +#endif // ASSERT + + if (_head != NULL) { + assert(length() > 0 && _tail != NULL, hrs_ext_msg(this, "invariant")); + from_list->_tail->set_next(_head); + } else { + assert(length() == 0 && _head == NULL, hrs_ext_msg(this, "invariant")); + _tail = from_list->_tail; + } + _head = from_list->_head; + + _length += from_list->length(); + _region_num += from_list->region_num(); + _total_used_bytes += from_list->total_used_bytes(); + from_list->clear(); + + verify_optional(); + from_list->verify_optional(); +} + void HeapRegionLinkedList::add_as_tail(HeapRegionLinkedList* from_list) { hrs_assert_mt_safety_ok(this); hrs_assert_mt_safety_ok(from_list); diff --git a/hotspot/src/share/vm/gc_implementation/g1/heapRegionSet.hpp b/hotspot/src/share/vm/gc_implementation/g1/heapRegionSet.hpp index 5d53068ca88..ffb106f7946 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/heapRegionSet.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegionSet.hpp @@ -277,6 +277,10 @@ protected: } public: + // It adds hr to the list as the new head. The region should not be + // a member of another set. + inline void add_as_head(HeapRegion* hr); + // It adds hr to the list as the new tail. The region should not be // a member of another set. inline void add_as_tail(HeapRegion* hr); @@ -288,6 +292,11 @@ public: // Convenience method. inline HeapRegion* remove_head_or_null(); + // It moves the regions from from_list to this list and empties + // from_list. The new regions will appear in the same order as they + // were in from_list and be linked in the beginning of this list. + void add_as_head(HeapRegionLinkedList* from_list); + // It moves the regions from from_list to this list and empties // from_list. The new regions will appear in the same order as they // were in from_list and be linked in the end of this list. diff --git a/hotspot/src/share/vm/gc_implementation/g1/heapRegionSet.inline.hpp b/hotspot/src/share/vm/gc_implementation/g1/heapRegionSet.inline.hpp index 501f5a7aef8..cd2fc29fb9c 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/heapRegionSet.inline.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegionSet.inline.hpp @@ -110,6 +110,23 @@ inline void HeapRegionSet::remove_with_proxy(HeapRegion* hr, //////////////////// HeapRegionLinkedList //////////////////// +inline void HeapRegionLinkedList::add_as_head(HeapRegion* hr) { + hrs_assert_mt_safety_ok(this); + assert((length() == 0 && _head == NULL && _tail == NULL) || + (length() > 0 && _head != NULL && _tail != NULL), + hrs_ext_msg(this, "invariant")); + // add_internal() will verify the region. + add_internal(hr); + + // Now link the region. + if (_head != NULL) { + hr->set_next(_head); + } else { + _tail = hr; + } + _head = hr; +} + inline void HeapRegionLinkedList::add_as_tail(HeapRegion* hr) { hrs_assert_mt_safety_ok(this); assert((length() == 0 && _head == NULL && _tail == NULL) || diff --git a/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp b/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp index aaf44b02d3f..d9b41613444 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2011, 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 diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp index b081ad09f4d..c7a651f03fe 100644 --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.hpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.hpp index 2a35caccdf1..4c8b1159526 100644 --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.hpp +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.cpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.cpp index 39f7f6a3e12..ad58a90fcd8 100644 --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.cpp +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.inline.hpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.inline.hpp index 1848a1db281..880f0678904 100644 --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.inline.hpp +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.inline.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psTasks.cpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psTasks.cpp index de44096c1f3..c297477fd60 100644 --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psTasks.cpp +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psTasks.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 diff --git a/hotspot/src/share/vm/gc_implementation/shared/allocationStats.hpp b/hotspot/src/share/vm/gc_implementation/shared/allocationStats.hpp index 4e089c14cde..104ff1954fe 100644 --- a/hotspot/src/share/vm/gc_implementation/shared/allocationStats.hpp +++ b/hotspot/src/share/vm/gc_implementation/shared/allocationStats.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2011, 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 diff --git a/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.cpp b/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.cpp index c16ec595cef..262d35065d2 100644 --- a/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.cpp +++ b/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2011, 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 diff --git a/hotspot/src/share/vm/gc_implementation/shared/gcUtil.cpp b/hotspot/src/share/vm/gc_implementation/shared/gcUtil.cpp index caa6efed1c8..5325fee218b 100644 --- a/hotspot/src/share/vm/gc_implementation/shared/gcUtil.cpp +++ b/hotspot/src/share/vm/gc_implementation/shared/gcUtil.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 diff --git a/hotspot/src/share/vm/gc_implementation/shared/markSweep.cpp b/hotspot/src/share/vm/gc_implementation/shared/markSweep.cpp index 3ddcda650dd..584c24c821a 100644 --- a/hotspot/src/share/vm/gc_implementation/shared/markSweep.cpp +++ b/hotspot/src/share/vm/gc_implementation/shared/markSweep.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/gc_interface/collectedHeap.cpp b/hotspot/src/share/vm/gc_interface/collectedHeap.cpp index 6ffd07c97cb..6b99a8f6298 100644 --- a/hotspot/src/share/vm/gc_interface/collectedHeap.cpp +++ b/hotspot/src/share/vm/gc_interface/collectedHeap.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2011, 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 diff --git a/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp index 1f59ee47ceb..599fd188cb4 100644 --- a/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp +++ b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 diff --git a/hotspot/src/share/vm/interpreter/bytecodeInterpreter.inline.hpp b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.inline.hpp index c0dc4b61b40..3715a521204 100644 --- a/hotspot/src/share/vm/interpreter/bytecodeInterpreter.inline.hpp +++ b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.inline.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 diff --git a/hotspot/src/share/vm/interpreter/cppInterpreter.hpp b/hotspot/src/share/vm/interpreter/cppInterpreter.hpp index 45d7921c07f..4997a443257 100644 --- a/hotspot/src/share/vm/interpreter/cppInterpreter.hpp +++ b/hotspot/src/share/vm/interpreter/cppInterpreter.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/interpreter/cppInterpreterGenerator.hpp b/hotspot/src/share/vm/interpreter/cppInterpreterGenerator.hpp index b324f953e30..c27805e3ec9 100644 --- a/hotspot/src/share/vm/interpreter/cppInterpreterGenerator.hpp +++ b/hotspot/src/share/vm/interpreter/cppInterpreterGenerator.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/interpreter/interpreter.hpp b/hotspot/src/share/vm/interpreter/interpreter.hpp index 698a2edcd8f..0ab0be74770 100644 --- a/hotspot/src/share/vm/interpreter/interpreter.hpp +++ b/hotspot/src/share/vm/interpreter/interpreter.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/interpreter/interpreterGenerator.hpp b/hotspot/src/share/vm/interpreter/interpreterGenerator.hpp index 1a228e20795..7bc43eccb21 100644 --- a/hotspot/src/share/vm/interpreter/interpreterGenerator.hpp +++ b/hotspot/src/share/vm/interpreter/interpreterGenerator.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/interpreter/linkResolver.hpp b/hotspot/src/share/vm/interpreter/linkResolver.hpp index 9d2bd57965d..3d4c6f40e2a 100644 --- a/hotspot/src/share/vm/interpreter/linkResolver.hpp +++ b/hotspot/src/share/vm/interpreter/linkResolver.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/interpreter/templateInterpreter.hpp b/hotspot/src/share/vm/interpreter/templateInterpreter.hpp index 40717ec5677..4db0a419ca8 100644 --- a/hotspot/src/share/vm/interpreter/templateInterpreter.hpp +++ b/hotspot/src/share/vm/interpreter/templateInterpreter.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/interpreter/templateInterpreterGenerator.hpp b/hotspot/src/share/vm/interpreter/templateInterpreterGenerator.hpp index dc63589ed42..3e1615e7a22 100644 --- a/hotspot/src/share/vm/interpreter/templateInterpreterGenerator.hpp +++ b/hotspot/src/share/vm/interpreter/templateInterpreterGenerator.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/interpreter/templateTable.hpp b/hotspot/src/share/vm/interpreter/templateTable.hpp index d38623247e4..f91ecc70213 100644 --- a/hotspot/src/share/vm/interpreter/templateTable.hpp +++ b/hotspot/src/share/vm/interpreter/templateTable.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/memory/barrierSet.cpp b/hotspot/src/share/vm/memory/barrierSet.cpp index 1209764d452..8cd966f5fc9 100644 --- a/hotspot/src/share/vm/memory/barrierSet.cpp +++ b/hotspot/src/share/vm/memory/barrierSet.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/memory/cardTableModRefBS.hpp b/hotspot/src/share/vm/memory/cardTableModRefBS.hpp index da1166ae718..34a924ef36e 100644 --- a/hotspot/src/share/vm/memory/cardTableModRefBS.hpp +++ b/hotspot/src/share/vm/memory/cardTableModRefBS.hpp @@ -382,6 +382,11 @@ public: return (addr_for(pcard) == p); } + HeapWord* align_to_card_boundary(HeapWord* p) { + jbyte* pcard = byte_for(p + card_size_in_words - 1); + return addr_for(pcard); + } + // The kinds of precision a CardTableModRefBS may offer. enum PrecisionStyle { Precise, diff --git a/hotspot/src/share/vm/memory/cardTableRS.cpp b/hotspot/src/share/vm/memory/cardTableRS.cpp index afc166615ab..dcaa7c682f5 100644 --- a/hotspot/src/share/vm/memory/cardTableRS.cpp +++ b/hotspot/src/share/vm/memory/cardTableRS.cpp @@ -318,17 +318,28 @@ private: protected: template void do_oop_work(T* p) { HeapWord* jp = (HeapWord*)p; - if (jp >= _begin && jp < _end) { - oop obj = oopDesc::load_decode_heap_oop(p); - guarantee(obj == NULL || - (HeapWord*)p < _boundary || - (HeapWord*)obj >= _boundary, - "pointer on clean card crosses boundary"); - } + assert(jp >= _begin && jp < _end, + err_msg("Error: jp " PTR_FORMAT " should be within " + "[_begin, _end) = [" PTR_FORMAT "," PTR_FORMAT ")", + _begin, _end)); + oop obj = oopDesc::load_decode_heap_oop(p); + guarantee(obj == NULL || (HeapWord*)obj >= _boundary, + err_msg("pointer " PTR_FORMAT " at " PTR_FORMAT " on " + "clean card crosses boundary" PTR_FORMAT, + (HeapWord*)obj, jp, _boundary)); } + public: VerifyCleanCardClosure(HeapWord* b, HeapWord* begin, HeapWord* end) : - _boundary(b), _begin(begin), _end(end) {} + _boundary(b), _begin(begin), _end(end) { + assert(b <= begin, + err_msg("Error: boundary " PTR_FORMAT " should be at or below begin " PTR_FORMAT, + b, begin)); + assert(begin <= end, + err_msg("Error: begin " PTR_FORMAT " should be strictly below end " PTR_FORMAT, + begin, end)); + } + virtual void do_oop(oop* p) { VerifyCleanCardClosure::do_oop_work(p); } virtual void do_oop(narrowOop* p) { VerifyCleanCardClosure::do_oop_work(p); } }; @@ -392,13 +403,14 @@ void CardTableRS::verify_space(Space* s, HeapWord* gen_boundary) { } } // Now traverse objects until end. - HeapWord* cur = start_block; - VerifyCleanCardClosure verify_blk(gen_boundary, begin, end); - while (cur < end) { - if (s->block_is_obj(cur) && s->obj_is_alive(cur)) { - oop(cur)->oop_iterate(&verify_blk); + if (begin < end) { + MemRegion mr(begin, end); + VerifyCleanCardClosure verify_blk(gen_boundary, begin, end); + for (HeapWord* cur = start_block; cur < end; cur += s->block_size(cur)) { + if (s->block_is_obj(cur) && s->obj_is_alive(cur)) { + oop(cur)->oop_iterate(&verify_blk, mr); + } } - cur += s->block_size(cur); } cur_entry = first_dirty; } else { diff --git a/hotspot/src/share/vm/memory/classify.cpp b/hotspot/src/share/vm/memory/classify.cpp index afd534d3194..c7beddeef03 100644 --- a/hotspot/src/share/vm/memory/classify.cpp +++ b/hotspot/src/share/vm/memory/classify.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/src/share/vm/memory/compactingPermGenGen.cpp b/hotspot/src/share/vm/memory/compactingPermGenGen.cpp index a57994c0f0d..3754628b852 100644 --- a/hotspot/src/share/vm/memory/compactingPermGenGen.cpp +++ b/hotspot/src/share/vm/memory/compactingPermGenGen.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/src/share/vm/memory/genCollectedHeap.cpp b/hotspot/src/share/vm/memory/genCollectedHeap.cpp index 84551154a7d..2165c21dfa7 100644 --- a/hotspot/src/share/vm/memory/genCollectedHeap.cpp +++ b/hotspot/src/share/vm/memory/genCollectedHeap.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/hotspot/src/share/vm/memory/genMarkSweep.cpp b/hotspot/src/share/vm/memory/genMarkSweep.cpp index 8d67a7988b1..802c646e1d9 100644 --- a/hotspot/src/share/vm/memory/genMarkSweep.cpp +++ b/hotspot/src/share/vm/memory/genMarkSweep.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2011, 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 diff --git a/hotspot/src/share/vm/memory/heap.cpp b/hotspot/src/share/vm/memory/heap.cpp index 2d46b611241..dcf1e41e0e4 100644 --- a/hotspot/src/share/vm/memory/heap.cpp +++ b/hotspot/src/share/vm/memory/heap.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/memory/heapInspection.cpp b/hotspot/src/share/vm/memory/heapInspection.cpp index 545a580c6cf..1042ff43b94 100644 --- a/hotspot/src/share/vm/memory/heapInspection.cpp +++ b/hotspot/src/share/vm/memory/heapInspection.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 diff --git a/hotspot/src/share/vm/memory/iterator.hpp b/hotspot/src/share/vm/memory/iterator.hpp index ca36ab4dee9..b5f8e0ef639 100644 --- a/hotspot/src/share/vm/memory/iterator.hpp +++ b/hotspot/src/share/vm/memory/iterator.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/memory/restore.cpp b/hotspot/src/share/vm/memory/restore.cpp index db7f9e9eb84..263867e6fff 100644 --- a/hotspot/src/share/vm/memory/restore.cpp +++ b/hotspot/src/share/vm/memory/restore.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/src/share/vm/memory/serialize.cpp b/hotspot/src/share/vm/memory/serialize.cpp index 629620c8357..65f05bdf846 100644 --- a/hotspot/src/share/vm/memory/serialize.cpp +++ b/hotspot/src/share/vm/memory/serialize.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/src/share/vm/memory/sharedHeap.cpp b/hotspot/src/share/vm/memory/sharedHeap.cpp index c346995f71b..37c17b03861 100644 --- a/hotspot/src/share/vm/memory/sharedHeap.cpp +++ b/hotspot/src/share/vm/memory/sharedHeap.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/hotspot/src/share/vm/memory/space.cpp b/hotspot/src/share/vm/memory/space.cpp index 65afc7b4a14..1971332cd06 100644 --- a/hotspot/src/share/vm/memory/space.cpp +++ b/hotspot/src/share/vm/memory/space.cpp @@ -818,9 +818,14 @@ size_t ContiguousSpace::block_size(const HeapWord* p) const { // This version requires locking. inline HeapWord* ContiguousSpace::allocate_impl(size_t size, HeapWord* const end_value) { + // In G1 there are places where a GC worker can allocates into a + // region using this serial allocation code without being prone to a + // race with other GC workers (we ensure that no other GC worker can + // access the same region at the same time). So the assert below is + // too strong in the case of G1. assert(Heap_lock->owned_by_self() || (SafepointSynchronize::is_at_safepoint() && - Thread::current()->is_VM_thread()), + (Thread::current()->is_VM_thread() || UseG1GC)), "not locked"); HeapWord* obj = top(); if (pointer_delta(end_value, obj) >= size) { diff --git a/hotspot/src/share/vm/memory/universe.hpp b/hotspot/src/share/vm/memory/universe.hpp index df2b15b4223..86682682ffb 100644 --- a/hotspot/src/share/vm/memory/universe.hpp +++ b/hotspot/src/share/vm/memory/universe.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/oops/arrayKlass.cpp b/hotspot/src/share/vm/oops/arrayKlass.cpp index b17a30570a7..5693f8eb869 100644 --- a/hotspot/src/share/vm/oops/arrayKlass.cpp +++ b/hotspot/src/share/vm/oops/arrayKlass.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/oops/arrayOop.cpp b/hotspot/src/share/vm/oops/arrayOop.cpp index 896b7bff5e5..62a971a6182 100644 --- a/hotspot/src/share/vm/oops/arrayOop.cpp +++ b/hotspot/src/share/vm/oops/arrayOop.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/oops/constantPoolKlass.cpp b/hotspot/src/share/vm/oops/constantPoolKlass.cpp index 40488301a8a..87a771bfe22 100644 --- a/hotspot/src/share/vm/oops/constantPoolKlass.cpp +++ b/hotspot/src/share/vm/oops/constantPoolKlass.cpp @@ -245,13 +245,13 @@ int constantPoolKlass::oop_oop_iterate_m(oop obj, OopClosure* blk, MemRegion mr) } oop* addr; addr = cp->tags_addr(); - blk->do_oop(addr); + if (mr.contains(addr)) blk->do_oop(addr); addr = cp->cache_addr(); - blk->do_oop(addr); + if (mr.contains(addr)) blk->do_oop(addr); addr = cp->operands_addr(); - blk->do_oop(addr); + if (mr.contains(addr)) blk->do_oop(addr); addr = cp->pool_holder_addr(); - blk->do_oop(addr); + if (mr.contains(addr)) blk->do_oop(addr); return size; } diff --git a/hotspot/src/share/vm/oops/cpCacheKlass.hpp b/hotspot/src/share/vm/oops/cpCacheKlass.hpp index 4a1532cffef..9a784fd21a7 100644 --- a/hotspot/src/share/vm/oops/cpCacheKlass.hpp +++ b/hotspot/src/share/vm/oops/cpCacheKlass.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2011, 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 diff --git a/hotspot/src/share/vm/oops/generateOopMap.hpp b/hotspot/src/share/vm/oops/generateOopMap.hpp index 92437407d3c..a635e2abdee 100644 --- a/hotspot/src/share/vm/oops/generateOopMap.hpp +++ b/hotspot/src/share/vm/oops/generateOopMap.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/oops/klass.cpp b/hotspot/src/share/vm/oops/klass.cpp index 6f6a39a6409..499bf53a96f 100644 --- a/hotspot/src/share/vm/oops/klass.cpp +++ b/hotspot/src/share/vm/oops/klass.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/oops/markOop.hpp b/hotspot/src/share/vm/oops/markOop.hpp index 0dca58494ec..9501c1ed642 100644 --- a/hotspot/src/share/vm/oops/markOop.hpp +++ b/hotspot/src/share/vm/oops/markOop.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/oops/symbol.cpp b/hotspot/src/share/vm/oops/symbol.cpp index ef2040ae051..4c508475064 100644 --- a/hotspot/src/share/vm/oops/symbol.cpp +++ b/hotspot/src/share/vm/oops/symbol.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/oops/symbol.hpp b/hotspot/src/share/vm/oops/symbol.hpp index 63c1df4f126..269c2b72128 100644 --- a/hotspot/src/share/vm/oops/symbol.hpp +++ b/hotspot/src/share/vm/oops/symbol.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/oops/typeArrayOop.hpp b/hotspot/src/share/vm/oops/typeArrayOop.hpp index c39987be5c7..e0133fd9dbc 100644 --- a/hotspot/src/share/vm/oops/typeArrayOop.hpp +++ b/hotspot/src/share/vm/oops/typeArrayOop.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/opto/buildOopMap.cpp b/hotspot/src/share/vm/opto/buildOopMap.cpp index 32a174729c7..fc731604eaa 100644 --- a/hotspot/src/share/vm/opto/buildOopMap.cpp +++ b/hotspot/src/share/vm/opto/buildOopMap.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 diff --git a/hotspot/src/share/vm/opto/c2_globals.hpp b/hotspot/src/share/vm/opto/c2_globals.hpp index 033074dadf6..a23c13d3fac 100644 --- a/hotspot/src/share/vm/opto/c2_globals.hpp +++ b/hotspot/src/share/vm/opto/c2_globals.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/hotspot/src/share/vm/opto/c2compiler.cpp b/hotspot/src/share/vm/opto/c2compiler.cpp index 7b0b9be59a6..713e3f1d1a1 100644 --- a/hotspot/src/share/vm/opto/c2compiler.cpp +++ b/hotspot/src/share/vm/opto/c2compiler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/hotspot/src/share/vm/opto/chaitin.cpp b/hotspot/src/share/vm/opto/chaitin.cpp index 3c363e9ffaf..21b4716b39d 100644 --- a/hotspot/src/share/vm/opto/chaitin.cpp +++ b/hotspot/src/share/vm/opto/chaitin.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/hotspot/src/share/vm/opto/gcm.cpp b/hotspot/src/share/vm/opto/gcm.cpp index 2122f7ca733..f714d01f03c 100644 --- a/hotspot/src/share/vm/opto/gcm.cpp +++ b/hotspot/src/share/vm/opto/gcm.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/opto/graphKit.cpp b/hotspot/src/share/vm/opto/graphKit.cpp index b20513e67c1..794a0f7171c 100644 --- a/hotspot/src/share/vm/opto/graphKit.cpp +++ b/hotspot/src/share/vm/opto/graphKit.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2011, 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 diff --git a/hotspot/src/share/vm/opto/graphKit.hpp b/hotspot/src/share/vm/opto/graphKit.hpp index 2f7a7d5ab05..1302184fcbd 100644 --- a/hotspot/src/share/vm/opto/graphKit.hpp +++ b/hotspot/src/share/vm/opto/graphKit.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2011, 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 diff --git a/hotspot/src/share/vm/opto/idealKit.cpp b/hotspot/src/share/vm/opto/idealKit.cpp index bc7aaaa6a9a..a143a6492e0 100644 --- a/hotspot/src/share/vm/opto/idealKit.cpp +++ b/hotspot/src/share/vm/opto/idealKit.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/hotspot/src/share/vm/opto/idealKit.hpp b/hotspot/src/share/vm/opto/idealKit.hpp index 8192a446288..1ece1425918 100644 --- a/hotspot/src/share/vm/opto/idealKit.hpp +++ b/hotspot/src/share/vm/opto/idealKit.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/hotspot/src/share/vm/opto/lcm.cpp b/hotspot/src/share/vm/opto/lcm.cpp index fd3343c3c71..1767bce2d00 100644 --- a/hotspot/src/share/vm/opto/lcm.cpp +++ b/hotspot/src/share/vm/opto/lcm.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2011, 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 diff --git a/hotspot/src/share/vm/opto/locknode.hpp b/hotspot/src/share/vm/opto/locknode.hpp index 64a1027a73c..05630e22d4a 100644 --- a/hotspot/src/share/vm/opto/locknode.hpp +++ b/hotspot/src/share/vm/opto/locknode.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/hotspot/src/share/vm/opto/loopTransform.cpp b/hotspot/src/share/vm/opto/loopTransform.cpp index 4c49ee0e634..9c5a7e034fd 100644 --- a/hotspot/src/share/vm/opto/loopTransform.cpp +++ b/hotspot/src/share/vm/opto/loopTransform.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/hotspot/src/share/vm/opto/loopUnswitch.cpp b/hotspot/src/share/vm/opto/loopUnswitch.cpp index fa8e58a44c8..544b845f8b0 100644 --- a/hotspot/src/share/vm/opto/loopUnswitch.cpp +++ b/hotspot/src/share/vm/opto/loopUnswitch.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2011, 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 diff --git a/hotspot/src/share/vm/opto/loopopts.cpp b/hotspot/src/share/vm/opto/loopopts.cpp index ae62e609f3f..831c6cb6e42 100644 --- a/hotspot/src/share/vm/opto/loopopts.cpp +++ b/hotspot/src/share/vm/opto/loopopts.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/hotspot/src/share/vm/opto/matcher.cpp b/hotspot/src/share/vm/opto/matcher.cpp index 48ff22d10c9..08a04198477 100644 --- a/hotspot/src/share/vm/opto/matcher.cpp +++ b/hotspot/src/share/vm/opto/matcher.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/opto/matcher.hpp b/hotspot/src/share/vm/opto/matcher.hpp index e8d3c99f853..5a34bea6478 100644 --- a/hotspot/src/share/vm/opto/matcher.hpp +++ b/hotspot/src/share/vm/opto/matcher.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/opto/memnode.hpp b/hotspot/src/share/vm/opto/memnode.hpp index 0c072fc211a..9608b3382d3 100644 --- a/hotspot/src/share/vm/opto/memnode.hpp +++ b/hotspot/src/share/vm/opto/memnode.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/opto/node.cpp b/hotspot/src/share/vm/opto/node.cpp index a6d87f06ae2..33bfeb68214 100644 --- a/hotspot/src/share/vm/opto/node.cpp +++ b/hotspot/src/share/vm/opto/node.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/opto/output.cpp b/hotspot/src/share/vm/opto/output.cpp index a57508b418e..1205cc2639d 100644 --- a/hotspot/src/share/vm/opto/output.cpp +++ b/hotspot/src/share/vm/opto/output.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2011, 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 diff --git a/hotspot/src/share/vm/opto/output.hpp b/hotspot/src/share/vm/opto/output.hpp index 51eaa5c5e2b..50b6e76035e 100644 --- a/hotspot/src/share/vm/opto/output.hpp +++ b/hotspot/src/share/vm/opto/output.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/hotspot/src/share/vm/opto/parse1.cpp b/hotspot/src/share/vm/opto/parse1.cpp index 589a541048e..497042c1f03 100644 --- a/hotspot/src/share/vm/opto/parse1.cpp +++ b/hotspot/src/share/vm/opto/parse1.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/opto/parse2.cpp b/hotspot/src/share/vm/opto/parse2.cpp index 162878e6aa8..808a2bdeb3a 100644 --- a/hotspot/src/share/vm/opto/parse2.cpp +++ b/hotspot/src/share/vm/opto/parse2.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2011, 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 diff --git a/hotspot/src/share/vm/opto/regmask.cpp b/hotspot/src/share/vm/opto/regmask.cpp index 3841a42fc53..ce220f01be9 100644 --- a/hotspot/src/share/vm/opto/regmask.cpp +++ b/hotspot/src/share/vm/opto/regmask.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/opto/regmask.hpp b/hotspot/src/share/vm/opto/regmask.hpp index 7c3e7182580..e50ff84ca16 100644 --- a/hotspot/src/share/vm/opto/regmask.hpp +++ b/hotspot/src/share/vm/opto/regmask.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/opto/runtime.cpp b/hotspot/src/share/vm/opto/runtime.cpp index b0544fef2ec..c2ddea145d1 100644 --- a/hotspot/src/share/vm/opto/runtime.cpp +++ b/hotspot/src/share/vm/opto/runtime.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2011, 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 diff --git a/hotspot/src/share/vm/opto/stringopts.cpp b/hotspot/src/share/vm/opto/stringopts.cpp index c039480118f..7f5f318dbf7 100644 --- a/hotspot/src/share/vm/opto/stringopts.cpp +++ b/hotspot/src/share/vm/opto/stringopts.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, 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 diff --git a/hotspot/src/share/vm/opto/type.hpp b/hotspot/src/share/vm/opto/type.hpp index 56ea820a734..4d08d50d542 100644 --- a/hotspot/src/share/vm/opto/type.hpp +++ b/hotspot/src/share/vm/opto/type.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/precompiled.hpp b/hotspot/src/share/vm/precompiled.hpp index 1b804cbf215..87129d11847 100644 --- a/hotspot/src/share/vm/precompiled.hpp +++ b/hotspot/src/share/vm/precompiled.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2011, 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 diff --git a/hotspot/src/share/vm/prims/forte.cpp b/hotspot/src/share/vm/prims/forte.cpp index 3c48f01d245..023921c33b6 100644 --- a/hotspot/src/share/vm/prims/forte.cpp +++ b/hotspot/src/share/vm/prims/forte.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/src/share/vm/prims/jni_md.h b/hotspot/src/share/vm/prims/jni_md.h index 72aa1dc3977..7fa58291109 100644 --- a/hotspot/src/share/vm/prims/jni_md.h +++ b/hotspot/src/share/vm/prims/jni_md.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/prims/jvm_misc.hpp b/hotspot/src/share/vm/prims/jvm_misc.hpp index 18795124660..2b46e362393 100644 --- a/hotspot/src/share/vm/prims/jvm_misc.hpp +++ b/hotspot/src/share/vm/prims/jvm_misc.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2011, 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 diff --git a/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp b/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp index fa08cf712d0..d12d69cee71 100644 --- a/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp +++ b/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.hpp b/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.hpp index 42cb9f23986..60a5ffb0956 100644 --- a/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.hpp +++ b/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/hotspot/src/share/vm/prims/jvmtiEventController.cpp b/hotspot/src/share/vm/prims/jvmtiEventController.cpp index ccb22b550b8..6b7b72b7ae6 100644 --- a/hotspot/src/share/vm/prims/jvmtiEventController.cpp +++ b/hotspot/src/share/vm/prims/jvmtiEventController.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/src/share/vm/prims/jvmtiRedefineClasses.hpp b/hotspot/src/share/vm/prims/jvmtiRedefineClasses.hpp index bf0778b535a..c5f4bdd4b84 100644 --- a/hotspot/src/share/vm/prims/jvmtiRedefineClasses.hpp +++ b/hotspot/src/share/vm/prims/jvmtiRedefineClasses.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/src/share/vm/prims/jvmtiTagMap.hpp b/hotspot/src/share/vm/prims/jvmtiTagMap.hpp index 9abdd9b37a1..2a460edc1e0 100644 --- a/hotspot/src/share/vm/prims/jvmtiTagMap.hpp +++ b/hotspot/src/share/vm/prims/jvmtiTagMap.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/deoptimization.hpp b/hotspot/src/share/vm/runtime/deoptimization.hpp index c62616fcb74..d515339d64e 100644 --- a/hotspot/src/share/vm/runtime/deoptimization.hpp +++ b/hotspot/src/share/vm/runtime/deoptimization.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/dtraceJSDT.hpp b/hotspot/src/share/vm/runtime/dtraceJSDT.hpp index d6c80c7374a..bff43108439 100644 --- a/hotspot/src/share/vm/runtime/dtraceJSDT.hpp +++ b/hotspot/src/share/vm/runtime/dtraceJSDT.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/fieldDescriptor.hpp b/hotspot/src/share/vm/runtime/fieldDescriptor.hpp index ced38aed21c..00f8864a807 100644 --- a/hotspot/src/share/vm/runtime/fieldDescriptor.hpp +++ b/hotspot/src/share/vm/runtime/fieldDescriptor.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/fieldType.cpp b/hotspot/src/share/vm/runtime/fieldType.cpp index 00247f1723e..ef929b9c559 100644 --- a/hotspot/src/share/vm/runtime/fieldType.cpp +++ b/hotspot/src/share/vm/runtime/fieldType.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/fieldType.hpp b/hotspot/src/share/vm/runtime/fieldType.hpp index 13ecf15a643..0da4f370622 100644 --- a/hotspot/src/share/vm/runtime/fieldType.hpp +++ b/hotspot/src/share/vm/runtime/fieldType.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/fprofiler.cpp b/hotspot/src/share/vm/runtime/fprofiler.cpp index 4efc3a936d1..3c100aa4c98 100644 --- a/hotspot/src/share/vm/runtime/fprofiler.cpp +++ b/hotspot/src/share/vm/runtime/fprofiler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/fprofiler.hpp b/hotspot/src/share/vm/runtime/fprofiler.hpp index 2731dea7b6b..60e51d2eb2f 100644 --- a/hotspot/src/share/vm/runtime/fprofiler.hpp +++ b/hotspot/src/share/vm/runtime/fprofiler.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/frame.hpp b/hotspot/src/share/vm/runtime/frame.hpp index 4750f3a5a69..a48c2af37ea 100644 --- a/hotspot/src/share/vm/runtime/frame.hpp +++ b/hotspot/src/share/vm/runtime/frame.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/frame.inline.hpp b/hotspot/src/share/vm/runtime/frame.inline.hpp index 739a50b9a25..b80b042dcbe 100644 --- a/hotspot/src/share/vm/runtime/frame.inline.hpp +++ b/hotspot/src/share/vm/runtime/frame.inline.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/globals.hpp b/hotspot/src/share/vm/runtime/globals.hpp index 020a1673ea6..32bd45794bc 100644 --- a/hotspot/src/share/vm/runtime/globals.hpp +++ b/hotspot/src/share/vm/runtime/globals.hpp @@ -1924,7 +1924,7 @@ class CommandLineFlags { experimental(intx, WorkStealingSleepMillis, 1, \ "Sleep time when sleep is used for yields") \ \ - experimental(uintx, WorkStealingYieldsBeforeSleep, 1000, \ + experimental(uintx, WorkStealingYieldsBeforeSleep, 5000, \ "Number of yields before a sleep is done during workstealing") \ \ experimental(uintx, WorkStealingHardSpins, 4096, \ diff --git a/hotspot/src/share/vm/runtime/handles.hpp b/hotspot/src/share/vm/runtime/handles.hpp index de069d34acc..d9d71e67010 100644 --- a/hotspot/src/share/vm/runtime/handles.hpp +++ b/hotspot/src/share/vm/runtime/handles.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/icache.hpp b/hotspot/src/share/vm/runtime/icache.hpp index 7ffce5b140d..d460a0ffba6 100644 --- a/hotspot/src/share/vm/runtime/icache.hpp +++ b/hotspot/src/share/vm/runtime/icache.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/interfaceSupport.cpp b/hotspot/src/share/vm/runtime/interfaceSupport.cpp index 33c6b3eb8c3..cec374fa69d 100644 --- a/hotspot/src/share/vm/runtime/interfaceSupport.cpp +++ b/hotspot/src/share/vm/runtime/interfaceSupport.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/interfaceSupport.hpp b/hotspot/src/share/vm/runtime/interfaceSupport.hpp index 02e8e7bc5f1..b119006035d 100644 --- a/hotspot/src/share/vm/runtime/interfaceSupport.hpp +++ b/hotspot/src/share/vm/runtime/interfaceSupport.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/javaCalls.cpp b/hotspot/src/share/vm/runtime/javaCalls.cpp index 79ecaa480c8..aaa2805e7e7 100644 --- a/hotspot/src/share/vm/runtime/javaCalls.cpp +++ b/hotspot/src/share/vm/runtime/javaCalls.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/javaCalls.hpp b/hotspot/src/share/vm/runtime/javaCalls.hpp index 535bcc15957..af29462dd9f 100644 --- a/hotspot/src/share/vm/runtime/javaCalls.hpp +++ b/hotspot/src/share/vm/runtime/javaCalls.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/javaFrameAnchor.hpp b/hotspot/src/share/vm/runtime/javaFrameAnchor.hpp index af5d7728411..501e59e1c60 100644 --- a/hotspot/src/share/vm/runtime/javaFrameAnchor.hpp +++ b/hotspot/src/share/vm/runtime/javaFrameAnchor.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/jniHandles.cpp b/hotspot/src/share/vm/runtime/jniHandles.cpp index 31595688fe5..e9c791d51dd 100644 --- a/hotspot/src/share/vm/runtime/jniHandles.cpp +++ b/hotspot/src/share/vm/runtime/jniHandles.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/objectMonitor.cpp b/hotspot/src/share/vm/runtime/objectMonitor.cpp index 2aade711829..e2b4bf2d760 100644 --- a/hotspot/src/share/vm/runtime/objectMonitor.cpp +++ b/hotspot/src/share/vm/runtime/objectMonitor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/reflection.hpp b/hotspot/src/share/vm/runtime/reflection.hpp index 1f669349543..90a3c0c0e3c 100644 --- a/hotspot/src/share/vm/runtime/reflection.hpp +++ b/hotspot/src/share/vm/runtime/reflection.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/reflectionUtils.hpp b/hotspot/src/share/vm/runtime/reflectionUtils.hpp index 712aa51fb3c..c9eecaa2324 100644 --- a/hotspot/src/share/vm/runtime/reflectionUtils.hpp +++ b/hotspot/src/share/vm/runtime/reflectionUtils.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/registerMap.hpp b/hotspot/src/share/vm/runtime/registerMap.hpp index da597d40ed4..5dd677ac4e1 100644 --- a/hotspot/src/share/vm/runtime/registerMap.hpp +++ b/hotspot/src/share/vm/runtime/registerMap.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/rframe.cpp b/hotspot/src/share/vm/runtime/rframe.cpp index f99d4d1a237..c52d16ff3d5 100644 --- a/hotspot/src/share/vm/runtime/rframe.cpp +++ b/hotspot/src/share/vm/runtime/rframe.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/safepoint.cpp b/hotspot/src/share/vm/runtime/safepoint.cpp index bd9a9e6eb32..bc729c4cd43 100644 --- a/hotspot/src/share/vm/runtime/safepoint.cpp +++ b/hotspot/src/share/vm/runtime/safepoint.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/signature.cpp b/hotspot/src/share/vm/runtime/signature.cpp index d13d3e10e10..cb4af90385f 100644 --- a/hotspot/src/share/vm/runtime/signature.cpp +++ b/hotspot/src/share/vm/runtime/signature.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/signature.hpp b/hotspot/src/share/vm/runtime/signature.hpp index 11ab3e2d1e4..2d7a35dd03d 100644 --- a/hotspot/src/share/vm/runtime/signature.hpp +++ b/hotspot/src/share/vm/runtime/signature.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/stackValueCollection.cpp b/hotspot/src/share/vm/runtime/stackValueCollection.cpp index bc391e599aa..110f7120d4f 100644 --- a/hotspot/src/share/vm/runtime/stackValueCollection.cpp +++ b/hotspot/src/share/vm/runtime/stackValueCollection.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/statSampler.cpp b/hotspot/src/share/vm/runtime/statSampler.cpp index bbb947737be..0b24def2497 100644 --- a/hotspot/src/share/vm/runtime/statSampler.cpp +++ b/hotspot/src/share/vm/runtime/statSampler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp b/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp index ba395194f7f..63fa6730f2c 100644 --- a/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp +++ b/hotspot/src/share/vm/runtime/stubCodeGenerator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/sweeper.cpp b/hotspot/src/share/vm/runtime/sweeper.cpp index c845b1761b6..535e337f378 100644 --- a/hotspot/src/share/vm/runtime/sweeper.cpp +++ b/hotspot/src/share/vm/runtime/sweeper.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/synchronizer.cpp b/hotspot/src/share/vm/runtime/synchronizer.cpp index fd0b3da40ec..d51be5c2b57 100644 --- a/hotspot/src/share/vm/runtime/synchronizer.cpp +++ b/hotspot/src/share/vm/runtime/synchronizer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/threadLocalStorage.hpp b/hotspot/src/share/vm/runtime/threadLocalStorage.hpp index 2ca4260d902..c936216871b 100644 --- a/hotspot/src/share/vm/runtime/threadLocalStorage.hpp +++ b/hotspot/src/share/vm/runtime/threadLocalStorage.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/vframe.cpp b/hotspot/src/share/vm/runtime/vframe.cpp index 9624c4983e1..323d7359847 100644 --- a/hotspot/src/share/vm/runtime/vframe.cpp +++ b/hotspot/src/share/vm/runtime/vframe.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/vmStructs.hpp b/hotspot/src/share/vm/runtime/vmStructs.hpp index 7bf6d93d064..355746eb420 100644 --- a/hotspot/src/share/vm/runtime/vmStructs.hpp +++ b/hotspot/src/share/vm/runtime/vmStructs.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/vm_operations.cpp b/hotspot/src/share/vm/runtime/vm_operations.cpp index 8a0cbe785b3..cb5d1381480 100644 --- a/hotspot/src/share/vm/runtime/vm_operations.cpp +++ b/hotspot/src/share/vm/runtime/vm_operations.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/vm_operations.hpp b/hotspot/src/share/vm/runtime/vm_operations.hpp index 77ffeb3bc63..77f262f6eda 100644 --- a/hotspot/src/share/vm/runtime/vm_operations.hpp +++ b/hotspot/src/share/vm/runtime/vm_operations.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/vm_version.cpp b/hotspot/src/share/vm/runtime/vm_version.cpp index 4afc8cea3b9..cd44c03da26 100644 --- a/hotspot/src/share/vm/runtime/vm_version.cpp +++ b/hotspot/src/share/vm/runtime/vm_version.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2011, 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 diff --git a/hotspot/src/share/vm/runtime/vm_version.hpp b/hotspot/src/share/vm/runtime/vm_version.hpp index 28b243f41ba..6fcbb6ac4df 100644 --- a/hotspot/src/share/vm/runtime/vm_version.hpp +++ b/hotspot/src/share/vm/runtime/vm_version.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/services/attachListener.cpp b/hotspot/src/share/vm/services/attachListener.cpp index 6ebafe96509..71d107d8046 100644 --- a/hotspot/src/share/vm/services/attachListener.cpp +++ b/hotspot/src/share/vm/services/attachListener.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/hotspot/src/share/vm/services/attachListener.hpp b/hotspot/src/share/vm/services/attachListener.hpp index 68cd834fe65..ba8fb93227b 100644 --- a/hotspot/src/share/vm/services/attachListener.hpp +++ b/hotspot/src/share/vm/services/attachListener.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/hotspot/src/share/vm/services/classLoadingService.cpp b/hotspot/src/share/vm/services/classLoadingService.cpp index 83979a8e57d..0f3ad684cbe 100644 --- a/hotspot/src/share/vm/services/classLoadingService.cpp +++ b/hotspot/src/share/vm/services/classLoadingService.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/src/share/vm/services/management.hpp b/hotspot/src/share/vm/services/management.hpp index ec2d77ce088..1598f2261e4 100644 --- a/hotspot/src/share/vm/services/management.hpp +++ b/hotspot/src/share/vm/services/management.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/src/share/vm/services/memoryManager.cpp b/hotspot/src/share/vm/services/memoryManager.cpp index 41b8d82f84b..e13b6437645 100644 --- a/hotspot/src/share/vm/services/memoryManager.cpp +++ b/hotspot/src/share/vm/services/memoryManager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/src/share/vm/services/memoryPool.cpp b/hotspot/src/share/vm/services/memoryPool.cpp index 6036bbe70b5..8a83606b026 100644 --- a/hotspot/src/share/vm/services/memoryPool.cpp +++ b/hotspot/src/share/vm/services/memoryPool.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/src/share/vm/services/memoryService.cpp b/hotspot/src/share/vm/services/memoryService.cpp index ee9471083a9..eca4d6418b7 100644 --- a/hotspot/src/share/vm/services/memoryService.cpp +++ b/hotspot/src/share/vm/services/memoryService.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp b/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp index e4b3347c5c9..ef4337233f5 100644 --- a/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp +++ b/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright 2009, 2010 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * diff --git a/hotspot/src/share/vm/utilities/copy.hpp b/hotspot/src/share/vm/utilities/copy.hpp index 8772fe44f06..3dcbfeee2ce 100644 --- a/hotspot/src/share/vm/utilities/copy.hpp +++ b/hotspot/src/share/vm/utilities/copy.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/src/share/vm/utilities/debug.cpp b/hotspot/src/share/vm/utilities/debug.cpp index 204b360b15b..cb5efc08d07 100644 --- a/hotspot/src/share/vm/utilities/debug.cpp +++ b/hotspot/src/share/vm/utilities/debug.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/utilities/debug.hpp b/hotspot/src/share/vm/utilities/debug.hpp index 75a9a27bd6b..63c69e63f64 100644 --- a/hotspot/src/share/vm/utilities/debug.hpp +++ b/hotspot/src/share/vm/utilities/debug.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/utilities/elfSymbolTable.cpp b/hotspot/src/share/vm/utilities/elfSymbolTable.cpp index 22773aa546b..0fa039c4fbf 100644 --- a/hotspot/src/share/vm/utilities/elfSymbolTable.cpp +++ b/hotspot/src/share/vm/utilities/elfSymbolTable.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/utilities/exceptions.cpp b/hotspot/src/share/vm/utilities/exceptions.cpp index 1d6ab0835ca..5d8a33b4d2e 100644 --- a/hotspot/src/share/vm/utilities/exceptions.cpp +++ b/hotspot/src/share/vm/utilities/exceptions.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2011, 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 diff --git a/hotspot/src/share/vm/utilities/exceptions.hpp b/hotspot/src/share/vm/utilities/exceptions.hpp index 8651604be5c..5649f4e600d 100644 --- a/hotspot/src/share/vm/utilities/exceptions.hpp +++ b/hotspot/src/share/vm/utilities/exceptions.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2011, 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 diff --git a/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp b/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp index cc244b4a78d..4ba099ace3b 100644 --- a/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp +++ b/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2011, 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 diff --git a/hotspot/src/share/vm/utilities/globalDefinitions_sparcWorks.hpp b/hotspot/src/share/vm/utilities/globalDefinitions_sparcWorks.hpp index e11fa58fa90..fca43e0d787 100644 --- a/hotspot/src/share/vm/utilities/globalDefinitions_sparcWorks.hpp +++ b/hotspot/src/share/vm/utilities/globalDefinitions_sparcWorks.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/utilities/globalDefinitions_visCPP.hpp b/hotspot/src/share/vm/utilities/globalDefinitions_visCPP.hpp index 2d6d7daf853..36549993a9e 100644 --- a/hotspot/src/share/vm/utilities/globalDefinitions_visCPP.hpp +++ b/hotspot/src/share/vm/utilities/globalDefinitions_visCPP.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/utilities/hashtable.cpp b/hotspot/src/share/vm/utilities/hashtable.cpp index aad68f13760..7e937966c8d 100644 --- a/hotspot/src/share/vm/utilities/hashtable.cpp +++ b/hotspot/src/share/vm/utilities/hashtable.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/src/share/vm/utilities/hashtable.hpp b/hotspot/src/share/vm/utilities/hashtable.hpp index 21747e6855b..a4f0e9012d4 100644 --- a/hotspot/src/share/vm/utilities/hashtable.hpp +++ b/hotspot/src/share/vm/utilities/hashtable.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/src/share/vm/utilities/hashtable.inline.hpp b/hotspot/src/share/vm/utilities/hashtable.inline.hpp index 09995537b2b..8cd2f89d0c8 100644 --- a/hotspot/src/share/vm/utilities/hashtable.inline.hpp +++ b/hotspot/src/share/vm/utilities/hashtable.inline.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/hotspot/src/share/vm/utilities/ostream.hpp b/hotspot/src/share/vm/utilities/ostream.hpp index 047cdac5821..b5eeb2a8307 100644 --- a/hotspot/src/share/vm/utilities/ostream.hpp +++ b/hotspot/src/share/vm/utilities/ostream.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/utilities/taskqueue.hpp b/hotspot/src/share/vm/utilities/taskqueue.hpp index 79f293444d9..5527e2fb62c 100644 --- a/hotspot/src/share/vm/utilities/taskqueue.hpp +++ b/hotspot/src/share/vm/utilities/taskqueue.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2011, 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 diff --git a/hotspot/src/share/vm/utilities/utf8.cpp b/hotspot/src/share/vm/utilities/utf8.cpp index c8c630032b9..be7d1881546 100644 --- a/hotspot/src/share/vm/utilities/utf8.cpp +++ b/hotspot/src/share/vm/utilities/utf8.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/utilities/utf8.hpp b/hotspot/src/share/vm/utilities/utf8.hpp index 182b6335e1e..c56d550ec9d 100644 --- a/hotspot/src/share/vm/utilities/utf8.hpp +++ b/hotspot/src/share/vm/utilities/utf8.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/hotspot/src/share/vm/utilities/xmlstream.cpp b/hotspot/src/share/vm/utilities/xmlstream.cpp index 8d6a0483970..c82010c1ba9 100644 --- a/hotspot/src/share/vm/utilities/xmlstream.cpp +++ b/hotspot/src/share/vm/utilities/xmlstream.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 diff --git a/hotspot/src/share/vm/utilities/xmlstream.hpp b/hotspot/src/share/vm/utilities/xmlstream.hpp index a2f39317a4a..98fec3c427f 100644 --- a/hotspot/src/share/vm/utilities/xmlstream.hpp +++ b/hotspot/src/share/vm/utilities/xmlstream.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 diff --git a/jdk/.hgtags b/jdk/.hgtags index 6c271f6efae..e85877d0b50 100644 --- a/jdk/.hgtags +++ b/jdk/.hgtags @@ -111,3 +111,4 @@ bdc069d3f9101f89ec3f81c2950ee2d68fa846d3 jdk7-b130 554adcfb615e63e62af530b1c10fcf7813a75b26 jdk7-b134 d8ced728159fbb2caa8b6adb477fd8efdbbdf179 jdk7-b135 aa13e7702cd9d8aca9aa38f1227f966990866944 jdk7-b136 +29296ea6529a418037ccce95903249665ef31c11 jdk7-b137 diff --git a/jdk/make/Makefile b/jdk/make/Makefile index afcdda1ee29..d6a1d319a6a 100644 --- a/jdk/make/Makefile +++ b/jdk/make/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1995, 2011, 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 diff --git a/jdk/make/com/sun/crypto/provider/Makefile b/jdk/make/com/sun/crypto/provider/Makefile index f52fb576fc6..281b02eb3d2 100644 --- a/jdk/make/com/sun/crypto/provider/Makefile +++ b/jdk/make/com/sun/crypto/provider/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2007, 2011, 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 diff --git a/jdk/make/com/sun/java/pack/Makefile b/jdk/make/com/sun/java/pack/Makefile index 0e73e055621..b9b79648bb3 100644 --- a/jdk/make/com/sun/java/pack/Makefile +++ b/jdk/make/com/sun/java/pack/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2003, 2011, 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 diff --git a/jdk/make/com/sun/java/pack/prop/Makefile b/jdk/make/com/sun/java/pack/prop/Makefile index b023d0505fd..0cb898d3913 100644 --- a/jdk/make/com/sun/java/pack/prop/Makefile +++ b/jdk/make/com/sun/java/pack/prop/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2003, 2011, 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 diff --git a/jdk/make/com/sun/jndi/cosnaming/Makefile b/jdk/make/com/sun/jndi/cosnaming/Makefile index 17425dba5f7..f8e9bf831c5 100644 --- a/jdk/make/com/sun/jndi/cosnaming/Makefile +++ b/jdk/make/com/sun/jndi/cosnaming/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2011, 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 diff --git a/jdk/make/com/sun/jndi/dns/Makefile b/jdk/make/com/sun/jndi/dns/Makefile index 4b34bdafaa9..bc412183ed9 100644 --- a/jdk/make/com/sun/jndi/dns/Makefile +++ b/jdk/make/com/sun/jndi/dns/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2000, 2011, 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 diff --git a/jdk/make/com/sun/jndi/ldap/Makefile b/jdk/make/com/sun/jndi/ldap/Makefile index 5b74b910167..798ac6c58a7 100644 --- a/jdk/make/com/sun/jndi/ldap/Makefile +++ b/jdk/make/com/sun/jndi/ldap/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2011, 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 diff --git a/jdk/make/com/sun/jndi/rmi/registry/Makefile b/jdk/make/com/sun/jndi/rmi/registry/Makefile index d8b3e6b512c..03dc25a21d3 100644 --- a/jdk/make/com/sun/jndi/rmi/registry/Makefile +++ b/jdk/make/com/sun/jndi/rmi/registry/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2011, 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 diff --git a/jdk/make/com/sun/nio/sctp/Makefile b/jdk/make/com/sun/nio/sctp/Makefile index 975776889e8..e71a92bc6ad 100644 --- a/jdk/make/com/sun/nio/sctp/Makefile +++ b/jdk/make/com/sun/nio/sctp/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2011, 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 diff --git a/jdk/make/com/sun/org/apache/xml/Makefile b/jdk/make/com/sun/org/apache/xml/Makefile index dc0f4831722..e0c25e9d273 100644 --- a/jdk/make/com/sun/org/apache/xml/Makefile +++ b/jdk/make/com/sun/org/apache/xml/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2003, 2011, 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 diff --git a/jdk/make/com/sun/rowset/Makefile b/jdk/make/com/sun/rowset/Makefile index 672aecef30d..53bbf0f9ab2 100644 --- a/jdk/make/com/sun/rowset/Makefile +++ b/jdk/make/com/sun/rowset/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2003, 2011, 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 diff --git a/jdk/make/com/sun/script/Makefile b/jdk/make/com/sun/script/Makefile index 1554d1f5936..58e134fad53 100644 --- a/jdk/make/com/sun/script/Makefile +++ b/jdk/make/com/sun/script/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2011, 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 diff --git a/jdk/make/com/sun/security/auth/module/Makefile b/jdk/make/com/sun/security/auth/module/Makefile index b53e1b307f3..c274fac637a 100644 --- a/jdk/make/com/sun/security/auth/module/Makefile +++ b/jdk/make/com/sun/security/auth/module/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2000, 2011, 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 diff --git a/jdk/make/com/sun/servicetag/Makefile b/jdk/make/com/sun/servicetag/Makefile index d647fc8df90..6a8bf6da52c 100644 --- a/jdk/make/com/sun/servicetag/Makefile +++ b/jdk/make/com/sun/servicetag/Makefile @@ -1,4 +1,4 @@ -# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2008, 2011, 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 diff --git a/jdk/make/com/sun/tools/attach/Makefile b/jdk/make/com/sun/tools/attach/Makefile index 0fa41d9d9ca..ac5994d89be 100644 --- a/jdk/make/com/sun/tools/attach/Makefile +++ b/jdk/make/com/sun/tools/attach/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2011, 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 diff --git a/jdk/make/common/Defs-embedded.gmk b/jdk/make/common/Defs-embedded.gmk new file mode 100644 index 00000000000..f196e2f4fed --- /dev/null +++ b/jdk/make/common/Defs-embedded.gmk @@ -0,0 +1,53 @@ +# +# Copyright (c) 2011, 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 +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# +# Variable definitions for SE Embedded builds. This file should +# not contain rules. +# +ifdef JAVASE_EMBEDDED + +# Compress jar files +COMPRESS_JARS = true + +# Don't mmap zip files +LIBZIP_CAN_USE_MMAP = false + +# Disable ALSA version check +REQUIRED_ALSA_VERSION = + +# Compilation settings +OTHER_CPPFLAGS += -DJAVASE_EMBEDDED + +# Product naming +PRODUCT_SUFFIX = SE Runtime Environment for Embedded +RUNTIME_NAME = $(PRODUCT_NAME) $(PRODUCT_SUFFIX) + +# Reduced JRE locations +JRE_REDUCED_HEADLESS_IMAGE_DIR = $(ABS_OUTPUTDIR)/j2re-reduced-headless-image +JRE_REDUCED_IMAGE_DIR = $(ABS_OUTPUTDIR)/j2re-reduced-image + +endif # JAVASE_EMBEDDED + diff --git a/jdk/make/common/Defs-solaris.gmk b/jdk/make/common/Defs-solaris.gmk index 50e5c4bb1de..1442959756f 100644 --- a/jdk/make/common/Defs-solaris.gmk +++ b/jdk/make/common/Defs-solaris.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1995, 2011, 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 diff --git a/jdk/make/common/Defs-windows.gmk b/jdk/make/common/Defs-windows.gmk index f5000e4465f..d04d60a7924 100644 --- a/jdk/make/common/Defs-windows.gmk +++ b/jdk/make/common/Defs-windows.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2011, 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 diff --git a/jdk/make/common/Defs.gmk b/jdk/make/common/Defs.gmk index a290efa652c..1e12d411942 100644 --- a/jdk/make/common/Defs.gmk +++ b/jdk/make/common/Defs.gmk @@ -115,6 +115,12 @@ endif include $(JDK_TOPDIR)/make/common/Defs-$(PLATFORM).gmk +# +# SE-Embedded support, if enabled +# + +include $(JDK_TOPDIR)/make/common/Defs-embedded.gmk + # # Cross-compilation Settings # @@ -144,7 +150,6 @@ ifdef BUILD_CLIENT_ONLY VM_NAME = client endif - # # Freetype logic is applicable to OpenJDK only # diff --git a/jdk/make/common/Demo.gmk b/jdk/make/common/Demo.gmk index 31c03249787..c804e94d180 100644 --- a/jdk/make/common/Demo.gmk +++ b/jdk/make/common/Demo.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2004, 2011, 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 diff --git a/jdk/make/common/Library.gmk b/jdk/make/common/Library.gmk index e7a24d477ff..9999406b718 100644 --- a/jdk/make/common/Library.gmk +++ b/jdk/make/common/Library.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1995, 2011, 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 @@ -78,7 +78,7 @@ LINKER=$(LINK.c) endif $(ACTUAL_LIBRARY):: $(INIT) $(TEMPDIR) $(LIBDIR) $(BINDIR) $(EXTDIR) classheaders - + @$(ECHO) Building lib:$(ACTUAL_LIBRARY) # # COMPILE_APPROACH: Different approaches to compile up the native object # files as quickly as possible. diff --git a/jdk/make/common/Program.gmk b/jdk/make/common/Program.gmk index dc0baec8836..23f704e46a7 100644 --- a/jdk/make/common/Program.gmk +++ b/jdk/make/common/Program.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1995, 2011, 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 diff --git a/jdk/make/common/Release-embedded.gmk b/jdk/make/common/Release-embedded.gmk new file mode 100644 index 00000000000..f7a87f28421 --- /dev/null +++ b/jdk/make/common/Release-embedded.gmk @@ -0,0 +1,232 @@ +# +# Copyright (c) 2011, 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 +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# +# SE-Embedded Reduced JRE targets +# +ifdef JAVASE_EMBEDDED + +reduced-image-jre reduced-headless-image-jre :: + @$(ECHO) ">>>Making "$@" @ `$(DATE)` ..." + +# Add the reduced-jre images as pre-reqs. These will be processed last +images:: reduced-image-jre reduced-headless-image-jre + + +###################################################### +# Create the headless rt.jar +###################################################### + +NOT_HEADLESS_RT_JAR_LIST = $(ABS_TEMPDIR)/not_hl_rt_jar.list +HEADLESS_RT_JAR_FILELIST=$(JARFILELISTS_TEMPDIR)/hl_rt_jar_list +TOTAL_HEADLESS_JAR_FILELIST=$(REORDER_TEMPDIR)/hl_file_list +HEADLESS_CLASSLIST=$(ABS_TEMPDIR)/headless_classlist + +# Add the jar file directories that we don't want in the +# headless JRE. If you want to remove most classes in a +# directory, put the directory in the NOT_HEADLESS_RT_JAR_LIST +# and put the individual classes you want to keep in the +# HEADLESS_CLASSLIST file. +$(NOT_HEADLESS_RT_JAR_LIST): $(NOT_RT_JAR_LIST) + $(RM) $(HEADLESS_CLASSLIST) + $(RM) $(NOT_HEADLESS_RT_JAR_LIST) + $(CP) $(NOT_RT_JAR_LIST) $(NOT_HEADLESS_RT_JAR_LIST) + $(ECHO) "sun/awt/motif/" >> $@ + $(ECHO) "sun/awt/X11/" >> $@ + $(ECHO) "sun/applet/" >> $@ + $(ECHO) "sun/java2d/opengl/" >> $@ + $(ECHO) "com/sun/java/swing/plaf/" >> $@ + $(ECHO) "sun/awt/motif/MFontConfiguration" >$(HEADLESS_CLASSLIST) + $(ECHO) "sun/applet/AppContextCreator" >>$(HEADLESS_CLASSLIST) + $(ECHO) "sun/applet/AppletAudioClip" >>$(HEADLESS_CLASSLIST) + $(ECHO) "sun/java2d/opengl/GLXSurfaceData" >>$(HEADLESS_CLASSLIST) + $(ECHO) "sun/java2d/opengl/GLXSurfaceData"\$$"GLXOffScreenSurfaceData" >>$(HEADLESS_CLASSLIST) + $(ECHO) "sun/java2d/opengl/GLXVolatileSurfaceManager" >>$(HEADLESS_CLASSLIST) + $(ECHO) "sun/java2d/opengl/OGLSurfaceData" >>$(HEADLESS_CLASSLIST) + +$(TOTAL_HEADLESS_JAR_FILELIST): $(JARREORDER_JARFILE) $(NOT_HEADLESS_RT_JAR_LIST) + $(prep-target) + $(RM) $@.temp + $(CD) $(CLASSBINDIR) ; \ + $(BOOT_JAVA_CMD) -jar $(JARREORDER_JARFILE) \ + -o $@.temp $(HEADLESS_CLASSLIST) $(NOT_HEADLESS_RT_JAR_LIST) . + $(MV) $@.temp $@ + @$(CD) $(CLASSBINDIR); $(java-vm-cleanup) + +# Create the headless rt.jar file list & non-class files list +MakeHeadlessJarFileList: $(TOTAL_HEADLESS_JAR_FILELIST) $(JARSPLIT_JARFILE) + @$(RM) $(HEADLESS_RT_JAR_FILELIST) $(RES_JAR_FILELIST) + $(BOOT_JAVA_CMD) -jar $(JARSPLIT_JARFILE) $(TOTAL_HEADLESS_JAR_FILELIST) \ + -o $(HEADLESS_RT_JAR_FILELIST) $(RES_JAR_FILELIST) + @$(java-vm-cleanup) + +# Create headless rt.jar +HL_RT_JAR=$(ABS_TEMPDIR)/rt-hl-orig.jar +$(HL_RT_JAR): MakeHeadlessJarFileList $(JAR_MANIFEST_FILE) + $(prep-target) + $(CD) $(CLASSBINDIR) ; \ + $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS) $(JAR_MANIFEST_FILE) $@ @$(HEADLESS_RT_JAR_FILELIST) \ + $(JAR_JFLAGS) + @$(CD) $(CLASSBINDIR); $(java-vm-cleanup) + + +# +# Produce a reduced Headful JRE for Embedded Devices +# +# The deployment binaries are added during the deployment build process +# + +# Binaries that don't get included in reduced jre image bin directory +NOT_REDUCEDJRE_BIN = \ + java_vm \ + kinit \ + klist \ + ktab \ + orbd \ + policytool \ + rmid \ + rmiregistry \ + servertool \ + tnameserv \ + pack200 \ + unpack200 + +# jars/resources/libs that don't get included in reduced jre image lib directory +NOT_REDUCEDJRE_LIB = \ + charsets.jar \ + ext/dnsns.jar \ + ext/localedata.jar \ + $(LIBARCH)/client/classes.jsa \ + $(LIBARCH)/libjavaplugin_jni.so \ + $(LIBARCH)/libjavaplugin_nscp_gcc29.so \ + $(LIBARCH)/libjavaplugin_nscp.so \ + $(LIBARCH)/libjavaplugin_oji.so + + +ifeq ($(PLATFORM), linux) + STRIP_OPTS = --strip-unneeded +else + STRIP_OPTS = -x +endif + + +reduced-image-jre:: + @$(ECHO) Starting to Produce Reduced JRE + @# + @# First make a copy of the full JRE + @# + $(RM) -r $(JRE_REDUCED_IMAGE_DIR) + $(MKDIR) -p $(JRE_REDUCED_IMAGE_DIR) + $(CD) $(JRE_IMAGE_DIR); \ + $(TAR) cf - . | ($(CD) $(JRE_REDUCED_IMAGE_DIR); $(TAR) xf - ); + + @# strip the main .so files + $(STRIP) $(STRIP_OPTS) $(JRE_REDUCED_IMAGE_DIR)/lib/$(LIBARCH)/client/libjvm.so +ifndef BUILD_CLIENT_ONLY + $(STRIP) $(STRIP_OPTS) $(JRE_REDUCED_IMAGE_DIR)/lib/$(LIBARCH)/server/libjvm.so +endif + + @# + @# Remove all of the files that are not needed for the + @# reduced JRE + @# + for l in $(NOT_REDUCEDJRE_BIN) ; do \ + $(RM) $(JRE_REDUCED_IMAGE_DIR)/bin/$$l ; \ + done + for l in $(NOT_REDUCEDJRE_LIB) ; do \ + $(RM) $(JRE_REDUCED_IMAGE_DIR)/lib/$$l ; \ + done + + @# Remove misc. other files + $(RM) -r $(JRE_REDUCED_IMAGE_DIR)/man + $(RM) -f $(JRE_REDUCED_IMAGE_DIR)/CHANGES + + @$(ECHO) Done Creating Reduced JRE + +# +# Produce a reduced Headless JRE +# +reduced-headless-image-jre:: $(RT_JAR) $(RESOURCES_JAR) $(BUILD_META_INDEX) $(HL_RT_JAR) + @$(ECHO) Starting to Produce Reduced Headless JRE + @# + @# First make a copy of the reduced JRE we just built + @# + $(RM) -r $(JRE_REDUCED_HEADLESS_IMAGE_DIR) + $(MKDIR) -p $(JRE_REDUCED_HEADLESS_IMAGE_DIR) + $(CD) $(JRE_REDUCED_IMAGE_DIR); \ + $(TAR) cf - . | ($(CD) $(JRE_REDUCED_HEADLESS_IMAGE_DIR); $(TAR) xf - ); + + @# Replace the full rt.jar with the headless rt.jar + $(RM) -f $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/rt.jar + $(CP) $(HL_RT_JAR) $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/rt.jar + + @# + @# Remove all of the files that are not needed for the + @# reduced Headless JRE + @# + $(RM) -f $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/$(LIBARCH)/gtkhelper + $(RM) $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/$(LIBARCH)/libjsoundalsa.so + $(RM) -r $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/audio + $(RM) -fr $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/applet + $(RM) $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/$(LIBARCH)/awt_robot + $(RM) -r $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/$(LIBARCH)/xawt + $(RM) -r $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/$(LIBARCH)/libsplashscreen.so + @# Remove oblique fonts and reduce font support to LucidaSansRegular only + $(RM) -fr $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/oblique-fonts + $(RM) -f $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/LucidaBrightDemiBold.ttf + $(RM) -f $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/LucidaBrightDemiItalic.ttf + $(RM) -f $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/LucidaBrightItalic.ttf + $(RM) -f $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/LucidaBrightRegular.ttf + $(RM) -f $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/LucidaSansDemiBold.ttf + $(RM) -f $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/LucidaTypewriterBold.ttf + $(RM) -f $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/LucidaTypewriterRegular.ttf + +ifeq ($(PLATFORM), linux) +# put out minimal fonts.dir file for the remaining font + $(RM) -f $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/fonts.dir + $(ECHO) 6>$(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/fonts.dir + $(ECHO) "LucidaSansRegular.ttf -b&h-lucidasans-medium-r-normal-sans-0-0-0-0-p-0-iso8859-1">>$(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/fonts.dir + $(ECHO) "LucidaSansRegular.ttf -b&h-lucidasans-medium-r-normal-sans-0-0-0-0-p-0-iso8859-2">>$(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/fonts.dir + $(ECHO) "LucidaSansRegular.ttf -b&h-lucidasans-medium-r-normal-sans-0-0-0-0-p-0-iso8859-4">>$(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/fonts.dir + $(ECHO) "LucidaSansRegular.ttf -b&h-lucidasans-medium-r-normal-sans-0-0-0-0-p-0-iso8859-5">>$(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/fonts.dir + $(ECHO) "LucidaSansRegular.ttf -b&h-lucidasans-medium-r-normal-sans-0-0-0-0-p-0-iso8859-7">>$(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/fonts.dir + $(ECHO) "LucidaSansRegular.ttf -b&h-lucidasans-medium-r-normal-sans-0-0-0-0-p-0-iso8859-9">>$(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/fonts.dir + +endif # Linux + + @# + @# all done with JRE reduced headless image + @# + + @$(ECHO) Done Creating Reduced Headless JRE + +images-clobber:: + $(RM) -r $(JRE_REDUCED_IMAGE_DIR) + $(RM) -r $(JRE_REDUCED_HEADLESS_IMAGE_DIR) + +.PHONY: reduced-image-jre reduced-headless-image-jre + +endif # JAVASE_EMBEDDED + diff --git a/jdk/make/common/Release.gmk b/jdk/make/common/Release.gmk index 63e03c44edc..17297d573b0 100644 --- a/jdk/make/common/Release.gmk +++ b/jdk/make/common/Release.gmk @@ -38,7 +38,7 @@ THIS_JDK_VERSION := $(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSIO IMAGE_BINDIR = bin -# The compiler should not issue a "Sun Propietary" warning when compiling +# The compiler should not issue a "Proprietary" warning when compiling # classes in the com.sun.java.swing.plaf packages, since we've always # allowed, and even advocated, extending them (see bug 6476749). # @@ -195,6 +195,16 @@ if [ "$(JA_DIRNAME)" != "" ] ; then \ fi endef + +# no compression unless requested +ifndef COMPRESS_JARS + CREATE_JAR_OPTS = c0mf + CREATE_JAR_OPTS_NOMANIFEST = c0f +else + CREATE_JAR_OPTS = cmf + CREATE_JAR_OPTS_NOMANIFEST = cf +endif + # # Targets. # @@ -222,7 +232,7 @@ images:: sanity-images post-sanity-images \ $(INITIAL_IMAGE_JRE) $(INITIAL_IMAGE_JDK) \ trim-image-jre trim-image-jdk \ identify-image-jre identify-image-jdk \ - process-image-jre process-image-jdk sec-files sec-files-win jgss-files + process-image-jre process-image-jdk sec-files sec-files-win jgss-files # Don't use these image-jre:: initial-image-jre trim-image-jre identify-image-jre process-image-jre @@ -613,7 +623,7 @@ RESOURCES_JAR=$(ABS_TEMPDIR)/resources-orig.jar $(RESOURCES_JAR): $(RES_JAR_FILELIST) $(JAR_MANIFEST_FILE) $(prep-target) $(CD) $(CLASSBINDIR) && \ - $(BOOT_JAR_CMD) c0mf $(JAR_MANIFEST_FILE) $@ \ + $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS) $(JAR_MANIFEST_FILE) $@ \ @$(RES_JAR_FILELIST) $(BOOT_JAR_JFLAGS) @$(CD) $(CLASSBINDIR) && $(java-vm-cleanup) @@ -622,7 +632,7 @@ JSSE_JAR=$(ABS_TEMPDIR)/jsse-orig.jar $(JSSE_JAR): $(JAR_MANIFEST_FILE) $(prep-target) $(CD) $(CLASSBINDIR) && \ - $(BOOT_JAR_CMD) c0mf $(JAR_MANIFEST_FILE) $@ \ + $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS) $(JAR_MANIFEST_FILE) $@ \ $(JSSE_CLASSES_DIRS) $(BOOT_JAR_JFLAGS) @$(CD) $(CLASSBINDIR) && $(java-vm-cleanup) @@ -669,7 +679,7 @@ RT_JAR=$(ABS_TEMPDIR)/rt-orig.jar $(RT_JAR): $(RT_JAR_FILELIST) $(JAR_MANIFEST_FILE) $(prep-target) $(CD) $(CLASSBINDIR) && \ - $(BOOT_JAR_CMD) c0mf $(JAR_MANIFEST_FILE) $@ \ + $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS) $(JAR_MANIFEST_FILE) $@ \ @$(RT_JAR_FILELIST) $(BOOT_JAR_JFLAGS) @$(CD) $(CLASSBINDIR) && $(java-vm-cleanup) @@ -677,6 +687,10 @@ $(RT_JAR): $(RT_JAR_FILELIST) $(JAR_MANIFEST_FILE) BUILDMETAINDEX_JARFILE = $(ABS_BUILDTOOLJARDIR)/buildmetaindex.jar +# SE-Embedded targets if enabled +include $(JDK_TOPDIR)/make/common/Release-embedded.gmk + + ###################################################### # JRE Image ###################################################### @@ -924,7 +938,7 @@ initial-image-jdk:: initial-image-jdk-setup \ @# lib/tools.jar @# $(CD) $(CLASSBINDIR) && \ - $(BOOT_JAR_CMD) c0f $(ABS_LIBDIR)/tools.jar \ + $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS_NOMANIFEST) $(ABS_LIBDIR)/tools.jar \ $(TOOLS) $(BOOT_JAR_JFLAGS) @$(CD) $(CLASSBINDIR) && $(java-vm-cleanup) $(CP) $(LIBDIR)/tools.jar $(JDK_IMAGE_DIR)/lib/tools.jar @@ -937,7 +951,7 @@ initial-image-jdk:: initial-image-jdk-setup \ -Acom.sun.tools.javac.sym.Jar=$(RT_JAR) \ -Acom.sun.tools.javac.sym.Dest=$(OUTPUTDIR)/symbols/META-INF/sym/rt.jar \ $(CORE_PKGS) $(NON_CORE_PKGS) $(EXCLUDE_PROPWARN_PKGS) $(EXPORTED_PRIVATE_PKGS) - $(BOOT_JAR_CMD) c0f $(LIBDIR)/ct.sym \ + $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS_NOMANIFEST) $(LIBDIR)/ct.sym \ -C $(OUTPUTDIR)/symbols META-INF $(BOOT_JAR_JFLAGS) @$(java-vm-cleanup) $(CP) $(LIBDIR)/ct.sym $(JDK_IMAGE_DIR)/lib/ct.sym diff --git a/jdk/make/common/Sanity.gmk b/jdk/make/common/Sanity.gmk index 5060b8c12b4..27fe5bdfa16 100644 --- a/jdk/make/common/Sanity.gmk +++ b/jdk/make/common/Sanity.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2001, 2011, 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 diff --git a/jdk/make/common/Subdirs.gmk b/jdk/make/common/Subdirs.gmk index 4da8acfca4e..f212d50c162 100644 --- a/jdk/make/common/Subdirs.gmk +++ b/jdk/make/common/Subdirs.gmk @@ -1,4 +1,4 @@ -# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2010, 2011, 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 diff --git a/jdk/make/common/shared/Compiler-msvc.gmk b/jdk/make/common/shared/Compiler-msvc.gmk index ff00095c565..c50706c5fbd 100644 --- a/jdk/make/common/shared/Compiler-msvc.gmk +++ b/jdk/make/common/shared/Compiler-msvc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2011, 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 diff --git a/jdk/make/common/shared/Defs-control.gmk b/jdk/make/common/shared/Defs-control.gmk index 288eb83e01c..4a67131a235 100644 --- a/jdk/make/common/shared/Defs-control.gmk +++ b/jdk/make/common/shared/Defs-control.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1995, 2011, 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 diff --git a/jdk/make/common/shared/Defs-javadoc.gmk b/jdk/make/common/shared/Defs-javadoc.gmk index f63ec22f501..c222ad10fa4 100644 --- a/jdk/make/common/shared/Defs-javadoc.gmk +++ b/jdk/make/common/shared/Defs-javadoc.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2011, 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 diff --git a/jdk/make/common/shared/Defs-solaris.gmk b/jdk/make/common/shared/Defs-solaris.gmk index be18063509c..261583d9af9 100644 --- a/jdk/make/common/shared/Defs-solaris.gmk +++ b/jdk/make/common/shared/Defs-solaris.gmk @@ -194,13 +194,30 @@ MAPFILE_WARNING-OPT=WARNING MAPFILE_WARNING-=WARNING MAPFILE_WARNING=$(MAPFILE_WARNING-$(VARIANT)) +# Some libraries do not have mapfiles for multiple reasons. +# These libraries for sparc and sparcv9 are exceptions to the mapfile rule: +# libjdgaSUNWafb.so +# libjdgaSUNWcg6.so +# libjdgaSUNWffb.so +# libjdgaSUNWm64.so +# libxinerama.so +# The library libJdbcOdbc.so has also been given an exception. +# The JNI/JVMTI demo libraries are also missing mapfiles, no exceptions yet. +ifeq ($(ARCH_FAMILY),sparc) + MAPFILE_EXCEPTIONS = \ + (libJdbcOdbc|libjdgaSUNWafb|libjdgaSUNWcg6|libjdgaSUNWffb|libjdgaSUNWm64|libxinerama) +else + MAPFILE_EXCEPTIONS = (libJdbcOdbc) +endif + # Macro to check it's input file for banned dependencies and verify the # binary built properly. Relies on process exit code. ifndef CROSS_COMPILE_ARCH define binary_file_verification # binary_file ( \ $(ECHO) "Checking for mapfile use in: $1" && \ - if [ "`$(NM) -g -D $1 | $(EGREP) -v 'UNDEF' | $(EGREP) 'SUNWprivate'`" = "" ] ; then \ + if [ "`$(ECHO) $(basename $(notdir $1)) | $(EGREP) '$(MAPFILE_EXCEPTIONS)'`" = "" \ + -a "`$(NM) -g -D $1 | $(EGREP) -v 'UNDEF' | $(EGREP) 'SUNWprivate'`" = "" ] ; then \ $(ECHO) "$(MAPFILE_WARNING): File was not built with a mapfile: $1"; \ fi && \ $(ECHO) "Library loads for: $1" && \ diff --git a/jdk/make/common/shared/Defs-windows.gmk b/jdk/make/common/shared/Defs-windows.gmk index 44df76cb3c2..af611f3aab2 100644 --- a/jdk/make/common/shared/Defs-windows.gmk +++ b/jdk/make/common/shared/Defs-windows.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2011, 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 diff --git a/jdk/make/common/shared/Defs.gmk b/jdk/make/common/shared/Defs.gmk index cfc889a0148..cc723658203 100644 --- a/jdk/make/common/shared/Defs.gmk +++ b/jdk/make/common/shared/Defs.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2011, 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 diff --git a/jdk/make/common/shared/Sanity-Settings.gmk b/jdk/make/common/shared/Sanity-Settings.gmk index 0184a74792d..36179fed5fd 100644 --- a/jdk/make/common/shared/Sanity-Settings.gmk +++ b/jdk/make/common/shared/Sanity-Settings.gmk @@ -185,7 +185,9 @@ ifeq ($(PLATFORM),windows) endif endif ifeq ($(PLATFORM),linux) - ALL_SETTINGS+=$(call addRequiredSetting,ALSA_VERSION) + ifdef REQUIRED_ALSA_VERSION + ALL_SETTINGS+=$(call addRequiredSetting,ALSA_VERSION) + endif endif ALL_SETTINGS+=$(call addRequiredVersionSetting,OS_VERSION) ALL_SETTINGS+=$(call addOptionalSetting,OS_VARIANT_NAME) diff --git a/jdk/make/docs/Makefile b/jdk/make/docs/Makefile index 520272b5f5a..ee8eb03b7a9 100644 --- a/jdk/make/docs/Makefile +++ b/jdk/make/docs/Makefile @@ -1,4 +1,4 @@ -# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2011, 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 @@ -40,7 +40,7 @@ COPYRIGHT_URL-7 = $(DOCSDIR_URL)/legal/cpyr.html COPYRIGHT_URL = $(COPYRIGHT_URL-$(JDK_MINOR_VERSION)) # Url to bug filing site -BUG_SUBMIT_URL = http://bugs.sun.com/services/bugreport/index.jsp +BUG_SUBMIT_URL = http://bugreport.sun.com/bugreport/ # Common line for how to submit a bug or rfe BUG_SUBMIT_LINE = Submit a bug or feature diff --git a/jdk/make/docs/NON_CORE_PKGS.gmk b/jdk/make/docs/NON_CORE_PKGS.gmk index a7f4aaf1dd2..25c79408bdb 100644 --- a/jdk/make/docs/NON_CORE_PKGS.gmk +++ b/jdk/make/docs/NON_CORE_PKGS.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2002, 2011, 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 diff --git a/jdk/make/java/awt/Makefile b/jdk/make/java/awt/Makefile index 1da8f498cfc..6cabc50f19a 100644 --- a/jdk/make/java/awt/Makefile +++ b/jdk/make/java/awt/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1995, 2011, 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 diff --git a/jdk/make/java/fdlibm/Makefile b/jdk/make/java/fdlibm/Makefile index 38e4bfd9f55..39346de1fdb 100644 --- a/jdk/make/java/fdlibm/Makefile +++ b/jdk/make/java/fdlibm/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2011, 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 diff --git a/jdk/make/java/java/FILES_java.gmk b/jdk/make/java/java/FILES_java.gmk index 06c93db4e5d..d07efda0aa1 100644 --- a/jdk/make/java/java/FILES_java.gmk +++ b/jdk/make/java/java/FILES_java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1996, 2011, 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 diff --git a/jdk/make/java/java/Makefile b/jdk/make/java/java/Makefile index 9a2627096f0..a51082614d3 100644 --- a/jdk/make/java/java/Makefile +++ b/jdk/make/java/java/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2011, 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 @@ -198,10 +198,12 @@ INSTALL_DOT_LIB = true # # What to link? +# On Windows, shell32 is not normally required and so it is delay loaded. # ifeq ($(PLATFORM),windows) OTHER_LDLIBS += $(JVMLIB) -libpath:$(OBJDIR)/../../../fdlibm/$(OBJDIRNAME) fdlibm.lib \ - -libpath:$(OBJDIR)/../../../verify/$(OBJDIRNAME) verify.lib + -libpath:$(OBJDIR)/../../../verify/$(OBJDIRNAME) verify.lib \ + shell32.lib delayimp.lib /DELAYLOAD:shell32.dll else OTHER_LDLIBS += $(JVMLIB) -lverify $(LIBSOCKET) $(LIBNSL) -ldl \ -L$(OBJDIR)/../../../fdlibm/$(OBJDIRNAME) -lfdlibm.$(ARCH) diff --git a/jdk/make/java/java_crw_demo/Makefile b/jdk/make/java/java_crw_demo/Makefile index 6b3732079aa..ebcadd74656 100644 --- a/jdk/make/java/java_crw_demo/Makefile +++ b/jdk/make/java/java_crw_demo/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2004, 2011, 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 diff --git a/jdk/make/java/java_hprof_demo/Makefile b/jdk/make/java/java_hprof_demo/Makefile index 8ad85dc0c5b..9449d2d7062 100644 --- a/jdk/make/java/java_hprof_demo/Makefile +++ b/jdk/make/java/java_hprof_demo/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2003, 2011, 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 diff --git a/jdk/make/java/jli/Makefile b/jdk/make/java/jli/Makefile index 7ecee49fb2f..f342f62b239 100644 --- a/jdk/make/java/jli/Makefile +++ b/jdk/make/java/jli/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2011, 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 diff --git a/jdk/make/java/logging/Makefile b/jdk/make/java/logging/Makefile index 5f9153fb7b1..11ce8df2bf0 100644 --- a/jdk/make/java/logging/Makefile +++ b/jdk/make/java/logging/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2000, 2011, 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 diff --git a/jdk/make/java/main/java/Makefile b/jdk/make/java/main/java/Makefile index 452099f7a91..2a40bdf9fdd 100644 --- a/jdk/make/java/main/java/Makefile +++ b/jdk/make/java/main/java/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1996, 2011, 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 diff --git a/jdk/make/java/main/javaw/Makefile b/jdk/make/java/main/javaw/Makefile index e2fc6161aa7..93a536e9edd 100644 --- a/jdk/make/java/main/javaw/Makefile +++ b/jdk/make/java/main/javaw/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2000, 2011, 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 diff --git a/jdk/make/java/management/Makefile b/jdk/make/java/management/Makefile index ebf3640b812..aa9b889546d 100644 --- a/jdk/make/java/management/Makefile +++ b/jdk/make/java/management/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2003, 2011, 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 @@ -86,7 +86,8 @@ OTHER_INCLUDES += \ -I$(SHARE_SRC)/native/sun/management ifeq ($(PLATFORM),windows) - OTHER_LDLIBS += $(JVMLIB) + # Need process status helper API (psapi) on Windows + OTHER_LDLIBS += $(JVMLIB) psapi.lib endif # diff --git a/jdk/make/java/net/Makefile b/jdk/make/java/net/Makefile index 6e865fa24ec..e6429c6c209 100644 --- a/jdk/make/java/net/Makefile +++ b/jdk/make/java/net/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1995, 2011, 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 @@ -37,10 +37,6 @@ include FILES_c.gmk AUTO_FILES_JAVA_DIRS = java/net ifeq ($(PLATFORM), windows) - # Windows 9x module only needed on 32-bit build - ifeq ($(ARCH_DATA_MODEL), 32) - FILES_c += NetworkInterface_win9x.c - endif FILES_c += NTLMAuthSequence.c FILES_c += NetworkInterface_winXP.c else @@ -96,7 +92,9 @@ include $(BUILDDIR)/common/Mapfile-vers.gmk include $(BUILDDIR)/common/Library.gmk ifeq ($(PLATFORM), windows) - OTHER_LDLIBS = ws2_32.lib $(JVMLIB) + OTHER_LDLIBS = ws2_32.lib $(JVMLIB) \ + secur32.lib iphlpapi.lib delayimp.lib \ + /DELAYLOAD:secur32.dll /DELAYLOAD:iphlpapi.dll else OTHER_LDLIBS = $(LIBSOCKET) $(LIBNSL) -ldl $(JVMLIB) endif diff --git a/jdk/make/java/nio/FILES_java.gmk b/jdk/make/java/nio/FILES_java.gmk index 9fbeafb48a3..34b41d5db38 100644 --- a/jdk/make/java/nio/FILES_java.gmk +++ b/jdk/make/java/nio/FILES_java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2000, 2011, 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 diff --git a/jdk/make/java/nio/mapfile-linux b/jdk/make/java/nio/mapfile-linux index 7738adb1a73..7af5388de96 100644 --- a/jdk/make/java/nio/mapfile-linux +++ b/jdk/make/java/nio/mapfile-linux @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2001, 2011, 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 diff --git a/jdk/make/java/nio/mapfile-solaris b/jdk/make/java/nio/mapfile-solaris index c295f8771ad..4d86f28a566 100644 --- a/jdk/make/java/nio/mapfile-solaris +++ b/jdk/make/java/nio/mapfile-solaris @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2001, 2011, 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 diff --git a/jdk/make/java/npt/Makefile b/jdk/make/java/npt/Makefile index 53f14aa5148..587f299ea44 100644 --- a/jdk/make/java/npt/Makefile +++ b/jdk/make/java/npt/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2004, 2011, 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 diff --git a/jdk/make/java/redist/Makefile b/jdk/make/java/redist/Makefile index 186296a5e34..392cd2c1624 100644 --- a/jdk/make/java/redist/Makefile +++ b/jdk/make/java/redist/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2011, 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 diff --git a/jdk/make/java/redist/fonts/Makefile b/jdk/make/java/redist/fonts/Makefile index 6c4c2f987df..d98fb8fb13b 100644 --- a/jdk/make/java/redist/fonts/Makefile +++ b/jdk/make/java/redist/fonts/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2011, 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 diff --git a/jdk/make/java/redist/sajdi/Makefile b/jdk/make/java/redist/sajdi/Makefile index 177c757cd05..b624b81ccc9 100644 --- a/jdk/make/java/redist/sajdi/Makefile +++ b/jdk/make/java/redist/sajdi/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2011, 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 diff --git a/jdk/make/java/sql/Makefile b/jdk/make/java/sql/Makefile index 6b71ac1644b..e3155b7713e 100644 --- a/jdk/make/java/sql/Makefile +++ b/jdk/make/java/sql/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1996, 2011, 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 diff --git a/jdk/make/java/text/base/FILES_java.gmk b/jdk/make/java/text/base/FILES_java.gmk index 34c3491d209..9d2667364d3 100644 --- a/jdk/make/java/text/base/FILES_java.gmk +++ b/jdk/make/java/text/base/FILES_java.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1996, 2011, 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 diff --git a/jdk/make/java/text/base/Makefile b/jdk/make/java/text/base/Makefile index d53d21b822c..8320363dc79 100644 --- a/jdk/make/java/text/base/Makefile +++ b/jdk/make/java/text/base/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1996, 2011, 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 diff --git a/jdk/make/java/util/FILES_properties.gmk b/jdk/make/java/util/FILES_properties.gmk index 5f3bec5e516..4f9f7cd9148 100644 --- a/jdk/make/java/util/FILES_properties.gmk +++ b/jdk/make/java/util/FILES_properties.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2011, 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 @@ -55,6 +55,7 @@ FILES_compiled_properties = \ sun/util/resources/LocaleNames_mt.properties \ sun/util/resources/LocaleNames_nl.properties \ sun/util/resources/LocaleNames_no.properties \ + sun/util/resources/LocaleNames_no_NO_NY.properties \ sun/util/resources/LocaleNames_pl.properties \ sun/util/resources/LocaleNames_pt.properties \ sun/util/resources/LocaleNames_pt_BR.properties \ diff --git a/jdk/make/java/verify/Makefile b/jdk/make/java/verify/Makefile index d0399120d81..4343e4aa0dc 100644 --- a/jdk/make/java/verify/Makefile +++ b/jdk/make/java/verify/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2011, 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 diff --git a/jdk/make/java/zip/Makefile b/jdk/make/java/zip/Makefile index fd83ea3f282..906e7e85096 100644 --- a/jdk/make/java/zip/Makefile +++ b/jdk/make/java/zip/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1996, 2011, 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 @@ -50,7 +50,10 @@ FILES_export = \ java/util/jar/JarFile.java ifneq ($(PLATFORM), windows) -OTHER_CFLAGS += -DUSE_MMAP + # Use mmap unless explicitly disallowed + ifneq ($(LIBZIP_CAN_USE_MMAP),false) + OTHER_CFLAGS += -DUSE_MMAP + endif endif # diff --git a/jdk/make/javax/crypto/Defs-jce.gmk b/jdk/make/javax/crypto/Defs-jce.gmk index cfb70b45c48..bd5cec9d4eb 100644 --- a/jdk/make/javax/crypto/Defs-jce.gmk +++ b/jdk/make/javax/crypto/Defs-jce.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2007, 2009, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2007, 2011, 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 diff --git a/jdk/make/javax/crypto/Makefile b/jdk/make/javax/crypto/Makefile index f2f8baed554..f8b55a411a3 100644 --- a/jdk/make/javax/crypto/Makefile +++ b/jdk/make/javax/crypto/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2007, 2011, 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 diff --git a/jdk/make/javax/imageio/Makefile b/jdk/make/javax/imageio/Makefile index 1a64c1038ba..c73f6f549f0 100644 --- a/jdk/make/javax/imageio/Makefile +++ b/jdk/make/javax/imageio/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2000, 2011, 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 diff --git a/jdk/make/javax/print/Makefile b/jdk/make/javax/print/Makefile index 290de0f4126..6e1c5c9e5d0 100644 --- a/jdk/make/javax/print/Makefile +++ b/jdk/make/javax/print/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2000, 2011, 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 diff --git a/jdk/make/javax/sound/Makefile b/jdk/make/javax/sound/Makefile index 9a6659c41b2..a048f23dd3f 100644 --- a/jdk/make/javax/sound/Makefile +++ b/jdk/make/javax/sound/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2011, 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 diff --git a/jdk/make/javax/sound/jsoundalsa/Makefile b/jdk/make/javax/sound/jsoundalsa/Makefile index 95161cd6b87..11b4987dc88 100644 --- a/jdk/make/javax/sound/jsoundalsa/Makefile +++ b/jdk/make/javax/sound/jsoundalsa/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2002, 2011, 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 diff --git a/jdk/make/javax/sound/jsoundds/Makefile b/jdk/make/javax/sound/jsoundds/Makefile index 26c59f1ab4b..f476b39811a 100644 --- a/jdk/make/javax/sound/jsoundds/Makefile +++ b/jdk/make/javax/sound/jsoundds/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2003, 2011, 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 diff --git a/jdk/make/javax/sql/Makefile b/jdk/make/javax/sql/Makefile index 91a8db6cabc..cd138cb30f2 100644 --- a/jdk/make/javax/sql/Makefile +++ b/jdk/make/javax/sql/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2000, 2011, 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 diff --git a/jdk/make/javax/swing/Makefile b/jdk/make/javax/swing/Makefile index 97c5060f7a2..4c67858b885 100644 --- a/jdk/make/javax/swing/Makefile +++ b/jdk/make/javax/swing/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2011, 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 diff --git a/jdk/make/javax/swing/plaf/Makefile b/jdk/make/javax/swing/plaf/Makefile index ceb5304a8fa..394657f1e3e 100644 --- a/jdk/make/javax/swing/plaf/Makefile +++ b/jdk/make/javax/swing/plaf/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2011, 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 diff --git a/jdk/make/jdk_generic_profile.sh b/jdk/make/jdk_generic_profile.sh index 9d7ead8b865..0190fc6bc24 100644 --- a/jdk/make/jdk_generic_profile.sh +++ b/jdk/make/jdk_generic_profile.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2007, 2011, 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 diff --git a/jdk/make/jpda/back/Makefile b/jdk/make/jpda/back/Makefile index 65d47e922c4..a0d9721b15d 100644 --- a/jdk/make/jpda/back/Makefile +++ b/jdk/make/jpda/back/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2011, 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 diff --git a/jdk/make/jpda/transport/Makefile b/jdk/make/jpda/transport/Makefile index a6f18ec29ad..6d8311bd90e 100644 --- a/jdk/make/jpda/transport/Makefile +++ b/jdk/make/jpda/transport/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2011, 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 diff --git a/jdk/make/jpda/transport/shmem/Makefile b/jdk/make/jpda/transport/shmem/Makefile index 60e0276a429..58987c8cca8 100644 --- a/jdk/make/jpda/transport/shmem/Makefile +++ b/jdk/make/jpda/transport/shmem/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2011, 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 diff --git a/jdk/make/jpda/transport/socket/Makefile b/jdk/make/jpda/transport/socket/Makefile index 3a742d337b2..ac1299d8e7e 100644 --- a/jdk/make/jpda/transport/socket/Makefile +++ b/jdk/make/jpda/transport/socket/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2011, 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 diff --git a/jdk/make/jpda/tty/Makefile b/jdk/make/jpda/tty/Makefile index 07a63fe8731..20ebd06acbe 100644 --- a/jdk/make/jpda/tty/Makefile +++ b/jdk/make/jpda/tty/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2011, 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 diff --git a/jdk/make/jprt.properties b/jdk/make/jprt.properties index 7cb87c1e3a3..b479e22f06a 100644 --- a/jdk/make/jprt.properties +++ b/jdk/make/jprt.properties @@ -52,8 +52,11 @@ jprt.build.targets= \ ${jprt.my.windows.i586}-{product|fastdebug}, \ windows_x64_5.2-{product|fastdebug} +# User can select the test set with jprt submit "-testset name" option +jprt.my.test.set=${jprt.test.set} + # Standard vm test target -jprt.test.targets= \ +jprt.vm.default.test.targets= \ solaris_sparc_5.10-product-c1-jvm98, \ solaris_sparcv9_5.10-product-c2-jvm98, \ solaris_i586_5.10-product-c1-jvm98, \ @@ -63,8 +66,10 @@ jprt.test.targets= \ ${jprt.my.windows.i586}-product-c1-jvm98, \ windows_x64_5.2-product-c2-jvm98 -# User can select the test set with jprt submit "-testset name" option -jprt.my.test.set=${jprt.test.set} +# Select vm testlist to use (allow for testset to be empty too) +jprt.vm.all.test.targets=${jprt.vm.default.test.targets} +jprt.vm..test.targets=${jprt.vm.default.test.targets} +jprt.test.targets=${jprt.vm.${jprt.my.test.set}.test.targets} # Default jdk test targets in test/Makefile (no fastdebug & limited c2) jprt.make.rule.default.test.targets= \ @@ -281,6 +286,21 @@ jprt.make.rule.all.test.targets= \ ${jprt.my.windows.i586}-product-c1-jdk_tools2, \ windows_x64_5.2-product-c2-jdk_tools2 +# JCK test targets in test/Makefile (no fastdebug & limited c2, windows broken) +jprt.my.jck.test.target.set= \ + solaris_sparc_5.10-product-c1-JCK7TESTRULE, \ + solaris_sparcv9_5.10-product-c2-JCK7TESTRULE, \ + solaris_i586_5.10-product-c1-JCK7TESTRULE, \ + solaris_x64_5.10-product-c2-JCK7TESTRULE, \ + linux_i586_2.6-product-c1-JCK7TESTRULE, \ + linux_x64_2.6-product-c2-JCK7TESTRULE + +# JCK testset targets (e.g. jprt submit -testset jck ... ) +jprt.make.rule.jck.test.targets= \ + ${jprt.my.jck.test.target.set:JCK7TESTRULE=jck7devtools}, \ + ${jprt.my.jck.test.target.set:JCK7TESTRULE=jck7runtime}, \ + ${jprt.my.jck.test.target.set:JCK7TESTRULE=jck7compiler} + # Select list to use (allow for testset to be empty too) jprt.make.rule..test.targets=${jprt.make.rule.default.test.targets} jprt.make.rule.test.targets=${jprt.make.rule.${jprt.my.test.set}.test.targets} diff --git a/jdk/make/launchers/Makefile b/jdk/make/launchers/Makefile index 8d7036be179..cc07bbe9cb0 100644 --- a/jdk/make/launchers/Makefile +++ b/jdk/make/launchers/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2004, 2011, 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 @@ -44,8 +44,17 @@ $(MAKE) -f Makefile.launcher \ endef # Run MAKE $@ for all generic launchers -define make-all-launchers +ifndef BUILD_HEADLESS_ONLY +define make-appletviewer $(call make-launcher, appletviewer, sun.applet.Main, , ) +endef +else +define make-appletviewer +endef +endif + +define make-all-launchers +$(make-appletviewer) $(call make-launcher, apt, com.sun.tools.apt.Main, , ) $(call make-launcher, extcheck, com.sun.tools.extcheck.Main, , ) $(call make-launcher, idlj, com.sun.tools.corba.se.idl.toJavaPortable.Compile, , ) diff --git a/jdk/make/mkdemo/Makefile b/jdk/make/mkdemo/Makefile index 1e1739467cc..c134316218e 100644 --- a/jdk/make/mkdemo/Makefile +++ b/jdk/make/mkdemo/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2011, 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 diff --git a/jdk/make/mkdemo/jfc/Font2DTest/Makefile b/jdk/make/mkdemo/jfc/Font2DTest/Makefile index bf60090be40..4eee7bde227 100644 --- a/jdk/make/mkdemo/jfc/Font2DTest/Makefile +++ b/jdk/make/mkdemo/jfc/Font2DTest/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2011, 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 diff --git a/jdk/make/mkdemo/jfc/Java2D/Makefile b/jdk/make/mkdemo/jfc/Java2D/Makefile index edd60bb3cef..2833fc4c97a 100644 --- a/jdk/make/mkdemo/jfc/Java2D/Makefile +++ b/jdk/make/mkdemo/jfc/Java2D/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2011, 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 diff --git a/jdk/make/mkdemo/jfc/Makefile b/jdk/make/mkdemo/jfc/Makefile index 768e5b8f4a8..c1063774f64 100644 --- a/jdk/make/mkdemo/jfc/Makefile +++ b/jdk/make/mkdemo/jfc/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2011, 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 @@ -39,7 +39,8 @@ SUBDIRS = \ Notepad \ SampleTree \ SwingApplet \ - TableExample + TableExample \ + TransparentRuler # Some demos aren't currently included in OpenJDK ifndef OPENJDK diff --git a/jdk/make/mkdemo/jfc/SwingApplet/Makefile b/jdk/make/mkdemo/jfc/SwingApplet/Makefile index ba2395585c7..e739c67dcfb 100644 --- a/jdk/make/mkdemo/jfc/SwingApplet/Makefile +++ b/jdk/make/mkdemo/jfc/SwingApplet/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2002, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2011, 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 diff --git a/jdk/make/mkdemo/jfc/SwingSet2/Makefile b/jdk/make/mkdemo/jfc/SwingSet2/Makefile index 837d1668c88..8cfef8ba75f 100644 --- a/jdk/make/mkdemo/jfc/SwingSet2/Makefile +++ b/jdk/make/mkdemo/jfc/SwingSet2/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2011, 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 diff --git a/jdk/make/mkdemo/jfc/SwingSet3/Makefile b/jdk/make/mkdemo/jfc/SwingSet3/Makefile index 9b9fddacaf5..5ba7886a452 100644 --- a/jdk/make/mkdemo/jfc/SwingSet3/Makefile +++ b/jdk/make/mkdemo/jfc/SwingSet3/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2010, 2011, 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 diff --git a/jdk/make/mkdemo/jfc/TransparentRuler/Makefile b/jdk/make/mkdemo/jfc/TransparentRuler/Makefile new file mode 100644 index 00000000000..7092b875048 --- /dev/null +++ b/jdk/make/mkdemo/jfc/TransparentRuler/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (c) 2011, 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 +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# +# Makefile to build the TransparentRuler demo. +# + +BUILDDIR = ../../.. +PRODUCT = demo/jfc +DEMONAME = TransparentRuler +include $(BUILDDIR)/common/Defs.gmk + +DEMO_ROOT = $(SHARE_SRC)/demo/jfc/$(DEMONAME) +DEMO_TOPFILES = ./README.txt +DEMO_MAINCLASS = transparentruler.Ruler +DEMO_DESTDIR = $(DEMODIR)/jfc/$(DEMONAME) + + +# +# Demo jar building rules. +# +include $(BUILDDIR)/common/Demo.gmk diff --git a/jdk/make/mkdemo/jpda/Makefile b/jdk/make/mkdemo/jpda/Makefile index 9844a739258..443deb5a212 100644 --- a/jdk/make/mkdemo/jpda/Makefile +++ b/jdk/make/mkdemo/jpda/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2004, 2011, 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 diff --git a/jdk/make/mkdemo/jvmti/Makefile b/jdk/make/mkdemo/jvmti/Makefile index 33bdf6fa106..630c65b2410 100644 --- a/jdk/make/mkdemo/jvmti/Makefile +++ b/jdk/make/mkdemo/jvmti/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2004, 2011, 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 diff --git a/jdk/make/mkdemo/management/Makefile b/jdk/make/mkdemo/management/Makefile index 4ddccb7ec9f..40ec42c5237 100644 --- a/jdk/make/mkdemo/management/Makefile +++ b/jdk/make/mkdemo/management/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2004, 2011, 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 diff --git a/jdk/make/mksample/dtrace/Makefile b/jdk/make/mksample/dtrace/Makefile index 033d4d3ba4c..040be7bd37a 100644 --- a/jdk/make/mksample/dtrace/Makefile +++ b/jdk/make/mksample/dtrace/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2006, 2011, 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 diff --git a/jdk/make/mksample/jmx/jmx-scandir/Makefile b/jdk/make/mksample/jmx/jmx-scandir/Makefile index 3ee0e99ac6b..cb23dc6d288 100644 --- a/jdk/make/mksample/jmx/jmx-scandir/Makefile +++ b/jdk/make/mksample/jmx/jmx-scandir/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2006, 2011, 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 diff --git a/jdk/make/mksample/nbproject/Makefile b/jdk/make/mksample/nbproject/Makefile index 92ef6714746..d280b5d01a7 100644 --- a/jdk/make/mksample/nbproject/Makefile +++ b/jdk/make/mksample/nbproject/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2006, 2011, 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 diff --git a/jdk/make/mksample/nio/file/Makefile b/jdk/make/mksample/nio/file/Makefile index 9462d5063f1..62fcfc2bdbc 100644 --- a/jdk/make/mksample/nio/file/Makefile +++ b/jdk/make/mksample/nio/file/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2008, 2011, 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 diff --git a/jdk/make/mksample/nio/multicast/Makefile b/jdk/make/mksample/nio/multicast/Makefile index ae3b4e1d816..57c9e30ae3d 100644 --- a/jdk/make/mksample/nio/multicast/Makefile +++ b/jdk/make/mksample/nio/multicast/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2007, 2011, 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 diff --git a/jdk/make/mksample/nio/server/Makefile b/jdk/make/mksample/nio/server/Makefile index bf97c727065..14b7f5b399b 100644 --- a/jdk/make/mksample/nio/server/Makefile +++ b/jdk/make/mksample/nio/server/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2004, 2011, 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 diff --git a/jdk/make/mksample/scripting/scriptpad/Makefile b/jdk/make/mksample/scripting/scriptpad/Makefile index b60b01deb22..bc641c06db8 100644 --- a/jdk/make/mksample/scripting/scriptpad/Makefile +++ b/jdk/make/mksample/scripting/scriptpad/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2006, 2011, 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 diff --git a/jdk/make/mksample/webservices/EbayClient/Makefile b/jdk/make/mksample/webservices/EbayClient/Makefile index d007ff36639..ac3d9318849 100644 --- a/jdk/make/mksample/webservices/EbayClient/Makefile +++ b/jdk/make/mksample/webservices/EbayClient/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2006, 2011, 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 diff --git a/jdk/make/mksample/webservices/EbayServer/Makefile b/jdk/make/mksample/webservices/EbayServer/Makefile index e51d34622ca..a3ece43d688 100644 --- a/jdk/make/mksample/webservices/EbayServer/Makefile +++ b/jdk/make/mksample/webservices/EbayServer/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2006, 2011, 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 diff --git a/jdk/make/netbeans/common/java-data-native.ent b/jdk/make/netbeans/common/java-data-native.ent index 831bf255245..fb531ed8921 100644 --- a/jdk/make/netbeans/common/java-data-native.ent +++ b/jdk/make/netbeans/common/java-data-native.ent @@ -1,7 +1,7 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set property 'main.class' (e.g. in build.properties) + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jdk/src/share/demo/nbproject/jfc/TransparentRuler/nbproject/file-targets.xml b/jdk/src/share/demo/nbproject/jfc/TransparentRuler/nbproject/file-targets.xml new file mode 100644 index 00000000000..9d750841e3b --- /dev/null +++ b/jdk/src/share/demo/nbproject/jfc/TransparentRuler/nbproject/file-targets.xml @@ -0,0 +1,46 @@ + + + + + + + + + + Must set property 'includes' + + + + + + + diff --git a/jdk/src/share/demo/nbproject/jfc/TransparentRuler/nbproject/jdk.xml b/jdk/src/share/demo/nbproject/jfc/TransparentRuler/nbproject/jdk.xml new file mode 100644 index 00000000000..3690ef0e8f8 --- /dev/null +++ b/jdk/src/share/demo/nbproject/jfc/TransparentRuler/nbproject/jdk.xml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jdk/src/share/demo/nbproject/jfc/TransparentRuler/nbproject/netbeans-targets.xml b/jdk/src/share/demo/nbproject/jfc/TransparentRuler/nbproject/netbeans-targets.xml new file mode 100644 index 00000000000..84a0e9b3c5e --- /dev/null +++ b/jdk/src/share/demo/nbproject/jfc/TransparentRuler/nbproject/netbeans-targets.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jdk/src/share/demo/nbproject/jfc/TransparentRuler/nbproject/project.xml b/jdk/src/share/demo/nbproject/jfc/TransparentRuler/nbproject/project.xml new file mode 100644 index 00000000000..ecc07bc52b9 --- /dev/null +++ b/jdk/src/share/demo/nbproject/jfc/TransparentRuler/nbproject/project.xml @@ -0,0 +1,173 @@ + + + + + + org.netbeans.modules.ant.freeform + + + TransparentRuler + + user.build.properties + build.properties + ${nbjdk.home}/jre/lib/rt.jar + + + + + ${main.dir} + + + + java + ${src.dir} + + + ${build.dir} + + + + + jar + + + clean + + + clean + jar + + + run + + + + show-javadoc + + + + debug + + + + compile-selected + + includes + ${src.dir} + \.java$ + relative-path + + , + + + + + run + + main.class + ${src.dir} + \.java$ + java-name + + + + + + + + debug + + main.class + ${src.dir} + \.java$ + java-name + + + + + + + + debug-fix + + class + ${src.dir} + \.java$ + relative-path-noext + + + + + + + + jar + ${jar} + jar + clean + + + + + + ${src.dir} + + + ${main.dir}/README.txt + + + + + + + + + + + + + + + + + ${src.dir} + ${cp} + ${run.cp} + ${nbjdk.bootclasspath} + ${classes.dir} + ${jar} + ${javadoc.dir} + 1.5 + + + + diff --git a/jdk/src/share/demo/nbproject/project.xml b/jdk/src/share/demo/nbproject/project.xml index 585faf33b00..43667547ddf 100644 --- a/jdk/src/share/demo/nbproject/project.xml +++ b/jdk/src/share/demo/nbproject/project.xml @@ -50,6 +50,7 @@ nbproject/jfc/Stylepad nbproject/jfc/SwingApplet nbproject/jfc/TableExample + nbproject/jfc/TransparentRuler nbproject/scripting/jconsole-plugin nbproject/management/FullThreadDump nbproject/management/JTop diff --git a/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/JarFileSystemProvider.java b/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/JarFileSystemProvider.java index dddf69e4dee..b9ea826ab11 100644 --- a/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/JarFileSystemProvider.java +++ b/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/JarFileSystemProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2007-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -12,7 +12,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * - Neither the name of Sun Microsystems nor the names of its + * - Neither the name of Oracle nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * diff --git a/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileAttributeView.java b/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileAttributeView.java index 22b183d97a7..c646a09e5e3 100644 --- a/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileAttributeView.java +++ b/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileAttributeView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileStore.java b/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileStore.java index 05719072de3..94ec0307dd9 100644 --- a/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileStore.java +++ b/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileStore.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystem.java b/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystem.java index fc43fd87ccf..39945358fc6 100644 --- a/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystem.java +++ b/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystemProvider.java b/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystemProvider.java index d8aa305d29b..c6dd243815e 100644 --- a/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystemProvider.java +++ b/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystemProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -99,7 +99,7 @@ public class ZipFileSystemProvider extends FileSystemProvider { synchronized(filesystems) { Path realPath = null; if (ensureFile(path)) { - realPath = path.toRealPath(true); + realPath = path.toRealPath(); if (filesystems.containsKey(realPath)) throw new FileSystemAlreadyExistsException(); } @@ -154,7 +154,7 @@ public class ZipFileSystemProvider extends FileSystemProvider { synchronized (filesystems) { ZipFileSystem zipfs = null; try { - zipfs = filesystems.get(uriToPath(uri).toRealPath(true)); + zipfs = filesystems.get(uriToPath(uri).toRealPath()); } catch (IOException x) { // ignore the ioe from toRealPath(), return FSNFE } @@ -310,7 +310,7 @@ public class ZipFileSystemProvider extends FileSystemProvider { ////////////////////////////////////////////////////////////// void removeFileSystem(Path zfpath, ZipFileSystem zfs) throws IOException { synchronized (filesystems) { - zfpath = zfpath.toRealPath(true); + zfpath = zfpath.toRealPath(); if (filesystems.get(zfpath) == zfs) filesystems.remove(zfpath); } diff --git a/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipPath.java b/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipPath.java index 1232a27ff1f..8c97818b244 100644 --- a/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipPath.java +++ b/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipPath.java @@ -150,7 +150,7 @@ public class ZipPath implements Path { } @Override - public ZipPath toRealPath(boolean resolveLinks) throws IOException { + public ZipPath toRealPath(LinkOption... options) throws IOException { ZipPath realPath = new ZipPath(zfs, getResolvedPath()).toAbsolutePath(); realPath.checkAccess(); return realPath; diff --git a/jdk/src/share/instrument/JPLISAgent.c b/jdk/src/share/instrument/JPLISAgent.c index 7f6b2a0b67c..7494c814189 100644 --- a/jdk/src/share/instrument/JPLISAgent.c +++ b/jdk/src/share/instrument/JPLISAgent.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/jdk/src/share/javavm/export/jvmti.h b/jdk/src/share/javavm/export/jvmti.h index 7e9f2216b55..ee708cb193b 100644 --- a/jdk/src/share/javavm/export/jvmti.h +++ b/jdk/src/share/javavm/export/jvmti.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/jdk/src/share/lib/logging.properties b/jdk/src/share/lib/logging.properties index 4f7f6dcfd41..65cf1b1b7dc 100644 --- a/jdk/src/share/lib/logging.properties +++ b/jdk/src/share/lib/logging.properties @@ -43,6 +43,11 @@ java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter java.util.logging.ConsoleHandler.level = INFO java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter +# Example to customize the SimpleFormatter output format +# to print one-line log message like this: +# : [] +# +# java.util.logging.SimpleFormatter.format=%4$s: %5$s [%1$tc]%n ############################################################ # Facility specific properties. diff --git a/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp b/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp index 40067b1df0f..17c48a4ceac 100644 --- a/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp +++ b/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2011, 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 diff --git a/jdk/src/share/native/common/check_code.c b/jdk/src/share/native/common/check_code.c index dcdaeda58bf..c8787b3612b 100644 --- a/jdk/src/share/native/common/check_code.c +++ b/jdk/src/share/native/common/check_code.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2011, 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 diff --git a/jdk/src/share/native/java/io/io_util.c b/jdk/src/share/native/java/io/io_util.c index 68a24bbab53..e17652a69b5 100644 --- a/jdk/src/share/native/java/io/io_util.c +++ b/jdk/src/share/native/java/io/io_util.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2011, 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 diff --git a/jdk/src/share/native/java/lang/System.c b/jdk/src/share/native/java/lang/System.c index f2b81a069b5..86ad8f6ce2f 100644 --- a/jdk/src/share/native/java/lang/System.c +++ b/jdk/src/share/native/java/lang/System.c @@ -99,7 +99,7 @@ Java_java_lang_System_identityHashCode(JNIEnv *env, jobject this, jobject x) #ifndef VENDOR /* Third party may overwrite this. */ #define VENDOR "Oracle Corporation" #define VENDOR_URL "http://java.oracle.com/" -#define VENDOR_URL_BUG "http://java.sun.com/cgi-bin/bugreport.cgi" +#define VENDOR_URL_BUG "http://bugreport.sun.com/bugreport/" #endif #define JAVA_MAX_SUPPORTED_VERSION 51 diff --git a/jdk/src/share/native/java/util/zip/Deflater.c b/jdk/src/share/native/java/util/zip/Deflater.c index 3b32750a298..6cad24e480a 100644 --- a/jdk/src/share/native/java/util/zip/Deflater.c +++ b/jdk/src/share/native/java/util/zip/Deflater.c @@ -129,34 +129,28 @@ Java_java_util_zip_Deflater_deflateBytes(JNIEnv *env, jobject this, jlong addr, if ((*env)->GetBooleanField(env, this, setParamsID)) { int level = (*env)->GetIntField(env, this, levelID); int strategy = (*env)->GetIntField(env, this, strategyID); - - in_buf = (jbyte *) malloc(this_len); - if (in_buf == 0) { + in_buf = (*env)->GetPrimitiveArrayCritical(env, this_buf, 0); + if (in_buf == NULL) { // Throw OOME only when length is not zero if (this_len != 0) JNU_ThrowOutOfMemoryError(env, 0); return 0; } - (*env)->GetByteArrayRegion(env, this_buf, this_off, this_len, in_buf); - out_buf = (jbyte *) malloc(len); - if (out_buf == 0) { - free(in_buf); + out_buf = (*env)->GetPrimitiveArrayCritical(env, b, 0); + if (out_buf == NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, this_buf, in_buf, 0); if (len != 0) JNU_ThrowOutOfMemoryError(env, 0); return 0; } - strm->next_in = (Bytef *) in_buf; - strm->next_out = (Bytef *) out_buf; + strm->next_in = (Bytef *) (in_buf + this_off); + strm->next_out = (Bytef *) (out_buf + off); strm->avail_in = this_len; strm->avail_out = len; res = deflateParams(strm, level, strategy); - - if (res == Z_OK) { - (*env)->SetByteArrayRegion(env, b, off, len - strm->avail_out, out_buf); - } - free(out_buf); - free(in_buf); + (*env)->ReleasePrimitiveArrayCritical(env, b, out_buf, 0); + (*env)->ReleasePrimitiveArrayCritical(env, this_buf, in_buf, 0); switch (res) { case Z_OK: @@ -174,33 +168,28 @@ Java_java_util_zip_Deflater_deflateBytes(JNIEnv *env, jobject this, jlong addr, } } else { jboolean finish = (*env)->GetBooleanField(env, this, finishID); - in_buf = (jbyte *) malloc(this_len); - if (in_buf == 0) { + in_buf = (*env)->GetPrimitiveArrayCritical(env, this_buf, 0); + if (in_buf == NULL) { if (this_len != 0) JNU_ThrowOutOfMemoryError(env, 0); return 0; } - (*env)->GetByteArrayRegion(env, this_buf, this_off, this_len, in_buf); - - out_buf = (jbyte *) malloc(len); - if (out_buf == 0) { - free(in_buf); + out_buf = (*env)->GetPrimitiveArrayCritical(env, b, 0); + if (out_buf == NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, this_buf, in_buf, 0); if (len != 0) JNU_ThrowOutOfMemoryError(env, 0); + return 0; } - strm->next_in = (Bytef *) in_buf; - strm->next_out = (Bytef *) out_buf; + strm->next_in = (Bytef *) (in_buf + this_off); + strm->next_out = (Bytef *) (out_buf + off); strm->avail_in = this_len; strm->avail_out = len; res = deflate(strm, finish ? Z_FINISH : flush); - - if (res == Z_STREAM_END || res == Z_OK) { - (*env)->SetByteArrayRegion(env, b, off, len - strm->avail_out, out_buf); - } - free(out_buf); - free(in_buf); + (*env)->ReleasePrimitiveArrayCritical(env, b, out_buf, 0); + (*env)->ReleasePrimitiveArrayCritical(env, this_buf, in_buf, 0); switch (res) { case Z_STREAM_END: diff --git a/jdk/src/share/native/java/util/zip/Inflater.c b/jdk/src/share/native/java/util/zip/Inflater.c index dbf9a1357ae..e5296fcf4c6 100644 --- a/jdk/src/share/native/java/util/zip/Inflater.c +++ b/jdk/src/share/native/java/util/zip/Inflater.c @@ -38,8 +38,6 @@ #include "zlib.h" #include "java_util_zip_Inflater.h" -#define MIN2(x, y) ((x) < (y) ? (x) : (y)) - #define ThrowDataFormatException(env, msg) \ JNU_ThrowByName(env, "java/util/zip/DataFormatException", msg) @@ -111,71 +109,50 @@ Java_java_util_zip_Inflater_inflateBytes(JNIEnv *env, jobject this, jlong addr, jarray b, jint off, jint len) { z_stream *strm = jlong_to_ptr(addr); - jarray this_buf = (jarray)(*env)->GetObjectField(env, this, bufID); jint this_off = (*env)->GetIntField(env, this, offID); jint this_len = (*env)->GetIntField(env, this, lenID); + jbyte *in_buf; jbyte *out_buf; int ret; - /* - * Avoid excess copying. - * zlib stream usually has a few bytes of overhead for header info - * (depends on the underlying data) - * - * (a) 5 bytes per 16KB - * (b) 6 bytes for entire stream - * (c) 4 bytes for gzip header - * (d) 2 bytes for crc - * - * Use 20 bytes as the "safe cutoff" number. - */ - jint in_len = MIN2(this_len, len + 20); - jint consumed; - in_buf = (jbyte *) malloc(in_len); - if (in_buf == 0) { - if (in_len != 0) + in_buf = (*env)->GetPrimitiveArrayCritical(env, this_buf, 0); + if (in_buf == NULL) { + if (this_len != 0) JNU_ThrowOutOfMemoryError(env, 0); return 0; } - (*env)->GetByteArrayRegion(env, this_buf, this_off, in_len, in_buf); - - out_buf = (jbyte *) malloc(len); - if (out_buf == 0) { - free(in_buf); + out_buf = (*env)->GetPrimitiveArrayCritical(env, b, 0); + if (out_buf == NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, this_buf, in_buf, 0); if (len != 0) JNU_ThrowOutOfMemoryError(env, 0); return 0; } - - strm->next_in = (Bytef *) in_buf; - strm->next_out = (Bytef *) out_buf; - strm->avail_in = in_len; + strm->next_in = (Bytef *) (in_buf + this_off); + strm->next_out = (Bytef *) (out_buf + off); + strm->avail_in = this_len; strm->avail_out = len; ret = inflate(strm, Z_PARTIAL_FLUSH); - - if (ret == Z_STREAM_END || ret == Z_OK) { - (*env)->SetByteArrayRegion(env, b, off, len - strm->avail_out, out_buf); - } - free(out_buf); - free(in_buf); + (*env)->ReleasePrimitiveArrayCritical(env, b, out_buf, 0); + (*env)->ReleasePrimitiveArrayCritical(env, this_buf, in_buf, 0); switch (ret) { case Z_STREAM_END: (*env)->SetBooleanField(env, this, finishedID, JNI_TRUE); /* fall through */ case Z_OK: - consumed = in_len - strm->avail_in; - (*env)->SetIntField(env, this, offID, this_off + consumed); - (*env)->SetIntField(env, this, lenID, this_len - consumed); + this_off += this_len - strm->avail_in; + (*env)->SetIntField(env, this, offID, this_off); + (*env)->SetIntField(env, this, lenID, strm->avail_in); return len - strm->avail_out; case Z_NEED_DICT: (*env)->SetBooleanField(env, this, needDictID, JNI_TRUE); /* Might have consumed some input here! */ - consumed = in_len - strm->avail_in; - (*env)->SetIntField(env, this, offID, this_off + consumed); - (*env)->SetIntField(env, this, lenID, this_len - consumed); + this_off += this_len - strm->avail_in; + (*env)->SetIntField(env, this, offID, this_off); + (*env)->SetIntField(env, this, lenID, strm->avail_in); return 0; case Z_BUF_ERROR: return 0; diff --git a/jdk/src/share/native/sun/awt/image/awt_parseImage.c b/jdk/src/share/native/sun/awt/image/awt_parseImage.c index b569828f5f6..264a02f1642 100644 --- a/jdk/src/share/native/sun/awt/image/awt_parseImage.c +++ b/jdk/src/share/native/sun/awt/image/awt_parseImage.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2010, 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 diff --git a/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c b/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c index 84b91889725..28af8316204 100644 --- a/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c +++ b/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c b/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c index 2b0992b5151..1879c35ced3 100644 --- a/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c +++ b/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2011, 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 diff --git a/jdk/src/share/native/sun/awt/medialib/mlib_ImageAffine.c b/jdk/src/share/native/sun/awt/medialib/mlib_ImageAffine.c index e0f47978490..18f997325ee 100644 --- a/jdk/src/share/native/sun/awt/medialib/mlib_ImageAffine.c +++ b/jdk/src/share/native/sun/awt/medialib/mlib_ImageAffine.c @@ -210,6 +210,8 @@ mlib_status mlib_ImageAffine_alltypes(mlib_image *dst, t_ind = 4; else if (type == MLIB_DOUBLE) t_ind = 5; + else + return MLIB_FAILURE; /* unknown image type */ if (colormap != NULL && filter != MLIB_NEAREST) { if (t_ind != 0 && t_ind != 1) @@ -318,6 +320,10 @@ mlib_status mlib_ImageAffine_alltypes(mlib_image *dst, } break; + + default: + /* nothing to do for other edge types. */ + break; } if (param_e->buff_malloc != NULL) diff --git a/jdk/src/share/native/sun/awt/medialib/mlib_ImageAffineEdge.c b/jdk/src/share/native/sun/awt/medialib/mlib_ImageAffineEdge.c index 5a8e209a0e0..cb06dee4d12 100644 --- a/jdk/src/share/native/sun/awt/medialib/mlib_ImageAffineEdge.c +++ b/jdk/src/share/native/sun/awt/medialib/mlib_ImageAffineEdge.c @@ -616,6 +616,9 @@ void mlib_ImageAffineEdgeZero(mlib_affine_param *param, MLIB_PROCESS_EDGES_ZERO(mlib_d64); break; } + default: + /* Image type MLIB_BIT is not used in java, so we can ignore it. */ + break; } } @@ -643,6 +646,9 @@ void mlib_ImageAffineEdgeNearest(mlib_affine_param *param, case MLIB_DOUBLE: MLIB_PROCESS_EDGES(MLIB_EDGE_NEAREST_LINE, mlib_d64); break; + default: + /* Image type MLIB_BIT is not used in java, so we can ignore it. */ + break; } } @@ -673,8 +679,11 @@ mlib_status mlib_ImageAffineEdgeExtend_BL(mlib_affine_param *param, if (ltype == MLIB_BYTE) { buff = mlib_malloc(channels * max_xsize); } - else { + else if (ltype == MLIB_SHORT) { buff = mlib_malloc(channels * max_xsize * sizeof(mlib_s16)); + } else { + /* Unsupported type of lookup table. Report a failure */ + return MLIB_FAILURE; } if (buff == NULL) @@ -691,6 +700,9 @@ mlib_status mlib_ImageAffineEdgeExtend_BL(mlib_affine_param *param, srcStride >>= 1; MLIB_PROCESS_EDGES(MLIB_EDGE_INDEX_u8i, mlib_s16); break; + default: + /* Incompatible image type. Ignore it for now. */ + break; } break; @@ -705,9 +717,18 @@ mlib_status mlib_ImageAffineEdgeExtend_BL(mlib_affine_param *param, srcStride >>= 1; MLIB_PROCESS_EDGES(MLIB_EDGE_INDEX_s16i, mlib_s16); break; + default: + /* Incompatible image type. Ignore it for now. */ + break; } break; + default: + /* Unsupported type of lookup table. + * Can not be here due to check on line 685, + * so just ignore it. + */ + break; } mlib_free(buff); @@ -744,6 +765,10 @@ mlib_status mlib_ImageAffineEdgeExtend_BL(mlib_affine_param *param, srcStride >>= 3; MLIB_PROCESS_EDGES(MLIB_EDGE_BL, mlib_d64); break; + + default: + /* Image type MLIB_BIT is not supported, ignore it. */ + break; } return MLIB_SUCCESS; @@ -803,8 +828,11 @@ mlib_status mlib_ImageAffineEdgeExtend_BC(mlib_affine_param *param, if (ltype == MLIB_BYTE) { buff = mlib_malloc(channels * max_xsize); } - else { + else if (ltype == MLIB_SHORT) { buff = mlib_malloc(channels * max_xsize * sizeof(mlib_s16)); + } else { + /* Unsupported type of lookup table. */ + return MLIB_FAILURE; } if (buff == NULL) @@ -821,6 +849,9 @@ mlib_status mlib_ImageAffineEdgeExtend_BC(mlib_affine_param *param, srcStride >>= 1; MLIB_PROCESS_EDGES(MLIB_EDGE_INDEX_u8i, mlib_s16); break; + default: + /* Ignore incomatible image type. */ + break; } break; @@ -835,9 +866,19 @@ mlib_status mlib_ImageAffineEdgeExtend_BC(mlib_affine_param *param, srcStride >>= 1; MLIB_PROCESS_EDGES(MLIB_EDGE_INDEX_s16i, mlib_s16); break; + default: + /* Ignore incomatible image type. */ + break; } break; + + default: + /* Unsupported type of lookup table. + * Can not be here due to check on line 836, + * so just ignore it. + */ + break; } mlib_free(buff); @@ -895,6 +936,10 @@ mlib_status mlib_ImageAffineEdgeExtend_BC(mlib_affine_param *param, } break; + + default: + /* Ignore unsupported image type MLIB_BIT */ + break; } return MLIB_SUCCESS; diff --git a/jdk/src/share/native/sun/awt/medialib/mlib_ImageColorTrue2Index.c b/jdk/src/share/native/sun/awt/medialib/mlib_ImageColorTrue2Index.c index dfe13e20362..375008197e4 100644 --- a/jdk/src/share/native/sun/awt/medialib/mlib_ImageColorTrue2Index.c +++ b/jdk/src/share/native/sun/awt/medialib/mlib_ImageColorTrue2Index.c @@ -2623,9 +2623,10 @@ mlib_status mlib_ImageColorTrue2Index(mlib_image *dst, return MLIB_FAILURE; } } + default: + /* Unsupported type of destination image */ + return MLIB_FAILURE; } - - break; } case MLIB_SHORT: @@ -2678,18 +2679,15 @@ mlib_status mlib_ImageColorTrue2Index(mlib_image *dst, return MLIB_FAILURE; } } + default: + /* Unsupported type of destination image */ + return MLIB_FAILURE; } - - break; } default: return MLIB_FAILURE; } - - /* we need to return something to make Microsoft VC happy. - Return FAILURE because on success we likely to return earlier. */ - return MLIB_FAILURE; } /***************************************************************/ diff --git a/jdk/src/share/native/sun/awt/medialib/mlib_ImageConvMxN.c b/jdk/src/share/native/sun/awt/medialib/mlib_ImageConvMxN.c index baf3c70fc18..c149d42de70 100644 --- a/jdk/src/share/native/sun/awt/medialib/mlib_ImageConvMxN.c +++ b/jdk/src/share/native/sun/awt/medialib/mlib_ImageConvMxN.c @@ -211,6 +211,13 @@ mlib_status mlib_ImageConvMxN_f(mlib_image *dst, case MLIB_DOUBLE: ret = mlib_convMxNnw_d64(dst_i, src_i, kernel, m, n, dm, dn, cmask); break; + + default: + /* For some reasons, there is no convolution routine for type MLIB_BIT. + * For now, we silently ignore it (because this image type is not used by java), + * but probably we have to report an error. + */ + break; } } @@ -221,6 +228,11 @@ mlib_status mlib_ImageConvMxN_f(mlib_image *dst, case MLIB_EDGE_DST_COPY_SRC: mlib_ImageConvCopyEdge(dst_e, src_e, dx_l, dx_r, dy_t, dy_b, cmask); break; + default: + /* Other edge conditions do not need additional handling. + * Note also that they are not exposed in public Java API + */ + break; } } else { /* MLIB_EDGE_SRC_EXTEND */ @@ -279,6 +291,12 @@ mlib_status mlib_ImageConvMxN_f(mlib_image *dst, case MLIB_DOUBLE: mlib_convMxNext_d64(dst_e, src_e, kernel, m, n, dx_l, dx_r, dy_t, dy_b, cmask); break; + default: + /* For some reasons, there is no convolution routine for type MLIB_BIT. + * For now, we silently ignore it (because this image type is not used by java), + * but probably we have to report an error. + */ + break; } } diff --git a/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c b/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c index 796063b0284..5ddcbb3e9b4 100644 --- a/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c +++ b/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c @@ -1869,8 +1869,8 @@ static mlib_status mlib_ImageConv1xN_ext(mlib_image *dst, /***************************************************************/ mlib_status CONV_FUNC_MxN { - DTYPE *adr_src, *sl, *sp; - DTYPE *adr_dst, *dl, *dp; + DTYPE *adr_src, *sl, *sp = NULL; + DTYPE *adr_dst, *dl, *dp = NULL; FTYPE buff[BUFF_SIZE], *buffs_arr[2*(MAX_N + 1)]; FTYPE **buffs = buffs_arr, *buffd; FTYPE akernel[256], *k = akernel, fscale = DSCALE; @@ -2332,8 +2332,8 @@ mlib_status CONV_FUNC_MxN mlib_status CONV_FUNC_MxN_I { - DTYPE *adr_src, *sl, *sp; - DTYPE *adr_dst, *dl, *dp; + DTYPE *adr_src, *sl, *sp = NULL; + DTYPE *adr_dst, *dl, *dp = NULL; mlib_s32 buff[BUFF_SIZE], *buffs_arr[2*(MAX_N + 1)]; mlib_s32 *pbuff = buff; mlib_s32 **buffs = buffs_arr, *buffd; diff --git a/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c b/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c index 53e1d8a793c..8c5ada353bd 100644 --- a/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c +++ b/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c @@ -148,8 +148,8 @@ typedef union { /***************************************************************/ #define DEF_VARS(type) \ - type *adr_src, *sl, *sp; \ - type *adr_dst, *dl, *dp; \ + type *adr_src, *sl, *sp = NULL; \ + type *adr_dst, *dl, *dp = NULL; \ FTYPE *pbuff = buff; \ mlib_s32 wid, hgt, sll, dll; \ mlib_s32 nchannel, chan1; \ @@ -2060,8 +2060,8 @@ mlib_status CONV_FUNC_I(MxN)(mlib_image *dst, mlib_s32 d0, d1, shift1, shift2; mlib_s32 k0, k1, k2, k3, k4, k5, k6; mlib_s32 p0, p1, p2, p3, p4, p5, p6, p7; - DTYPE *adr_src, *sl, *sp; - DTYPE *adr_dst, *dl, *dp; + DTYPE *adr_src, *sl, *sp = NULL; + DTYPE *adr_dst, *dl, *dp = NULL; mlib_s32 wid, hgt, sll, dll; mlib_s32 nchannel, chan1; mlib_s32 i, j, c; diff --git a/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_32nw.c b/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_32nw.c index 5a74988ce34..eb7037307ca 100644 --- a/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_32nw.c +++ b/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_32nw.c @@ -78,7 +78,7 @@ /***************************************************************/ #define DEF_VARS_MxN(type) \ GET_SRC_DST_PARAMETERS(type); \ - type *sl, *sp, *dl, *dp; \ + type *sl, *sp = NULL, *dl, *dp = NULL; \ mlib_d64 *pbuff = buff; \ mlib_s32 i, j, c diff --git a/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c b/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c index 53d54990deb..3a006ed5f83 100644 --- a/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c +++ b/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c @@ -1869,8 +1869,8 @@ static mlib_status mlib_ImageConv1xN_ext(mlib_image *dst, /***************************************************************/ mlib_status CONV_FUNC_MxN { - DTYPE *adr_src, *sl, *sp; - DTYPE *adr_dst, *dl, *dp; + DTYPE *adr_src, *sl, *sp = NULL; + DTYPE *adr_dst, *dl, *dp = NULL; FTYPE buff[BUFF_SIZE], *buffs_arr[2*(MAX_N + 1)]; FTYPE **buffs = buffs_arr, *buffd; FTYPE akernel[256], *k = akernel, fscale = DSCALE; @@ -2332,8 +2332,8 @@ mlib_status CONV_FUNC_MxN mlib_status CONV_FUNC_MxN_I { - DTYPE *adr_src, *sl, *sp; - DTYPE *adr_dst, *dl, *dp; + DTYPE *adr_src, *sl, *sp = NULL; + DTYPE *adr_dst, *dl, *dp = NULL; mlib_s32 buff[BUFF_SIZE], *buffs_arr[2*(MAX_N + 1)]; mlib_s32 *pbuff = buff; mlib_s32 **buffs = buffs_arr, *buffd; diff --git a/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c b/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c index 1b09b1bcade..ce337534c6f 100644 --- a/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c +++ b/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c @@ -149,8 +149,8 @@ typedef union { /***************************************************************/ #define DEF_VARS(type) \ - type *adr_src, *sl, *sp; \ - type *adr_dst, *dl, *dp; \ + type *adr_src, *sl, *sp = NULL; \ + type *adr_dst, *dl, *dp = NULL; \ FTYPE *pbuff = buff; \ mlib_s32 wid, hgt, sll, dll; \ mlib_s32 nchannel, chan1; \ @@ -2061,8 +2061,8 @@ mlib_status CONV_FUNC_I(MxN)(mlib_image *dst, mlib_s32 d0, d1, shift1, shift2; mlib_s32 k0, k1, k2, k3, k4, k5, k6; mlib_s32 p0, p1, p2, p3, p4, p5, p6, p7; - DTYPE *adr_src, *sl, *sp; - DTYPE *adr_dst, *dl, *dp; + DTYPE *adr_src, *sl, *sp = NULL; + DTYPE *adr_dst, *dl, *dp = NULL; mlib_s32 wid, hgt, sll, dll; mlib_s32 nchannel, chan1; mlib_s32 i, j, c; diff --git a/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_D64nw.c b/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_D64nw.c index cb08ae2ae80..2e84957bdf1 100644 --- a/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_D64nw.c +++ b/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_D64nw.c @@ -71,8 +71,8 @@ #define DEF_VARS(type) \ GET_SRC_DST_PARAMETERS(type); \ type *sl; \ - type *dl, *dp; \ - mlib_s32 i, j, c + type *dl, *dp = NULL; \ + mlib_s32 i = 0, j, c /***************************************************************/ #undef KSIZE diff --git a/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_F32nw.c b/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_F32nw.c index c78615fd718..d19448d936c 100644 --- a/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_F32nw.c +++ b/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_F32nw.c @@ -71,7 +71,7 @@ #define DEF_VARS(type) \ GET_SRC_DST_PARAMETERS(type); \ type *sl; \ - type *dl, *dp; \ + type *dl, *dp = NULL; \ mlib_s32 i, j, c /***************************************************************/ diff --git a/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c b/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c index a3f79ffb564..f412112b168 100644 --- a/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c +++ b/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c @@ -1869,8 +1869,8 @@ static mlib_status mlib_ImageConv1xN_ext(mlib_image *dst, /***************************************************************/ mlib_status CONV_FUNC_MxN { - DTYPE *adr_src, *sl, *sp; - DTYPE *adr_dst, *dl, *dp; + DTYPE *adr_src, *sl, *sp = NULL; + DTYPE *adr_dst, *dl, *dp = NULL; FTYPE buff[BUFF_SIZE], *buffs_arr[2*(MAX_N + 1)]; FTYPE **buffs = buffs_arr, *buffd; FTYPE akernel[256], *k = akernel, fscale = DSCALE; @@ -2332,8 +2332,8 @@ mlib_status CONV_FUNC_MxN mlib_status CONV_FUNC_MxN_I { - DTYPE *adr_src, *sl, *sp; - DTYPE *adr_dst, *dl, *dp; + DTYPE *adr_src, *sl, *sp = NULL; + DTYPE *adr_dst, *dl, *dp = NULL; mlib_s32 buff[BUFF_SIZE], *buffs_arr[2*(MAX_N + 1)]; mlib_s32 *pbuff = buff; mlib_s32 **buffs = buffs_arr, *buffd; diff --git a/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c b/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c index 2f017c6f8d0..eb68aeff7dd 100644 --- a/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c +++ b/jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c @@ -148,8 +148,8 @@ typedef union { /***************************************************************/ #define DEF_VARS(type) \ - type *adr_src, *sl, *sp; \ - type *adr_dst, *dl, *dp; \ + type *adr_src, *sl, *sp = NULL; \ + type *adr_dst, *dl, *dp = NULL; \ FTYPE *pbuff = buff; \ mlib_s32 wid, hgt, sll, dll; \ mlib_s32 nchannel, chan1; \ @@ -2060,8 +2060,8 @@ mlib_status CONV_FUNC_I(MxN)(mlib_image *dst, mlib_s32 d0, d1, shift1, shift2; mlib_s32 k0, k1, k2, k3, k4, k5, k6; mlib_s32 p0, p1, p2, p3, p4, p5, p6, p7; - DTYPE *adr_src, *sl, *sp; - DTYPE *adr_dst, *dl, *dp; + DTYPE *adr_src, *sl, *sp = NULL; + DTYPE *adr_dst, *dl, *dp = NULL; mlib_s32 wid, hgt, sll, dll; mlib_s32 nchannel, chan1; mlib_s32 i, j, c; diff --git a/jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c b/jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c index 503883e1866..a5fdb06cd2a 100644 --- a/jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c +++ b/jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c @@ -204,9 +204,9 @@ void mlib_ImageCopy_bit_na(const mlib_u8 *sa, mlib_u64 *dp; /* 8-byte aligned start points in dst */ mlib_u64 *sp; /* 8-byte aligned start point in src */ mlib_s32 j; /* offset of address in dst */ - mlib_u64 lmask0 = 0xFFFFFFFFFFFFFFFF; + mlib_u64 lmask0 = 0xFFFFFFFFFFFFFFFFULL; mlib_u64 dmask; - mlib_u64 lsrc, lsrc0, lsrc1, ldst; + mlib_u64 lsrc, lsrc0, lsrc1 = 0ULL, ldst; mlib_s32 ls_offset, ld_offset, shift; if (size <= 0) return; @@ -427,9 +427,9 @@ void mlib_ImageCopy_bit_na_r(const mlib_u8 *sa, mlib_u64 *dp; /* 8-byte aligned start points in dst */ mlib_u64 *sp; /* 8-byte aligned start point in src */ mlib_s32 j; /* offset of address in dst */ - mlib_u64 lmask0 = 0xFFFFFFFFFFFFFFFF; + mlib_u64 lmask0 = 0xFFFFFFFFFFFFFFFFULL; mlib_u64 dmask; - mlib_u64 lsrc, lsrc0, lsrc1, ldst; + mlib_u64 lsrc, lsrc0, lsrc1 = 0ULL, ldst; mlib_s32 ls_offset, ld_offset, shift; if (size <= 0) return; diff --git a/jdk/src/share/native/sun/awt/medialib/mlib_ImageCreate.c b/jdk/src/share/native/sun/awt/medialib/mlib_ImageCreate.c index ba1a2b47fb0..fe065b35df3 100644 --- a/jdk/src/share/native/sun/awt/medialib/mlib_ImageCreate.c +++ b/jdk/src/share/native/sun/awt/medialib/mlib_ImageCreate.c @@ -334,7 +334,7 @@ mlib_image *mlib_ImageCreateSubimage(mlib_image *img, mlib_s32 width; /* for parent image */ mlib_s32 height; /* for parent image */ mlib_s32 stride; - mlib_s32 bitoffset; + mlib_s32 bitoffset = 0; void *data; /* sanity check */ @@ -423,7 +423,7 @@ mlib_image *mlib_ImageSetSubimage(mlib_image *dst, mlib_s32 channels = src -> channels; mlib_s32 stride = src -> stride; mlib_u8 *data = src -> data; - mlib_s32 bitoffset; + mlib_s32 bitoffset = 0; data += y * stride; diff --git a/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gfx_impl.h b/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gfx_impl.h index a0fd446e94a..10574adba21 100644 --- a/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gfx_impl.h +++ b/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gfx_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2010, 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 diff --git a/jdk/src/share/native/sun/font/FontInstanceAdapter.cpp b/jdk/src/share/native/sun/font/FontInstanceAdapter.cpp index 952523105c1..824f296cc5c 100644 --- a/jdk/src/share/native/sun/font/FontInstanceAdapter.cpp +++ b/jdk/src/share/native/sun/font/FontInstanceAdapter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/jdk/src/share/native/sun/java2d/cmm/lcms/LCMS.c b/jdk/src/share/native/sun/java2d/cmm/lcms/LCMS.c index bd2c03c1ac6..8ac40e4b1d1 100644 --- a/jdk/src/share/native/sun/java2d/cmm/lcms/LCMS.c +++ b/jdk/src/share/native/sun/java2d/cmm/lcms/LCMS.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, 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 diff --git a/jdk/src/share/native/sun/java2d/loops/MaskFill.c b/jdk/src/share/native/sun/java2d/loops/MaskFill.c index 6691ede7a35..0003675d43c 100644 --- a/jdk/src/share/native/sun/java2d/loops/MaskFill.c +++ b/jdk/src/share/native/sun/java2d/loops/MaskFill.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2010, 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 diff --git a/jdk/src/share/native/sun/java2d/loops/ParallelogramUtils.h b/jdk/src/share/native/sun/java2d/loops/ParallelogramUtils.h index 3691abad25c..117d32e2daa 100644 --- a/jdk/src/share/native/sun/java2d/loops/ParallelogramUtils.h +++ b/jdk/src/share/native/sun/java2d/loops/ParallelogramUtils.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2010, 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 diff --git a/jdk/src/share/native/sun/java2d/loops/ProcessPath.c b/jdk/src/share/native/sun/java2d/loops/ProcessPath.c index 5131a3e22c7..c6c643219a4 100644 --- a/jdk/src/share/native/sun/java2d/loops/ProcessPath.c +++ b/jdk/src/share/native/sun/java2d/loops/ProcessPath.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/jdk/src/share/native/sun/java2d/pipe/BufferedMaskBlit.c b/jdk/src/share/native/sun/java2d/pipe/BufferedMaskBlit.c index ccfeab5cafd..b5ba039a237 100644 --- a/jdk/src/share/native/sun/java2d/pipe/BufferedMaskBlit.c +++ b/jdk/src/share/native/sun/java2d/pipe/BufferedMaskBlit.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2010, 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 diff --git a/jdk/src/share/native/sun/security/ec/ECC_JNI.cpp b/jdk/src/share/native/sun/security/ec/ECC_JNI.cpp index 249d2e74ed1..dff675f9500 100644 --- a/jdk/src/share/native/sun/security/ec/ECC_JNI.cpp +++ b/jdk/src/share/native/sun/security/ec/ECC_JNI.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, 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 diff --git a/jdk/src/share/native/sun/security/ec/impl/ec.c b/jdk/src/share/native/sun/security/ec/impl/ec.c index 11777de8746..de357229046 100644 --- a/jdk/src/share/native/sun/security/ec/impl/ec.c +++ b/jdk/src/share/native/sun/security/ec/impl/ec.c @@ -51,7 +51,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/ec.h b/jdk/src/share/native/sun/security/ec/impl/ec.h index f5f3d356e26..96d25f2a47a 100644 --- a/jdk/src/share/native/sun/security/ec/impl/ec.h +++ b/jdk/src/share/native/sun/security/ec/impl/ec.h @@ -50,7 +50,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/ec2.h b/jdk/src/share/native/sun/security/ec/impl/ec2.h index e297a309218..b0ad53e9ee1 100644 --- a/jdk/src/share/native/sun/security/ec/impl/ec2.h +++ b/jdk/src/share/native/sun/security/ec/impl/ec2.h @@ -50,7 +50,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/ec2_163.c b/jdk/src/share/native/sun/security/ec/impl/ec2_163.c index c1dc55dea35..45023bfb92b 100644 --- a/jdk/src/share/native/sun/security/ec/impl/ec2_163.c +++ b/jdk/src/share/native/sun/security/ec/impl/ec2_163.c @@ -52,7 +52,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/ec2_193.c b/jdk/src/share/native/sun/security/ec/impl/ec2_193.c index aa7f29f0823..7bb7a947ac9 100644 --- a/jdk/src/share/native/sun/security/ec/impl/ec2_193.c +++ b/jdk/src/share/native/sun/security/ec/impl/ec2_193.c @@ -52,7 +52,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/ec2_233.c b/jdk/src/share/native/sun/security/ec/impl/ec2_233.c index 485b104ce2a..d8fa9b36ed8 100644 --- a/jdk/src/share/native/sun/security/ec/impl/ec2_233.c +++ b/jdk/src/share/native/sun/security/ec/impl/ec2_233.c @@ -52,7 +52,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/ec2_aff.c b/jdk/src/share/native/sun/security/ec/impl/ec2_aff.c index f77eba3f499..aff4da37d63 100644 --- a/jdk/src/share/native/sun/security/ec/impl/ec2_aff.c +++ b/jdk/src/share/native/sun/security/ec/impl/ec2_aff.c @@ -50,7 +50,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/ec2_mont.c b/jdk/src/share/native/sun/security/ec/impl/ec2_mont.c index eda921f3ff6..d000a1ab6df 100644 --- a/jdk/src/share/native/sun/security/ec/impl/ec2_mont.c +++ b/jdk/src/share/native/sun/security/ec/impl/ec2_mont.c @@ -52,7 +52,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/ec_naf.c b/jdk/src/share/native/sun/security/ec/impl/ec_naf.c index e6307f0d108..c9e4aa4abb9 100644 --- a/jdk/src/share/native/sun/security/ec/impl/ec_naf.c +++ b/jdk/src/share/native/sun/security/ec/impl/ec_naf.c @@ -50,7 +50,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/ecc_impl.h b/jdk/src/share/native/sun/security/ec/impl/ecc_impl.h index 23357ae8c42..9e5b0f951c9 100644 --- a/jdk/src/share/native/sun/security/ec/impl/ecc_impl.h +++ b/jdk/src/share/native/sun/security/ec/impl/ecc_impl.h @@ -51,7 +51,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/ecdecode.c b/jdk/src/share/native/sun/security/ec/impl/ecdecode.c index 826192161ee..639035c4652 100644 --- a/jdk/src/share/native/sun/security/ec/impl/ecdecode.c +++ b/jdk/src/share/native/sun/security/ec/impl/ecdecode.c @@ -51,7 +51,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/ecl-curve.h b/jdk/src/share/native/sun/security/ec/impl/ecl-curve.h index 865c3d49feb..7f8ad1a7f9b 100644 --- a/jdk/src/share/native/sun/security/ec/impl/ecl-curve.h +++ b/jdk/src/share/native/sun/security/ec/impl/ecl-curve.h @@ -50,7 +50,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/ecl-exp.h b/jdk/src/share/native/sun/security/ec/impl/ecl-exp.h index 51ed43fdbc2..434df45af67 100644 --- a/jdk/src/share/native/sun/security/ec/impl/ecl-exp.h +++ b/jdk/src/share/native/sun/security/ec/impl/ecl-exp.h @@ -50,7 +50,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/ecl-priv.h b/jdk/src/share/native/sun/security/ec/impl/ecl-priv.h index 6b032eabecc..c99b3e21bb7 100644 --- a/jdk/src/share/native/sun/security/ec/impl/ecl-priv.h +++ b/jdk/src/share/native/sun/security/ec/impl/ecl-priv.h @@ -51,7 +51,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/ecl.c b/jdk/src/share/native/sun/security/ec/impl/ecl.c index 79c5467cf07..a379d28e0d9 100644 --- a/jdk/src/share/native/sun/security/ec/impl/ecl.c +++ b/jdk/src/share/native/sun/security/ec/impl/ecl.c @@ -50,7 +50,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/ecl.h b/jdk/src/share/native/sun/security/ec/impl/ecl.h index ab956d89fbc..80c32659858 100644 --- a/jdk/src/share/native/sun/security/ec/impl/ecl.h +++ b/jdk/src/share/native/sun/security/ec/impl/ecl.h @@ -50,7 +50,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/ecl_curve.c b/jdk/src/share/native/sun/security/ec/impl/ecl_curve.c index a253a363f6a..c315625f771 100644 --- a/jdk/src/share/native/sun/security/ec/impl/ecl_curve.c +++ b/jdk/src/share/native/sun/security/ec/impl/ecl_curve.c @@ -50,7 +50,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/ecl_gf.c b/jdk/src/share/native/sun/security/ec/impl/ecl_gf.c index 46b8dff0295..bd4c10c7218 100644 --- a/jdk/src/share/native/sun/security/ec/impl/ecl_gf.c +++ b/jdk/src/share/native/sun/security/ec/impl/ecl_gf.c @@ -51,7 +51,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/ecl_mult.c b/jdk/src/share/native/sun/security/ec/impl/ecl_mult.c index 5c43ae8cf0e..55ad75f293b 100644 --- a/jdk/src/share/native/sun/security/ec/impl/ecl_mult.c +++ b/jdk/src/share/native/sun/security/ec/impl/ecl_mult.c @@ -50,7 +50,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/ecp.h b/jdk/src/share/native/sun/security/ec/impl/ecp.h index 97220f3d39f..989c4359b2c 100644 --- a/jdk/src/share/native/sun/security/ec/impl/ecp.h +++ b/jdk/src/share/native/sun/security/ec/impl/ecp.h @@ -50,7 +50,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/ecp_192.c b/jdk/src/share/native/sun/security/ec/impl/ecp_192.c index dcdd9dbe618..c58474dd60b 100644 --- a/jdk/src/share/native/sun/security/ec/impl/ecp_192.c +++ b/jdk/src/share/native/sun/security/ec/impl/ecp_192.c @@ -50,7 +50,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/ecp_224.c b/jdk/src/share/native/sun/security/ec/impl/ecp_224.c index 96d775f9e87..573a9f43b59 100644 --- a/jdk/src/share/native/sun/security/ec/impl/ecp_224.c +++ b/jdk/src/share/native/sun/security/ec/impl/ecp_224.c @@ -50,7 +50,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/ecp_256.c b/jdk/src/share/native/sun/security/ec/impl/ecp_256.c index ef829085663..2ce46e5b935 100644 --- a/jdk/src/share/native/sun/security/ec/impl/ecp_256.c +++ b/jdk/src/share/native/sun/security/ec/impl/ecp_256.c @@ -50,7 +50,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/ecp_384.c b/jdk/src/share/native/sun/security/ec/impl/ecp_384.c index 263fecb888f..74f8e342c00 100644 --- a/jdk/src/share/native/sun/security/ec/impl/ecp_384.c +++ b/jdk/src/share/native/sun/security/ec/impl/ecp_384.c @@ -50,7 +50,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/ecp_521.c b/jdk/src/share/native/sun/security/ec/impl/ecp_521.c index 239b1289372..62c0bc41d58 100644 --- a/jdk/src/share/native/sun/security/ec/impl/ecp_521.c +++ b/jdk/src/share/native/sun/security/ec/impl/ecp_521.c @@ -50,7 +50,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/ecp_aff.c b/jdk/src/share/native/sun/security/ec/impl/ecp_aff.c index a3a97f62570..4f9b0d1daeb 100644 --- a/jdk/src/share/native/sun/security/ec/impl/ecp_aff.c +++ b/jdk/src/share/native/sun/security/ec/impl/ecp_aff.c @@ -55,7 +55,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/ecp_jac.c b/jdk/src/share/native/sun/security/ec/impl/ecp_jac.c index 8b35dae8e99..779b82f75cb 100644 --- a/jdk/src/share/native/sun/security/ec/impl/ecp_jac.c +++ b/jdk/src/share/native/sun/security/ec/impl/ecp_jac.c @@ -55,7 +55,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/ecp_jm.c b/jdk/src/share/native/sun/security/ec/impl/ecp_jm.c index b85615be7ad..2f1c42aa001 100644 --- a/jdk/src/share/native/sun/security/ec/impl/ecp_jm.c +++ b/jdk/src/share/native/sun/security/ec/impl/ecp_jm.c @@ -50,7 +50,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/ecp_mont.c b/jdk/src/share/native/sun/security/ec/impl/ecp_mont.c index 6519eda7bc0..9a9ce1e4cb2 100644 --- a/jdk/src/share/native/sun/security/ec/impl/ecp_mont.c +++ b/jdk/src/share/native/sun/security/ec/impl/ecp_mont.c @@ -50,7 +50,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/logtab.h b/jdk/src/share/native/sun/security/ec/impl/logtab.h index f4b40008b4a..a6314ff76e1 100644 --- a/jdk/src/share/native/sun/security/ec/impl/logtab.h +++ b/jdk/src/share/native/sun/security/ec/impl/logtab.h @@ -50,7 +50,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/mp_gf2m-priv.h b/jdk/src/share/native/sun/security/ec/impl/mp_gf2m-priv.h index 889bfd1bed0..d4f81cee045 100644 --- a/jdk/src/share/native/sun/security/ec/impl/mp_gf2m-priv.h +++ b/jdk/src/share/native/sun/security/ec/impl/mp_gf2m-priv.h @@ -51,7 +51,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/mp_gf2m.c b/jdk/src/share/native/sun/security/ec/impl/mp_gf2m.c index 2c021c88a24..06e557af127 100644 --- a/jdk/src/share/native/sun/security/ec/impl/mp_gf2m.c +++ b/jdk/src/share/native/sun/security/ec/impl/mp_gf2m.c @@ -51,7 +51,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/mp_gf2m.h b/jdk/src/share/native/sun/security/ec/impl/mp_gf2m.h index f689ba35358..90c3bffdf0b 100644 --- a/jdk/src/share/native/sun/security/ec/impl/mp_gf2m.h +++ b/jdk/src/share/native/sun/security/ec/impl/mp_gf2m.h @@ -51,7 +51,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/mpi-config.h b/jdk/src/share/native/sun/security/ec/impl/mpi-config.h index 4c2b22b9f12..1e4216c3baa 100644 --- a/jdk/src/share/native/sun/security/ec/impl/mpi-config.h +++ b/jdk/src/share/native/sun/security/ec/impl/mpi-config.h @@ -50,7 +50,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/mpi-priv.h b/jdk/src/share/native/sun/security/ec/impl/mpi-priv.h index 9a80f23d02f..2cec62c254a 100644 --- a/jdk/src/share/native/sun/security/ec/impl/mpi-priv.h +++ b/jdk/src/share/native/sun/security/ec/impl/mpi-priv.h @@ -56,7 +56,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/mpi.c b/jdk/src/share/native/sun/security/ec/impl/mpi.c index a495b998598..c33bc19160a 100644 --- a/jdk/src/share/native/sun/security/ec/impl/mpi.c +++ b/jdk/src/share/native/sun/security/ec/impl/mpi.c @@ -54,7 +54,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/mpi.h b/jdk/src/share/native/sun/security/ec/impl/mpi.h index d80657e5657..87ba0856192 100644 --- a/jdk/src/share/native/sun/security/ec/impl/mpi.h +++ b/jdk/src/share/native/sun/security/ec/impl/mpi.h @@ -53,7 +53,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/mplogic.c b/jdk/src/share/native/sun/security/ec/impl/mplogic.c index 8de8306ea9e..30b5b42c27d 100644 --- a/jdk/src/share/native/sun/security/ec/impl/mplogic.c +++ b/jdk/src/share/native/sun/security/ec/impl/mplogic.c @@ -52,7 +52,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/mplogic.h b/jdk/src/share/native/sun/security/ec/impl/mplogic.h index a2f7714bffb..abc94c0c1a9 100644 --- a/jdk/src/share/native/sun/security/ec/impl/mplogic.h +++ b/jdk/src/share/native/sun/security/ec/impl/mplogic.h @@ -52,7 +52,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/mpmontg.c b/jdk/src/share/native/sun/security/ec/impl/mpmontg.c index c1762847a5e..04dfe9b62d7 100644 --- a/jdk/src/share/native/sun/security/ec/impl/mpmontg.c +++ b/jdk/src/share/native/sun/security/ec/impl/mpmontg.c @@ -52,7 +52,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/mpprime.h b/jdk/src/share/native/sun/security/ec/impl/mpprime.h index b9012af4b31..a741d418d63 100644 --- a/jdk/src/share/native/sun/security/ec/impl/mpprime.h +++ b/jdk/src/share/native/sun/security/ec/impl/mpprime.h @@ -53,7 +53,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/oid.c b/jdk/src/share/native/sun/security/ec/impl/oid.c index e5a76992bf9..252491b3331 100644 --- a/jdk/src/share/native/sun/security/ec/impl/oid.c +++ b/jdk/src/share/native/sun/security/ec/impl/oid.c @@ -50,7 +50,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/secitem.c b/jdk/src/share/native/sun/security/ec/impl/secitem.c index 6cfa5dea4b2..3db3027afa2 100644 --- a/jdk/src/share/native/sun/security/ec/impl/secitem.c +++ b/jdk/src/share/native/sun/security/ec/impl/secitem.c @@ -49,7 +49,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/native/sun/security/ec/impl/secoidt.h b/jdk/src/share/native/sun/security/ec/impl/secoidt.h index ea5da257ad7..5ad9a67415a 100644 --- a/jdk/src/share/native/sun/security/ec/impl/secoidt.h +++ b/jdk/src/share/native/sun/security/ec/impl/secoidt.h @@ -50,7 +50,7 @@ * *********************************************************************** */ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ diff --git a/jdk/src/share/sample/nio/file/AclEdit.java b/jdk/src/share/sample/nio/file/AclEdit.java index 0910e888a70..02b6ae78aa3 100644 --- a/jdk/src/share/sample/nio/file/AclEdit.java +++ b/jdk/src/share/sample/nio/file/AclEdit.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/jdk/src/share/sample/nio/file/Chmod.java b/jdk/src/share/sample/nio/file/Chmod.java index 7c4d50e93ef..321f4552551 100644 --- a/jdk/src/share/sample/nio/file/Chmod.java +++ b/jdk/src/share/sample/nio/file/Chmod.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/jdk/src/share/sample/nio/file/Copy.java b/jdk/src/share/sample/nio/file/Copy.java index 38062c4b875..7cb684183aa 100644 --- a/jdk/src/share/sample/nio/file/Copy.java +++ b/jdk/src/share/sample/nio/file/Copy.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/jdk/src/share/sample/nio/file/DiskUsage.java b/jdk/src/share/sample/nio/file/DiskUsage.java index fb2a164bf32..8d6bbb674d1 100644 --- a/jdk/src/share/sample/nio/file/DiskUsage.java +++ b/jdk/src/share/sample/nio/file/DiskUsage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/jdk/src/share/sample/nio/file/FileType.java b/jdk/src/share/sample/nio/file/FileType.java index 71451614b07..dc754b5f895 100644 --- a/jdk/src/share/sample/nio/file/FileType.java +++ b/jdk/src/share/sample/nio/file/FileType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/jdk/src/share/sample/nio/file/WatchDir.java b/jdk/src/share/sample/nio/file/WatchDir.java index 796b728206b..9b9d2ece052 100644 --- a/jdk/src/share/sample/nio/file/WatchDir.java +++ b/jdk/src/share/sample/nio/file/WatchDir.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/jdk/src/share/sample/nio/file/Xdd.java b/jdk/src/share/sample/nio/file/Xdd.java index 7551121a924..f07802f264a 100644 --- a/jdk/src/share/sample/nio/file/Xdd.java +++ b/jdk/src/share/sample/nio/file/Xdd.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/jdk/src/solaris/bin/arm/jvm.cfg b/jdk/src/solaris/bin/arm/jvm.cfg new file mode 100644 index 00000000000..0262ebda2e3 --- /dev/null +++ b/jdk/src/solaris/bin/arm/jvm.cfg @@ -0,0 +1,38 @@ +# Copyright (c) 2011, 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 +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# +# List of JVMs that can be used as an option to java, javac, etc. +# Order is important -- first in this list is the default JVM. +# NOTE that this both this file and its format are UNSUPPORTED and +# WILL GO AWAY in a future release. +# +# You may also select a JVM in an arbitrary location with the +# "-XXaltjvm=" option, but that too is unsupported +# and may not be available in a future release. +# +-client KNOWN +-server KNOWN +-hotspot ERROR +-classic WARN +-native ERROR +-green ERROR diff --git a/jdk/src/solaris/bin/ppc/jvm.cfg b/jdk/src/solaris/bin/ppc/jvm.cfg new file mode 100644 index 00000000000..0262ebda2e3 --- /dev/null +++ b/jdk/src/solaris/bin/ppc/jvm.cfg @@ -0,0 +1,38 @@ +# Copyright (c) 2011, 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 +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# +# List of JVMs that can be used as an option to java, javac, etc. +# Order is important -- first in this list is the default JVM. +# NOTE that this both this file and its format are UNSUPPORTED and +# WILL GO AWAY in a future release. +# +# You may also select a JVM in an arbitrary location with the +# "-XXaltjvm=" option, but that too is unsupported +# and may not be available in a future release. +# +-client KNOWN +-server KNOWN +-hotspot ERROR +-classic WARN +-native ERROR +-green ERROR diff --git a/jdk/src/solaris/classes/java/lang/ProcessEnvironment.java b/jdk/src/solaris/classes/java/lang/ProcessEnvironment.java index a08a291c937..bb60c71b604 100644 --- a/jdk/src/solaris/classes/java/lang/ProcessEnvironment.java +++ b/jdk/src/solaris/classes/java/lang/ProcessEnvironment.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2010, 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 diff --git a/jdk/src/solaris/classes/java/util/prefs/FileSystemPreferences.java b/jdk/src/solaris/classes/java/util/prefs/FileSystemPreferences.java index 53a19b5f5bd..166fcd97d69 100644 --- a/jdk/src/solaris/classes/java/util/prefs/FileSystemPreferences.java +++ b/jdk/src/solaris/classes/java/util/prefs/FileSystemPreferences.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/jdk/src/solaris/classes/sun/awt/X11/GtkFileDialogPeer.java b/jdk/src/solaris/classes/sun/awt/X11/GtkFileDialogPeer.java index e41bbb65dfb..02be75b6ca5 100644 --- a/jdk/src/solaris/classes/sun/awt/X11/GtkFileDialogPeer.java +++ b/jdk/src/solaris/classes/sun/awt/X11/GtkFileDialogPeer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2011, 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 diff --git a/jdk/src/solaris/classes/sun/awt/X11/XComponentPeer.java b/jdk/src/solaris/classes/sun/awt/X11/XComponentPeer.java index 6e425513c1c..37126c71654 100644 --- a/jdk/src/solaris/classes/sun/awt/X11/XComponentPeer.java +++ b/jdk/src/solaris/classes/sun/awt/X11/XComponentPeer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 diff --git a/jdk/src/solaris/classes/sun/awt/X11/XDesktopPeer.java b/jdk/src/solaris/classes/sun/awt/X11/XDesktopPeer.java index 740eabac485..94ba7529a54 100644 --- a/jdk/src/solaris/classes/sun/awt/X11/XDesktopPeer.java +++ b/jdk/src/solaris/classes/sun/awt/X11/XDesktopPeer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/jdk/src/solaris/classes/sun/awt/X11/XGlobalCursorManager.java b/jdk/src/solaris/classes/sun/awt/X11/XGlobalCursorManager.java index c28d9d03e11..a8703cb7877 100644 --- a/jdk/src/solaris/classes/sun/awt/X11/XGlobalCursorManager.java +++ b/jdk/src/solaris/classes/sun/awt/X11/XGlobalCursorManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/jdk/src/solaris/classes/sun/awt/X11/XRobotPeer.java b/jdk/src/solaris/classes/sun/awt/X11/XRobotPeer.java index a6acd8eb5f5..1463f283f0b 100644 --- a/jdk/src/solaris/classes/sun/awt/X11/XRobotPeer.java +++ b/jdk/src/solaris/classes/sun/awt/X11/XRobotPeer.java @@ -48,7 +48,7 @@ class XRobotPeer implements RobotPeer { } public void dispose() { - // does nothing + _dispose(); } public void mouseMove(int x, int y) { @@ -88,6 +88,7 @@ class XRobotPeer implements RobotPeer { } private static native synchronized void setup(int numberOfButtons, int[] buttonDownMasks); + private static native synchronized void _dispose(); private static native synchronized void mouseMoveImpl(X11GraphicsConfig xgc, int x, int y); private static native synchronized void mousePressImpl(int buttons); diff --git a/jdk/src/solaris/classes/sun/awt/X11/XSelection.java b/jdk/src/solaris/classes/sun/awt/X11/XSelection.java index 1ffd1346361..f19ad2ffb67 100644 --- a/jdk/src/solaris/classes/sun/awt/X11/XSelection.java +++ b/jdk/src/solaris/classes/sun/awt/X11/XSelection.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java b/jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java index d9cc3033a3b..3f63391473d 100644 --- a/jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java +++ b/jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/jdk/src/solaris/classes/sun/awt/X11/XToolkit.java b/jdk/src/solaris/classes/sun/awt/X11/XToolkit.java index ad92d2e9c00..641d82180a9 100644 --- a/jdk/src/solaris/classes/sun/awt/X11/XToolkit.java +++ b/jdk/src/solaris/classes/sun/awt/X11/XToolkit.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 @@ -135,6 +135,12 @@ public final class XToolkit extends UNIXToolkit implements Runnable { noisyAwtHandler = AccessController.doPrivileged(new GetBooleanAction("sun.awt.noisyerrorhandler")); } + /* + * Return (potentially) platform specific display timeout for the + * tray icon + */ + static native long getTrayIconDisplayTimeout(); + //---- ERROR HANDLER CODE ----// /* @@ -1222,8 +1228,8 @@ public final class XToolkit extends UNIXToolkit implements Runnable { public PrintJob getPrintJob(final Frame frame, final String doctitle, final Properties props) { - if (GraphicsEnvironment.isHeadless()) { - throw new IllegalArgumentException(); + if (frame == null) { + throw new NullPointerException("frame must not be null"); } PrintJob2D printJob = new PrintJob2D(frame, doctitle, props); @@ -1236,11 +1242,10 @@ public final class XToolkit extends UNIXToolkit implements Runnable { public PrintJob getPrintJob(final Frame frame, final String doctitle, final JobAttributes jobAttributes, - final PageAttributes pageAttributes) { - - - if (GraphicsEnvironment.isHeadless()) { - throw new IllegalArgumentException(); + final PageAttributes pageAttributes) + { + if (frame == null) { + throw new NullPointerException("frame must not be null"); } PrintJob2D printJob = new PrintJob2D(frame, doctitle, diff --git a/jdk/src/solaris/classes/sun/awt/X11/XTrayIconPeer.java b/jdk/src/solaris/classes/sun/awt/X11/XTrayIconPeer.java index ff7b78e2c13..7bc452c968e 100644 --- a/jdk/src/solaris/classes/sun/awt/X11/XTrayIconPeer.java +++ b/jdk/src/solaris/classes/sun/awt/X11/XTrayIconPeer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 @@ -230,7 +230,7 @@ public class XTrayIconPeer implements TrayIconPeer, // Wait till the EmbeddedFrame is reparented long start = System.currentTimeMillis(); - final long PERIOD = 2000L; + final long PERIOD = XToolkit.getTrayIconDisplayTimeout(); XToolkit.awtLock(); try { while (!isTrayIconDisplayed) { diff --git a/jdk/src/solaris/classes/sun/awt/motif/MFontConfiguration.java b/jdk/src/solaris/classes/sun/awt/motif/MFontConfiguration.java index 4e42db8d557..25e676eda53 100644 --- a/jdk/src/solaris/classes/sun/awt/motif/MFontConfiguration.java +++ b/jdk/src/solaris/classes/sun/awt/motif/MFontConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/jdk/src/solaris/classes/sun/awt/motif/MToolkit.java b/jdk/src/solaris/classes/sun/awt/motif/MToolkit.java index a4148a7b047..44108be3cf1 100644 --- a/jdk/src/solaris/classes/sun/awt/motif/MToolkit.java +++ b/jdk/src/solaris/classes/sun/awt/motif/MToolkit.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2011, 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 diff --git a/jdk/src/solaris/classes/sun/font/FcFontConfiguration.java b/jdk/src/solaris/classes/sun/font/FcFontConfiguration.java index 3ce3ce9e264..ce2c935ba71 100644 --- a/jdk/src/solaris/classes/sun/font/FcFontConfiguration.java +++ b/jdk/src/solaris/classes/sun/font/FcFontConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/solaris/classes/sun/font/FontConfigManager.java b/jdk/src/solaris/classes/sun/font/FontConfigManager.java index 5832683c04e..41c1a5d8cbb 100644 --- a/jdk/src/solaris/classes/sun/font/FontConfigManager.java +++ b/jdk/src/solaris/classes/sun/font/FontConfigManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/solaris/classes/sun/font/XRGlyphCache.java b/jdk/src/solaris/classes/sun/font/XRGlyphCache.java index 7dbb23a774f..74ac140a787 100644 --- a/jdk/src/solaris/classes/sun/font/XRGlyphCache.java +++ b/jdk/src/solaris/classes/sun/font/XRGlyphCache.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2011, 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 diff --git a/jdk/src/solaris/classes/sun/java2d/xr/XRPMBlitLoops.java b/jdk/src/solaris/classes/sun/java2d/xr/XRPMBlitLoops.java index 7b5d37d95d4..aaa48af2e16 100644 --- a/jdk/src/solaris/classes/sun/java2d/xr/XRPMBlitLoops.java +++ b/jdk/src/solaris/classes/sun/java2d/xr/XRPMBlitLoops.java @@ -143,7 +143,8 @@ public class XRPMBlitLoops { Blit swToSurfaceBlit = Blit.getFromCache(src.getSurfaceType(), CompositeType.SrcNoEa, vImgSurfaceType); XRSurfaceData vImgSurface = (XRSurfaceData) vImg.getDestSurface(); - swToSurfaceBlit.Blit(src, vImgSurface, null, null, sx, sy, 0, 0, w, h); + swToSurfaceBlit.Blit(src, vImgSurface, AlphaComposite.Src, null, + sx, sy, 0, 0, w, h); return vImgSurface; } diff --git a/jdk/src/solaris/classes/sun/java2d/xr/XRSurfaceData.java b/jdk/src/solaris/classes/sun/java2d/xr/XRSurfaceData.java index d8790b2cb59..fa0598774df 100644 --- a/jdk/src/solaris/classes/sun/java2d/xr/XRSurfaceData.java +++ b/jdk/src/solaris/classes/sun/java2d/xr/XRSurfaceData.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2011, 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 diff --git a/jdk/src/solaris/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java b/jdk/src/solaris/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java index be2426d7f72..0d898336e24 100644 --- a/jdk/src/solaris/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java +++ b/jdk/src/solaris/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/jdk/src/solaris/classes/sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java b/jdk/src/solaris/classes/sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java index ee3731a0c2e..3b431e77b01 100644 --- a/jdk/src/solaris/classes/sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java +++ b/jdk/src/solaris/classes/sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/solaris/classes/sun/nio/ch/UnixAsynchronousSocketChannelImpl.java b/jdk/src/solaris/classes/sun/nio/ch/UnixAsynchronousSocketChannelImpl.java index 37caeeb9bce..d7fccc9d558 100644 --- a/jdk/src/solaris/classes/sun/nio/ch/UnixAsynchronousSocketChannelImpl.java +++ b/jdk/src/solaris/classes/sun/nio/ch/UnixAsynchronousSocketChannelImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/solaris/classes/sun/nio/fs/GnomeFileTypeDetector.java b/jdk/src/solaris/classes/sun/nio/fs/GnomeFileTypeDetector.java index 8e06835570f..f92a31488f8 100644 --- a/jdk/src/solaris/classes/sun/nio/fs/GnomeFileTypeDetector.java +++ b/jdk/src/solaris/classes/sun/nio/fs/GnomeFileTypeDetector.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/solaris/classes/sun/nio/fs/LinuxDosFileAttributeView.java b/jdk/src/solaris/classes/sun/nio/fs/LinuxDosFileAttributeView.java index af0dc1036bd..4a97e094243 100644 --- a/jdk/src/solaris/classes/sun/nio/fs/LinuxDosFileAttributeView.java +++ b/jdk/src/solaris/classes/sun/nio/fs/LinuxDosFileAttributeView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/solaris/classes/sun/nio/fs/LinuxFileSystem.java b/jdk/src/solaris/classes/sun/nio/fs/LinuxFileSystem.java index 18309cb4450..89be8614a25 100644 --- a/jdk/src/solaris/classes/sun/nio/fs/LinuxFileSystem.java +++ b/jdk/src/solaris/classes/sun/nio/fs/LinuxFileSystem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/solaris/classes/sun/nio/fs/LinuxFileSystemProvider.java b/jdk/src/solaris/classes/sun/nio/fs/LinuxFileSystemProvider.java index 6659ff5ede4..1045a7e00c6 100644 --- a/jdk/src/solaris/classes/sun/nio/fs/LinuxFileSystemProvider.java +++ b/jdk/src/solaris/classes/sun/nio/fs/LinuxFileSystemProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 @@ -56,11 +56,11 @@ public class LinuxFileSystemProvider extends UnixFileSystemProvider { { if (type == DosFileAttributeView.class) { return (V) new LinuxDosFileAttributeView(UnixPath.toUnixPath(obj), - followLinks(options)); + Util.followLinks(options)); } if (type == UserDefinedFileAttributeView.class) { return (V) new LinuxUserDefinedFileAttributeView(UnixPath.toUnixPath(obj), - followLinks(options)); + Util.followLinks(options)); } return super.getFileAttributeView(obj, type, options); } @@ -72,11 +72,11 @@ public class LinuxFileSystemProvider extends UnixFileSystemProvider { { if (name.equals("dos")) { return new LinuxDosFileAttributeView(UnixPath.toUnixPath(obj), - followLinks(options)); + Util.followLinks(options)); } if (name.equals("user")) { return new LinuxUserDefinedFileAttributeView(UnixPath.toUnixPath(obj), - followLinks(options)); + Util.followLinks(options)); } return super.getFileAttributeView(obj, name, options); } diff --git a/jdk/src/solaris/classes/sun/nio/fs/LinuxUserDefinedFileAttributeView.java b/jdk/src/solaris/classes/sun/nio/fs/LinuxUserDefinedFileAttributeView.java index 14bfbcc2e1e..586e4b3fad1 100644 --- a/jdk/src/solaris/classes/sun/nio/fs/LinuxUserDefinedFileAttributeView.java +++ b/jdk/src/solaris/classes/sun/nio/fs/LinuxUserDefinedFileAttributeView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/solaris/classes/sun/nio/fs/LinuxWatchService.java b/jdk/src/solaris/classes/sun/nio/fs/LinuxWatchService.java index bca96756325..31d3bf0770f 100644 --- a/jdk/src/solaris/classes/sun/nio/fs/LinuxWatchService.java +++ b/jdk/src/solaris/classes/sun/nio/fs/LinuxWatchService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/solaris/classes/sun/nio/fs/SolarisAclFileAttributeView.java b/jdk/src/solaris/classes/sun/nio/fs/SolarisAclFileAttributeView.java index 5fa71242b81..b27f937b8d7 100644 --- a/jdk/src/solaris/classes/sun/nio/fs/SolarisAclFileAttributeView.java +++ b/jdk/src/solaris/classes/sun/nio/fs/SolarisAclFileAttributeView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/solaris/classes/sun/nio/fs/SolarisFileSystem.java b/jdk/src/solaris/classes/sun/nio/fs/SolarisFileSystem.java index 516d983c259..9aa9e533b8a 100644 --- a/jdk/src/solaris/classes/sun/nio/fs/SolarisFileSystem.java +++ b/jdk/src/solaris/classes/sun/nio/fs/SolarisFileSystem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/solaris/classes/sun/nio/fs/SolarisFileSystemProvider.java b/jdk/src/solaris/classes/sun/nio/fs/SolarisFileSystemProvider.java index 98c3ae8699c..5564a26235c 100644 --- a/jdk/src/solaris/classes/sun/nio/fs/SolarisFileSystemProvider.java +++ b/jdk/src/solaris/classes/sun/nio/fs/SolarisFileSystemProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 @@ -57,11 +57,11 @@ public class SolarisFileSystemProvider extends UnixFileSystemProvider { { if (type == AclFileAttributeView.class) { return (V) new SolarisAclFileAttributeView(UnixPath.toUnixPath(obj), - followLinks(options)); + Util.followLinks(options)); } if (type == UserDefinedFileAttributeView.class) { return(V) new SolarisUserDefinedFileAttributeView(UnixPath.toUnixPath(obj), - followLinks(options)); + Util.followLinks(options)); } return super.getFileAttributeView(obj, type, options); } @@ -73,10 +73,10 @@ public class SolarisFileSystemProvider extends UnixFileSystemProvider { { if (name.equals("acl")) return new SolarisAclFileAttributeView(UnixPath.toUnixPath(obj), - followLinks(options)); + Util.followLinks(options)); if (name.equals("user")) return new SolarisUserDefinedFileAttributeView(UnixPath.toUnixPath(obj), - followLinks(options)); + Util.followLinks(options)); return super.getFileAttributeView(obj, name, options); } } diff --git a/jdk/src/solaris/classes/sun/nio/fs/SolarisUserDefinedFileAttributeView.java b/jdk/src/solaris/classes/sun/nio/fs/SolarisUserDefinedFileAttributeView.java index 6148f4109f2..c48ecef63b0 100644 --- a/jdk/src/solaris/classes/sun/nio/fs/SolarisUserDefinedFileAttributeView.java +++ b/jdk/src/solaris/classes/sun/nio/fs/SolarisUserDefinedFileAttributeView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/solaris/classes/sun/nio/fs/SolarisWatchService.java b/jdk/src/solaris/classes/sun/nio/fs/SolarisWatchService.java index 68296bc34e5..fcf36316b19 100644 --- a/jdk/src/solaris/classes/sun/nio/fs/SolarisWatchService.java +++ b/jdk/src/solaris/classes/sun/nio/fs/SolarisWatchService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/solaris/classes/sun/nio/fs/UnixChannelFactory.java b/jdk/src/solaris/classes/sun/nio/fs/UnixChannelFactory.java index 21c69ae4f4c..963e3777bdf 100644 --- a/jdk/src/solaris/classes/sun/nio/fs/UnixChannelFactory.java +++ b/jdk/src/solaris/classes/sun/nio/fs/UnixChannelFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/solaris/classes/sun/nio/fs/UnixCopyFile.java b/jdk/src/solaris/classes/sun/nio/fs/UnixCopyFile.java index 9a666c167ee..08aa82211dd 100644 --- a/jdk/src/solaris/classes/sun/nio/fs/UnixCopyFile.java +++ b/jdk/src/solaris/classes/sun/nio/fs/UnixCopyFile.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/solaris/classes/sun/nio/fs/UnixFileAttributeViews.java b/jdk/src/solaris/classes/sun/nio/fs/UnixFileAttributeViews.java index ad0a2a00d12..3716e3fdef7 100644 --- a/jdk/src/solaris/classes/sun/nio/fs/UnixFileAttributeViews.java +++ b/jdk/src/solaris/classes/sun/nio/fs/UnixFileAttributeViews.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/solaris/classes/sun/nio/fs/UnixFileAttributes.java b/jdk/src/solaris/classes/sun/nio/fs/UnixFileAttributes.java index 966712e0cf1..a6b79953add 100644 --- a/jdk/src/solaris/classes/sun/nio/fs/UnixFileAttributes.java +++ b/jdk/src/solaris/classes/sun/nio/fs/UnixFileAttributes.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/solaris/classes/sun/nio/fs/UnixFileStore.java b/jdk/src/solaris/classes/sun/nio/fs/UnixFileStore.java index 080c2c0c2fd..4299b2668d0 100644 --- a/jdk/src/solaris/classes/sun/nio/fs/UnixFileStore.java +++ b/jdk/src/solaris/classes/sun/nio/fs/UnixFileStore.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/solaris/classes/sun/nio/fs/UnixFileSystem.java b/jdk/src/solaris/classes/sun/nio/fs/UnixFileSystem.java index 96c6e4a4cce..28276e134ad 100644 --- a/jdk/src/solaris/classes/sun/nio/fs/UnixFileSystem.java +++ b/jdk/src/solaris/classes/sun/nio/fs/UnixFileSystem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/solaris/classes/sun/nio/fs/UnixFileSystemProvider.java b/jdk/src/solaris/classes/sun/nio/fs/UnixFileSystemProvider.java index 8ec672a306b..0c14ef02e7e 100644 --- a/jdk/src/solaris/classes/sun/nio/fs/UnixFileSystemProvider.java +++ b/jdk/src/solaris/classes/sun/nio/fs/UnixFileSystemProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 @@ -105,20 +105,6 @@ public abstract class UnixFileSystemProvider return (UnixPath)obj; } - boolean followLinks(LinkOption... options) { - boolean followLinks = true; - for (LinkOption option: options) { - if (option == LinkOption.NOFOLLOW_LINKS) { - followLinks = false; - continue; - } - if (option == null) - throw new NullPointerException(); - throw new AssertionError("Should not get here"); - } - return followLinks; - } - @Override @SuppressWarnings("unchecked") public V getFileAttributeView(Path obj, @@ -126,7 +112,7 @@ public abstract class UnixFileSystemProvider LinkOption... options) { UnixPath file = UnixPath.toUnixPath(obj); - boolean followLinks = followLinks(options); + boolean followLinks = Util.followLinks(options); if (type == BasicFileAttributeView.class) return (V) UnixFileAttributeViews.createBasicView(file, followLinks); if (type == PosixFileAttributeView.class) @@ -163,7 +149,7 @@ public abstract class UnixFileSystemProvider LinkOption... options) { UnixPath file = UnixPath.toUnixPath(obj); - boolean followLinks = followLinks(options); + boolean followLinks = Util.followLinks(options); if (name.equals("basic")) return UnixFileAttributeViews.createBasicView(file, followLinks); if (name.equals("posix")) diff --git a/jdk/src/solaris/classes/sun/nio/fs/UnixPath.java b/jdk/src/solaris/classes/sun/nio/fs/UnixPath.java index b392b56b7e9..30c4dfe6501 100644 --- a/jdk/src/solaris/classes/sun/nio/fs/UnixPath.java +++ b/jdk/src/solaris/classes/sun/nio/fs/UnixPath.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 @@ -819,13 +819,13 @@ class UnixPath } @Override - public Path toRealPath(boolean resolveLinks) throws IOException { + public Path toRealPath(LinkOption... options) throws IOException { checkRead(); UnixPath absolute = toAbsolutePath(); - // if resolveLinks is true then use realpath - if (resolveLinks) { + // if resolving links then use realpath + if (Util.followLinks(options)) { try { byte[] rp = realpath(absolute); return new UnixPath(getFileSystem(), rp); @@ -834,7 +834,7 @@ class UnixPath } } - // if resolveLinks is false then eliminate "." and also ".." + // if not resolving links then eliminate "." and also ".." // where the previous element is not a link. UnixPath result = fs.rootDirectory(); for (int i=0; i +#include +#endif + /* Take an array of string pairs (map of key->value) and a string (key). * Examine each pair in the map to see if the first string (key) matches the * string. If so, store the second string of the pair (value) in the value and @@ -304,6 +309,36 @@ static int ParseLocale(int cat, char ** std_language, char ** std_script, return 1; } +#ifdef JAVASE_EMBEDDED +/* Determine the default embedded toolkit based on whether lib/xawt/ + * exists in the JRE. This can still be overridden by -Dawt.toolkit=XXX + */ +static char* getEmbeddedToolkit() { + Dl_info dlinfo; + char buf[MAXPATHLEN]; + int32_t len; + char *p; + struct stat statbuf; + + /* Get address of this library and the directory containing it. */ + dladdr((void *)getEmbeddedToolkit, &dlinfo); + realpath((char *)dlinfo.dli_fname, buf); + len = strlen(buf); + p = strrchr(buf, '/'); + /* Default AWT Toolkit on Linux and Solaris is XAWT. */ + strncpy(p, "/xawt/", MAXPATHLEN-len-1); + /* Check if it exists */ + if (stat(buf, &statbuf) == -1 && errno == ENOENT) { + /* No - this is a reduced-headless-jre so use special HToolkit */ + return "sun.awt.HToolkit"; + } + else { + /* Yes - this is a headful JRE so fallback to SE defaults */ + return NULL; + } +} +#endif + /* This function gets called very early, before VM_CALLS are setup. * Do not use any of the VM_CALLS entries!!! */ @@ -328,7 +363,12 @@ GetJavaProperties(JNIEnv *env) /* Java 2D properties */ sprops.graphics_env = "sun.awt.X11GraphicsEnvironment"; - sprops.awt_toolkit = NULL; + +#ifdef JAVASE_EMBEDDED + sprops.awt_toolkit = getEmbeddedToolkit(); + if (sprops.awt_toolkit == NULL) // default as below +#endif + sprops.awt_toolkit = "sun.awt.X11.XToolkit"; /* This is used only for debugging of font problems. */ v = getenv("JAVA2D_FONTPATH"); diff --git a/jdk/src/solaris/native/java/net/Inet6AddressImpl.c b/jdk/src/solaris/native/java/net/Inet6AddressImpl.c index 835969d7761..bb5bae78104 100644 --- a/jdk/src/solaris/native/java/net/Inet6AddressImpl.c +++ b/jdk/src/solaris/native/java/net/Inet6AddressImpl.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/jdk/src/solaris/native/java/net/NetworkInterface.c b/jdk/src/solaris/native/java/net/NetworkInterface.c index ba1c3c7aa8e..0f987ff6764 100644 --- a/jdk/src/solaris/native/java/net/NetworkInterface.c +++ b/jdk/src/solaris/native/java/net/NetworkInterface.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c b/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c index 0eb2a9be890..7a1edc3a99a 100644 --- a/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c +++ b/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/jdk/src/solaris/native/java/net/PlainSocketImpl.c b/jdk/src/solaris/native/java/net/PlainSocketImpl.c index 9aca8060962..64b6e3c07fd 100644 --- a/jdk/src/solaris/native/java/net/PlainSocketImpl.c +++ b/jdk/src/solaris/native/java/net/PlainSocketImpl.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/jdk/src/solaris/native/java/net/linux_close.c b/jdk/src/solaris/native/java/net/linux_close.c index 1385519ef60..5665e85e09c 100644 --- a/jdk/src/solaris/native/java/net/linux_close.c +++ b/jdk/src/solaris/native/java/net/linux_close.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2011, 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 diff --git a/jdk/src/solaris/native/java/net/net_util_md.c b/jdk/src/solaris/native/java/net/net_util_md.c index 8e035b368f1..25b58f67c2a 100644 --- a/jdk/src/solaris/native/java/net/net_util_md.c +++ b/jdk/src/solaris/native/java/net/net_util_md.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/jdk/src/solaris/native/sun/awt/awt_DrawingSurface.c b/jdk/src/solaris/native/sun/awt/awt_DrawingSurface.c index f84c08edf66..21cc862dcae 100644 --- a/jdk/src/solaris/native/sun/awt/awt_DrawingSurface.c +++ b/jdk/src/solaris/native/sun/awt/awt_DrawingSurface.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2011, 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 diff --git a/jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c b/jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c index b548df4bf5d..301df87f8c9 100644 --- a/jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c +++ b/jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/jdk/src/solaris/native/sun/awt/awt_Robot.c b/jdk/src/solaris/native/sun/awt/awt_Robot.c index c3384b2eb1a..38ad2786366 100644 --- a/jdk/src/solaris/native/sun/awt/awt_Robot.c +++ b/jdk/src/solaris/native/sun/awt/awt_Robot.c @@ -48,12 +48,28 @@ #ifdef __linux__ #include #endif +#include extern struct X11GraphicsConfigIDs x11GraphicsConfigIDs; static jint * masks; static jint num_buttons; +static unsigned int s_robotInstanceCounter = 0; + +static void* xcompositeLibHandle = NULL; +static Bool xcompositeExtAvailable = False; +static Bool xcompositeExtTested = False; + +typedef Status (*T_XCompositeQueryVersion)(Display *dpy, int *major_versionp, int *minor_versionp); +typedef Window (*T_XCompositeGetOverlayWindow)(Display *dpy, Window window); +typedef void (*T_XCompositeReleaseOverlayWindow)(Display *dpy, Window window); + +static T_XCompositeQueryVersion XCompositeQueryVersion = NULL; +static T_XCompositeGetOverlayWindow XCompositeGetOverlayWindow = NULL; +static T_XCompositeReleaseOverlayWindow XCompositeReleaseOverlayWindow = NULL; + + static int32_t isXTestAvailable() { int32_t major_opcode, first_event, first_error; int32_t event_basep, error_basep, majorp, minorp; @@ -194,8 +210,80 @@ Java_sun_awt_X11_XRobotPeer_setup (JNIEnv * env, jclass cls, jint numberOfButton } AWT_UNLOCK(); + + s_robotInstanceCounter++; } +JNIEXPORT void JNICALL +Java_sun_awt_X11_XRobotPeer__1dispose (JNIEnv * env, jclass cls) +{ + if (--s_robotInstanceCounter) { + return; + } + + // This is the last instance of the XRobotPeer being released + + if (xcompositeExtTested && xcompositeExtAvailable && xcompositeLibHandle) { + // The lib is loaded in IsXCompositeAvailable(). Unload under AWT_LOCK + // so that the shutdown function of the lib behaves correctly. + AWT_LOCK(); + dlclose(xcompositeLibHandle); + AWT_UNLOCK(); + } + + xcompositeExtTested = False; + xcompositeExtAvailable = False; + xcompositeLibHandle = NULL; +} + +/* + * Returns True only if XCOMPOSITE is of version 0.3 or higher. + * The functions that we need are available since that version. + * + * Must be invoked under AWT_LOCK. + * + * Leaves the library loaded if the version is correct. + */ +static Bool IsXCompositeAvailable() +{ + if (!xcompositeExtTested) { + int opcode, eventb, errorb; + + if (XQueryExtension(awt_display, "Composite", &opcode, &eventb, &errorb)) { + xcompositeLibHandle = dlopen("libXcomposite.so.1", RTLD_LAZY | RTLD_GLOBAL); +#ifndef __linux__ /* SOLARIS */ + if (xcompositeLibHandle == NULL) { + xcompositeLibHandle = dlopen("/usr/sfw/lib/libXcomposite.so.1", + RTLD_LAZY | RTLD_GLOBAL); + } +#endif + + if (xcompositeLibHandle) { + int major, minor; + XCompositeQueryVersion = (T_XCompositeQueryVersion)dlsym(xcompositeLibHandle, "XCompositeQueryVersion"); + + if (XCompositeQueryVersion && XCompositeQueryVersion(awt_display, &major, &minor)) { + if (major >= 0 && minor >= 3) { + XCompositeGetOverlayWindow = (T_XCompositeGetOverlayWindow)dlsym(xcompositeLibHandle, "XCompositeGetOverlayWindow"); + XCompositeReleaseOverlayWindow = (T_XCompositeReleaseOverlayWindow)dlsym(xcompositeLibHandle, "XCompositeReleaseOverlayWindow"); + + if (XCompositeGetOverlayWindow && XCompositeReleaseOverlayWindow) { + xcompositeExtAvailable = True; + } + } + } + + if (!xcompositeExtAvailable) { + dlclose(xcompositeLibHandle); + } /* else the lib is unloaded in _dispose() */ + } + } + + xcompositeExtTested = True; + } + + return xcompositeExtAvailable; +} JNIEXPORT void JNICALL Java_sun_awt_X11_XRobotPeer_getRGBPixelsImpl( JNIEnv *env, @@ -211,7 +299,7 @@ Java_sun_awt_X11_XRobotPeer_getRGBPixelsImpl( JNIEnv *env, jint *ary; /* Array of jints for sending pixel values back * to parent process. */ - Window rootWindow; + Window window; AwtGraphicsConfigDataPtr adata; DTRACE_PRINTLN6("RobotPeer: getRGBPixelsImpl(%lx, %d, %d, %d, %d, %x)", xgc, x, y, width, height, pixelArray); @@ -228,14 +316,24 @@ Java_sun_awt_X11_XRobotPeer_getRGBPixelsImpl( JNIEnv *env, adata = (AwtGraphicsConfigDataPtr) JNU_GetLongFieldAsPtr(env, xgc, x11GraphicsConfigIDs.aData); DASSERT(adata != NULL); - rootWindow = XRootWindow(awt_display, adata->awt_visInfo.screen); - image = getWindowImage(awt_display, rootWindow, x, y, width, height); + window = XRootWindow(awt_display, adata->awt_visInfo.screen); + + if (IsXCompositeAvailable()) { + // Use 'composite overlay window' instead of the root window. + // See 6903034 for details. + window = XCompositeGetOverlayWindow(awt_display, window); + } + + image = getWindowImage(awt_display, window, x, y, width, height); /* Array to use to crunch around the pixel values */ ary = (jint *) malloc(width * height * sizeof (jint)); if (ary == NULL) { JNU_ThrowOutOfMemoryError(env, "OutOfMemoryError"); XDestroyImage(image); + if (IsXCompositeAvailable()) { + XCompositeReleaseOverlayWindow(awt_display, window); + } AWT_UNLOCK(); return; } @@ -256,6 +354,9 @@ Java_sun_awt_X11_XRobotPeer_getRGBPixelsImpl( JNIEnv *env, free(ary); XDestroyImage(image); + if (IsXCompositeAvailable()) { + XCompositeReleaseOverlayWindow(awt_display, window); + } AWT_UNLOCK(); } diff --git a/jdk/src/solaris/native/sun/awt/fontpath.c b/jdk/src/solaris/native/sun/awt/fontpath.c index c868f3cc0ea..68c352db16c 100644 --- a/jdk/src/solaris/native/sun/awt/fontpath.c +++ b/jdk/src/solaris/native/sun/awt/fontpath.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2011, 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 diff --git a/jdk/src/solaris/native/sun/awt/gtk2_interface.c b/jdk/src/solaris/native/sun/awt/gtk2_interface.c index 291edc3fb7e..3378dd00c2d 100644 --- a/jdk/src/solaris/native/sun/awt/gtk2_interface.c +++ b/jdk/src/solaris/native/sun/awt/gtk2_interface.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/jdk/src/solaris/native/sun/awt/gtk2_interface.h b/jdk/src/solaris/native/sun/awt/gtk2_interface.h index addbc99d61c..9a6e2ca0f8f 100644 --- a/jdk/src/solaris/native/sun/awt/gtk2_interface.h +++ b/jdk/src/solaris/native/sun/awt/gtk2_interface.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/jdk/src/solaris/native/sun/awt/jawt.c b/jdk/src/solaris/native/sun/awt/jawt.c index b682edaf45d..f6f8530cb9a 100644 --- a/jdk/src/solaris/native/sun/awt/jawt.c +++ b/jdk/src/solaris/native/sun/awt/jawt.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 @@ -33,6 +33,10 @@ */ JNIEXPORT jboolean JNICALL JAWT_GetAWT(JNIEnv* env, JAWT* awt) { +#if defined(JAVASE_EMBEDDED) && defined(HEADLESS) + /* there are no AWT libs available at all */ + return JNI_FALSE; +#else if (awt == NULL) { return JNI_FALSE; } @@ -51,4 +55,5 @@ JNIEXPORT jboolean JNICALL JAWT_GetAWT(JNIEnv* env, JAWT* awt) } return JNI_TRUE; +#endif } diff --git a/jdk/src/solaris/native/sun/java2d/loops/vis_IntArgbPre_Mask.c b/jdk/src/solaris/native/sun/java2d/loops/vis_IntArgbPre_Mask.c index 2b142c46c48..3e9d09747e1 100644 --- a/jdk/src/solaris/native/sun/java2d/loops/vis_IntArgbPre_Mask.c +++ b/jdk/src/solaris/native/sun/java2d/loops/vis_IntArgbPre_Mask.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2010, 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 diff --git a/jdk/src/solaris/native/sun/java2d/loops/vis_SrcMaskFill.c b/jdk/src/solaris/native/sun/java2d/loops/vis_SrcMaskFill.c index 170ab458d80..5d1710ce551 100644 --- a/jdk/src/solaris/native/sun/java2d/loops/vis_SrcMaskFill.c +++ b/jdk/src/solaris/native/sun/java2d/loops/vis_SrcMaskFill.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2010, 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 diff --git a/jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c b/jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c index db16fdc524a..9b3e7061436 100644 --- a/jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c +++ b/jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.h b/jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.h index 104d7b1021a..a082df9f518 100644 --- a/jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.h +++ b/jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/jdk/src/solaris/native/sun/java2d/x11/XRBackendNative.c b/jdk/src/solaris/native/sun/java2d/x11/XRBackendNative.c index f56e904a669..969f5f589fe 100644 --- a/jdk/src/solaris/native/sun/java2d/x11/XRBackendNative.c +++ b/jdk/src/solaris/native/sun/java2d/x11/XRBackendNative.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2011, 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 @@ -644,7 +644,7 @@ Java_sun_java2d_xr_XRBackendNative_XRAddGlyphsNative for (i=0; i < glyphCnt; i++) { GlyphInfo *jginfo = (GlyphInfo *) jlong_to_ptr(glyphInfoPtrs[i]); - gid[i] = (Glyph) (0xffffffff & ((unsigned int) jginfo->cellInfo)); + gid[i] = (Glyph) (0x0ffffffffL & ((unsigned long)(jginfo->cellInfo))); xginfo[i].x = (-jginfo->topLeftX); xginfo[i].y = (-jginfo->topLeftY); xginfo[i].width = jginfo->width; @@ -666,16 +666,56 @@ Java_sun_java2d_xr_XRBackendNative_XRAddGlyphsNative JNIEXPORT void JNICALL Java_sun_java2d_xr_XRBackendNative_XRFreeGlyphsNative (JNIEnv *env, jclass cls, jint glyphSet, jintArray gidArray, jint glyphCnt) { - jint *gids; - int i; - if ((gids = (jint *) (*env)->GetPrimitiveArrayCritical(env, gidArray, NULL)) == NULL) { + /* The glyph ids are 32 bit but may be stored in a 64 bit long on + * a 64 bit architecture. So optimise the 32 bit case to avoid + * extra stack or heap allocations by directly referencing the + * underlying Java array and only allocate on 64 bit. + */ + if (sizeof(jint) == sizeof(Glyph)) { + jint *gids = + (*env)->GetPrimitiveArrayCritical(env, gidArray, NULL); + if (gids == NULL) { + return; + } else { + XRenderFreeGlyphs(awt_display, + (GlyphSet)glyphSet, (Glyph *)gids, glyphCnt); + (*env)->ReleasePrimitiveArrayCritical(env, gidArray, + gids, JNI_ABORT); + } return; + } else { + Glyph stack_ids[64]; + Glyph *gids = NULL; + jint* jgids = NULL; + int i; + + if (glyphCnt <= 64) { + gids = stack_ids; + } else { + gids = (Glyph *)malloc(sizeof(Glyph) * glyphCnt); + if (gids == NULL) { + return; + } + } + jgids = (*env)->GetPrimitiveArrayCritical(env, gidArray, NULL); + if (jgids == NULL) { + if (gids != stack_ids) { + free(gids); + } + return; + } + for (i=0; i < glyphCnt; i++) { + gids[i] = jgids[i]; + } + XRenderFreeGlyphs(awt_display, + (GlyphSet) glyphSet, gids, glyphCnt); + (*env)->ReleasePrimitiveArrayCritical(env, gidArray, + jgids, JNI_ABORT); + if (gids != stack_ids) { + free(gids); + } } - - XRenderFreeGlyphs (awt_display, (GlyphSet) glyphSet, (Glyph *) gids, glyphCnt); - - (*env)->ReleasePrimitiveArrayCritical(env, gidArray, gids, JNI_ABORT); } JNIEXPORT jint JNICALL @@ -692,9 +732,9 @@ Java_sun_java2d_xr_XRBackendNative_XRenderCompositeTextNative jint *ids; jint *elts; XGlyphElt32 *xelts; - Glyph *xids; + unsigned int *xids; XGlyphElt32 selts[24]; - Glyph sids[256]; + unsigned int sids[256]; int charCnt = 0; if (eltCnt <= 24) { @@ -709,7 +749,7 @@ Java_sun_java2d_xr_XRBackendNative_XRenderCompositeTextNative if (glyphCnt <= 256) { xids = &sids[0]; } else { - xids = (Glyph *) malloc(sizeof(Glyph) * glyphCnt); + xids = (unsigned int*)malloc(sizeof(unsigned int) * glyphCnt); if (xids == NULL) { if (xelts != &selts[0]) { free(xelts); @@ -742,7 +782,7 @@ Java_sun_java2d_xr_XRBackendNative_XRenderCompositeTextNative } for (i=0; i < glyphCnt; i++) { - xids[i] = (Glyph) ids[i]; + xids[i] = ids[i]; } for (i=0; i < eltCnt; i++) { @@ -750,7 +790,7 @@ Java_sun_java2d_xr_XRBackendNative_XRenderCompositeTextNative xelts[i].xOff = elts[i*4 + 1]; xelts[i].yOff = elts[i*4 + 2]; xelts[i].glyphset = (GlyphSet) elts[i*4 + 3]; - xelts[i].chars = (unsigned int *) &xids[charCnt]; + xelts[i].chars = &xids[charCnt]; charCnt += xelts[i].nchars; } diff --git a/jdk/src/solaris/native/sun/java2d/x11/XRSurfaceData.c b/jdk/src/solaris/native/sun/java2d/x11/XRSurfaceData.c index 620f90f7618..5de53ca7a04 100644 --- a/jdk/src/solaris/native/sun/java2d/x11/XRSurfaceData.c +++ b/jdk/src/solaris/native/sun/java2d/x11/XRSurfaceData.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2011, 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 diff --git a/jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c b/jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c index 539013f0bd7..808391433f6 100644 --- a/jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c +++ b/jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/jdk/src/solaris/native/sun/nio/ch/Net.c b/jdk/src/solaris/native/sun/nio/ch/Net.c index 9f9b4669a8e..def98591f8a 100644 --- a/jdk/src/solaris/native/sun/nio/ch/Net.c +++ b/jdk/src/solaris/native/sun/nio/ch/Net.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2011, 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 diff --git a/jdk/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c b/jdk/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c index d01f09e3c64..ba22f417556 100644 --- a/jdk/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c +++ b/jdk/src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/solaris/native/sun/xawt/XToolkit.c b/jdk/src/solaris/native/sun/xawt/XToolkit.c index 4ea63143c70..69620ffc1e6 100644 --- a/jdk/src/solaris/native/sun/xawt/XToolkit.c +++ b/jdk/src/solaris/native/sun/xawt/XToolkit.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 @@ -110,6 +110,21 @@ Java_sun_awt_X11_XToolkit_initIDs awt_ModLockIsShiftLock = (*env)->GetStaticIntField(env, clazz, fid) != 0 ? True : False; } +/* + * Class: sun_awt_X11_XToolkit + * Method: getTrayIconDisplayTimeout + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_sun_awt_X11_XToolkit_getTrayIconDisplayTimeout + (JNIEnv *env, jclass clazz) +{ +#ifndef JAVASE_EMBEDDED + return (jlong) 2000; +#else + return (jlong) 10000; +#endif +} + /* * Class: sun_awt_X11_XToolkit * Method: getDefaultXColormap @@ -340,15 +355,34 @@ static uint32_t get_poll_timeout(jlong nextTaskTime); #define AWT_READPIPE (awt_pipe_fds[0]) #define AWT_WRITEPIPE (awt_pipe_fds[1]) -#define DEF_AWT_MAX_POLL_TIMEOUT ((uint32_t)500) /* milliseconds */ +#ifdef JAVASE_EMBEDDED + #define DEF_AWT_MAX_POLL_TIMEOUT ((uint32_t)4000000000) /* milliseconds */ +#else + #define DEF_AWT_MAX_POLL_TIMEOUT ((uint32_t)500) /* milliseconds */ +#endif + #define DEF_AWT_FLUSH_TIMEOUT ((uint32_t)100) /* milliseconds */ #define AWT_MIN_POLL_TIMEOUT ((uint32_t)0) /* milliseconds */ #define TIMEOUT_TIMEDOUT 0 #define TIMEOUT_EVENTS 1 +/* awt_poll_alg - AWT Poll Events Aging Algorithms */ +#define AWT_POLL_FALSE 1 +#define AWT_POLL_AGING_SLOW 2 +#define AWT_POLL_AGING_FAST 3 + +#define AWT_POLL_THRESHOLD 1000 // msec, Block if delay is larger +#define AWT_POLL_BLOCK -1 // cause poll() block + // Static fields +#ifdef JAVASE_EMBEDDED + static int awt_poll_alg = AWT_POLL_AGING_FAST; +#else + static int awt_poll_alg = AWT_POLL_AGING_SLOW; +#endif + static uint32_t AWT_FLUSH_TIMEOUT = DEF_AWT_FLUSH_TIMEOUT; /* milliseconds */ static uint32_t AWT_MAX_POLL_TIMEOUT = DEF_AWT_MAX_POLL_TIMEOUT; /* milliseconds */ static pthread_t awt_MainThread = 0; @@ -417,6 +451,7 @@ awt_pipe_init() { */ static void readEnv() { char * value; + int tmp_poll_alg; static Boolean env_read = False; if (env_read) return; @@ -451,6 +486,23 @@ static void readEnv() { if (static_poll_timeout != 0) { curPollTimeout = static_poll_timeout; } + + // non-blocking poll() + value = getenv("_AWT_POLL_ALG"); + if (value != NULL) { + tmp_poll_alg = atoi(value); + switch(tmp_poll_alg) { + case AWT_POLL_FALSE: + case AWT_POLL_AGING_SLOW: + case AWT_POLL_AGING_FAST: + awt_poll_alg = tmp_poll_alg; + break; + default: + PRINT("Unknown value of _AWT_POLL_ALG, assuming Slow Aging Algorithm by default"); + awt_poll_alg = AWT_POLL_AGING_SLOW; + break; + } + } } /** @@ -478,14 +530,29 @@ static void update_poll_timeout(int timeout_control) { if (static_poll_timeout != 0) return; // Update it otherwise - if (timeout_control == TIMEOUT_TIMEDOUT) { - /* add 1/4 (plus 1, in case the division truncates to 0) */ - curPollTimeout += ((curPollTimeout>>2) + 1); - curPollTimeout = min(AWT_MAX_POLL_TIMEOUT, curPollTimeout); - } else if (timeout_control == TIMEOUT_EVENTS) { - /* subtract 1/4 (plus 1, in case the division truncates to 0) */ - curPollTimeout -= ((curPollTimeout>>2) + 1); - curPollTimeout = max(AWT_MIN_POLL_TIMEOUT, curPollTimeout); + + switch(awt_poll_alg) { + case AWT_POLL_AGING_SLOW: + if (timeout_control == TIMEOUT_TIMEDOUT) { + /* add 1/4 (plus 1, in case the division truncates to 0) */ + curPollTimeout += ((curPollTimeout>>2) + 1); + curPollTimeout = min(AWT_MAX_POLL_TIMEOUT, curPollTimeout); + } else if (timeout_control == TIMEOUT_EVENTS) { + /* subtract 1/4 (plus 1, in case the division truncates to 0) */ + curPollTimeout -= ((curPollTimeout>>2) + 1); + curPollTimeout = max(AWT_MIN_POLL_TIMEOUT, curPollTimeout); + } + break; + case AWT_POLL_AGING_FAST: + if (timeout_control == TIMEOUT_TIMEDOUT) { + curPollTimeout += ((curPollTimeout>>2) + 1); + curPollTimeout = min(AWT_MAX_POLL_TIMEOUT, curPollTimeout); + if((int)curPollTimeout > AWT_POLL_THRESHOLD || (int)curPollTimeout == AWT_POLL_BLOCK) + curPollTimeout = AWT_POLL_BLOCK; + } else if (timeout_control == TIMEOUT_EVENTS) { + curPollTimeout = max(AWT_MIN_POLL_TIMEOUT, 1); + } + break; } } @@ -497,16 +564,37 @@ static void update_poll_timeout(int timeout_control) { */ static uint32_t get_poll_timeout(jlong nextTaskTime) { + uint32_t ret_timeout; + uint32_t timeout; + uint32_t taskTimeout; + uint32_t flushTimeout; + jlong curTime = awtJNI_TimeMillis(); - uint32_t timeout = curPollTimeout; - uint32_t taskTimeout = (nextTaskTime == -1) ? AWT_MAX_POLL_TIMEOUT : (uint32_t)max(0, (int32_t)(nextTaskTime - curTime)); - uint32_t flushTimeout = (awt_next_flush_time > 0) ? (uint32_t)max(0, (int32_t)(awt_next_flush_time - curTime)) : AWT_MAX_POLL_TIMEOUT; + timeout = curPollTimeout; + switch(awt_poll_alg) { + case AWT_POLL_AGING_SLOW: + case AWT_POLL_AGING_FAST: + taskTimeout = (nextTaskTime == -1) ? AWT_MAX_POLL_TIMEOUT : (uint32_t)max(0, (int32_t)(nextTaskTime - curTime)); + flushTimeout = (awt_next_flush_time > 0) ? (uint32_t)max(0, (int32_t)(awt_next_flush_time - curTime)) : AWT_MAX_POLL_TIMEOUT; - PRINT2("to: %d, ft: %d, to: %d, tt: %d, mil: %d\n", taskTimeout, flushTimeout, timeout, (int)nextTaskTime, (int)curTime); + PRINT2("to: %d, ft: %d, to: %d, tt: %d, mil: %d\n", taskTimeout, flushTimeout, timeout, (int)nextTaskTime, (int)curTime); - // Adjust timeout to flush_time and task_time - return min(flushTimeout, min(taskTimeout, timeout)); -} /* awt_get_poll_timeout() */ + // Adjust timeout to flush_time and task_time + ret_timeout = min(flushTimeout, min(taskTimeout, timeout)); + if((int)curPollTimeout == AWT_POLL_BLOCK) + ret_timeout = AWT_POLL_BLOCK; + break; + + case AWT_POLL_FALSE: + ret_timeout = (nextTaskTime > curTime) ? + (nextTaskTime - curTime) : + ((nextTaskTime == -1) ? -1 : 0); + break; + } + + return ret_timeout; + +} /* get_poll_timeout() */ /* * Waits for X/Xt events to appear on the pipe. Returns only when @@ -598,6 +686,8 @@ performPoll(JNIEnv *env, jlong nextTaskTime) { if (result == 0) { /* poll() timed out -- update timeout value */ update_poll_timeout(TIMEOUT_TIMEDOUT); + PRINT2("%s(): TIMEOUT_TIMEDOUT curPollTimeout = %d \n", + performPoll, curPollTimeout); } if (pollFds[1].revents) { int count; @@ -606,10 +696,14 @@ performPoll(JNIEnv *env, jlong nextTaskTime) { do { count = read(AWT_READPIPE, read_buf, AWT_POLL_BUFSIZE ); } while (count == AWT_POLL_BUFSIZE ); + PRINT2("%s(): data on the AWT pipe: curPollTimeout = %d \n", + performPoll, curPollTimeout); } if (pollFds[0].revents) { // Events in X pipe update_poll_timeout(TIMEOUT_EVENTS); + PRINT2("%s(): TIMEOUT_EVENTS curPollTimeout = %ld \n", + performPoll, curPollTimeout); } return; diff --git a/jdk/src/solaris/native/sun/xawt/awt_Desktop.c b/jdk/src/solaris/native/sun/xawt/awt_Desktop.c index 69b9207bc99..77f38f88e07 100644 --- a/jdk/src/solaris/native/sun/xawt/awt_Desktop.c +++ b/jdk/src/solaris/native/sun/xawt/awt_Desktop.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/jdk/src/windows/bin/java_md.c b/jdk/src/windows/bin/java_md.c index dfa50ac8af8..b8665f3fefb 100644 --- a/jdk/src/windows/bin/java_md.c +++ b/jdk/src/windows/bin/java_md.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/jdk/src/windows/classes/java/lang/ProcessEnvironment.java b/jdk/src/windows/classes/java/lang/ProcessEnvironment.java index c5e4c130f26..b5a4383019e 100644 --- a/jdk/src/windows/classes/java/lang/ProcessEnvironment.java +++ b/jdk/src/windows/classes/java/lang/ProcessEnvironment.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2010, 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 diff --git a/jdk/src/windows/classes/java/net/PlainSocketImpl.java b/jdk/src/windows/classes/java/net/PlainSocketImpl.java index cc25c39dc72..ea11fa609d8 100644 --- a/jdk/src/windows/classes/java/net/PlainSocketImpl.java +++ b/jdk/src/windows/classes/java/net/PlainSocketImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, 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 diff --git a/jdk/src/windows/classes/java/net/TwoStacksPlainDatagramSocketImpl.java b/jdk/src/windows/classes/java/net/TwoStacksPlainDatagramSocketImpl.java index 5590523b6ae..d8e4ec54c20 100644 --- a/jdk/src/windows/classes/java/net/TwoStacksPlainDatagramSocketImpl.java +++ b/jdk/src/windows/classes/java/net/TwoStacksPlainDatagramSocketImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, 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 diff --git a/jdk/src/windows/classes/sun/awt/Win32FontManager.java b/jdk/src/windows/classes/sun/awt/Win32FontManager.java index b2dd894e490..61e3b59eaa6 100644 --- a/jdk/src/windows/classes/sun/awt/Win32FontManager.java +++ b/jdk/src/windows/classes/sun/awt/Win32FontManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/windows/classes/sun/awt/Win32GraphicsEnvironment.java b/jdk/src/windows/classes/sun/awt/Win32GraphicsEnvironment.java index f3088fcbca3..c9b38df6686 100644 --- a/jdk/src/windows/classes/sun/awt/Win32GraphicsEnvironment.java +++ b/jdk/src/windows/classes/sun/awt/Win32GraphicsEnvironment.java @@ -39,12 +39,8 @@ import java.util.NoSuchElementException; import java.util.StringTokenizer; import sun.awt.DisplayChangedListener; import sun.awt.SunDisplayChanger; -import sun.awt.windows.WFontConfiguration; import sun.awt.windows.WPrinterJob; import sun.awt.windows.WToolkit; -import sun.font.FontManager; -import sun.font.FontManagerFactory; -import sun.font.SunFontManager; import sun.java2d.SunGraphicsEnvironment; import sun.java2d.SurfaceManagerFactory; import sun.java2d.WindowsSurfaceManagerFactory; @@ -231,20 +227,6 @@ public class Win32GraphicsEnvironment return device; } - // Implements SunGraphicsEnvironment.createFontConfiguration. - protected FontConfiguration createFontConfiguration() { - FontConfiguration fc = new WFontConfiguration(SunFontManager.getInstance()); - fc.init(); - return fc; - } - - public FontConfiguration createFontConfiguration(boolean preferLocaleFonts, - boolean preferPropFonts) { - - return new WFontConfiguration(SunFontManager.getInstance(), - preferLocaleFonts,preferPropFonts); - } - public boolean isDisplayLocal() { return true; } diff --git a/jdk/src/windows/classes/sun/awt/windows/WPathGraphics.java b/jdk/src/windows/classes/sun/awt/windows/WPathGraphics.java index 180341f20f3..fff1765c464 100644 --- a/jdk/src/windows/classes/sun/awt/windows/WPathGraphics.java +++ b/jdk/src/windows/classes/sun/awt/windows/WPathGraphics.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2011, 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 diff --git a/jdk/src/windows/classes/sun/awt/windows/WPrinterJob.java b/jdk/src/windows/classes/sun/awt/windows/WPrinterJob.java index cf629bb0ae8..250d8c72203 100644 --- a/jdk/src/windows/classes/sun/awt/windows/WPrinterJob.java +++ b/jdk/src/windows/classes/sun/awt/windows/WPrinterJob.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/jdk/src/windows/classes/sun/awt/windows/WToolkit.java b/jdk/src/windows/classes/sun/awt/windows/WToolkit.java index b994c23a1e5..f87f5859bf7 100644 --- a/jdk/src/windows/classes/sun/awt/windows/WToolkit.java +++ b/jdk/src/windows/classes/sun/awt/windows/WToolkit.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2011, 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 @@ -630,10 +630,10 @@ public class WToolkit extends SunToolkit implements Runnable { public PrintJob getPrintJob(Frame frame, String doctitle, JobAttributes jobAttributes, - PageAttributes pageAttributes) { - - if (GraphicsEnvironment.isHeadless()) { - throw new IllegalArgumentException(); + PageAttributes pageAttributes) + { + if (frame == null) { + throw new NullPointerException("frame must not be null"); } PrintJob2D printJob = new PrintJob2D(frame, doctitle, diff --git a/jdk/src/windows/classes/sun/awt/windows/fontconfig.properties b/jdk/src/windows/classes/sun/awt/windows/fontconfig.properties index a7f59e52b8d..2a43e6e90d0 100644 --- a/jdk/src/windows/classes/sun/awt/windows/fontconfig.properties +++ b/jdk/src/windows/classes/sun/awt/windows/fontconfig.properties @@ -102,28 +102,28 @@ sansserif.bolditalic.korean=Gulim monospaced.plain.alphabetic=Courier New monospaced.plain.chinese-ms950=MingLiU monospaced.plain.chinese-ms950-extb=MingLiU-ExtB -monospaced.plain.hebrew=David +monospaced.plain.hebrew=Courier New monospaced.plain.japanese=MS Gothic monospaced.plain.korean=GulimChe monospaced.bold.alphabetic=Courier New Bold monospaced.bold.chinese-ms950=PMingLiU monospaced.bold.chinese-ms950-extb=PMingLiU-ExtB -monospaced.bold.hebrew=David Bold +monospaced.bold.hebrew=Courier New Bold monospaced.bold.japanese=MS Gothic monospaced.bold.korean=GulimChe monospaced.italic.alphabetic=Courier New Italic monospaced.italic.chinese-ms950=PMingLiU monospaced.italic.chinese-ms950-extb=PMingLiU-ExtB -monospaced.italic.hebrew=David +monospaced.italic.hebrew=Courier New monospaced.italic.japanese=MS Gothic monospaced.italic.korean=GulimChe monospaced.bolditalic.alphabetic=Courier New Bold Italic monospaced.bolditalic.chinese-ms950=PMingLiU monospaced.bolditalic.chinese-ms950-extb=PMingLiU-ExtB -monospaced.bolditalic.hebrew=David Bold +monospaced.bolditalic.hebrew=Courier New Bold monospaced.bolditalic.japanese=MS Gothic monospaced.bolditalic.korean=GulimChe diff --git a/jdk/src/windows/classes/sun/java2d/d3d/D3DSurfaceData.java b/jdk/src/windows/classes/sun/java2d/d3d/D3DSurfaceData.java index bc7dfd8631a..50a51a6f94b 100644 --- a/jdk/src/windows/classes/sun/java2d/d3d/D3DSurfaceData.java +++ b/jdk/src/windows/classes/sun/java2d/d3d/D3DSurfaceData.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2010, 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 diff --git a/jdk/src/windows/classes/sun/java2d/opengl/WGLVolatileSurfaceManager.java b/jdk/src/windows/classes/sun/java2d/opengl/WGLVolatileSurfaceManager.java index 7c4fde1b640..0c3009c44db 100644 --- a/jdk/src/windows/classes/sun/java2d/opengl/WGLVolatileSurfaceManager.java +++ b/jdk/src/windows/classes/sun/java2d/opengl/WGLVolatileSurfaceManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2010, 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 diff --git a/jdk/src/windows/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java b/jdk/src/windows/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java index c4b20db6495..8ca04d7fef7 100644 --- a/jdk/src/windows/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java +++ b/jdk/src/windows/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 diff --git a/jdk/src/windows/classes/sun/nio/ch/PendingIoCache.java b/jdk/src/windows/classes/sun/nio/ch/PendingIoCache.java index 7a4b1e3e319..a660ff097e3 100644 --- a/jdk/src/windows/classes/sun/nio/ch/PendingIoCache.java +++ b/jdk/src/windows/classes/sun/nio/ch/PendingIoCache.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java b/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java index 82405875928..b144c96f81b 100644 --- a/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java +++ b/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.java b/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.java index 2cc9cf026af..a55e7a01a9d 100644 --- a/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.java +++ b/jdk/src/windows/classes/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/windows/classes/sun/nio/fs/RegistryFileTypeDetector.java b/jdk/src/windows/classes/sun/nio/fs/RegistryFileTypeDetector.java index 8c846c1c219..e04cd746039 100644 --- a/jdk/src/windows/classes/sun/nio/fs/RegistryFileTypeDetector.java +++ b/jdk/src/windows/classes/sun/nio/fs/RegistryFileTypeDetector.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/windows/classes/sun/nio/fs/WindowsFileAttributeViews.java b/jdk/src/windows/classes/sun/nio/fs/WindowsFileAttributeViews.java index 67e5be670e0..737bbd73e98 100644 --- a/jdk/src/windows/classes/sun/nio/fs/WindowsFileAttributeViews.java +++ b/jdk/src/windows/classes/sun/nio/fs/WindowsFileAttributeViews.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/windows/classes/sun/nio/fs/WindowsFileCopy.java b/jdk/src/windows/classes/sun/nio/fs/WindowsFileCopy.java index ed3421fb90e..a8ffba1c933 100644 --- a/jdk/src/windows/classes/sun/nio/fs/WindowsFileCopy.java +++ b/jdk/src/windows/classes/sun/nio/fs/WindowsFileCopy.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/windows/classes/sun/nio/fs/WindowsFileStore.java b/jdk/src/windows/classes/sun/nio/fs/WindowsFileStore.java index 07eb73231ce..a18af6d1011 100644 --- a/jdk/src/windows/classes/sun/nio/fs/WindowsFileStore.java +++ b/jdk/src/windows/classes/sun/nio/fs/WindowsFileStore.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/windows/classes/sun/nio/fs/WindowsFileSystem.java b/jdk/src/windows/classes/sun/nio/fs/WindowsFileSystem.java index 59891ec51d5..6dba2bc9394 100644 --- a/jdk/src/windows/classes/sun/nio/fs/WindowsFileSystem.java +++ b/jdk/src/windows/classes/sun/nio/fs/WindowsFileSystem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/windows/classes/sun/nio/fs/WindowsFileSystemProvider.java b/jdk/src/windows/classes/sun/nio/fs/WindowsFileSystemProvider.java index 6d6a4db89b2..bff9e0a60dc 100644 --- a/jdk/src/windows/classes/sun/nio/fs/WindowsFileSystemProvider.java +++ b/jdk/src/windows/classes/sun/nio/fs/WindowsFileSystemProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 @@ -150,20 +150,6 @@ public class WindowsFileSystemProvider } } - private boolean followLinks(LinkOption... options) { - boolean followLinks = true; - for (LinkOption option: options) { - if (option == LinkOption.NOFOLLOW_LINKS) { - followLinks = false; - continue; - } - if (option == null) - throw new NullPointerException(); - throw new AssertionError("Should not get here"); - } - return followLinks; - } - @Override @SuppressWarnings("unchecked") public V @@ -172,7 +158,7 @@ public class WindowsFileSystemProvider WindowsPath file = WindowsPath.toWindowsPath(obj); if (view == null) throw new NullPointerException(); - boolean followLinks = followLinks(options); + boolean followLinks = Util.followLinks(options); if (view == BasicFileAttributeView.class) return (V) WindowsFileAttributeViews.createBasicView(file, followLinks); if (view == DosFileAttributeView.class) @@ -209,7 +195,7 @@ public class WindowsFileSystemProvider @Override public DynamicFileAttributeView getFileAttributeView(Path obj, String name, LinkOption... options) { WindowsPath file = WindowsPath.toWindowsPath(obj); - boolean followLinks = followLinks(options); + boolean followLinks = Util.followLinks(options); if (name.equals("basic")) return WindowsFileAttributeViews.createBasicView(file, followLinks); if (name.equals("dos")) diff --git a/jdk/src/windows/classes/sun/nio/fs/WindowsPath.java b/jdk/src/windows/classes/sun/nio/fs/WindowsPath.java index eb35de8167e..e84db2af231 100644 --- a/jdk/src/windows/classes/sun/nio/fs/WindowsPath.java +++ b/jdk/src/windows/classes/sun/nio/fs/WindowsPath.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 @@ -831,9 +831,9 @@ class WindowsPath extends AbstractPath { } @Override - public WindowsPath toRealPath(boolean resolveLinks) throws IOException { + public WindowsPath toRealPath(LinkOption... options) throws IOException { checkRead(); - String rp = WindowsLinkSupport.getRealPath(this, resolveLinks); + String rp = WindowsLinkSupport.getRealPath(this, Util.followLinks(options)); return createFromNormalizedPath(getFileSystem(), rp); } diff --git a/jdk/src/windows/classes/sun/nio/fs/WindowsPathParser.java b/jdk/src/windows/classes/sun/nio/fs/WindowsPathParser.java index e898fd55fd2..f1158e5f7de 100644 --- a/jdk/src/windows/classes/sun/nio/fs/WindowsPathParser.java +++ b/jdk/src/windows/classes/sun/nio/fs/WindowsPathParser.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/windows/classes/sun/nio/fs/WindowsSecurityDescriptor.java b/jdk/src/windows/classes/sun/nio/fs/WindowsSecurityDescriptor.java index 7d9464e0ce4..fb432271cc6 100644 --- a/jdk/src/windows/classes/sun/nio/fs/WindowsSecurityDescriptor.java +++ b/jdk/src/windows/classes/sun/nio/fs/WindowsSecurityDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/windows/classes/sun/nio/fs/WindowsUserDefinedFileAttributeView.java b/jdk/src/windows/classes/sun/nio/fs/WindowsUserDefinedFileAttributeView.java index 5ae901fe8cd..45f5d064459 100644 --- a/jdk/src/windows/classes/sun/nio/fs/WindowsUserDefinedFileAttributeView.java +++ b/jdk/src/windows/classes/sun/nio/fs/WindowsUserDefinedFileAttributeView.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/windows/classes/sun/nio/fs/WindowsWatchService.java b/jdk/src/windows/classes/sun/nio/fs/WindowsWatchService.java index 53f2fa2af56..d5ad78fee9b 100644 --- a/jdk/src/windows/classes/sun/nio/fs/WindowsWatchService.java +++ b/jdk/src/windows/classes/sun/nio/fs/WindowsWatchService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/windows/classes/sun/print/Win32PrintService.java b/jdk/src/windows/classes/sun/print/Win32PrintService.java index e9f1eb7df82..bef2213e664 100644 --- a/jdk/src/windows/classes/sun/print/Win32PrintService.java +++ b/jdk/src/windows/classes/sun/print/Win32PrintService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/jdk/src/windows/demo/jvmti/hprof/hprof_md.c b/jdk/src/windows/demo/jvmti/hprof/hprof_md.c index 03e77f635d5..073a946d2e4 100644 --- a/jdk/src/windows/demo/jvmti/hprof/hprof_md.c +++ b/jdk/src/windows/demo/jvmti/hprof/hprof_md.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/jdk/src/windows/native/com/sun/management/OperatingSystem_md.c b/jdk/src/windows/native/com/sun/management/OperatingSystem_md.c index c8e72bf73a7..9422ee2dc86 100644 --- a/jdk/src/windows/native/com/sun/management/OperatingSystem_md.c +++ b/jdk/src/windows/native/com/sun/management/OperatingSystem_md.c @@ -30,6 +30,7 @@ #include "management.h" #include "com_sun_management_OperatingSystem.h" +#include #include #include @@ -53,41 +54,12 @@ static jlong jlong_from(jint h, jint l) { return result; } -// From psapi.h -typedef struct _PROCESS_MEMORY_COUNTERS { - DWORD cb; - DWORD PageFaultCount; - SIZE_T PeakWorkingSetSize; - SIZE_T WorkingSetSize; - SIZE_T QuotaPeakPagedPoolUsage; - SIZE_T QuotaPagedPoolUsage; - SIZE_T QuotaPeakNonPagedPoolUsage; - SIZE_T QuotaNonPagedPoolUsage; - SIZE_T PagefileUsage; - SIZE_T PeakPagefileUsage; -} PROCESS_MEMORY_COUNTERS; - -static HINSTANCE hInstPsapi = NULL; -typedef BOOL (WINAPI *LPFNGETPROCESSMEMORYINFO)(HANDLE, PROCESS_MEMORY_COUNTERS*, DWORD); - -static jboolean is_nt = JNI_FALSE; static HANDLE main_process; JNIEXPORT void JNICALL Java_com_sun_management_OperatingSystem_initialize (JNIEnv *env, jclass cls) { - OSVERSIONINFO oi; - oi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - GetVersionEx(&oi); - switch(oi.dwPlatformId) { - case VER_PLATFORM_WIN32_WINDOWS: is_nt = JNI_FALSE; break; - case VER_PLATFORM_WIN32_NT: is_nt = JNI_TRUE; break; - default: - throw_internal_error(env, "Unsupported Platform"); - return; - } - main_process = GetCurrentProcess(); } @@ -95,31 +67,12 @@ JNIEXPORT jlong JNICALL Java_com_sun_management_OperatingSystem_getCommittedVirtualMemorySize0 (JNIEnv *env, jobject mbean) { - - /* - * In bytes. NT/2000/XP only - using GetProcessMemoryInfo from psapi.dll - */ - static LPFNGETPROCESSMEMORYINFO lpfnGetProcessMemoryInfo = NULL; - static volatile jboolean psapi_inited = JNI_FALSE; PROCESS_MEMORY_COUNTERS pmc; - - if (!is_nt) return -1; - - if (!psapi_inited) { - psapi_inited = JNI_TRUE; - if ((hInstPsapi = LoadLibrary("PSAPI.DLL")) == NULL) return -1; - if ((lpfnGetProcessMemoryInfo = (LPFNGETPROCESSMEMORYINFO) - GetProcAddress( hInstPsapi, "GetProcessMemoryInfo")) == NULL) { - FreeLibrary(hInstPsapi); - return -1; - } + if (GetProcessMemoryInfo(main_process, &pmc, sizeof(PROCESS_MEMORY_COUNTERS)) == 0) { + return (jlong)-1L; + } else { + return (jlong) pmc.PagefileUsage; } - - if (lpfnGetProcessMemoryInfo == NULL) return -1; - - lpfnGetProcessMemoryInfo(main_process, &pmc, - sizeof(PROCESS_MEMORY_COUNTERS)); - return (jlong) pmc.PagefileUsage; } JNIEXPORT jlong JNICALL @@ -148,20 +101,15 @@ Java_com_sun_management_OperatingSystem_getProcessCpuTime FILETIME process_creation_time, process_exit_time, process_user_time, process_kernel_time; - // Windows NT only - if (is_nt) { - // Using static variables declared above - // Units are 100-ns intervals. Convert to ns. - GetProcessTimes(main_process, &process_creation_time, - &process_exit_time, - &process_kernel_time, &process_user_time); - return (jlong_from(process_user_time.dwHighDateTime, - process_user_time.dwLowDateTime) + - jlong_from(process_kernel_time.dwHighDateTime, - process_kernel_time.dwLowDateTime)) * 100; - } else { - return -1; - } + // Using static variables declared above + // Units are 100-ns intervals. Convert to ns. + GetProcessTimes(main_process, &process_creation_time, + &process_exit_time, + &process_kernel_time, &process_user_time); + return (jlong_from(process_user_time.dwHighDateTime, + process_user_time.dwLowDateTime) + + jlong_from(process_kernel_time.dwHighDateTime, + process_kernel_time.dwLowDateTime)) * 100; } JNIEXPORT jlong JNICALL diff --git a/jdk/src/windows/native/java/io/WinNTFileSystem_md.c b/jdk/src/windows/native/java/io/WinNTFileSystem_md.c index 566b697eb8f..7d978294367 100644 --- a/jdk/src/windows/native/java/io/WinNTFileSystem_md.c +++ b/jdk/src/windows/native/java/io/WinNTFileSystem_md.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2011, 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 @@ -23,9 +23,9 @@ * questions. */ -/* Access APIs for Win2K and above */ +/* Access APIs for WinXP and above */ #ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x0500 +#define _WIN32_WINNT 0x0501 #endif #include @@ -60,13 +60,17 @@ static GetFinalPathNameByHandleProc GetFinalPathNameByHandle_func; JNIEXPORT void JNICALL Java_java_io_WinNTFileSystem_initIDs(JNIEnv *env, jclass cls) { - HANDLE handle; + HMODULE handle; jclass fileClass = (*env)->FindClass(env, "java/io/File"); if (!fileClass) return; ids.path = (*env)->GetFieldID(env, fileClass, "path", "Ljava/lang/String;"); - handle = LoadLibrary("kernel32"); - if (handle != NULL) { + + // GetFinalPathNameByHandle requires Windows Vista or newer + if (GetModuleHandleExW((GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | + GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT), + (LPCWSTR)&CreateFileW, &handle) != 0) + { GetFinalPathNameByHandle_func = (GetFinalPathNameByHandleProc) GetProcAddress(handle, "GetFinalPathNameByHandleW"); } @@ -824,8 +828,6 @@ Java_java_io_WinNTFileSystem_getDriveDirectory(JNIEnv *env, jobject this, return ret; } -typedef BOOL (WINAPI* GetVolumePathNameProc) (LPCWSTR, LPWSTR, DWORD); - JNIEXPORT jlong JNICALL Java_java_io_WinNTFileSystem_getSpace0(JNIEnv *env, jobject this, jobject file, jint t) @@ -834,14 +836,7 @@ Java_java_io_WinNTFileSystem_getSpace0(JNIEnv *env, jobject this, jlong rv = 0L; WCHAR *pathbuf = fileToNTPath(env, file, ids.path); - HMODULE h = LoadLibrary("kernel32"); - GetVolumePathNameProc getVolumePathNameW = NULL; - if (h) { - getVolumePathNameW - = (GetVolumePathNameProc)GetProcAddress(h, "GetVolumePathNameW"); - } - - if (getVolumePathNameW(pathbuf, volname, MAX_PATH_LENGTH)) { + if (GetVolumePathNameW(pathbuf, volname, MAX_PATH_LENGTH)) { ULARGE_INTEGER totalSpace, freeSpace, usableSpace; if (GetDiskFreeSpaceExW(volname, &usableSpace, &totalSpace, &freeSpace)) { switch(t) { @@ -860,9 +855,6 @@ Java_java_io_WinNTFileSystem_getSpace0(JNIEnv *env, jobject this, } } - if (h) { - FreeLibrary(h); - } free(pathbuf); return rv; } diff --git a/jdk/src/windows/native/java/io/canonicalize_md.c b/jdk/src/windows/native/java/io/canonicalize_md.c index e0eadb6b82f..a7e3ccac417 100644 --- a/jdk/src/windows/native/java/io/canonicalize_md.c +++ b/jdk/src/windows/native/java/io/canonicalize_md.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2011, 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 diff --git a/jdk/src/windows/native/java/io/io_util_md.c b/jdk/src/windows/native/java/io/io_util_md.c index 81a69392096..345f95588b9 100644 --- a/jdk/src/windows/native/java/io/io_util_md.c +++ b/jdk/src/windows/native/java/io/io_util_md.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2011, 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 diff --git a/jdk/src/windows/native/java/lang/java_props_md.c b/jdk/src/windows/native/java/lang/java_props_md.c index 5b9332fb111..c66efbaf2fb 100644 --- a/jdk/src/windows/native/java/lang/java_props_md.c +++ b/jdk/src/windows/native/java/lang/java_props_md.c @@ -196,42 +196,23 @@ getHomeFromRegistry() /* * Code to figure out the user's home directory using shell32.dll */ -typedef HRESULT (WINAPI *GetSpecialFolderType)(HWND, int, LPITEMIDLIST *); -typedef BOOL (WINAPI *GetPathFromIDListType)(LPCITEMIDLIST, LPSTR); - WCHAR* getHomeFromShell32() { - HMODULE lib = LoadLibraryW(L"SHELL32.DLL"); - GetSpecialFolderType do_get_folder; - GetPathFromIDListType do_get_path; HRESULT rc; LPITEMIDLIST item_list = 0; WCHAR *p; WCHAR path[MAX_PATH+1]; int size = MAX_PATH+1; - if (lib == 0) { - // We can't load the library !!?? - return NULL; - } - - do_get_folder = (GetSpecialFolderType)GetProcAddress(lib, "SHGetSpecialFolderLocation"); - do_get_path = (GetPathFromIDListType)GetProcAddress(lib, "SHGetPathFromIDListW"); - - if (do_get_folder == 0 || do_get_path == 0) { - // the library doesn't hold the right functions !!?? - return NULL; - } - - rc = (*do_get_folder)(NULL, CSIDL_DESKTOPDIRECTORY, &item_list); + rc = SHGetSpecialFolderLocation(NULL, CSIDL_DESKTOPDIRECTORY, &item_list); if (!SUCCEEDED(rc)) { // we can't find the shell folder. return NULL; } path[0] = 0; - (*do_get_path)(item_list, (LPSTR)path); + SHGetPathFromIDListW(item_list, (LPWSTR)path); /* Get the parent of Desktop directory */ p = wcsrchr(path, L'\\'); @@ -253,17 +234,7 @@ getHomeFromShell32() static boolean haveMMX(void) { - boolean mmx = 0; - HMODULE lib = LoadLibrary("KERNEL32"); - if (lib != NULL) { - BOOL (WINAPI *isProcessorFeaturePresent)(DWORD) = - (BOOL (WINAPI *)(DWORD)) - GetProcAddress(lib, "IsProcessorFeaturePresent"); - if (isProcessorFeaturePresent != NULL) - mmx = isProcessorFeaturePresent(PF_MMX_INSTRUCTIONS_AVAILABLE); - FreeLibrary(lib); - } - return mmx; + return IsProcessorFeaturePresent(PF_MMX_INSTRUCTIONS_AVAILABLE); } static const char * @@ -532,10 +503,19 @@ GetJavaProperties(JNIEnv* env) if (uname != NULL && wcslen(uname) > 0) { sprops.user_name = _wcsdup(uname); } else { - WCHAR buf[100]; - int buflen = sizeof(buf); - sprops.user_name = - GetUserNameW(buf, &buflen) ? _wcsdup(buf) : L"unknown"; + DWORD buflen = 0; + if (GetUserNameW(NULL, &buflen) == 0 && + GetLastError() == ERROR_INSUFFICIENT_BUFFER) + { + uname = (WCHAR*)malloc(buflen * sizeof(WCHAR)); + if (uname != NULL && GetUserNameW(uname, &buflen) == 0) { + free(uname); + uname = NULL; + } + } else { + uname = NULL; + } + sprops.user_name = (uname != NULL) ? uname : L"unknown"; } } @@ -633,8 +613,8 @@ GetJavaProperties(JNIEnv* env) /* Current directory */ { WCHAR buf[MAX_PATH]; - GetCurrentDirectoryW(sizeof(buf), buf); - sprops.user_dir = _wcsdup(buf); + if (GetCurrentDirectoryW(sizeof(buf)/sizeof(WCHAR), buf) != 0) + sprops.user_dir = _wcsdup(buf); } sprops.file_separator = "\\"; diff --git a/jdk/src/windows/native/java/net/Inet4AddressImpl.c b/jdk/src/windows/native/java/net/Inet4AddressImpl.c index 197800dc59b..4bbcfc782b3 100644 --- a/jdk/src/windows/native/java/net/Inet4AddressImpl.c +++ b/jdk/src/windows/native/java/net/Inet4AddressImpl.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/jdk/src/windows/native/java/net/Inet6AddressImpl.c b/jdk/src/windows/native/java/net/Inet6AddressImpl.c index 1f9a6779e6e..efdcd54662b 100644 --- a/jdk/src/windows/native/java/net/Inet6AddressImpl.c +++ b/jdk/src/windows/native/java/net/Inet6AddressImpl.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 @@ -90,6 +90,7 @@ Java_java_net_Inet6AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, jobjectArray ret = 0; int retLen = 0; jboolean preferIPv6Address; + static jfieldID ia_preferIPv6AddressID; int error=0; struct addrinfo hints, *res, *resNew = NULL; @@ -116,166 +117,163 @@ Java_java_net_Inet6AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, hostname = JNU_GetStringPlatformChars(env, host, JNI_FALSE); CHECK_NULL_RETURN(hostname, NULL); - if (NET_addrtransAvailable()) { - static jfieldID ia_preferIPv6AddressID; - if (ia_preferIPv6AddressID == NULL) { - jclass c = (*env)->FindClass(env,"java/net/InetAddress"); - if (c) { - ia_preferIPv6AddressID = - (*env)->GetStaticFieldID(env, c, "preferIPv6Address", "Z"); - } - if (ia_preferIPv6AddressID == NULL) { - JNU_ReleaseStringPlatformChars(env, host, hostname); - return NULL; - } + if (ia_preferIPv6AddressID == NULL) { + jclass c = (*env)->FindClass(env,"java/net/InetAddress"); + if (c) { + ia_preferIPv6AddressID = + (*env)->GetStaticFieldID(env, c, "preferIPv6Address", "Z"); } - /* get the address preference */ - preferIPv6Address - = (*env)->GetStaticBooleanField(env, ia_class, ia_preferIPv6AddressID); - - /* Try once, with our static buffer. */ - memset(&hints, 0, sizeof(hints)); - hints.ai_flags = AI_CANONNAME; - hints.ai_family = AF_UNSPEC; - - error = (*getaddrinfo_ptr)(hostname, NULL, &hints, &res); - - if (error) { - /* report error */ - JNU_ThrowByName(env, JNU_JAVANETPKG "UnknownHostException", - (char *)hostname); + if (ia_preferIPv6AddressID == NULL) { JNU_ReleaseStringPlatformChars(env, host, hostname); return NULL; - } else { - int i = 0; - int inetCount = 0, inet6Count = 0, inetIndex, inet6Index; - struct addrinfo *itr, *last, *iterator = res; - while (iterator != NULL) { - int skip = 0; - itr = resNew; - while (itr != NULL) { - if (iterator->ai_family == itr->ai_family && - iterator->ai_addrlen == itr->ai_addrlen) { - if (itr->ai_family == AF_INET) { /* AF_INET */ - struct sockaddr_in *addr1, *addr2; - addr1 = (struct sockaddr_in *)iterator->ai_addr; - addr2 = (struct sockaddr_in *)itr->ai_addr; - if (addr1->sin_addr.s_addr == - addr2->sin_addr.s_addr) { - skip = 1; - break; - } - } else { - int t; - struct sockaddr_in6 *addr1, *addr2; - addr1 = (struct sockaddr_in6 *)iterator->ai_addr; - addr2 = (struct sockaddr_in6 *)itr->ai_addr; + } + } + /* get the address preference */ + preferIPv6Address + = (*env)->GetStaticBooleanField(env, ia_class, ia_preferIPv6AddressID); - for (t = 0; t < 16; t++) { - if (addr1->sin6_addr.s6_addr[t] != - addr2->sin6_addr.s6_addr[t]) { - break; - } - } - if (t < 16) { - itr = itr->ai_next; - continue; - } else { - skip = 1; + /* Try once, with our static buffer. */ + memset(&hints, 0, sizeof(hints)); + hints.ai_flags = AI_CANONNAME; + hints.ai_family = AF_UNSPEC; + + error = getaddrinfo(hostname, NULL, &hints, &res); + + if (error) { + /* report error */ + JNU_ThrowByName(env, JNU_JAVANETPKG "UnknownHostException", + (char *)hostname); + JNU_ReleaseStringPlatformChars(env, host, hostname); + return NULL; + } else { + int i = 0; + int inetCount = 0, inet6Count = 0, inetIndex, inet6Index; + struct addrinfo *itr, *last, *iterator = res; + while (iterator != NULL) { + int skip = 0; + itr = resNew; + while (itr != NULL) { + if (iterator->ai_family == itr->ai_family && + iterator->ai_addrlen == itr->ai_addrlen) { + if (itr->ai_family == AF_INET) { /* AF_INET */ + struct sockaddr_in *addr1, *addr2; + addr1 = (struct sockaddr_in *)iterator->ai_addr; + addr2 = (struct sockaddr_in *)itr->ai_addr; + if (addr1->sin_addr.s_addr == + addr2->sin_addr.s_addr) { + skip = 1; + break; + } + } else { + int t; + struct sockaddr_in6 *addr1, *addr2; + addr1 = (struct sockaddr_in6 *)iterator->ai_addr; + addr2 = (struct sockaddr_in6 *)itr->ai_addr; + + for (t = 0; t < 16; t++) { + if (addr1->sin6_addr.s6_addr[t] != + addr2->sin6_addr.s6_addr[t]) { break; } } - } else if (iterator->ai_family != AF_INET && - iterator->ai_family != AF_INET6) { - /* we can't handle other family types */ - skip = 1; - break; + if (t < 16) { + itr = itr->ai_next; + continue; + } else { + skip = 1; + break; + } } - itr = itr->ai_next; + } else if (iterator->ai_family != AF_INET && + iterator->ai_family != AF_INET6) { + /* we can't handle other family types */ + skip = 1; + break; } + itr = itr->ai_next; + } - if (!skip) { - struct addrinfo *next - = (struct addrinfo*) malloc(sizeof(struct addrinfo)); - if (!next) { - JNU_ThrowOutOfMemoryError(env, "heap allocation failed"); - ret = NULL; - goto cleanupAndReturn; - } - memcpy(next, iterator, sizeof(struct addrinfo)); - next->ai_next = NULL; - if (resNew == NULL) { - resNew = next; - } else { - last->ai_next = next; - } - last = next; - i++; - if (iterator->ai_family == AF_INET) { - inetCount ++; - } else if (iterator->ai_family == AF_INET6) { - inet6Count ++; - } + if (!skip) { + struct addrinfo *next + = (struct addrinfo*) malloc(sizeof(struct addrinfo)); + if (!next) { + JNU_ThrowOutOfMemoryError(env, "heap allocation failed"); + ret = NULL; + goto cleanupAndReturn; } - iterator = iterator->ai_next; - } - retLen = i; - iterator = resNew; - i = 0; - ret = (*env)->NewObjectArray(env, retLen, ni_iacls, NULL); - - if (IS_NULL(ret)) { - /* we may have memory to free at the end of this */ - goto cleanupAndReturn; - } - - if (preferIPv6Address) { - inetIndex = inet6Count; - inet6Index = 0; - } else { - inetIndex = 0; - inet6Index = inetCount; - } - - while (iterator != NULL) { + memcpy(next, iterator, sizeof(struct addrinfo)); + next->ai_next = NULL; + if (resNew == NULL) { + resNew = next; + } else { + last->ai_next = next; + } + last = next; + i++; if (iterator->ai_family == AF_INET) { - jobject iaObj = (*env)->NewObject(env, ni_ia4cls, ni_ia4ctrID); - if (IS_NULL(iaObj)) { - ret = NULL; - goto cleanupAndReturn; - } - (*env)->SetIntField(env, iaObj, ni_iaaddressID, - ntohl(((struct sockaddr_in*)iterator->ai_addr)->sin_addr.s_addr)); - (*env)->SetObjectField(env, iaObj, ni_iahostID, host); - (*env)->SetObjectArrayElement(env, ret, inetIndex, iaObj); - inetIndex ++; + inetCount ++; } else if (iterator->ai_family == AF_INET6) { - jint scope = 0; - jbyteArray ipaddress; - jobject iaObj = (*env)->NewObject(env, ni_ia6cls, ni_ia6ctrID); - if (IS_NULL(iaObj)) { - ret = NULL; - goto cleanupAndReturn; - } - ipaddress = (*env)->NewByteArray(env, 16); - if (IS_NULL(ipaddress)) { - ret = NULL; - goto cleanupAndReturn; - } - (*env)->SetByteArrayRegion(env, ipaddress, 0, 16, - (jbyte *)&(((struct sockaddr_in6*)iterator->ai_addr)->sin6_addr)); - scope = ((struct sockaddr_in6*)iterator->ai_addr)->sin6_scope_id; - if (scope != 0) { /* zero is default value, no need to set */ - (*env)->SetIntField(env, iaObj, ia6_scopeidID, scope); - (*env)->SetBooleanField(env, iaObj, ia6_scopeidsetID, JNI_TRUE); - } - (*env)->SetObjectField(env, iaObj, ni_ia6ipaddressID, ipaddress); - (*env)->SetObjectField(env, iaObj, ni_iahostID, host); - (*env)->SetObjectArrayElement(env, ret, inet6Index, iaObj); - inet6Index ++; + inet6Count ++; } - iterator = iterator->ai_next; } + iterator = iterator->ai_next; + } + retLen = i; + iterator = resNew; + i = 0; + ret = (*env)->NewObjectArray(env, retLen, ni_iacls, NULL); + + if (IS_NULL(ret)) { + /* we may have memory to free at the end of this */ + goto cleanupAndReturn; + } + + if (preferIPv6Address) { + inetIndex = inet6Count; + inet6Index = 0; + } else { + inetIndex = 0; + inet6Index = inetCount; + } + + while (iterator != NULL) { + if (iterator->ai_family == AF_INET) { + jobject iaObj = (*env)->NewObject(env, ni_ia4cls, ni_ia4ctrID); + if (IS_NULL(iaObj)) { + ret = NULL; + goto cleanupAndReturn; + } + (*env)->SetIntField(env, iaObj, ni_iaaddressID, + ntohl(((struct sockaddr_in*)iterator->ai_addr)->sin_addr.s_addr)); + (*env)->SetObjectField(env, iaObj, ni_iahostID, host); + (*env)->SetObjectArrayElement(env, ret, inetIndex, iaObj); + inetIndex ++; + } else if (iterator->ai_family == AF_INET6) { + jint scope = 0; + jbyteArray ipaddress; + jobject iaObj = (*env)->NewObject(env, ni_ia6cls, ni_ia6ctrID); + if (IS_NULL(iaObj)) { + ret = NULL; + goto cleanupAndReturn; + } + ipaddress = (*env)->NewByteArray(env, 16); + if (IS_NULL(ipaddress)) { + ret = NULL; + goto cleanupAndReturn; + } + (*env)->SetByteArrayRegion(env, ipaddress, 0, 16, + (jbyte *)&(((struct sockaddr_in6*)iterator->ai_addr)->sin6_addr)); + scope = ((struct sockaddr_in6*)iterator->ai_addr)->sin6_scope_id; + if (scope != 0) { /* zero is default value, no need to set */ + (*env)->SetIntField(env, iaObj, ia6_scopeidID, scope); + (*env)->SetBooleanField(env, iaObj, ia6_scopeidsetID, JNI_TRUE); + } + (*env)->SetObjectField(env, iaObj, ni_ia6ipaddressID, ipaddress); + (*env)->SetObjectField(env, iaObj, ni_iahostID, host); + (*env)->SetObjectArrayElement(env, ret, inet6Index, iaObj); + inet6Index ++; + } + iterator = iterator->ai_next; } } @@ -291,8 +289,7 @@ cleanupAndReturn: JNU_ReleaseStringPlatformChars(env, host, hostname); } - if (NET_addrtransAvailable()) - (*freeaddrinfo_ptr)(res); + freeaddrinfo(res); return ret; } @@ -312,44 +309,41 @@ Java_java_net_Inet6AddressImpl_getHostByAddr(JNIEnv *env, jobject this, int len = 0; jbyte caddr[16]; - if (NET_addrtransAvailable()) { - struct sockaddr_in him4; - struct sockaddr_in6 him6; - struct sockaddr *sa; + struct sockaddr_in him4; + struct sockaddr_in6 him6; + struct sockaddr *sa; + /* + * For IPv4 addresses construct a sockaddr_in structure. + */ + if ((*env)->GetArrayLength(env, addrArray) == 4) { + jint addr; + (*env)->GetByteArrayRegion(env, addrArray, 0, 4, caddr); + addr = ((caddr[0]<<24) & 0xff000000); + addr |= ((caddr[1] <<16) & 0xff0000); + addr |= ((caddr[2] <<8) & 0xff00); + addr |= (caddr[3] & 0xff); + memset((char *) &him4, 0, sizeof(him4)); + him4.sin_addr.s_addr = (uint32_t) htonl(addr); + him4.sin_family = AF_INET; + sa = (struct sockaddr *) &him4; + len = sizeof(him4); + } else { /* - * For IPv4 addresses construct a sockaddr_in structure. + * For IPv6 address construct a sockaddr_in6 structure. */ - if ((*env)->GetArrayLength(env, addrArray) == 4) { - jint addr; - (*env)->GetByteArrayRegion(env, addrArray, 0, 4, caddr); - addr = ((caddr[0]<<24) & 0xff000000); - addr |= ((caddr[1] <<16) & 0xff0000); - addr |= ((caddr[2] <<8) & 0xff00); - addr |= (caddr[3] & 0xff); - memset((char *) &him4, 0, sizeof(him4)); - him4.sin_addr.s_addr = (uint32_t) htonl(addr); - him4.sin_family = AF_INET; - sa = (struct sockaddr *) &him4; - len = sizeof(him4); - } else { - /* - * For IPv6 address construct a sockaddr_in6 structure. - */ - (*env)->GetByteArrayRegion(env, addrArray, 0, 16, caddr); - memset((char *) &him6, 0, sizeof(him6)); - memcpy((void *)&(him6.sin6_addr), caddr, sizeof(struct in6_addr) ); - him6.sin6_family = AF_INET6; - sa = (struct sockaddr *) &him6 ; - len = sizeof(him6) ; - } + (*env)->GetByteArrayRegion(env, addrArray, 0, 16, caddr); + memset((char *) &him6, 0, sizeof(him6)); + memcpy((void *)&(him6.sin6_addr), caddr, sizeof(struct in6_addr) ); + him6.sin6_family = AF_INET6; + sa = (struct sockaddr *) &him6 ; + len = sizeof(him6) ; + } - error = (*getnameinfo_ptr)(sa, len, host, NI_MAXHOST, NULL, 0, - NI_NAMEREQD); + error = getnameinfo(sa, len, host, NI_MAXHOST, NULL, 0, NI_NAMEREQD); - if (!error) { - ret = (*env)->NewStringUTF(env, host); - } + if (!error) { + ret = (*env)->NewStringUTF(env, host); } if (ret == NULL) { diff --git a/jdk/src/windows/native/java/net/NetworkInterface.c b/jdk/src/windows/native/java/net/NetworkInterface.c index 6a318722414..fa5dfc13f61 100644 --- a/jdk/src/windows/native/java/net/NetworkInterface.c +++ b/jdk/src/windows/native/java/net/NetworkInterface.c @@ -53,36 +53,6 @@ * order and this ensures consistent device number across invocations. */ - -/* IP helper library routines */ -int (PASCAL FAR *GetIpAddrTable_fn)(); -int (PASCAL FAR *GetIfTable_fn)(); -int (PASCAL FAR *GetFriendlyIfIndex_fn)(); -int (PASCAL FAR *GetAdaptersAddresses_fn)(); -int (PASCAL FAR *GetAdaptersInfo_fn)(); -int (PASCAL FAR *GetNumberOfInterfaces_fn)(); - -/* Enumeration routines */ -typedef int (*EnumerateNetInterfaces)(JNIEnv *, netif **); -typedef int(*EnumerateNetAddresses)(JNIEnv *, netif *, netaddr **); - -static EnumerateNetInterfaces enumInterfaces_fn; -static EnumerateNetAddresses enumAddresses_fn; - -/* Windows 9x routines are external (not needed on 64-bit) */ -#ifndef _WIN64 -extern int enumInterfaces_win9x(JNIEnv *, netif **); -extern int enumAddresses_win9x(JNIEnv *, netif *, netaddr **); -extern int init_win9x(void); -#endif - - -/* Windows 95/98/ME running */ -static jboolean isW9x; - -/* Windows version supports */ -static jboolean os_supports_ipv6; - /* various JNI ids */ jclass ni_class; /* NetworkInterface */ @@ -154,10 +124,10 @@ MIB_IFROW *getIF(jint index) { */ size = sizeof(MIB_IFTABLE); tableP = (MIB_IFTABLE *)malloc(size); - count = (*GetIfTable_fn)(tableP, &size, TRUE); + count = GetIfTable(tableP, &size, TRUE); if (count == ERROR_INSUFFICIENT_BUFFER || count == ERROR_BUFFER_OVERFLOW) { tableP = (MIB_IFTABLE *)realloc(tableP, size); - count = (*GetIfTable_fn)(tableP, &size, TRUE); + count = GetIfTable(tableP, &size, TRUE); } if (count != NO_ERROR) { @@ -172,7 +142,7 @@ MIB_IFROW *getIF(jint index) { /* * Warning the real index is obtained by GetFriendlyIfIndex() */ - ifindex = (*GetFriendlyIfIndex_fn)(ifrowP->dwIndex); + ifindex = GetFriendlyIfIndex(ifrowP->dwIndex); if (ifindex == index) { /* * Create a copy of the entry so that we can free the table. @@ -199,7 +169,7 @@ MIB_IFROW *getIF(jint index) { * occurs then netifPP be returned as list of netif structures or NULL * if no interfaces are found. */ -int enumInterfaces_win(JNIEnv *env, netif **netifPP) +int enumInterfaces(JNIEnv *env, netif **netifPP) { MIB_IFTABLE *tableP; MIB_IFROW *ifrowP; @@ -215,32 +185,16 @@ int enumInterfaces_win(JNIEnv *env, netif **netifPP) */ size = sizeof(MIB_IFTABLE); tableP = (MIB_IFTABLE *)malloc(size); - ret = (*GetIfTable_fn)(tableP, &size, TRUE); + ret = GetIfTable(tableP, &size, TRUE); if (ret == ERROR_INSUFFICIENT_BUFFER || ret == ERROR_BUFFER_OVERFLOW) { tableP = (MIB_IFTABLE *)realloc(tableP, size); - ret = (*GetIfTable_fn)(tableP, &size, TRUE); + ret = GetIfTable(tableP, &size, TRUE); } if (ret != NO_ERROR) { if (tableP != NULL) free(tableP); -#ifndef _WIN64 - if (isW9x && ret == ERROR_NOT_SUPPORTED) { - /* - * If ERROR_NOT_SUPPORTED is returned on Windows 98 it means that - * IE5.0 has been installed. In this case we revert to the Windows 95 - * approach and avoid using the IP Helper Library. - * See: http://support.microsoft.com/support/kb/articles/q234/5/73.asp - */ - enumInterfaces_fn = enumInterfaces_win9x; - enumAddresses_fn = enumAddresses_win9x; - init_win9x(); - - return (*enumInterfaces_fn)(env, netifPP); - } -#endif - JNU_ThrowByName(env, "java/lang/Error", "IP Helper Library GetIfTable function failed"); @@ -328,7 +282,7 @@ int enumInterfaces_win(JNIEnv *env, netif **netifPP) curr->displayName[ifrowP->dwDescrLen] = '\0'; curr->dwIndex = ifrowP->dwIndex; curr->ifType = ifrowP->dwType; - curr->index = (*GetFriendlyIfIndex_fn)(ifrowP->dwIndex); + curr->index = GetFriendlyIfIndex(ifrowP->dwIndex); /* * Put the interface at tail of list as GetIfTable(,,TRUE) is @@ -384,10 +338,10 @@ int enumAddresses_win(JNIEnv *env, netif *netifP, netaddr **netaddrPP) size = sizeof(MIB_IPADDRTABLE); tableP = (MIB_IPADDRTABLE *)malloc(size); - ret = (*GetIpAddrTable_fn)(&tableP, &size, FALSE); + ret = GetIpAddrTable(tableP, &size, FALSE); if (ret == ERROR_INSUFFICIENT_BUFFER || ret == ERROR_BUFFER_OVERFLOW) { tableP = (MIB_IPADDRTABLE *)realloc(tableP, size); - ret = (*GetIpAddrTable_fn)(tableP, &size, FALSE); + ret = GetIpAddrTable(tableP, &size, FALSE); } if (ret != NO_ERROR) { if (tableP) { @@ -477,71 +431,6 @@ int enumAddresses_win(JNIEnv *env, netif *netifP, netaddr **netaddrPP) JNIEXPORT void JNICALL Java_java_net_NetworkInterface_init(JNIEnv *env, jclass cls) { - OSVERSIONINFO ver; - HANDLE h; - - /* - * First check if this is a Windows 9x machine. - */ - ver.dwOSVersionInfoSize = sizeof(ver); - GetVersionEx(&ver); - if (ver.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS && ver.dwMajorVersion == 4) { - isW9x = JNI_TRUE; - } - - /* - * Try to load the IP Helper Library and obtain the entry points we - * require. This will succeed on 98, NT SP4+, 2000 & XP. It will - * fail on Windows 95 (if IE hasn't been updated) and old versions - * of NT (IP helper library only appeared at SP4). If it fails on - * Windows 9x we will use the registry approach, otherwise if it - * fails we throw an Error indicating that we have an incompatible - * IP helper library. - */ - h = LoadLibrary("iphlpapi.dll"); - if (h != NULL) { - GetIpAddrTable_fn = - (int (PASCAL FAR *)())GetProcAddress(h, "GetIpAddrTable"); - GetIfTable_fn = - (int (PASCAL FAR *)())GetProcAddress(h, "GetIfTable"); - GetFriendlyIfIndex_fn = - (int (PASCAL FAR *)())GetProcAddress(h, "GetFriendlyIfIndex"); - GetNumberOfInterfaces_fn = - (int (PASCAL FAR *)())GetProcAddress(h, "GetNumberOfInterfaces"); - GetAdaptersAddresses_fn = - (int (PASCAL FAR *)())GetProcAddress(h, "GetAdaptersAddresses"); - GetAdaptersInfo_fn = - (int (PASCAL FAR *)())GetProcAddress(h, "GetAdaptersInfo"); - } - - /* IPv6 is supported on Windows versions if the following APIs avail */ - - os_supports_ipv6 = (GetAdaptersAddresses_fn != NULL) && - (GetNumberOfInterfaces_fn != NULL) && - (GetAdaptersInfo_fn != NULL); - - if (GetIpAddrTable_fn == NULL || - GetIfTable_fn == NULL || - GetFriendlyIfIndex_fn == NULL) { - -#ifndef _WIN64 - if (isW9x) { - /* Use Windows 9x registry approach which requires initialization */ - enumInterfaces_fn = enumInterfaces_win9x; - enumAddresses_fn = enumAddresses_win9x; - init_win9x(); - } else -#endif - { - JNU_ThrowByName(env, "java/lang/Error", - "Incompatible IP helper library (iphlpapi.dll)"); - return; - } - } else { - enumInterfaces_fn = enumInterfaces_win; - enumAddresses_fn = enumAddresses_win; - } - /* * Get the various JNI ids that we require */ @@ -581,7 +470,8 @@ Java_java_net_NetworkInterface_init(JNIEnv *env, jclass cls) * populate the InetAddress array based on the IP addresses for this * interface. */ -jobject createNetworkInterface(JNIEnv *env, netif *ifs, int netaddrCount, netaddr *netaddrP) +jobject createNetworkInterface + (JNIEnv *env, netif *ifs, int netaddrCount, netaddr *netaddrP) { jobject netifObj; jobject name, displayName; @@ -596,7 +486,8 @@ jobject createNetworkInterface(JNIEnv *env, netif *ifs, int netaddrCount, netadd netifObj = (*env)->NewObject(env, ni_class, ni_ctor); name = (*env)->NewStringUTF(env, ifs->name); if (ifs->dNameIsUnicode) { - displayName = (*env)->NewString(env, (PWCHAR)ifs->displayName, wcslen ((PWCHAR)ifs->displayName)); + displayName = (*env)->NewString(env, (PWCHAR)ifs->displayName, + (jsize)wcslen ((PWCHAR)ifs->displayName)); } else { displayName = (*env)->NewStringUTF(env, ifs->displayName); } @@ -612,7 +503,7 @@ jobject createNetworkInterface(JNIEnv *env, netif *ifs, int netaddrCount, netadd * Note that 0 is a valid number of addresses. */ if (netaddrCount < 0) { - netaddrCount = (*enumAddresses_fn)(env, ifs, &netaddrP); + netaddrCount = enumAddresses_win(env, ifs, &netaddrP); if ((*env)->ExceptionOccurred(env)) { free_netaddr(netaddrP); return NULL; @@ -725,12 +616,13 @@ JNIEXPORT jobject JNICALL Java_java_net_NetworkInterface_getByName0 const char *name_utf; jobject netifObj = NULL; - if (os_supports_ipv6 && ipv6_available()) { + // Retained for now to support IPv4 only stack, java.net.preferIPv4Stack + if (ipv6_available()) { return Java_java_net_NetworkInterface_getByName0_XP (env, cls, name); } /* get the list of interfaces */ - if ((*enumInterfaces_fn)(env, &ifList) < 0) { + if (enumInterfaces(env, &ifList) < 0) { return NULL; } @@ -771,12 +663,13 @@ JNIEXPORT jobject JNICALL Java_java_net_NetworkInterface_getByIndex0 netif *ifList, *curr; jobject netifObj = NULL; - if (os_supports_ipv6 && ipv6_available()) { + // Retained for now to support IPv4 only stack, java.net.preferIPv4Stack + if (ipv6_available()) { return Java_java_net_NetworkInterface_getByIndex0_XP (env, cls, index); } /* get the list of interfaces */ - if ((*enumInterfaces_fn)(env, &ifList) < 0) { + if (enumInterfaces(env, &ifList) < 0) { return NULL; } @@ -812,12 +705,13 @@ JNIEXPORT jobject JNICALL Java_java_net_NetworkInterface_getByInetAddress0 jint addr = (*env)->GetIntField(env, iaObj, ni_iaAddr); jobject netifObj = NULL; - if (os_supports_ipv6 && ipv6_available()) { + // Retained for now to support IPv4 only stack, java.net.preferIPv4Stack + if (ipv6_available()) { return Java_java_net_NetworkInterface_getByInetAddress0_XP (env, cls, iaObj); } /* get the list of interfaces */ - if ((*enumInterfaces_fn)(env, &ifList) < 0) { + if (enumInterfaces(env, &ifList) < 0) { return NULL; } @@ -832,7 +726,7 @@ JNIEXPORT jobject JNICALL Java_java_net_NetworkInterface_getByInetAddress0 netaddr *addrP; /* enumerate the addresses on this interface */ - count = (*enumAddresses_fn)(env, curr, &addrList); + count = enumAddresses_win(env, curr, &addrList); if (count < 0) { free_netif(ifList); return NULL; @@ -881,14 +775,15 @@ JNIEXPORT jobjectArray JNICALL Java_java_net_NetworkInterface_getAll jobjectArray netIFArr; jint arr_index; - if (os_supports_ipv6 && ipv6_available()) { + // Retained for now to support IPv4 only stack, java.net.preferIPv4Stack + if (ipv6_available()) { return Java_java_net_NetworkInterface_getAll_XP (env, cls); } /* * Get list of interfaces */ - count = (*enumInterfaces_fn)(env, &ifList); + count = enumInterfaces(env, &ifList); if (count < 0) { return NULL; } @@ -934,13 +829,16 @@ JNIEXPORT jboolean JNICALL Java_java_net_NetworkInterface_isUp0 (JNIEnv *env, jclass cls, jstring name, jint index) { jboolean ret = JNI_FALSE; - if (os_supports_ipv6 && ipv6_available()) { + // Retained for now to support IPv4 only stack, java.net.preferIPv4Stack + if (ipv6_available()) { return Java_java_net_NetworkInterface_isUp0_XP(env, cls, name, index); } else { MIB_IFROW *ifRowP; ifRowP = getIF(index); if (ifRowP != NULL) { - ret = ifRowP->dwAdminStatus == 1 && (ifRowP->dwOperStatus == MIB_IF_OPER_STATUS_OPERATIONAL || ifRowP->dwOperStatus == MIB_IF_OPER_STATUS_CONNECTED); + ret = ifRowP->dwAdminStatus == 1 && + (ifRowP->dwOperStatus == MIB_IF_OPER_STATUS_OPERATIONAL || + ifRowP->dwOperStatus == MIB_IF_OPER_STATUS_CONNECTED); free(ifRowP); } } @@ -952,11 +850,13 @@ JNIEXPORT jboolean JNICALL Java_java_net_NetworkInterface_isUp0 * Method: isP2P0 * Signature: (Ljava/lang/String;I)Z */ -JNIEXPORT jboolean JNICALL Java_java_net_NetworkInterface_isP2P0(JNIEnv *env, jclass cls, jstring name, jint index) { +JNIEXPORT jboolean JNICALL Java_java_net_NetworkInterface_isP2P0 + (JNIEnv *env, jclass cls, jstring name, jint index) { MIB_IFROW *ifRowP; jboolean ret = JNI_FALSE; - if (os_supports_ipv6 && ipv6_available()) { + // Retained for now to support IPv4 only stack, java.net.preferIPv4Stack + if (ipv6_available()) { return Java_java_net_NetworkInterface_isP2P0_XP(env, cls, name, index); } else { ifRowP = getIF(index); @@ -983,7 +883,8 @@ JNIEXPORT jboolean JNICALL Java_java_net_NetworkInterface_isLoopback0 MIB_IFROW *ifRowP; jboolean ret = JNI_FALSE; - if (os_supports_ipv6 && ipv6_available()) { + // Retained for now to support IPv4 only stack, java.net.preferIPv4Stack + if (ipv6_available()) { return Java_java_net_NetworkInterface_isLoopback0_XP(env, cls, name, index); } else { ifRowP = getIF(index); @@ -1003,22 +904,8 @@ JNIEXPORT jboolean JNICALL Java_java_net_NetworkInterface_isLoopback0 */ JNIEXPORT jboolean JNICALL Java_java_net_NetworkInterface_supportsMulticast0 (JNIEnv *env, jclass cls, jstring name, jint index) { - MIB_IFROW *ifRowP; - jboolean ret = JNI_TRUE; - - // Let's try to use the newer API (XP & 2003 only) - if (GetAdaptersAddresses_fn != NULL) { - ret = Java_java_net_NetworkInterface_supportsMulticast0_XP(env, cls, + return Java_java_net_NetworkInterface_supportsMulticast0_XP(env, cls, name, index); - return ret; - } - ifRowP = getIF(index); - if (ifRowP != NULL) { - if (ifRowP->dwType == MIB_IF_TYPE_LOOPBACK) - ret = JNI_FALSE; - free(ifRowP); - } - return ret; } /* @@ -1026,12 +913,14 @@ JNIEXPORT jboolean JNICALL Java_java_net_NetworkInterface_supportsMulticast0 * Method: getMacAddr0 * Signature: ([bLjava/lang/String;I)[b */ -JNIEXPORT jbyteArray JNICALL Java_java_net_NetworkInterface_getMacAddr0(JNIEnv *env, jclass class, jbyteArray addrArray, jstring name, jint index) { +JNIEXPORT jbyteArray JNICALL Java_java_net_NetworkInterface_getMacAddr0 + (JNIEnv *env, jclass class, jbyteArray addrArray, jstring name, jint index) { jbyteArray ret = NULL; int len; MIB_IFROW *ifRowP; - if (os_supports_ipv6 && ipv6_available()) { + // Retained for now to support IPv4 only stack, java.net.preferIPv4Stack + if (ipv6_available()) { return Java_java_net_NetworkInterface_getMacAddr0_XP(env, class, name, index); } else { ifRowP = getIF(index); @@ -1058,11 +947,13 @@ JNIEXPORT jbyteArray JNICALL Java_java_net_NetworkInterface_getMacAddr0(JNIEnv * * Method: getMTU0 * Signature: ([bLjava/lang/String;I)I */ -JNIEXPORT jint JNICALL Java_java_net_NetworkInterface_getMTU0(JNIEnv *env, jclass class, jstring name, jint index) { +JNIEXPORT jint JNICALL Java_java_net_NetworkInterface_getMTU0 + (JNIEnv *env, jclass class, jstring name, jint index) { jint ret = -1; MIB_IFROW *ifRowP; - if (os_supports_ipv6 && ipv6_available()) { + // Retained for now to support IPv4 only stack, java.net.preferIPv4Stack + if (ipv6_available()) { return Java_java_net_NetworkInterface_getMTU0_XP(env, class, name, index); } else { ifRowP = getIF(index); diff --git a/jdk/src/windows/native/java/net/NetworkInterface.h b/jdk/src/windows/native/java/net/NetworkInterface.h index 6d3e1c1a957..262e15a0db0 100644 --- a/jdk/src/windows/native/java/net/NetworkInterface.h +++ b/jdk/src/windows/native/java/net/NetworkInterface.h @@ -87,338 +87,6 @@ extern jfieldID ni_ibaddressID; /* InterfaceAddress.address */ extern jfieldID ni_ibbroadcastID; /* InterfaceAddress.broadcast */ extern jfieldID ni_ibmaskID; /* InterfaceAddress.maskLength */ -int enumInterfaces_win(JNIEnv *env, netif **netifPP); - -/* We have included iphlpapi.h which includes iptypes.h which has the definition - * for MAX_ADAPTER_DESCRIPTION_LENGTH (along with the other definitions in this - * ifndef block). Therefore if MAX_ADAPTER_DESCRIPTION_LENGTH is defined we can - * be sure that the other definitions are also defined */ -#ifndef MAX_ADAPTER_DESCRIPTION_LENGTH - -/* - * Following includes come from iptypes.h - */ - -#pragma warning(push) -#pragma warning(disable:4201) - -#include - -// Definitions and structures used by getnetworkparams and getadaptersinfo apis - -#define MAX_ADAPTER_DESCRIPTION_LENGTH 128 // arb. -#define MAX_ADAPTER_NAME_LENGTH 256 // arb. -#define MAX_ADAPTER_ADDRESS_LENGTH 8 // arb. -#define DEFAULT_MINIMUM_ENTITIES 32 // arb. -#define MAX_HOSTNAME_LEN 128 // arb. -#define MAX_DOMAIN_NAME_LEN 128 // arb. -#define MAX_SCOPE_ID_LEN 256 // arb. - -// -// types -// - -// Node Type - -#define BROADCAST_NODETYPE 1 -#define PEER_TO_PEER_NODETYPE 2 -#define MIXED_NODETYPE 4 -#define HYBRID_NODETYPE 8 - -// -// IP_ADDRESS_STRING - store an IP address as a dotted decimal string -// - -typedef struct { - char String[4 * 4]; -} IP_ADDRESS_STRING, *PIP_ADDRESS_STRING, IP_MASK_STRING, *PIP_MASK_STRING; - -// -// IP_ADDR_STRING - store an IP address with its corresponding subnet mask, -// both as dotted decimal strings -// - -typedef struct _IP_ADDR_STRING { - struct _IP_ADDR_STRING* Next; - IP_ADDRESS_STRING IpAddress; - IP_MASK_STRING IpMask; - DWORD Context; -} IP_ADDR_STRING, *PIP_ADDR_STRING; - -// -// ADAPTER_INFO - per-adapter information. All IP addresses are stored as -// strings -// - -typedef struct _IP_ADAPTER_INFO { - struct _IP_ADAPTER_INFO* Next; - DWORD ComboIndex; - char AdapterName[MAX_ADAPTER_NAME_LENGTH + 4]; - char Description[MAX_ADAPTER_DESCRIPTION_LENGTH + 4]; - UINT AddressLength; - BYTE Address[MAX_ADAPTER_ADDRESS_LENGTH]; - DWORD Index; - UINT Type; - UINT DhcpEnabled; - PIP_ADDR_STRING CurrentIpAddress; - IP_ADDR_STRING IpAddressList; - IP_ADDR_STRING GatewayList; - IP_ADDR_STRING DhcpServer; - BOOL HaveWins; - IP_ADDR_STRING PrimaryWinsServer; - IP_ADDR_STRING SecondaryWinsServer; - time_t LeaseObtained; - time_t LeaseExpires; -} IP_ADAPTER_INFO, *PIP_ADAPTER_INFO; - -#ifdef _WINSOCK2API_ - -// -// The following types require Winsock2. -// - -typedef enum { - IpPrefixOriginOther = 0, - IpPrefixOriginManual, - IpPrefixOriginWellKnown, - IpPrefixOriginDhcp, - IpPrefixOriginRouterAdvertisement, -} IP_PREFIX_ORIGIN; - -typedef enum { - IpSuffixOriginOther = 0, - IpSuffixOriginManual, - IpSuffixOriginWellKnown, - IpSuffixOriginDhcp, - IpSuffixOriginLinkLayerAddress, - IpSuffixOriginRandom, -} IP_SUFFIX_ORIGIN; - -typedef enum { - IpDadStateInvalid = 0, - IpDadStateTentative, - IpDadStateDuplicate, - IpDadStateDeprecated, - IpDadStatePreferred, -} IP_DAD_STATE; - -typedef struct _IP_ADAPTER_UNICAST_ADDRESS { - union { - ULONGLONG Alignment; - struct { - ULONG Length; - DWORD Flags; - }; - }; - struct _IP_ADAPTER_UNICAST_ADDRESS *Next; - SOCKET_ADDRESS Address; - - IP_PREFIX_ORIGIN PrefixOrigin; - IP_SUFFIX_ORIGIN SuffixOrigin; - IP_DAD_STATE DadState; - - ULONG ValidLifetime; - ULONG PreferredLifetime; - ULONG LeaseLifetime; -} IP_ADAPTER_UNICAST_ADDRESS, *PIP_ADAPTER_UNICAST_ADDRESS; - -typedef struct _IP_ADAPTER_ANYCAST_ADDRESS { - union { - ULONGLONG Alignment; - struct { - ULONG Length; - DWORD Flags; - }; - }; - struct _IP_ADAPTER_ANYCAST_ADDRESS *Next; - SOCKET_ADDRESS Address; -} IP_ADAPTER_ANYCAST_ADDRESS, *PIP_ADAPTER_ANYCAST_ADDRESS; - -typedef struct _IP_ADAPTER_MULTICAST_ADDRESS { - union { - ULONGLONG Alignment; - struct { - ULONG Length; - DWORD Flags; - }; - }; - struct _IP_ADAPTER_MULTICAST_ADDRESS *Next; - SOCKET_ADDRESS Address; -} IP_ADAPTER_MULTICAST_ADDRESS, *PIP_ADAPTER_MULTICAST_ADDRESS; - -// -// Per-address Flags -// -#define IP_ADAPTER_ADDRESS_DNS_ELIGIBLE 0x01 -#define IP_ADAPTER_ADDRESS_TRANSIENT 0x02 - -typedef struct _IP_ADAPTER_DNS_SERVER_ADDRESS { - union { - ULONGLONG Alignment; - struct { - ULONG Length; - DWORD Reserved; - }; - }; - struct _IP_ADAPTER_DNS_SERVER_ADDRESS *Next; - SOCKET_ADDRESS Address; -} IP_ADAPTER_DNS_SERVER_ADDRESS, *PIP_ADAPTER_DNS_SERVER_ADDRESS; - -typedef struct _IP_ADAPTER_PREFIX { - union { - ULONGLONG Alignment; - struct { - ULONG Length; - DWORD Flags; - }; - }; - struct _IP_ADAPTER_PREFIX *Next; - SOCKET_ADDRESS Address; - ULONG PrefixLength; -} IP_ADAPTER_PREFIX, *PIP_ADAPTER_PREFIX; - -// -// Per-adapter Flags -// -#define IP_ADAPTER_DDNS_ENABLED 0x01 -#define IP_ADAPTER_REGISTER_ADAPTER_SUFFIX 0x02 -#define IP_ADAPTER_DHCP_ENABLED 0x04 -#define IP_ADAPTER_RECEIVE_ONLY 0x08 -#define IP_ADAPTER_NO_MULTICAST 0x10 -#define IP_ADAPTER_IPV6_OTHER_STATEFUL_CONFIG 0x20 - -// -// OperStatus values from RFC 2863 -// -typedef enum { - IfOperStatusUp = 1, - IfOperStatusDown, - IfOperStatusTesting, - IfOperStatusUnknown, - IfOperStatusDormant, - IfOperStatusNotPresent, - IfOperStatusLowerLayerDown -} IF_OPER_STATUS; - -// -// Scope levels from RFC 2373 used with ZoneIndices array. -// -typedef enum { - ScopeLevelInterface = 1, - ScopeLevelLink = 2, - ScopeLevelSubnet = 3, - ScopeLevelAdmin = 4, - ScopeLevelSite = 5, - ScopeLevelOrganization = 8, - ScopeLevelGlobal = 14 -} SCOPE_LEVEL; - -typedef struct _IP_ADAPTER_ADDRESSES { - union { - ULONGLONG Alignment; - struct { - ULONG Length; - DWORD IfIndex; - }; - }; - struct _IP_ADAPTER_ADDRESSES *Next; - PCHAR AdapterName; - PIP_ADAPTER_UNICAST_ADDRESS FirstUnicastAddress; - PIP_ADAPTER_ANYCAST_ADDRESS FirstAnycastAddress; - PIP_ADAPTER_MULTICAST_ADDRESS FirstMulticastAddress; - PIP_ADAPTER_DNS_SERVER_ADDRESS FirstDnsServerAddress; - PWCHAR DnsSuffix; - PWCHAR Description; - PWCHAR FriendlyName; - BYTE PhysicalAddress[MAX_ADAPTER_ADDRESS_LENGTH]; - DWORD PhysicalAddressLength; - DWORD Flags; - DWORD Mtu; - DWORD IfType; - IF_OPER_STATUS OperStatus; - DWORD Ipv6IfIndex; - DWORD ZoneIndices[16]; - PIP_ADAPTER_PREFIX FirstPrefix; -} IP_ADAPTER_ADDRESSES, *PIP_ADAPTER_ADDRESSES; - -// -// Flags used as argument to GetAdaptersAddresses(). -// "SKIP" flags are added when the default is to include the information. -// "INCLUDE" flags are added when the default is to skip the information. -// -#define GAA_FLAG_SKIP_UNICAST 0x0001 -#define GAA_FLAG_SKIP_ANYCAST 0x0002 -#define GAA_FLAG_SKIP_MULTICAST 0x0004 -#define GAA_FLAG_SKIP_DNS_SERVER 0x0008 -#define GAA_FLAG_INCLUDE_PREFIX 0x0010 -#define GAA_FLAG_SKIP_FRIENDLY_NAME 0x0020 - -#endif /* _WINSOCK2API_ */ - -// -// IP_PER_ADAPTER_INFO - per-adapter IP information such as DNS server list. -// - -typedef struct _IP_PER_ADAPTER_INFO { - UINT AutoconfigEnabled; - UINT AutoconfigActive; - PIP_ADDR_STRING CurrentDnsServer; - IP_ADDR_STRING DnsServerList; -} IP_PER_ADAPTER_INFO, *PIP_PER_ADAPTER_INFO; - -// -// FIXED_INFO - the set of IP-related information which does not depend on DHCP -// - -typedef struct { - char HostName[MAX_HOSTNAME_LEN + 4] ; - char DomainName[MAX_DOMAIN_NAME_LEN + 4]; - PIP_ADDR_STRING CurrentDnsServer; - IP_ADDR_STRING DnsServerList; - UINT NodeType; - char ScopeId[MAX_SCOPE_ID_LEN + 4]; - UINT EnableRouting; - UINT EnableProxy; - UINT EnableDns; -} FIXED_INFO, *PFIXED_INFO; - -#pragma warning(pop) - -#endif /*!MAX_ADAPTER_DESCRIPTION_LENGTH*/ - -#ifndef IP_INTERFACE_NAME_INFO_DEFINED -#define IP_INTERFACE_NAME_INFO_DEFINED - -typedef struct ip_interface_name_info { - ULONG Index; // Interface Index - ULONG MediaType; // Interface Types - see ipifcons.h - UCHAR ConnectionType; - UCHAR AccessType; - GUID DeviceGuid; // Device GUID is the guid of the device - // that IP exposes - GUID InterfaceGuid; // Interface GUID, if not GUID_NULL is the - // GUID for the interface mapped to the device. -} IP_INTERFACE_NAME_INFO, *PIP_INTERFACE_NAME_INFO; - -#endif - - -/* from ipifcons.h */ - -#ifndef IF_TYPE_PPP -#define IF_TYPE_PPP 23 -#endif - -#ifndef IF_TYPE_SOFTWARE_LOOPBACK -#define IF_TYPE_SOFTWARE_LOOPBACK 24 -#endif - -#ifndef IF_TYPE_SLIP -#define IF_TYPE_SLIP 28 -#endif - -#ifndef IF_TYPE_TUNNEL -#define IF_TYPE_TUNNEL 131 -#endif +int enumInterfaces(JNIEnv *env, netif **netifPP); #endif diff --git a/jdk/src/windows/native/java/net/NetworkInterface_win9x.c b/jdk/src/windows/native/java/net/NetworkInterface_win9x.c deleted file mode 100644 index deac1eb7f3d..00000000000 --- a/jdk/src/windows/native/java/net/NetworkInterface_win9x.c +++ /dev/null @@ -1,1141 +0,0 @@ -/* - * Copyright (c) 2002, 2008, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -#include -#include -#include - -#include "jni_util.h" - -#include "NetworkInterface.h" - -/* - * Windows 9x specific routines to enumerate network interfaces and the - * IP addresses bound to those interfaces. - * - * Windows 95 does not include IP helper library support by default. - * Additionally Windows 98 can have its IP helper library support - * trashed by certain IE installations. For these environments we - * combine information from the registry with the list of IP addresses - * obtained via SIO_GET_INTERFACE_LIST. - */ - -/* - * Header files are missing these - */ -#if !defined(SIO_GET_INTERFACE_LIST) -#define SIO_GET_INTERFACE_LIST _IOR('t', 127, u_long) - -struct in_addr6 { - u_char s6_addr[16]; -}; - -struct sockaddr_in6 { - short sin6_family; - u_short sin6_port; - u_long sin6_flowinfo; - struct in_addr6 sin6_addr; -}; - -typedef union sockaddr_gen{ - struct sockaddr Address; - struct sockaddr_in AddressIn; - struct sockaddr_in6 AddressIn6; -} sockaddr_gen; - -typedef struct _INTERFACE_INFO -{ - u_long iiFlags; - sockaddr_gen iiAddress; - sockaddr_gen iiBroadcastAddress; - sockaddr_gen iiNetmask; -} INTERFACE_INFO; - -#define IFF_UP 0x00000001 -#endif - - -#define MAX_STR_LEN 256 - - -/* - * A network adapter (similiar to the netif structure except contains - * Windows 9x specific fields). - */ -typedef struct _adapter { - char *name; - char *displayName; - int index; - char *reg_key; - int is_wan_driver; - netaddr *addrs; - struct _adapter *next; -} adapter; - - -/* - * Cached adapter list. - */ -static CRITICAL_SECTION cacheLock; -static adapter *cachedAdapterList; - -/* - * Initialize cache - */ -void init_win9x() { - InitializeCriticalSection(&cacheLock); -} - - -/* - * Free adapter list and any addresses bound to the adpater. - */ -static void free_adapters(adapter *adapterP) { - adapter *curr = adapterP; - while (curr != NULL) { - if (curr->name != NULL) - free(curr->name); - - if (curr->displayName != NULL) - free(curr->displayName); - - if (curr->reg_key != NULL) - free(curr->reg_key); - - if (curr->addrs != NULL) - free_netaddr(curr->addrs); - - adapterP = adapterP->next; - free(curr); - curr = adapterP; - } -} - - -/* - * Returns the SIO_GET_INTERFACE_LIST output - */ -static int getInterfaceList(JNIEnv *env, INTERFACE_INFO *infoP, DWORD dwSize) { - SOCKET sock; - DWORD ret; - - /* create a socket and do the ioctl */ - sock = socket(AF_INET, SOCK_DGRAM, 0); - if (sock == INVALID_SOCKET) { - JNU_ThrowByName(env, "java/lang/Error", "socket failed"); - return -1; - } - ret = WSAIoctl(sock, SIO_GET_INTERFACE_LIST, NULL, 0, - infoP, dwSize, &dwSize, NULL, NULL); - closesocket(sock); - if (ret == SOCKET_ERROR) { - JNU_ThrowByName(env, "java/lang/Error", "WSAIoctl failed"); - return -1; - } - return dwSize; -} - - -/* - * Gross, ugly, and crude way of guessing if this is a WAN (dial-up) driver. - * Returns 1 if it's the normal PPCMAC VxD, otherwise 0. - */ -static int isWanDriver(char *driver) { - LONG ret; - HKEY hKey; - DWORD dwLen; - ULONG ulType; - char key[MAX_STR_LEN]; - char vxd[MAX_STR_LEN]; - - sprintf(key, "System\\CurrentControlSet\\Services\\Class\\%s", driver); - ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, key, 0, KEY_READ, (PHKEY)&hKey); - if (ret != ERROR_SUCCESS) { - return 0; - } - dwLen = sizeof(vxd); - ret = RegQueryValueEx(hKey, "DeviceVxDs", NULL, &ulType, - (LPBYTE)vxd, &dwLen); - RegCloseKey(hKey); - if (ret != ERROR_SUCCESS) { - return 0; - } - return (strcmp(vxd, "pppmac.vxd") == 0); -} - -/* - * Windows 9x routine to get the network adapters using the registry. - * We enumerate HKEY_LOCAL_MACHINE\Enum and iterate through the tree - * looking for devices of class "Net". As these devices may not have a - * unique name we assign them a generated name. - * - * Returns a list of adapters without IP addresses (addrs member is NULL). - */ -static int getAdapters(JNIEnv *env, adapter **adapterPP) -{ - LONG ret; - HKEY enumKey; - DWORD dwLen; - DWORD dwEnumKeys; - DWORD enumIndex; - ULONG ulType; - int adapterCount = 0; - adapter *adapterP = NULL; - adapter *curr; - - /* - * Start at HKEY_LOCAL_MACHINE\Enum - */ - ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Enum", 0, KEY_READ, (PHKEY)&enumKey); - if (ret != ERROR_SUCCESS) { - return -1; - } - ret = RegQueryInfoKey(enumKey, NULL, NULL, NULL, &dwEnumKeys, - NULL, NULL, NULL, NULL, NULL, NULL, NULL); - if (ret != ERROR_SUCCESS) { - RegCloseKey(enumKey); - return -1; - } - - /* - * Iterate through the sub-keys (PCI, Root, ...) - */ - for(enumIndex = 0; enumIndexis_wan_driver = wan_device; - curr->name = (char *)malloc(strlen(ps_name) + 1); - if (curr->name) { - curr->displayName = (char *)malloc(strlen(deviceDesc) + 1); - if (curr->displayName) { - curr->reg_key = (char *)malloc(strlen(key_name)+1); - if (curr->reg_key == NULL) { - free(curr->displayName); - free(curr->name); - free(curr); - curr = NULL; - } - } else { - free(curr->name); - free(curr); - curr = NULL; - } - } else { - free(curr); - curr = NULL; - } - } - - /* At OutOfMemory occurred */ - if (curr == NULL) { - JNU_ThrowOutOfMemoryError(env, "heap allocation failure"); - free_adapters(adapterP); - RegCloseKey(clsKey); - RegCloseKey(nameKey); - RegCloseKey(deviceKey); - RegCloseKey(enumKey); - return -1; - } - - /* index starts at 1 (not 0) */ - curr->index = ++adapterCount; - - strcpy(curr->name, ps_name); - strcpy(curr->displayName, deviceDesc); - strcpy(curr->reg_key, key_name); - - /* - * Put the adapter at the end of the list. - */ - if (adapterP == NULL) { - adapterP = curr; - } else { - adapter *tail = adapterP; - while (tail->next != NULL) { - tail = tail->next; - } - tail->next = curr; - } - } - } - } - } - RegCloseKey(clsKey); - } - RegCloseKey(nameKey); - } - RegCloseKey(deviceKey); - } - RegCloseKey(enumKey); - - /* - * Insert an entry for the loopback interface - */ - curr = (adapter *)calloc(1, sizeof(adapter)); - if (curr == NULL) { - JNU_ThrowOutOfMemoryError(env, "heap allocation failure"); - free_adapters(adapterP); - return -1; - } - curr->index = ++adapterCount; - curr->name = _strdup("lo"); - curr->displayName = _strdup("TCP Loopback interface"); - curr->next = adapterP; - *adapterPP = curr; - - return adapterCount; -} - -/* - * Windows 9x routine to obtain any static addresses for a specified - * TCP/IP binding. - * - * We first open Enum\Network\${binding} and check that the driver - * is TCP/IP. If so we pick up the driver and check for any IP addresses - * in System\\CurrentControlSet\\Services\\Class\\${driver} - * - * Returns 0 if found, otherwise -1. - */ -static int getStaticAddressEntry(char *binding, char *addresses) { - LONG ret; - HKEY hKey; - char name[255]; - char desc[255]; - char driver[255]; - char ipaddr[255]; - DWORD dwName; - ULONG ulType; - - /* assume nothing will be returned */ - strcpy(addresses, ""); - - /* - * Open the binding and check that it's TCP/IP - */ - sprintf(name, "Enum\\Network\\%s", binding); - ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, name, 0, KEY_READ, (PHKEY)&hKey); - if (ret != ERROR_SUCCESS) { - return -1; - } - dwName = sizeof(desc); - ret = RegQueryValueEx(hKey, "DeviceDesc", NULL, &ulType, - (LPBYTE)desc, &dwName); - if (ret != ERROR_SUCCESS) { - RegCloseKey(hKey); - return -1; - } - if (strcmp(desc, "TCP/IP") != 0) { - /* ignore non-TCP/IP bindings */ - RegCloseKey(hKey); - return -1; - } - - /* - * Get the driver for this TCP/IP binding - */ - dwName = sizeof(driver); - ret = RegQueryValueEx(hKey, "Driver", NULL, &ulType, - (LPBYTE)driver, &dwName); - RegCloseKey(hKey); - if (ret != ERROR_SUCCESS) { - return -1; - } - - /* - * Finally check if there is an IPAddress value for this driver. - */ - sprintf(name, "System\\CurrentControlSet\\Services\\Class\\%s", driver); - ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, name, 0, KEY_READ, (PHKEY)&hKey); - if (ret != ERROR_SUCCESS) { - return -1; - } - dwName = sizeof(ipaddr); - ret = RegQueryValueEx(hKey, "IPAddress", NULL, &ulType, - (LPBYTE)ipaddr, &dwName); - RegCloseKey(hKey); - if (ret != ERROR_SUCCESS) { - return -1; - } - - /* Return the address(es) */ - strcpy( addresses, ipaddr ); - return 0; -} - -/* - * Windows 9x routine to enumerate the static IP addresses on a - * particular interface using the registry. - * - * Returns a count of the number of addresses found. - */ -static int getStaticAddresses(JNIEnv *env, char *reg_key, netaddr **netaddrPP) -{ - LONG ret; - HKEY enumKey, bindingKey; - DWORD dwLen; - ULONG ulType; - char addresses[MAX_STR_LEN]; - unsigned long addr; /* IPv4 address */ - unsigned char byte; - netaddr *netaddrP, *curr; - int i, addrCount; - - /* - * Open the HKEY_LOCAL_MACHINE\Enum\%s\%s\%s key - */ - ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, reg_key, 0, KEY_READ, - (PHKEY)&enumKey); - if (ret != ERROR_SUCCESS) { - /* interface has been removed */ - *netaddrPP = NULL; - return 0; - } - - /* - * Iterate through each of the bindings to find any TCP/IP bindings - * and any static address assoicated with the binding. - */ - strcpy(addresses, ""); - addrCount = 0; - netaddrP = NULL; - - ret = RegOpenKeyEx(enumKey, "Bindings", 0, KEY_READ, (PHKEY)&bindingKey); - if (ret == ERROR_SUCCESS) { - DWORD dwBindingKeys; - DWORD dwBindingIndex; - - ret = RegQueryInfoKey(bindingKey, NULL, NULL, NULL, NULL, NULL, NULL, &dwBindingKeys, - NULL, NULL, NULL, NULL); - if (ret == ERROR_SUCCESS) { - TCHAR binding[MAX_STR_LEN]; - - dwBindingIndex=0; - while (dwBindingIndexaddr.him4.sin_family = AF_INET; - curr->addr.him4.sin_addr.s_addr = htonl(addr); - curr->next = netaddrP; - - netaddrP = curr; - addrCount++; - - /* reset the address for the next iteration */ - addr = 0; - } - byte = 0; - } else { - if (addresses[i] == '.') { - addr = (addr << 8) | byte; - byte = 0; - } else { - byte = (byte * 10) + (addresses[i] - '0'); - } - } - i++; - } - } - } - if (addrCount > 0) { - break; - } - dwBindingIndex++; - } - } - RegCloseKey(bindingKey); - } - - /* close the registry */ - RegCloseKey(enumKey); - - - /* return the list */ - *netaddrPP = netaddrP; - return addrCount; -} - -/* - * Windows 9x routine to probe the registry for a DHCP allocated address. - * This routine is only useful if we know that only one interface has its - * address allocated using DHCP. Returns 0.0.0.0 if none or multiple - * addresses found.0 - */ -static DWORD getDHCPAddress() -{ - LONG ret; - HKEY hKey; - DWORD dwLen; - ULONG ulType; - char key[MAX_STR_LEN]; - int index; - DWORD dhcp_addr = 0; - - index = 0; - while (index < 99) { - DWORD addr; - - sprintf(key, "SYSTEM\\CurrentControlSet\\Services\\VxD\\DHCP\\DhcpInfo%02d", index); - - ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, key, 0, KEY_READ, (PHKEY)&hKey); - if (ret != ERROR_SUCCESS) { - return dhcp_addr; - } - - /* - * On Windows 9x the DHCP address is in the DhcpIPAddress key. We - * are assuming here that this is Windows Socket 2. If Windows - * Sockets is the original 1.1 release then this doesn't work because - * the IP address if in the DhcpInfo key (a blob with the first 4 - * bytes set to the IP address). - */ - dwLen = sizeof(addr); - ret = RegQueryValueEx(hKey, "DhcpIPAddress", NULL, &ulType, - (LPBYTE)&addr, &dwLen); - RegCloseKey(hKey); - - if (ret == ERROR_SUCCESS) { - if (addr) { - /* more than 1 DHCP address in registry */ - if (dhcp_addr) { - return 0; - } - dhcp_addr = htonl(addr); - } - } - index++; - } - - /* if we get here it means we've examined 100 registry entries */ - return 0; -} - - -/* - * Attempt to allocate the remaining addresses on addrList to the adpaters - * on adapterList. Returns the number of address remaining. - */ -int allocateRemaining(adapter *adapterList, int address_count, netaddr *addrList) { - adapter *adapterP = adapterList; - adapter *nobindingsP = NULL; - - /* - * If all addresses have been assigned there's nothing to do. - */ - if (address_count == 0) { - return 0; - } - - /* - * Determine if there is only one adapter without an address - */ - while (adapterP != NULL) { - if (adapterP->addrs == NULL) { - if (nobindingsP == NULL) { - nobindingsP = adapterP; - } else { - nobindingsP = NULL; - break; - } - } - adapterP = adapterP->next; - } - - /* - * Found (only one) - */ - if (nobindingsP) { - nobindingsP->addrs = addrList; - address_count = 0; - } - - return address_count; -} - - -/* - * 1. Network adapters are enumerated by traversing through the - * HKEY_LOCAL_MACHINE\Enum tree and picking out class "Net" devices. - * - * 2. Address enumeration starts with the list of IP addresses returned - * by SIO_GET_INTERFACE_LIST and then we "allocate" the addresses to - * the network adapters enumerated in step 1. Allocation works as - * follows :- - * - * i. Loopback address is assigned to the loopback interface. If there - * is one network adapter then all other addresses must be bound - * to that adapter. - * - * ii. Enumerate all static IP addresses using the registry. This allows - * us to allocate all static IP address to the corresponding adapter. - * - * iii. After step ii. if there is one network adapter that has not been - * allocated an IP address then we know that the remaining IP addresses - * must be bound to this adapter. - * - * iv. If we get to this step it means we are dealing with a complex - * configuration whereby multiple network adapters have their address - * configured dynamically (eg: NIC using DHCP plus modem using PPP). - * We employ a gross hack based on a crude determination done in step 1. - * If there is a DHCP address configured and if one remaining - * network adapter that is not a WAN adapter then the DHCP address - * must be bound to it. - */ -static adapter *loadConfig(JNIEnv *env) { - adapter *adapterList; - int adapter_count; - INTERFACE_INFO interfaceInfo[8]; - DWORD dwSize; - int address_count, i; - netaddr *addrList; - - /* - * Enumerate the network adapters - */ - adapter_count = getAdapters(env, &adapterList); - if (adapter_count < 0) { - return NULL; - } - /* minimum of loopback interface */ - assert(adapter_count >= 1); - - /* - * Enumerate all IP addresses as known to winsock - */ - dwSize = getInterfaceList(env, interfaceInfo, sizeof(interfaceInfo)); - if (dwSize < 0) { - free_adapters(adapterList); - return NULL; - } - address_count = dwSize/sizeof(INTERFACE_INFO); - - /* minimum of loopback address */ - assert(address_count >= 1); - - /* - * Create an address list (addrList) from the INTERFACE_INFO - * structure. - */ - addrList = NULL; - for (i=0; iaddr.him4.sin_family = AF_INET; - addrP->addr.him4.sin_addr.s_addr = - ((SOCKADDR_IN *)&(interfaceInfo[i].iiAddress))->sin_addr.S_un.S_addr; - - addrP->next = addrList; - addrList = addrP; - } - - - /* - * First we assign the loopback address to the lo adapter. - * If lo is the only adapter then we are done. - */ - { - adapter *loopbackAdapter; - netaddr *addrP, *prevP; - - /* find the loopback adapter */ - loopbackAdapter = adapterList; - while (strcmp(loopbackAdapter->name, "lo") != 0) { - loopbackAdapter = loopbackAdapter->next; - } - assert(loopbackAdapter != NULL); - - /* find the loopback address and move it to the loopback adapter */ - addrP = addrList; - prevP = NULL; - while (addrP != NULL) { - if (addrP->addr.him4.sin_addr.s_addr == htonl(0x7f000001)) { - loopbackAdapter->addrs = addrP; - if (prevP == NULL) { - addrList = addrP->next; - } else { - prevP->next = addrP->next; - } - loopbackAdapter->addrs->next = NULL; - address_count--; - break; - } - prevP = addrP; - addrP = addrP->next; - } - } - - - /* - * Special case. If there's only one network adapter then all remaining - * IP addresses must be bound to that adapter. - */ - address_count = allocateRemaining(adapterList, address_count, addrList); - if (address_count == 0) { - return adapterList; - } - - /* - * Locate any static IP addresses defined in the registry. Validate the - * addresses against the SIO_GET_INTERFACE_LIST (as registry may have - * stale settings). If valid we move the addresses from addrList to - * the adapter. - */ - { - adapter *adapterP; - - adapterP = adapterList; - while (adapterP != NULL) { - int cnt; - netaddr *static_addrP; - - /* - * Skip loopback - */ - if (strcmp(adapterP->name, "lo") == 0) { - adapterP = adapterP->next; - continue; - } - - /* - * Get the static addresses for this adapter. - */ - cnt = getStaticAddresses(env, adapterP->reg_key, &static_addrP); - if (cnt < 0) { - free_netaddr(addrList); - free(adapterList); - return NULL; - } - - /* - * Validate against the SIO_GET_INTERFACE_LIST. - * (avoids stale registry settings). - */ - while (static_addrP != NULL) { - netaddr *addrP = addrList; - netaddr *prev = NULL; - - while (addrP != NULL) { - if (addrP->addr.him4.sin_addr.s_addr == static_addrP->addr.him4.sin_addr.s_addr) - break; - - prev = addrP; - addrP = addrP->next; - } - - /* - * if addrP is not NULL it means we have a match - * (ie: address from the registry is valid). - */ - if (addrP != NULL) { - /* remove from addrList */ - if (prev == NULL) { - addrList = addrP->next; - } else { - prev->next = addrP->next; - } - address_count--; - - /* add to adapter list */ - addrP->next = adapterP->addrs; - adapterP->addrs = addrP; - } - - /* - * On the next static address. - */ - static_addrP = static_addrP->next; - } - - /* not needed */ - free_netaddr(static_addrP); - - adapterP = adapterP->next; - } - } - - - /* - * Static addresses are now assigned so try again to allocate the - * remaining addresses. This will succeed if there is one adapter - * with a dynamically assigned address (DHCP or PPP). - */ - address_count = allocateRemaining(adapterList, address_count, addrList); - if (address_count == 0) { - return adapterList; - } - - /* - * Next we see if there is a DHCP address in the registry. If there is - * an address (and it's valid) then we know it must be bound to a LAN - * adapter. Additionally, when we enumerate the network adapters - * we made a crude determination on if an adapter is dial-up. Thus if - * we know there is one remaining LAN adapter without an IP address - * then the DHCP address must be bound to it. - */ - { - long dhcp_addr = getDHCPAddress(); /* returns in network order */ - if (dhcp_addr) { - netaddr *addrP, *prevP; - - /* - * Check that the DHCP address is valid - */ - addrP = addrList; - prevP = NULL; - while (addrP != NULL) { - if (addrP->addr.him4.sin_addr.s_addr == dhcp_addr) { - break; - } - prevP = addrP; - addrP = addrP->next; - } - - /* - * Address is valid - now check how many non-WAN adapters - * don't have addresses yet. - */ - if (addrP != NULL) { - adapter *adapterP = adapterList; - adapter *nobindingsP = NULL; - - while (adapterP != NULL) { - if (adapterP->addrs == NULL && !adapterP->is_wan_driver) { - if (nobindingsP == NULL) { - nobindingsP = adapterP; - } else { - /* already found one */ - nobindingsP = NULL; - break; - } - } - adapterP = adapterP->next; - } - - /* - * One non-WAN adapter remaining - */ - if (nobindingsP != NULL) { - nobindingsP->addrs = addrP; - - /* remove from addrList */ - if (prevP == NULL) { - addrList = addrP->next; - } else { - prevP->next = addrP->next; - } - addrP->next = NULL; - address_count--; - } - } - } - } - - /* - * Finally we do one final attempt to re-assign any remaining - * addresses. This catches the case of 2 adapters that have their - * addresses dynamically assigned (specifically NIC with DHCP, and - * Modem using RAS/PPP). - */ - address_count = allocateRemaining(adapterList, address_count, addrList); - if (address_count == 0) { - return adapterList; - } - - /* - * Free any unallocated addresses - */ - if (address_count > 0) { - free_netaddr(addrList); - } - - /* - * Return the adapter List. - */ - return adapterList; - -} - - -/* - * Enumerate network interfaces. If successful returns the number of - * network interfaces and netifPP returning a list of netif structures. - * Returns -1 with exception thrown if error. - */ -int enumInterfaces_win9x(JNIEnv *env, netif **netifPP) { - adapter *adapters, *adapterP; - int cnt = 0; - netif *netifP = NULL; - - /* enumerate network configuration */ - adapters = loadConfig(env); - if (adapters == NULL) { - return -1; - } - - /* - * loadConfig returns an adapter list - we need to create a corresponding - * list of netif structures. - */ - adapterP = adapters; - while (adapterP != NULL) { - netif *ifs = (netif *)calloc(1, sizeof(netif)); - - if (ifs == NULL) { - JNU_ThrowOutOfMemoryError(env, "heap allocation failure"); - free_adapters(adapters); - free_netif(netifP); - return -1; - } - - ifs->name = _strdup(adapterP->name); - ifs->displayName = _strdup(adapterP->displayName); - ifs->dwIndex = adapterP->index; - ifs->index = adapterP->index; - ifs->next = netifP; - netifP = ifs; - - if (ifs->name == NULL || ifs->displayName == NULL) { - JNU_ThrowOutOfMemoryError(env, "heap allocation failure"); - free_adapters(adapters); - free_netif(netifP); - return -1; - } - - cnt++; - adapterP = adapterP->next; - } - - /* - * Put the adapter list in the cache - */ - EnterCriticalSection(&cacheLock); - { - if (cachedAdapterList != NULL) { - free_adapters(cachedAdapterList); - } - cachedAdapterList = adapters; - } - LeaveCriticalSection(&cacheLock); - - /* - * Return the netif list - */ - *netifPP = netifP; - return cnt; -} - -/* - * Enumerate the addresses for the specified network interface. If successful - * returns the number of addresses bound to the interface and sets netaddrPP - * to be a list of netaddr structures. Returns -1 if error. - */ -int enumAddresses_win9x(JNIEnv *env, netif *netifP, netaddr **netaddrPP) { - - EnterCriticalSection(&cacheLock); - { - adapter *adapterP = cachedAdapterList; - while (adapterP != NULL) { - if (strcmp(adapterP->name, netifP->name) == 0) { - - netaddr *newlist = NULL; - netaddr *curr = adapterP->addrs; - int cnt = 0; - - while (curr != NULL) { - /* - * Clone the netaddr and add it to newlist. - */ - netaddr *tmp = (netaddr *)calloc(1, sizeof(netaddr)); - if (tmp == NULL) { - LeaveCriticalSection(&cacheLock); - JNU_ThrowOutOfMemoryError(env, "heap allocation failure"); - free_netaddr(newlist); - return -1; - } - tmp->addr = curr->addr; - tmp->next = newlist; - newlist = tmp; - - cnt++; - curr = curr->next; - } - - *netaddrPP = newlist; - LeaveCriticalSection(&cacheLock); - return cnt; - } - adapterP = adapterP->next; - } - } - LeaveCriticalSection(&cacheLock); - - *netaddrPP = NULL; - return 0; -} diff --git a/jdk/src/windows/native/java/net/NetworkInterface_winXP.c b/jdk/src/windows/native/java/net/NetworkInterface_winXP.c index 283be81b89a..ecfab4967db 100644 --- a/jdk/src/windows/native/java/net/NetworkInterface_winXP.c +++ b/jdk/src/windows/native/java/net/NetworkInterface_winXP.c @@ -43,14 +43,6 @@ extern int enumAddresses_win(JNIEnv *env, netif *netifP, netaddr **netaddrPP); int getAddrsFromAdapter(IP_ADAPTER_ADDRESSES *ptr, netaddr **netaddrPP); -/* IP helper library routines */ -int (PASCAL FAR *GetIpAddrTable_fn)(); -int (PASCAL FAR *GetIfTable_fn)(); -int (PASCAL FAR *GetFriendlyIfIndex_fn)(); -int (PASCAL FAR *GetAdaptersAddresses_fn)(); -int (PASCAL FAR *GetAdaptersInfo_fn)(); -int (PASCAL FAR *GetNumberOfInterfaces_fn)(); - #ifdef DEBUG void printnif (netif *nif) { #ifdef _WIN64 @@ -96,14 +88,14 @@ static int getAdapters (JNIEnv *env, IP_ADAPTER_ADDRESSES **adapters) { flags = GAA_FLAG_SKIP_DNS_SERVER; flags |= GAA_FLAG_SKIP_MULTICAST; flags |= GAA_FLAG_INCLUDE_PREFIX; - ret = (*GetAdaptersAddresses_fn) (AF_UNSPEC, flags, NULL, adapterInfo, &len); + ret = GetAdaptersAddresses(AF_UNSPEC, flags, NULL, adapterInfo, &len); if (ret == ERROR_BUFFER_OVERFLOW) { adapterInfo = (IP_ADAPTER_ADDRESSES *) realloc (adapterInfo, len); if (adapterInfo == 0) { return -1; } bufsize = len; - ret = (*GetAdaptersAddresses_fn) (AF_UNSPEC, flags, NULL, adapterInfo, &len); + ret = GetAdaptersAddresses(AF_UNSPEC, flags, NULL, adapterInfo, &len); } if (ret != ERROR_SUCCESS) { free (adapterInfo); @@ -133,7 +125,7 @@ IP_ADAPTER_ADDRESSES *getAdapter (JNIEnv *env, jint index) { flags = GAA_FLAG_SKIP_DNS_SERVER; flags |= GAA_FLAG_SKIP_MULTICAST; flags |= GAA_FLAG_INCLUDE_PREFIX; - val = (*GetAdaptersAddresses_fn) (AF_UNSPEC, flags, NULL, adapterInfo, &len); + val = GetAdaptersAddresses(AF_UNSPEC, flags, NULL, adapterInfo, &len); if (val == ERROR_BUFFER_OVERFLOW) { adapterInfo = (IP_ADAPTER_ADDRESSES *) realloc (adapterInfo, len); if (adapterInfo == 0) { @@ -141,7 +133,7 @@ IP_ADAPTER_ADDRESSES *getAdapter (JNIEnv *env, jint index) { return NULL; } bufsize = len; - val = (*GetAdaptersAddresses_fn) (AF_UNSPEC, flags, NULL, adapterInfo, &len); + val = GetAdaptersAddresses(AF_UNSPEC, flags, NULL, adapterInfo, &len); } if (val != ERROR_SUCCESS) { free (adapterInfo); @@ -182,7 +174,7 @@ int getAllInterfacesAndAddresses (JNIEnv *env, netif **netifPP) * as what previous JDK versions would return. */ - ret = enumInterfaces_win (env, netifPP); + ret = enumInterfaces(env, netifPP); if (ret == -1) { return -1; } else { @@ -221,7 +213,7 @@ int getAllInterfacesAndAddresses (JNIEnv *env, netif **netifPP) * (b) IPv6 information for IPv6 only interfaces (probably tunnels) * * For compatibility with previous releases we use the naming - * information gotten from enumInterfaces_win() for (a) entries + * information gotten from enumInterfaces() for (a) entries * However, the index numbers are taken from the new API. * * The procedure is to go through the list of adapters returned @@ -439,7 +431,8 @@ static jobject createNetworkInterfaceXP(JNIEnv *env, netif *ifs) netifObj = (*env)->NewObject(env, ni_class, ni_ctor); name = (*env)->NewStringUTF(env, ifs->name); if (ifs->dNameIsUnicode) { - displayName = (*env)->NewString(env, (PWCHAR)ifs->displayName, wcslen ((PWCHAR)ifs->displayName)); + displayName = (*env)->NewString(env, (PWCHAR)ifs->displayName, + (jsize)wcslen ((PWCHAR)ifs->displayName)); } else { displayName = (*env)->NewStringUTF(env, ifs->displayName); } diff --git a/jdk/src/windows/native/java/net/TwoStacksPlainSocketImpl.c b/jdk/src/windows/native/java/net/TwoStacksPlainSocketImpl.c index 71e2b2b124e..9c1ffee6c1a 100644 --- a/jdk/src/windows/native/java/net/TwoStacksPlainSocketImpl.c +++ b/jdk/src/windows/native/java/net/TwoStacksPlainSocketImpl.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 diff --git a/jdk/src/windows/native/java/net/net_util_md.c b/jdk/src/windows/native/java/net/net_util_md.c index ffaf52078aa..4cf522e786a 100644 --- a/jdk/src/windows/native/java/net/net_util_md.c +++ b/jdk/src/windows/native/java/net/net_util_md.c @@ -39,10 +39,6 @@ /* true if SO_RCVTIMEO is supported */ jboolean isRcvTimeoutSupported = JNI_TRUE; -LPFN_GETADDRINFO getaddrinfo_ptr = NULL; -LPFN_FREEADDRINFO freaddrinfo_ptr = NULL; -LPFN_GETNAMEINFO getnameinfo_ptr = NULL; - /* * Table of Windows Sockets errors, the specific exception we * throw for the error, and the error text. @@ -233,38 +229,15 @@ NET_GetFileDescriptorID(JNIEnv *env) jint IPv6_supported() { - HMODULE lib; - int fd = socket(AF_INET6, SOCK_STREAM, 0) ; - if (fd < 0) { + SOCKET s = socket(AF_INET6, SOCK_STREAM, 0) ; + if (s == INVALID_SOCKET) { return JNI_FALSE; } - closesocket (fd); - - if ((lib = LoadLibrary ("ws2_32.dll")) == NULL) { - return JNI_FALSE; - } - if ((getaddrinfo_ptr = (LPFN_GETADDRINFO)GetProcAddress (lib, "getaddrinfo")) == NULL) { - FreeLibrary (lib); - return JNI_FALSE; - } - if ((freeaddrinfo_ptr = (LPFN_FREEADDRINFO)GetProcAddress (lib, "freeaddrinfo")) == NULL) { - FreeLibrary (lib); - return JNI_FALSE; - } - if ((getnameinfo_ptr = (LPFN_GETNAMEINFO)GetProcAddress (lib, "getnameinfo")) == NULL) { - FreeLibrary (lib); - return JNI_FALSE; - } - FreeLibrary(lib); + closesocket(s); return JNI_TRUE; } -jboolean NET_addrtransAvailable() { - return (jboolean)(getaddrinfo_ptr != NULL); -} - - /* * Return the default TOS value */ @@ -664,7 +637,7 @@ NET_BindV6(struct ipv6bind* b) { if (family == AF_INET && (b->addr->him4.sin_addr.s_addr != INADDR_ANY)) { /* bind to v4 only */ int ret; - ret = NET_Bind (b->ipv4_fd, (struct sockaddr *)b->addr, + ret = NET_Bind ((int)b->ipv4_fd, (struct sockaddr *)b->addr, sizeof (struct sockaddr_in)); if (ret == SOCKET_ERROR) { CLOSE_SOCKETS_AND_RETURN; @@ -676,7 +649,7 @@ NET_BindV6(struct ipv6bind* b) { if (family == AF_INET6 && (!IN6_IS_ADDR_ANY(&b->addr->him6.sin6_addr))) { /* bind to v6 only */ int ret; - ret = NET_Bind (b->ipv6_fd, (struct sockaddr *)b->addr, + ret = NET_Bind ((int)b->ipv6_fd, (struct sockaddr *)b->addr, sizeof (struct SOCKADDR_IN6)); if (ret == SOCKET_ERROR) { CLOSE_SOCKETS_AND_RETURN; @@ -691,15 +664,15 @@ NET_BindV6(struct ipv6bind* b) { memset (&oaddr, 0, sizeof(oaddr)); if (family == AF_INET) { ofamily = AF_INET6; - fd = b->ipv4_fd; - ofd = b->ipv6_fd; + fd = (int)b->ipv4_fd; + ofd = (int)b->ipv6_fd; port = (u_short)GET_PORT (b->addr); IN6ADDR_SETANY (&oaddr.him6); oaddr.him6.sin6_port = port; } else { ofamily = AF_INET; - ofd = b->ipv4_fd; - fd = b->ipv6_fd; + ofd = (int)b->ipv4_fd; + fd = (int)b->ipv6_fd; port = (u_short)GET_PORT (b->addr); oaddr.him4.sin_family = AF_INET; oaddr.him4.sin_port = port; @@ -744,11 +717,11 @@ NET_BindV6(struct ipv6bind* b) { b->ipv6_fd = SOCKET_ERROR; /* create two new sockets */ - fd = socket (family, sotype, 0); + fd = (int)socket (family, sotype, 0); if (fd == SOCKET_ERROR) { CLOSE_SOCKETS_AND_RETURN; } - ofd = socket (ofamily, sotype, 0); + ofd = (int)socket (ofamily, sotype, 0); if (ofd == SOCKET_ERROR) { CLOSE_SOCKETS_AND_RETURN; } @@ -802,7 +775,7 @@ jint getDefaultIPv6Interface(JNIEnv *env, struct SOCKADDR_IN6 *target_addr) DWORD b; struct sockaddr_in6 route; SOCKET fd = socket(AF_INET6, SOCK_STREAM, 0); - if (fd < 0) { + if (fd == INVALID_SOCKET) { return 0; } @@ -810,7 +783,7 @@ jint getDefaultIPv6Interface(JNIEnv *env, struct SOCKADDR_IN6 *target_addr) (void *)target_addr, sizeof(struct sockaddr_in6), (void *)&route, sizeof(struct sockaddr_in6), &b, 0, 0); - if (ret < 0) { + if (ret == SOCKET_ERROR) { // error closesocket(fd); return 0; @@ -1001,10 +974,10 @@ NET_Wait(JNIEnv *env, jint fd, jint flags, jint timeout) } int NET_Socket (int domain, int type, int protocol) { - int sock; + SOCKET sock; sock = socket (domain, type, protocol); if (sock != INVALID_SOCKET) { SetHandleInformation((HANDLE)(uintptr_t)sock, HANDLE_FLAG_INHERIT, FALSE); } - return sock; + return (int)sock; } diff --git a/jdk/src/windows/native/java/net/net_util_md.h b/jdk/src/windows/native/java/net/net_util_md.h index b1a37e9b826..e764260bb24 100644 --- a/jdk/src/windows/native/java/net/net_util_md.h +++ b/jdk/src/windows/native/java/net/net_util_md.h @@ -209,10 +209,6 @@ int ); #endif -LPFN_GETADDRINFO getaddrinfo_ptr; -LPFN_FREEADDRINFO freeaddrinfo_ptr; -LPFN_GETNAMEINFO getnameinfo_ptr; - /* used to disable connection reset messages on Windows XP */ #ifndef SIO_UDP_CONNRESET #define SIO_UDP_CONNRESET _WSAIOW(IOC_VENDOR,12) @@ -302,8 +298,6 @@ void NET_ThrowByNameWithLastError(JNIEnv *env, const char *name, void NET_ThrowSocketException(JNIEnv *env, char* msg); -jboolean NET_addrtransAvailable(); - /* * differs from NET_Timeout() as follows: * diff --git a/jdk/src/windows/native/sun/java2d/d3d/D3DGraphicsDevice.cpp b/jdk/src/windows/native/sun/java2d/d3d/D3DGraphicsDevice.cpp index efb20c5d3a3..b20bd9c278d 100644 --- a/jdk/src/windows/native/sun/java2d/d3d/D3DGraphicsDevice.cpp +++ b/jdk/src/windows/native/sun/java2d/d3d/D3DGraphicsDevice.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, 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 diff --git a/jdk/src/windows/native/sun/java2d/windows/GDIBlitLoops.cpp b/jdk/src/windows/native/sun/java2d/windows/GDIBlitLoops.cpp index d3dc21dae14..5f888977713 100644 --- a/jdk/src/windows/native/sun/java2d/windows/GDIBlitLoops.cpp +++ b/jdk/src/windows/native/sun/java2d/windows/GDIBlitLoops.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 diff --git a/jdk/src/windows/native/sun/management/FileSystemImpl.c b/jdk/src/windows/native/sun/management/FileSystemImpl.c index 57abea98541..0747121d35a 100644 --- a/jdk/src/windows/native/sun/management/FileSystemImpl.c +++ b/jdk/src/windows/native/sun/management/FileSystemImpl.c @@ -36,45 +36,6 @@ */ #define ANY_ACCESS (FILE_GENERIC_READ | FILE_GENERIC_WRITE | FILE_GENERIC_EXECUTE) -/* - * Function prototypes for security functions - we can't statically - * link because these functions aren't on Windows 9x. - */ -typedef BOOL (WINAPI *GetFileSecurityFunc) - (LPCTSTR lpFileName, SECURITY_INFORMATION RequestedInformation, - PSECURITY_DESCRIPTOR pSecurityDescriptor, DWORD nLength, - LPDWORD lpnLengthNeeded); - -typedef BOOL (WINAPI *GetSecurityDescriptorOwnerFunc) - (PSECURITY_DESCRIPTOR pSecurityDescriptor, PSID *pOwner, - LPBOOL lpbOwnerDefaulted); - -typedef BOOL (WINAPI *GetSecurityDescriptorDaclFunc) - (PSECURITY_DESCRIPTOR pSecurityDescriptor, LPBOOL lpbDaclPresent, - PACL *pDacl, LPBOOL lpbDaclDefaulted); - -typedef BOOL (WINAPI *GetAclInformationFunc) - (PACL pAcl, LPVOID pAclInformation, DWORD nAclInformationLength, - ACL_INFORMATION_CLASS dwAclInformationClass); - -typedef BOOL (WINAPI *GetAceFunc) - (PACL pAcl, DWORD dwAceIndex, LPVOID *pAce); - -typedef BOOL (WINAPI *EqualSidFunc)(PSID pSid1, PSID pSid2); - - -/* Addresses of the security functions */ -static GetFileSecurityFunc GetFileSecurity_func; -static GetSecurityDescriptorOwnerFunc GetSecurityDescriptorOwner_func; -static GetSecurityDescriptorDaclFunc GetSecurityDescriptorDacl_func; -static GetAclInformationFunc GetAclInformation_func; -static GetAceFunc GetAce_func; -static EqualSidFunc EqualSid_func; - -/* True if this OS is NT kernel based (NT/2000/XP) */ -static int isNT; - - /* * Returns JNI_TRUE if the specified file is on a file system that supports * persistent ACLs (On NTFS file systems returns true, on FAT32 file systems @@ -165,7 +126,7 @@ static SECURITY_DESCRIPTOR* getFileSecurityDescriptor(JNIEnv* env, const char* p SECURITY_INFORMATION info = OWNER_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION; - (*GetFileSecurity_func)(path, info , 0, 0, &len); + GetFileSecurityA(path, info , 0, 0, &len); if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) { JNU_ThrowIOExceptionWithLastError(env, "GetFileSecurity failed"); return NULL; @@ -174,7 +135,7 @@ static SECURITY_DESCRIPTOR* getFileSecurityDescriptor(JNIEnv* env, const char* p if (sd == NULL) { JNU_ThrowOutOfMemoryError(env, 0); } else { - if (!(*GetFileSecurity_func)(path, info, sd, len, &len)) { + if (!(*GetFileSecurityA)(path, info, sd, len, &len)) { JNU_ThrowIOExceptionWithLastError(env, "GetFileSecurity failed"); free(sd); return NULL; @@ -191,7 +152,7 @@ static SID* getFileOwner(JNIEnv* env, SECURITY_DESCRIPTOR* sd) { SID* owner; BOOL defaulted; - if (!(*GetSecurityDescriptorOwner_func)(sd, &owner, &defaulted)) { + if (!GetSecurityDescriptorOwner(sd, &owner, &defaulted)) { JNU_ThrowIOExceptionWithLastError(env, "GetSecurityDescriptorOwner failed"); return NULL; } @@ -206,7 +167,7 @@ static ACL* getFileDACL(JNIEnv* env, SECURITY_DESCRIPTOR* sd) { ACL *acl; int defaulted, present; - if (!(*GetSecurityDescriptorDacl_func)(sd, &present, &acl, &defaulted)) { + if (!GetSecurityDescriptorDacl(sd, &present, &acl, &defaulted)) { JNU_ThrowIOExceptionWithLastError(env, "GetSecurityDescriptorDacl failed"); return NULL; } @@ -235,8 +196,8 @@ static jboolean isAccessUserOnly(JNIEnv* env, SID* owner, ACL* acl) { /* * Get the ACE count */ - if (!(*GetAclInformation_func)(acl, (void *) &acl_size_info, sizeof(acl_size_info), - AclSizeInformation)) { + if (!GetAclInformation(acl, (void *) &acl_size_info, sizeof(acl_size_info), + AclSizeInformation)) { JNU_ThrowIOExceptionWithLastError(env, "GetAclInformation failed"); return JNI_FALSE; } @@ -250,7 +211,7 @@ static jboolean isAccessUserOnly(JNIEnv* env, SID* owner, ACL* acl) { ACCESS_ALLOWED_ACE *access; SID* sid; - if (!(*GetAce_func)(acl, i, &ace)) { + if (!GetAce(acl, i, &ace)) { JNU_ThrowIOExceptionWithLastError(env, "GetAce failed"); return -1; } @@ -280,51 +241,7 @@ static jboolean isAccessUserOnly(JNIEnv* env, SID* owner, ACL* acl) { JNIEXPORT void JNICALL Java_sun_management_FileSystemImpl_init0 (JNIEnv *env, jclass ignored) { - OSVERSIONINFO ver; - HINSTANCE hInst; - - /* - * Get the OS version. If dwPlatformId is VER_PLATFORM_WIN32_NT - * it means we're running on a Windows NT, 2000, or XP machine. - */ - ver.dwOSVersionInfoSize = sizeof(ver); - GetVersionEx(&ver); - isNT = (ver.dwPlatformId == VER_PLATFORM_WIN32_NT); - if (!isNT) { - return; - } - - /* - * On NT/2000/XP we need the addresses of the security functions - */ - hInst = LoadLibrary("ADVAPI32.DLL"); - if (hInst == NULL) { - JNU_ThrowIOExceptionWithLastError(env, "Unable to load ADVAPI32.DLL"); - return; - } - - - GetFileSecurity_func = (GetFileSecurityFunc)GetProcAddress(hInst, "GetFileSecurityA"); - GetSecurityDescriptorOwner_func = - (GetSecurityDescriptorOwnerFunc)GetProcAddress(hInst, "GetSecurityDescriptorOwner"); - GetSecurityDescriptorDacl_func = - (GetSecurityDescriptorDaclFunc)GetProcAddress(hInst, "GetSecurityDescriptorDacl"); - GetAclInformation_func = - (GetAclInformationFunc)GetProcAddress(hInst, "GetAclInformation"); - GetAce_func = (GetAceFunc)GetProcAddress(hInst, "GetAce"); - EqualSid_func = (EqualSidFunc)GetProcAddress(hInst, "EqualSid"); - - if (GetFileSecurity_func == NULL || - GetSecurityDescriptorDacl_func == NULL || - GetSecurityDescriptorDacl_func == NULL || - GetAclInformation_func == NULL || - GetAce_func == NULL || - EqualSid_func == NULL) - { - JNU_ThrowIOExceptionWithLastError(env, - "Unable to get address of security functions"); - return; - } + /* nothing to do */ } /* @@ -339,10 +256,6 @@ JNIEXPORT jboolean JNICALL Java_sun_management_FileSystemImpl_isSecuritySupporte jboolean isCopy; const char* path; - if (!isNT) { - return JNI_FALSE; - } - path = JNU_GetStringPlatformChars(env, str, &isCopy); if (path != NULL) { res = isSecuritySupported(env, path); diff --git a/jdk/src/windows/native/sun/net/dns/ResolverConfigurationImpl.c b/jdk/src/windows/native/sun/net/dns/ResolverConfigurationImpl.c index 21a87afa25e..8885bdc7902 100644 --- a/jdk/src/windows/native/sun/net/dns/ResolverConfigurationImpl.c +++ b/jdk/src/windows/native/sun/net/dns/ResolverConfigurationImpl.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 @@ -30,6 +30,7 @@ #include #include #include +#include #include "jni_util.h" @@ -42,93 +43,17 @@ #define IS_SL_FOUND(sts) (sts & STS_SL_FOUND) #define IS_NS_FOUND(sts) (sts & STS_NS_FOUND) -/* - * Visual C++ SP3 (as required by J2SE 1.4.0) is missing some of - * the definitions required for the IP helper library routines that - * were added in Windows 98 & Windows 2000. - */ -#ifndef MAX_ADAPTER_NAME_LENGTH - -#define MAX_ADAPTER_ADDRESS_LENGTH 8 -#define MAX_ADAPTER_DESCRIPTION_LENGTH 128 -#define MAX_ADAPTER_NAME_LENGTH 256 -#define MAX_HOSTNAME_LEN 128 -#define MAX_DOMAIN_NAME_LEN 128 -#define MAX_SCOPE_ID_LEN 256 - -typedef struct { - char String[4 * 4]; -} IP_ADDRESS_STRING, *PIP_ADDRESS_STRING, IP_MASK_STRING, *PIP_MASK_STRING; - -typedef struct _IP_ADDR_STRING { - struct _IP_ADDR_STRING* Next; - IP_ADDRESS_STRING IpAddress; - IP_MASK_STRING IpMask; - DWORD Context; -} IP_ADDR_STRING, *PIP_ADDR_STRING; - -typedef struct _IP_ADAPTER_INFO { - struct _IP_ADAPTER_INFO* Next; - DWORD ComboIndex; - char AdapterName[MAX_ADAPTER_NAME_LENGTH + 4]; - char Description[MAX_ADAPTER_DESCRIPTION_LENGTH + 4]; - UINT AddressLength; - BYTE Address[MAX_ADAPTER_ADDRESS_LENGTH]; - DWORD Index; - UINT Type; - UINT DhcpEnabled; - PIP_ADDR_STRING CurrentIpAddress; - IP_ADDR_STRING IpAddressList; - IP_ADDR_STRING GatewayList; - IP_ADDR_STRING DhcpServer; - BOOL HaveWins; - IP_ADDR_STRING PrimaryWinsServer; - IP_ADDR_STRING SecondaryWinsServer; - time_t LeaseObtained; - time_t LeaseExpires; -} IP_ADAPTER_INFO, *PIP_ADAPTER_INFO; - -typedef struct _FIXED_INFO { - char HostName[MAX_HOSTNAME_LEN + 4] ; - char DomainName[MAX_DOMAIN_NAME_LEN + 4]; - PIP_ADDR_STRING CurrentDnsServer; - IP_ADDR_STRING DnsServerList; - UINT NodeType; - char ScopeId[MAX_SCOPE_ID_LEN + 4]; - UINT EnableRouting; - UINT EnableProxy; - UINT EnableDns; -} FIXED_INFO, *PFIXED_INFO; - -#endif - - -/* IP helper library routine used on 98/2000/XP */ -static int (PASCAL FAR *GetNetworkParams_fn)(); -static int (PASCAL FAR *GetAdaptersInfo_fn)(); -static int (PASCAL FAR *NotifyAddrChange_fn)(); - -/* - * Routines to obtain domain name and name servers are OS specific - */ -typedef int (*LoadConfig)(char *sl, char *ns); -static LoadConfig loadconfig_fn; - - -/* - * JNI ids - */ +/* JNI ids */ static jfieldID searchlistID; static jfieldID nameserversID; - /* * Utility routine to append s2 to s1 with a space delimiter. * strappend(s1="abc", "def") => "abc def" * strappend(s1="", "def") => "def */ void strappend(char *s1, char *s2) { - int len; + size_t len; if (s2[0] == '\0') /* nothing to append */ return; @@ -145,356 +70,6 @@ void strappend(char *s1, char *s2) { strcat(s1, s2); } - -/* - * Windows 95/98/ME for static TCP/IP configuration. - * - * Use registry approach for statically configured TCP/IP settings. - * Registry entries described in "MS TCP/IP and Windows 95 Networking" - * (Microsoft TechNet site). - */ -static int loadStaticConfig9x(char *sl, char *ns) { - LONG ret; - HANDLE hKey; - DWORD dwLen; - ULONG ulType; - char result[MAX_STR_LEN]; - int sts = STS_NO_CONFIG; - - ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, - "SYSTEM\\CurrentControlSet\\Services\\VxD\\MSTCP", - 0, - KEY_READ, - (PHKEY)&hKey); - if (ret == ERROR_SUCCESS) { - /* - * Determine suffix list - */ - result[0] = '\0'; - dwLen = sizeof(result); - ret = RegQueryValueEx(hKey, "SearchList", NULL, &ulType, - (LPBYTE)&result, &dwLen); - if ((ret != ERROR_SUCCESS) || (strlen(result) == 0)) { - dwLen = sizeof(result); - ret = RegQueryValueEx(hKey, "Domain", NULL, &ulType, - (LPBYTE)&result, &dwLen); - } - if (ret == ERROR_SUCCESS) { - assert(ulType == REG_SZ); - if (strlen(result) > 0) { - strappend(sl, result); - sts |= STS_SL_FOUND; - } - } - - /* - * Determine DNS name server(s) - */ - result[0] = '\0'; - dwLen = sizeof(result); - ret = RegQueryValueEx(hKey, "NameServer", NULL, &ulType, - (LPBYTE)&result, &dwLen); - if (ret == ERROR_SUCCESS) { - assert(ulType == REG_SZ); - if (strlen(result) > 0) { - strappend(ns, result); - sts |= STS_NS_FOUND; - } - } - - RegCloseKey(hKey); - } - - return sts; -} - - -/* - * Windows 95 - * - * Use registry approach for statically configured TCP/IP settings - * (see loadStaticConfig9x). - * - * If DHCP is used we examine the DHCP vendor specific extensions. We parse - * this based on format described in RFC 2132. - * - * If Dial-up Networking (DUN) is used then this TCP/IP settings cannot - * be determined here. - */ -static int loadConfig95(char *sl, char *ns) { - int sts; - int index; - LONG ret; - HANDLE hKey; - DWORD dwLen; - ULONG ulType; - char optionInfo[MAX_STR_LEN]; - - /* - * First try static configuration - if found we are done. - */ - sts = loadStaticConfig9x(sl, ns); - if (IS_SL_FOUND(sts) && IS_NS_FOUND(sts)) { - return sts; - } - - /* - * Try DHCP. DHCP information is stored in :- - * SYSTEM\CurrentControlSet\Services\VxD\DHCP\DhcpInfoXX - * - * The key is normally DhcpInfo00\OptionInfo (see Article Q255245 on - * Microsoft site). However when multiple cards are added & removed we - * have observed that it can be located in DhcpInfo{01,02, ...}. - * As a hack we search all DhcpInfoXX keys until we find OptionInfo. - */ - for (index=0; index<99; index++) { - char key[MAX_STR_LEN]; - sprintf(key, "SYSTEM\\CurrentControlSet\\Services\\VxD\\DHCP\\DhcpInfo%02d", - index); - - ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, key, 0, KEY_READ, (PHKEY)&hKey); - if (ret != ERROR_SUCCESS) { - /* end of DhcpInfoXX entries */ - break; - } - - dwLen = sizeof(optionInfo); - ret = RegQueryValueEx(hKey, "OptionInfo", NULL, &ulType, - (LPBYTE)optionInfo, &dwLen); - RegCloseKey(hKey); - - if (ret == ERROR_SUCCESS) { - /* OptionInfo found */ - break; - } - } - - /* - * If OptionInfo was found then we parse (as the 'options' field of - * the DHCP packet - see RFC 2132). - */ - if (ret == ERROR_SUCCESS) { - unsigned int pos = 0; - - while (pos < dwLen) { - int code, len; - - code = optionInfo[pos]; - pos++; - if (pos >= dwLen) break; /* bad packet */ - - len = optionInfo[pos]; - pos++; - - if (pos+len > dwLen) break; /* bad packet */ - - /* - * Domain Name - see RFC 2132 section 3.17 - */ - if (!IS_SL_FOUND(sts)) { - if (code == 0xf) { - char domain[MAX_STR_LEN]; - - assert(len < MAX_STR_LEN); - - memcpy((void *)domain, (void *)&(optionInfo[pos]), (size_t)len); - domain[len] = '\0'; - - strappend(sl, domain); - sts |= STS_SL_FOUND; - } - } - - /* - * DNS Option - see RFC 2132 section 3.8 - */ - if (!IS_NS_FOUND(sts)) { - if (code == 6 && (len % 4) == 0) { - while (len > 0 && pos < dwLen) { - char addr[32]; - sprintf(addr, "%d.%d.%d.%d", - (unsigned char)optionInfo[pos], - (unsigned char)optionInfo[pos+1], - (unsigned char)optionInfo[pos+2], - (unsigned char)optionInfo[pos+3]); - pos += 4; - len -= 4; - - /* - * Append to list of name servers - */ - strappend(ns, addr); - sts |= STS_NS_FOUND; - } - } - } - - /* - * Onto the next options - */ - pos += len; - } - } - - return sts; -} - -/* - * Windows 98/ME - * - * Use registry approach for statically configured TCP/IP settings - * (see loadStaticConfig9x). - * - * If configuration is not static then use IP helper library routine - * GetNetworkParams to obtain the network settings which include the - * domain name and the DNS servers. Note that we use the registry in - * preference to GetNetworkParams as the domain name is not populated - * by GetNetworkParams if the configuration is static. - */ -static int loadConfig98(char *sl, char *ns) { - FIXED_INFO *infoP; - ULONG size; - DWORD ret; - int sts; - - /* - * Use registry approach to pick up static configuation. - */ - sts = loadStaticConfig9x(sl, ns); - if (IS_SL_FOUND(sts) && IS_NS_FOUND(sts)) { - return sts; - } - - /* - * Use IP helper library to obtain dynamic configuration (DHCP and - * DUN). - */ - size = sizeof(FIXED_INFO); - infoP = (FIXED_INFO *)malloc(size); - if (infoP) { - ret = (*GetNetworkParams_fn)(infoP, &size); - if (ret == ERROR_BUFFER_OVERFLOW) { - infoP = (FIXED_INFO *)realloc(infoP, size); - if (infoP != NULL) - ret = (*GetNetworkParams_fn)(infoP, &size); - } - } - if (infoP == NULL) { - return sts; - } - if (ret == ERROR_SUCCESS) { - /* - * Use DomainName if search-list not specified. - */ - if (!IS_SL_FOUND(sts)) { - strappend(sl, infoP->DomainName); - sts |= STS_SL_FOUND; - } - - /* - * Use DnsServerList if not statically configured. - */ - if (!IS_NS_FOUND(sts)) { - PIP_ADDR_STRING dnsP = &(infoP->DnsServerList); - do { - strappend(ns, (char *)&(dnsP->IpAddress)); - dnsP = dnsP->Next; - } while (dnsP != NULL); - sts |= STS_NS_FOUND; - } - } - - free(infoP); - - return sts; -} - - -/* - * Windows NT - * - * Use registry approach based on settings described in "TCP/IP and - * NBT Configuration Parameters for Windows" - Article Q12062 on - * Microsoft site. - * - * All non-RAS TCP/IP settings are stored in HKEY_LOCAL_MACHINE in - * the SYSTEM\CurrentControlSet\Services\Tcpip\Parameters key. - * - * If SearchList if not provided then return Domain or DhcpDomain. - * If Domain is specified it overrides DhcpDomain even if DHCP is - * enabled. - * - * DNS name servers based on NameServer or DhcpNameServer settings. - * NameServer overrides DhcpNameServer even if DHCP is enabled. - */ -static int loadConfigNT(char *sl, char *ns) { - LONG ret; - HANDLE hKey; - DWORD dwLen; - ULONG ulType; - char result[MAX_STR_LEN]; - int sts = STS_NO_CONFIG; - - ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, - "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters", - 0, - KEY_READ, - (PHKEY)&hKey); - if (ret != ERROR_SUCCESS) { - return sts; - } - - /* - * Determine search list - */ - result[0] = '\0'; - dwLen = sizeof(result); - ret = RegQueryValueEx(hKey, "SearchList", NULL, &ulType, - (LPBYTE)&result, &dwLen); - if ((ret != ERROR_SUCCESS) || (strlen(result) == 0)) { - dwLen = sizeof(result); - ret = RegQueryValueEx(hKey, "Domain", NULL, &ulType, - (LPBYTE)&result, &dwLen); - if ((ret != ERROR_SUCCESS) || (strlen(result) == 0)) { - dwLen = sizeof(result); - ret = RegQueryValueEx(hKey, "DhcpDomain", NULL, &ulType, - (LPBYTE)&result, &dwLen); - } - } - if (ret == ERROR_SUCCESS) { - assert(ulType == REG_SZ); - if (strlen(result) > 0) { - strappend(sl, result); - sts |= STS_SL_FOUND; - } - } - - /* - * Determine DNS name server(s) - */ - result[0] = '\0'; - dwLen = sizeof(result); - ret = RegQueryValueEx(hKey, "NameServer", NULL, &ulType, - (LPBYTE)&result, &dwLen); - if ((ret != ERROR_SUCCESS) || (strlen(result) == 0)) { - dwLen = sizeof(result); - ret = RegQueryValueEx(hKey, "DhcpNameServer", NULL, &ulType, - (LPBYTE)&result, &dwLen); - } - if (ret == ERROR_SUCCESS) { - assert(ulType == REG_SZ); - if (strlen(result) > 0) { - strappend(ns, result); - sts |= STS_NS_FOUND; - } - } - - RegCloseKey(hKey); - - return sts; -} - - /* * Windows 2000/XP * @@ -510,7 +85,7 @@ static int loadConfigNT(char *sl, char *ns) { * names of each adapter and then query the corresponding registry * settings to obtain NameServer/DhcpNameServer and Domain/DhcpDomain. */ -static int loadConfig2000(char *sl, char *ns) { +static int loadConfig(char *sl, char *ns) { IP_ADAPTER_INFO *adapterP; ULONG size; DWORD ret; @@ -547,10 +122,10 @@ static int loadConfig2000(char *sl, char *ns) { */ size = sizeof(IP_ADAPTER_INFO); adapterP = (IP_ADAPTER_INFO *)malloc(size); - ret = (*GetAdaptersInfo_fn)(adapterP, &size); + ret = GetAdaptersInfo(adapterP, &size); if (ret == ERROR_BUFFER_OVERFLOW) { adapterP = (IP_ADAPTER_INFO *)realloc(adapterP, size); - ret = (*GetAdaptersInfo_fn)(adapterP, &size); + ret = GetAdaptersInfo(adapterP, &size); } /* @@ -648,87 +223,15 @@ static int loadConfig2000(char *sl, char *ns) { /* - * Initialization :- - * - * 1. Based on OS version set the function pointer for OS specific load - * configuration routine. - * - * 2. On 98/2000/XP load the IP helper library. - * - * 3. Initialize JNI field IDs. - * + * Initialize JNI field IDs. */ JNIEXPORT void JNICALL Java_sun_net_dns_ResolverConfigurationImpl_init0(JNIEnv *env, jclass cls) { - OSVERSIONINFO ver; - jboolean loadHelperLibrary = JNI_TRUE; - - /* - * First we figure out which OS is running - */ - ver.dwOSVersionInfoSize = sizeof(ver); - GetVersionEx(&ver); - - if (ver.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) { - if ((ver.dwMajorVersion == 4) && (ver.dwMinorVersion == 0)) { - /* - * Windows 95 - */ - loadHelperLibrary = JNI_FALSE; - loadconfig_fn = loadConfig95; - } else { - /* - * Windows 98/ME - */ - loadHelperLibrary = JNI_TRUE; - loadconfig_fn = loadConfig98; - } - } - - if (ver.dwPlatformId == VER_PLATFORM_WIN32_NT) { - if (ver.dwMajorVersion <= 4) { - /* - * Windows NT - */ - loadHelperLibrary = JNI_FALSE; - loadconfig_fn = loadConfigNT; - } else { - /* - * Windows 2000/XP - */ - loadHelperLibrary = JNI_TRUE; - loadconfig_fn = loadConfig2000; - } - } - - /* - * On 98/2000/XP we load the IP Helper Library. - */ - if (loadHelperLibrary) { - HANDLE h = LoadLibrary("iphlpapi.dll"); - - if (h != NULL) { - GetNetworkParams_fn = (int (PASCAL FAR *)())GetProcAddress(h, "GetNetworkParams"); - GetAdaptersInfo_fn = (int (PASCAL FAR *)())GetProcAddress(h, "GetAdaptersInfo"); - - NotifyAddrChange_fn = (int (PASCAL FAR *)())GetProcAddress(h, "NotifyAddrChange"); - } - - if (GetNetworkParams_fn == NULL || GetAdaptersInfo_fn == NULL) { - JNU_ThrowByName(env, "java/lang/UnsatisfiedLinkError", "iphlpapi.dll"); - return; - } - } - - /* - * Get JNI ids - */ searchlistID = (*env)->GetStaticFieldID(env, cls, "os_searchlist", "Ljava/lang/String;"); nameserversID = (*env)->GetStaticFieldID(env, cls, "os_nameservers", "Ljava/lang/String;"); - } /* @@ -746,8 +249,7 @@ Java_sun_net_dns_ResolverConfigurationImpl_loadDNSconfig0(JNIEnv *env, jclass cl searchlist[0] = '\0'; nameservers[0] = '\0'; - /* call OS specific routine */ - (void)(*loadconfig_fn)(searchlist, nameservers); + loadConfig(searchlist, nameservers); /* * Populate static fields in sun.net.DefaultResolverConfiguration @@ -772,17 +274,15 @@ Java_sun_net_dns_ResolverConfigurationImpl_notifyAddrChange0(JNIEnv *env, jclass HANDLE h; DWORD rc, xfer; - if (NotifyAddrChange_fn != NULL) { - ol.hEvent = (HANDLE)0; - rc = (*NotifyAddrChange_fn)(&h, &ol); - if (rc == ERROR_IO_PENDING) { - rc = GetOverlappedResult(h, &ol, &xfer, TRUE); - if (rc != 0) { - return 0; /* address changed */ - } + ol.hEvent = (HANDLE)0; + rc = NotifyAddrChange(&h, &ol); + if (rc == ERROR_IO_PENDING) { + rc = GetOverlappedResult(h, &ol, &xfer, TRUE); + if (rc != 0) { + return 0; /* address changed */ } } - /* NotifyAddrChange not support or error */ + /* error */ return -1; } diff --git a/jdk/src/windows/native/sun/net/www/protocol/http/ntlm/NTLMAuthSequence.c b/jdk/src/windows/native/sun/net/www/protocol/http/ntlm/NTLMAuthSequence.c index fca399d3206..86af0a877a1 100644 --- a/jdk/src/windows/native/sun/net/www/protocol/http/ntlm/NTLMAuthSequence.c +++ b/jdk/src/windows/native/sun/net/www/protocol/http/ntlm/NTLMAuthSequence.c @@ -41,18 +41,6 @@ #define SECURITY_WIN32 #include "sspi.h" - -/* - * OS calls loaded from DLL on intialization - */ - -static FREE_CREDENTIALS_HANDLE_FN pFreeCredentialsHandle; -static ACQUIRE_CREDENTIALS_HANDLE_FN pAcquireCredentialsHandle; -static FREE_CONTEXT_BUFFER_FN pFreeContextBuffer; -static INITIALIZE_SECURITY_CONTEXT_FN pInitializeSecurityContext; -static COMPLETE_AUTH_TOKEN_FN pCompleteAuthToken; -static DELETE_SECURITY_CONTEXT_FN pDeleteSecurityContext; - static void endSequence (PCredHandle credHand, PCtxtHandle ctxHandle); static jfieldID ntlm_ctxHandleID; @@ -63,48 +51,8 @@ static HINSTANCE lib = NULL; JNIEXPORT void JNICALL Java_sun_net_www_protocol_http_ntlm_NTLMAuthSequence_initFirst (JNIEnv *env, jclass clazz) { - OSVERSIONINFO version; - UCHAR libName[MAX_PATH]; - ntlm_ctxHandleID = (*env)->GetFieldID(env, clazz, "ctxHandle", "J"); ntlm_crdHandleID = (*env)->GetFieldID(env, clazz, "crdHandle", "J"); - - version.dwOSVersionInfoSize = sizeof (OSVERSIONINFO); - GetVersionEx (&version); - - if (version.dwPlatformId == VER_PLATFORM_WIN32_NT) { - strcpy (libName, "security.dll" ); - } - else if (version.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) { - strcpy (libName, "secur32.dll" ); - } - - lib = LoadLibrary (libName); - - pFreeCredentialsHandle - = (FREE_CREDENTIALS_HANDLE_FN) GetProcAddress( - lib, "FreeCredentialsHandle" ); - - pAcquireCredentialsHandle - = (ACQUIRE_CREDENTIALS_HANDLE_FN) GetProcAddress( - lib, "AcquireCredentialsHandleA" ); - - pFreeContextBuffer - = (FREE_CONTEXT_BUFFER_FN) GetProcAddress( - lib, "FreeContextBuffer" ); - - pInitializeSecurityContext - = (INITIALIZE_SECURITY_CONTEXT_FN) GetProcAddress( - lib, "InitializeSecurityContextA" ); - - pCompleteAuthToken - = (COMPLETE_AUTH_TOKEN_FN) GetProcAddress( - lib, "CompleteAuthToken" ); - - pDeleteSecurityContext - = (DELETE_SECURITY_CONTEXT_FN) GetProcAddress( - lib, "DeleteSecurityContext" ); - } /* @@ -158,17 +106,17 @@ JNIEXPORT jlong JNICALL Java_sun_net_www_protocol_http_ntlm_NTLMAuthSequence_get if ( pUser != NULL ) { AuthId.User = (unsigned char *) pUser; - AuthId.UserLength = strlen( pUser ); + AuthId.UserLength = (unsigned long) strlen( pUser ); } if ( pPassword != NULL ) { AuthId.Password = (unsigned char *) pPassword; - AuthId.PasswordLength = strlen( pPassword ); + AuthId.PasswordLength = (unsigned long) strlen( pPassword ); } if ( pDomain != NULL ) { AuthId.Domain = (unsigned char *) pDomain; - AuthId.DomainLength = strlen( pDomain ); + AuthId.DomainLength = (unsigned long) strlen( pDomain ); } AuthId.Flags = SEC_WINNT_AUTH_IDENTITY_ANSI; @@ -176,7 +124,7 @@ JNIEXPORT jlong JNICALL Java_sun_net_www_protocol_http_ntlm_NTLMAuthSequence_get pAuthId = NULL; } - ss = pAcquireCredentialsHandle( + ss = AcquireCredentialsHandleA( NULL, "NTLM", SECPKG_CRED_OUTBOUND, NULL, pAuthId, NULL, NULL, pCred, <ime @@ -258,7 +206,7 @@ JNIEXPORT jbyteArray JNICALL Java_sun_net_www_protocol_http_ntlm_NTLMAuthSequenc * need to send the out buffer if there are bytes to send */ - ss = pInitializeSecurityContext( + ss = InitializeSecurityContextA( pCred, pCtx, NULL, 0, 0, SECURITY_NATIVE_DREP, lastToken ? &InBuffDesc : NULL, 0, newContext, &OutBuffDesc, &ContextAttributes, <ime @@ -274,7 +222,7 @@ JNIEXPORT jbyteArray JNICALL Java_sun_net_www_protocol_http_ntlm_NTLMAuthSequenc } if ((ss == SEC_I_COMPLETE_NEEDED) || (ss == SEC_I_COMPLETE_AND_CONTINUE) ) { - ss = pCompleteAuthToken( pCtx, &OutBuffDesc ); + ss = CompleteAuthToken( pCtx, &OutBuffDesc ); if (ss < 0) { endSequence (pCred, pCtx); @@ -300,12 +248,12 @@ JNIEXPORT jbyteArray JNICALL Java_sun_net_www_protocol_http_ntlm_NTLMAuthSequenc static void endSequence (PCredHandle credHand, PCtxtHandle ctxHandle) { if (credHand != 0) { - pFreeCredentialsHandle (credHand); - free (credHand); + FreeCredentialsHandle(credHand); + free(credHand); } if (ctxHandle != 0) { - pDeleteSecurityContext(ctxHandle); - free (ctxHandle); + DeleteSecurityContext(ctxHandle); + free(ctxHandle); } } diff --git a/jdk/src/windows/native/sun/nio/ch/Iocp.c b/jdk/src/windows/native/sun/nio/ch/Iocp.c index 773a870ca2b..8f87a8937f7 100644 --- a/jdk/src/windows/native/sun/nio/ch/Iocp.c +++ b/jdk/src/windows/native/sun/nio/ch/Iocp.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/windows/native/sun/nio/ch/Net.c b/jdk/src/windows/native/sun/nio/ch/Net.c index 75c9ba4ce66..55c03a28b5b 100644 --- a/jdk/src/windows/native/sun/nio/ch/Net.c +++ b/jdk/src/windows/native/sun/nio/ch/Net.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2011, 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 diff --git a/jdk/src/windows/native/sun/nio/fs/RegistryFileTypeDetector.c b/jdk/src/windows/native/sun/nio/fs/RegistryFileTypeDetector.c index 6d082271015..946fc46601d 100644 --- a/jdk/src/windows/native/sun/nio/fs/RegistryFileTypeDetector.c +++ b/jdk/src/windows/native/sun/nio/fs/RegistryFileTypeDetector.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/src/windows/native/sun/nio/fs/WindowsNativeDispatcher.c b/jdk/src/windows/native/sun/nio/fs/WindowsNativeDispatcher.c index d9d8a9d7cb2..5faf34d2458 100644 --- a/jdk/src/windows/native/sun/nio/fs/WindowsNativeDispatcher.c +++ b/jdk/src/windows/native/sun/nio/fs/WindowsNativeDispatcher.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 @@ -24,7 +24,7 @@ */ #ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x0500 +#define _WIN32_WINNT 0x0501 #endif #include @@ -36,6 +36,7 @@ #include #include #include +#include #include "jni.h" #include "jni_util.h" @@ -77,40 +78,20 @@ static jfieldID backupResult_context; /** - * Win32 APIs not defined in Visual Studio 2003 header files + * Win32 APIs not available in Windows XP */ - -typedef enum { - FindStreamInfoStandard -} MY_STREAM_INFO_LEVELS; - -typedef struct _MY_WIN32_FIND_STREAM_DATA { - LARGE_INTEGER StreamSize; - WCHAR cStreamName[MAX_PATH + 36]; -} MY_WIN32_FIND_STREAM_DATA; - -typedef HANDLE (WINAPI* FindFirstStream_Proc)(LPCWSTR, MY_STREAM_INFO_LEVELS, LPVOID, DWORD); +typedef HANDLE (WINAPI* FindFirstStream_Proc)(LPCWSTR, STREAM_INFO_LEVELS, LPVOID, DWORD); typedef BOOL (WINAPI* FindNextStream_Proc)(HANDLE, LPVOID); typedef BOOLEAN (WINAPI* CreateSymbolicLinkProc) (LPCWSTR, LPCWSTR, DWORD); -typedef BOOL (WINAPI* CreateHardLinkProc) (LPCWSTR, LPCWSTR, LPSECURITY_ATTRIBUTES); typedef BOOL (WINAPI* GetFinalPathNameByHandleProc) (HANDLE, LPWSTR, DWORD, DWORD); -typedef BOOL (WINAPI* ConvertSidToStringSidProc) (PSID, LPWSTR*); -typedef BOOL (WINAPI* ConvertStringSidToSidProc) (LPWSTR, PSID*); -typedef DWORD (WINAPI* GetLengthSidProc) (PSID); - static FindFirstStream_Proc FindFirstStream_func; static FindNextStream_Proc FindNextStream_func; static CreateSymbolicLinkProc CreateSymbolicLink_func; -static CreateHardLinkProc CreateHardLink_func; static GetFinalPathNameByHandleProc GetFinalPathNameByHandle_func; -static ConvertSidToStringSidProc ConvertSidToStringSid_func; -static ConvertStringSidToSidProc ConvertStringSidToSid_func; -static GetLengthSidProc GetLengthSid_func; - static void throwWindowsException(JNIEnv* env, DWORD lastError) { jobject x = JNU_NewObjectByName(env, "sun/nio/fs/WindowsException", "(I)V", lastError); @@ -190,33 +171,23 @@ Java_sun_nio_fs_WindowsNativeDispatcher_initIDs(JNIEnv* env, jclass this) backupResult_bytesTransferred = (*env)->GetFieldID(env, clazz, "bytesTransferred", "I"); backupResult_context = (*env)->GetFieldID(env, clazz, "context", "J"); - - h = LoadLibrary("kernel32"); - if (h != INVALID_HANDLE_VALUE) { + // get handle to kernel32 + if (GetModuleHandleExW((GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | + GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT), + (LPCWSTR)&CreateFileW, &h) != 0) + { + // requires Windows Server 2003 or newer FindFirstStream_func = (FindFirstStream_Proc)GetProcAddress(h, "FindFirstStreamW"); FindNextStream_func = (FindNextStream_Proc)GetProcAddress(h, "FindNextStreamW"); + + // requires Windows Vista or newer CreateSymbolicLink_func = (CreateSymbolicLinkProc)GetProcAddress(h, "CreateSymbolicLinkW"); - CreateHardLink_func = - (CreateHardLinkProc)GetProcAddress(h, "CreateHardLinkW"); GetFinalPathNameByHandle_func = (GetFinalPathNameByHandleProc)GetProcAddress(h, "GetFinalPathNameByHandleW"); - FreeLibrary(h); } - - h = LoadLibrary("advapi32"); - if (h != INVALID_HANDLE_VALUE) { - ConvertSidToStringSid_func = - (ConvertSidToStringSidProc)GetProcAddress(h, "ConvertSidToStringSidW"); - ConvertStringSidToSid_func = - (ConvertStringSidToSidProc)GetProcAddress(h, "ConvertStringSidToSidW"); - GetLengthSid_func = - (GetLengthSidProc)GetProcAddress(h, "GetLengthSid"); - FreeLibrary(h); - } - } JNIEXPORT jstring JNICALL @@ -413,7 +384,7 @@ JNIEXPORT void JNICALL Java_sun_nio_fs_WindowsNativeDispatcher_FindFirstStream0(JNIEnv* env, jclass this, jlong address, jobject obj) { - MY_WIN32_FIND_STREAM_DATA data; + WIN32_FIND_STREAM_DATA data; LPCWSTR lpFileName = jlong_to_ptr(address); HANDLE handle; @@ -443,7 +414,7 @@ JNIEXPORT jstring JNICALL Java_sun_nio_fs_WindowsNativeDispatcher_FindNextStream(JNIEnv* env, jclass this, jlong handle) { - MY_WIN32_FIND_STREAM_DATA data; + WIN32_FIND_STREAM_DATA data; HANDLE h = (HANDLE)jlong_to_ptr(handle); if (FindNextStream_func == NULL) { @@ -909,12 +880,7 @@ Java_sun_nio_fs_WindowsNativeDispatcher_GetLengthSid(JNIEnv* env, jclass this, jlong address) { PSID sid = jlong_to_ptr(address); - - if (GetLengthSid_func == NULL) { - JNU_ThrowInternalError(env, "Should not get here"); - return 0; - } - return (jint)(*GetLengthSid_func)(sid); + return (jint)GetLengthSid(sid); } @@ -924,13 +890,7 @@ Java_sun_nio_fs_WindowsNativeDispatcher_ConvertSidToStringSid(JNIEnv* env, { PSID sid = jlong_to_ptr(address); LPWSTR string; - - if (ConvertSidToStringSid_func == NULL) { - JNU_ThrowInternalError(env, "Should not get here"); - return NULL; - } - - if ((*ConvertSidToStringSid_func)(sid, &string) == 0) { + if (ConvertSidToStringSidW(sid, &string) == 0) { throwWindowsException(env, GetLastError()); return NULL; } else { @@ -947,15 +907,8 @@ Java_sun_nio_fs_WindowsNativeDispatcher_ConvertStringSidToSid0(JNIEnv* env, { LPWSTR lpStringSid = jlong_to_ptr(address); PSID pSid; - - if (ConvertStringSidToSid_func == NULL) { - JNU_ThrowInternalError(env, "Should not get here"); - return (jlong)0; - } - - if ((*ConvertStringSidToSid_func)(lpStringSid, &pSid) == 0) + if (ConvertStringSidToSidW(lpStringSid, &pSid) == 0) throwWindowsException(env, GetLastError()); - return ptr_to_jlong(pSid); } @@ -1137,11 +1090,7 @@ Java_sun_nio_fs_WindowsNativeDispatcher_CreateHardLink0(JNIEnv* env, LPCWSTR newFile = jlong_to_ptr(newFileAddress); LPCWSTR existingFile = jlong_to_ptr(existingFileAddress); - if (CreateHardLink_func == NULL) { - JNU_ThrowInternalError(env, "Should not get here"); - return; - } - if ((*CreateHardLink_func)(newFile, existingFile, NULL) == 0) + if (CreateHardLinkW(newFile, existingFile, NULL) == 0) throwWindowsException(env, GetLastError()); } diff --git a/jdk/src/windows/native/sun/security/provider/WinCAPISeedGenerator.c b/jdk/src/windows/native/sun/security/provider/WinCAPISeedGenerator.c index d9d91080ddb..968650da591 100644 --- a/jdk/src/windows/native/sun/security/provider/WinCAPISeedGenerator.c +++ b/jdk/src/windows/native/sun/security/provider/WinCAPISeedGenerator.c @@ -33,11 +33,6 @@ #include #include "sun_security_provider_NativeSeedGenerator.h" -/* Typedefs for runtime linking. */ -typedef BOOL (WINAPI *CryptAcquireContextType)(HCRYPTPROV*, LPCTSTR, LPCTSTR, DWORD, DWORD); -typedef BOOL (WINAPI *CryptGenRandomType)(HCRYPTPROV, DWORD, BYTE*); -typedef BOOL (WINAPI *CryptReleaseContextType)(HCRYPTPROV, DWORD); - /* * Get a random seed from the MS CryptoAPI. Return true if successful, false * otherwise. @@ -49,48 +44,27 @@ typedef BOOL (WINAPI *CryptReleaseContextType)(HCRYPTPROV, DWORD); JNIEXPORT jboolean JNICALL Java_sun_security_provider_NativeSeedGenerator_nativeGenerateSeed (JNIEnv *env, jclass clazz, jbyteArray randArray) { - HMODULE lib; - CryptAcquireContextType acquireContext; - CryptGenRandomType genRandom; - CryptReleaseContextType releaseContext; - HCRYPTPROV hCryptProv; jboolean result = JNI_FALSE; jsize numBytes; jbyte* randBytes; - lib = LoadLibrary("ADVAPI32.DLL"); - if (lib == NULL) { - return result; - } - - acquireContext = (CryptAcquireContextType)GetProcAddress(lib, "CryptAcquireContextA"); - genRandom = (CryptGenRandomType)GetProcAddress(lib, "CryptGenRandom"); - releaseContext = (CryptReleaseContextType)GetProcAddress(lib, "CryptReleaseContext"); - - if (acquireContext == NULL || genRandom == NULL || releaseContext == NULL) { - FreeLibrary(lib); - return result; - } - - if (acquireContext(&hCryptProv, "J2SE", NULL, PROV_RSA_FULL, 0) == FALSE) { + if (CryptAcquireContextA(&hCryptProv, "J2SE", NULL, PROV_RSA_FULL, 0) == FALSE) { /* If CSP context hasn't been created, create one. */ - if (acquireContext(&hCryptProv, "J2SE", NULL, PROV_RSA_FULL, + if (CryptAcquireContextA(&hCryptProv, "J2SE", NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET) == FALSE) { - FreeLibrary(lib); return result; } } numBytes = (*env)->GetArrayLength(env, randArray); randBytes = (*env)->GetByteArrayElements(env, randArray, NULL); - if (genRandom(hCryptProv, numBytes, randBytes)) { + if (CryptGenRandom(hCryptProv, numBytes, randBytes)) { result = JNI_TRUE; } (*env)->ReleaseByteArrayElements(env, randArray, randBytes, 0); - releaseContext(hCryptProv, 0); - FreeLibrary(lib); + CryptReleaseContext(hCryptProv, 0); return result; } diff --git a/jdk/src/windows/native/sun/windows/Devices.h b/jdk/src/windows/native/sun/windows/Devices.h index 748ded20a3f..bbd8a497aaf 100644 --- a/jdk/src/windows/native/sun/windows/Devices.h +++ b/jdk/src/windows/native/sun/windows/Devices.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2010, 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 diff --git a/jdk/src/windows/native/sun/windows/awt_Debug.cpp b/jdk/src/windows/native/sun/windows/awt_Debug.cpp index 42e099bb599..4be1b5d9165 100644 --- a/jdk/src/windows/native/sun/windows/awt_Debug.cpp +++ b/jdk/src/windows/native/sun/windows/awt_Debug.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2010, 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 diff --git a/jdk/src/windows/native/sun/windows/awt_Debug.h b/jdk/src/windows/native/sun/windows/awt_Debug.h index 729e652621a..9f7c0c08a8b 100644 --- a/jdk/src/windows/native/sun/windows/awt_Debug.h +++ b/jdk/src/windows/native/sun/windows/awt_Debug.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2010, 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 diff --git a/jdk/src/windows/native/sun/windows/awt_Dialog.h b/jdk/src/windows/native/sun/windows/awt_Dialog.h index 15918a6fd88..32199fdf266 100644 --- a/jdk/src/windows/native/sun/windows/awt_Dialog.h +++ b/jdk/src/windows/native/sun/windows/awt_Dialog.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2010, 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 diff --git a/jdk/src/windows/native/sun/windows/awt_Frame.cpp b/jdk/src/windows/native/sun/windows/awt_Frame.cpp index ca874cac841..4d3374e5734 100644 --- a/jdk/src/windows/native/sun/windows/awt_Frame.cpp +++ b/jdk/src/windows/native/sun/windows/awt_Frame.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2011, 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 diff --git a/jdk/src/windows/native/sun/windows/awt_Frame.h b/jdk/src/windows/native/sun/windows/awt_Frame.h index 2949ac92924..1adca139bf9 100644 --- a/jdk/src/windows/native/sun/windows/awt_Frame.h +++ b/jdk/src/windows/native/sun/windows/awt_Frame.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2011, 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 diff --git a/jdk/src/windows/native/sun/windows/awt_PrintJob.cpp b/jdk/src/windows/native/sun/windows/awt_PrintJob.cpp index 1deff60252a..43c03fd5490 100644 --- a/jdk/src/windows/native/sun/windows/awt_PrintJob.cpp +++ b/jdk/src/windows/native/sun/windows/awt_PrintJob.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2011, 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 diff --git a/jdk/src/windows/native/sun/windows/awt_TextArea.h b/jdk/src/windows/native/sun/windows/awt_TextArea.h index 19a44e7681b..8a762924203 100644 --- a/jdk/src/windows/native/sun/windows/awt_TextArea.h +++ b/jdk/src/windows/native/sun/windows/awt_TextArea.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2010, 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 diff --git a/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp b/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp index cab78049f23..ca2bae8325a 100644 --- a/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp +++ b/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2011, 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 @@ -528,9 +528,6 @@ BOOL AwtToolkit::Dispose() { tk.m_isActive = FALSE; - awt_dnd_uninitialize(); - awt_clipboard_uninitialize((JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2)); - // dispose Direct3D-related resources. This should be done // before AwtObjectList::Cleanup() as the d3d will attempt to // shutdown when the last of its windows is disposed of @@ -539,6 +536,9 @@ BOOL AwtToolkit::Dispose() { AwtObjectList::Cleanup(); AwtFont::Cleanup(); + awt_dnd_uninitialize(); + awt_clipboard_uninitialize((JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2)); + if (tk.m_inputMethodHWnd != NULL) { ::SendMessage(tk.m_inputMethodHWnd, WM_IME_CONTROL, IMC_OPENSTATUSWINDOW, 0); } diff --git a/jdk/src/windows/native/sun/windows/awt_TrayIcon.cpp b/jdk/src/windows/native/sun/windows/awt_TrayIcon.cpp index e43c8130405..4156c9cfec1 100644 --- a/jdk/src/windows/native/sun/windows/awt_TrayIcon.cpp +++ b/jdk/src/windows/native/sun/windows/awt_TrayIcon.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/jdk/src/windows/native/sun/windows/awt_Win32GraphicsEnv.cpp b/jdk/src/windows/native/sun/windows/awt_Win32GraphicsEnv.cpp index efe485230a7..937007a5fd3 100644 --- a/jdk/src/windows/native/sun/windows/awt_Win32GraphicsEnv.cpp +++ b/jdk/src/windows/native/sun/windows/awt_Win32GraphicsEnv.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/jdk/src/windows/native/sun/windows/awt_Window.cpp b/jdk/src/windows/native/sun/windows/awt_Window.cpp index a6a5eb64ffa..c742aca9000 100644 --- a/jdk/src/windows/native/sun/windows/awt_Window.cpp +++ b/jdk/src/windows/native/sun/windows/awt_Window.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2011, 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 diff --git a/jdk/test/Makefile b/jdk/test/Makefile index d1171b96027..daa8ee92313 100644 --- a/jdk/test/Makefile +++ b/jdk/test/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1995, 2011, 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 @@ -261,6 +261,7 @@ endif # Follow command with ";$(BUNDLE_UP_AND_EXIT)", so it always gets executed. ZIP_UP_RESULTS = ( $(MKDIR) -p `$(DIRNAME) $(ARCHIVE_BUNDLE)` \ && $(CD) $(ABS_TEST_OUTPUT_DIR) \ + && $(CHMOD) -R a+r . \ && $(ZIP) -q -r $(ARCHIVE_BUNDLE) . ) SUMMARY_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTreport/text/summary.txt STATS_TXT_NAME = Stats.txt @@ -312,7 +313,9 @@ BUNDLE_UP_AND_EXIT = \ else \ $(ECHO) "Missing file: $${_summary}" >> $(STATS_TXT); \ fi; \ - $(CAT) $(STATS_TXT); \ + if [ -f $(STATS_TXT) ] ; then \ + $(CAT) $(STATS_TXT); \ + fi; \ $(ZIP_UP_RESULTS) ; \ $(TESTEXIT) \ ) @@ -370,10 +373,10 @@ EXCLUDELIST=$(ABS_TEST_OUTPUT_DIR)/excludelist.txt # Create exclude list for this platform and arch ifdef NO_EXCLUDES -$(EXCLUDELIST): $(PROBLEM_LISTS) $(TESTDIRS) +$(EXCLUDELIST): $(PROBLEM_LISTS) $(TEST_DEPENDENCIES) @$(ECHO) "NOTHING_EXCLUDED" > $@ else -$(EXCLUDELIST): $(PROBLEM_LISTS) $(TESTDIRS) +$(EXCLUDELIST): $(PROBLEM_LISTS) $(TEST_DEPENDENCIES) @$(RM) $@ $@.temp1 $@.temp2 @(($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-all' ) ;\ ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(PLATFORM_OS)' ) ;\ @@ -385,7 +388,7 @@ $(EXCLUDELIST): $(PROBLEM_LISTS) $(TESTDIRS) ($(ECHO) "#") ;\ ) | $(SED) -e 's@^[\ ]*@@' \ | $(EGREP) -v '^#' > $@.temp1 - @for tdir in $(TESTDIRS) ; do \ + for tdir in $(TESTDIRS) SOLARIS_10_SH_BUG_NO_EMPTY_FORS ; do \ ( ( $(CAT) $@.temp1 | $(EGREP) "^$${tdir}" ) ; $(ECHO) "#" ) >> $@.temp2 ; \ done @$(ECHO) "# at least one line" >> $@.temp2 @@ -400,11 +403,11 @@ endef # Running batches of tests with or without samevm define RunSamevmBatch $(ECHO) "Running tests in samevm mode: $?" -$(MAKE) TESTDIRS="$?" USE_JTREG_SAMEVM=true UNIQUE_DIR=$@ jtreg_tests +$(MAKE) TEST_DEPENDENCIES="$?" TESTDIRS="$?" USE_JTREG_SAMEVM=true UNIQUE_DIR=$@ jtreg_tests endef define RunOthervmBatch $(ECHO) "Running tests in othervm mode: $?" -$(MAKE) TESTDIRS="$?" USE_JTREG_SAMEVM=false UNIQUE_DIR=$@ jtreg_tests +$(MAKE) TEST_DEPENDENCIES="$?" TESTDIRS="$?" USE_JTREG_SAMEVM=false UNIQUE_DIR=$@ jtreg_tests endef define SummaryInfo $(ECHO) "########################################################" @@ -501,7 +504,7 @@ jdk_nio1: $(call TestDirs, java/nio/file) # Stable samevm testruns (minus items from PROBLEM_LIST) JDK_ALL_TARGETS += jdk_nio2 jdk_nio2: $(call TestDirs, java/nio/Buffer java/nio/ByteOrder \ - java/nio/channels java/nio/BufferPoolMXBean java/nio/MappedByteBuffer) + java/nio/channels java/nio/MappedByteBuffer) $(call SharedLibraryPermissions,java/nio/channels) $(call RunSamevmBatch) @@ -684,7 +687,7 @@ PHONY_LIST += packtest packtest_stress ################################################################ -# perftest to collect statistics +# perftest to collect statistics # Expect JPRT to set JPRT_PACKTEST_HOME. PERFTEST_HOME = $(TEST_ROOT)/perf @@ -706,7 +709,7 @@ PHONY_LIST += perftest # vmsqe tests # Expect JPRT to set JPRT_VMSQE_HOME. -VMSQE_HOME = /java/sqe/comp/vm/testbase/sqe/vm/current/build/latest/vm +VMSQE_HOME = $(SLASH_JAVA)/sqe/comp/vm/testbase/sqe/vm/current/build/latest/vm ifdef JPRT_VMSQE_HOME VMSQE_HOME = $(JPRT_VMSQE_HOME) endif @@ -718,7 +721,7 @@ ifdef JPRT_RUNVMSQE_HOME endif # Expect JPRT to set JPRT_TONGA3_HOME. -TONGA3_HOME = /java/sqe//tools/gtee/harness/tonga +TONGA3_HOME = $(SLASH_JAVA)/sqe/tools/gtee/harness/tonga ifdef JPRT_TONGA3_HOME TONGA3_HOME = $(JPRT_TONGA3_HOME) endif @@ -771,148 +774,84 @@ PHONY_LIST += vmsqe_jdwp vmsqe_jdi vmsqe_jdb vmsqe_quick-jdi vmsqe_sajdi \ # jck tests -JCK_WORK_DIR = $(ABS_TEST_OUTPUT_DIR)/JCKwork -JCK_REPORT_DIR = $(ABS_TEST_OUTPUT_DIR)/JCKreport -JCK_PROPERTIES = $(ABS_TEST_OUTPUT_DIR)/jck.properties -JCK_CONFIG = $(ABS_TEST_OUTPUT_DIR)/jck.config - -JCK_JAVA_EXE = $(PRODUCT_HOME)/bin/java$(EXESUFFIX) - -JCK_JAVATEST_JAR = $(JCK_HOME)/lib/javatest.jar -JCK_JAVATEST = $(ALT_BOOTDIR)/bin/java -jar $(JCK_JAVATEST_JAR) - -$(JCK_CONFIG): $(TEST_ROOT)/JCK-$(JCK_BUNDLE_NAME)-$(JCK_RELEASE)-base.jti - $(RM) $@ - $(MKDIR) -p $(@D) - $(CP) $< $@ - -$(JCK_PROPERTIES): $(PRODUCT_HOME) $(JCK_JAVA_EXE) - $(RM) $@ - $(MKDIR) -p $(@D) - $(ECHO) "jck.env.compiler.compRefExecute.cmdAsFile=$(JCK_JAVA_EXE)" >> $@ - $(ECHO) "jck.env.compiler.compRefExecute.systemRoot=$(SYSTEMROOT)" >> $@ - $(ECHO) "jck.env.compiler.testCompile.testCompileAPImultiJVM.cmdAsFile=$(JCK_JAVA_EXE)" >> $@ - $(ECHO) "jck.tests.tests=$(JCK_BUNDLE_TESTDIRS)" >> $@ - -jck_tests: prep $(JCK_HOME) $(JCK_PROPERTIES) $(JCK_CONFIG) $(JCK_JAVATEST_JAR) - $(MKDIR) -p $(JCK_WORK_DIR) - ( $(JCK_JAVATEST) \ - -verbose:commands,non-pass \ - -testSuite $(JCK_HOME) \ - -workDir $(JCK_WORK_DIR) \ - -config $(JCK_CONFIG) \ - -set -file $(JCK_PROPERTIES) \ - -runtests \ - -writeReport $(JCK_REPORT_DIR) \ - ) ; $(BUNDLE_UP_AND_EXIT) - -PHONY_LIST += jck_tests - -################################################################ - -# jck6 tests - -JCK6_RELEASE = 6b -JCK6_DEFAULT_HOME = $(SLASH_JAVA)/re/jck/$(JCK6_RELEASE)/archive/fcs/binaries - -# Expect JPRT to set JPRT_JCK6COMPILER_HOME. -JCK6COMPILER_HOME = $(JCK6_DEFAULT_HOME)/JCK-compiler-$(JCK6_RELEASE) -ifdef JPRT_JCK6COMPILER_HOME - JCK6COMPILER_HOME = $(JPRT_JCK6COMPILER_HOME) -endif - -# Expect JPRT to set JPRT_JCK6RUNTIME_HOME. -JCK6RUNTIME_HOME = $(JCK6_DEFAULT_HOME)/JCK-runtime-$(JCK6_RELEASE) -ifdef JPRT_JCK6RUNTIME_HOME - JCK6RUNTIME_HOME = $(JPRT_JCK6RUNTIME_HOME) -endif - -# Expect JPRT to set JPRT_JCK6DEVTOOLS_HOME. -JCK6DEVTOOLS_HOME = $(JCK6_DEFAULT_HOME)/JCK-devtools-$(JCK6_RELEASE) -ifdef JPRT_JCK6DEVTOOLS_HOME - JCK6DEVTOOLS_HOME = $(JPRT_JCK6DEVTOOLS_HOME) -endif - -jck6_tests: JCK_HOME=$(JCK6_HOME) -jck6_tests: JCK_RELEASE=$(JCK6_RELEASE) -jck6_tests: jck_tests - -jck6compiler: JCK6_HOME=$(JCK6COMPILER_HOME) -jck6compiler: JCK_BUNDLE_NAME=compiler -jck6compiler: jck6_tests - -jck6compiler_lang: JCK_BUNDLE_TESTDIRS=lang -jck6compiler_lang: jck6compiler - -jck6runtime: JCK6_HOME=$(JCK6RUNTIME_HOME) -jck6runtime: JCK_BUNDLE_NAME=runtime -jck6runtime: jck6_tests - -jck6runtime_lang: JCK_BUNDLE_TESTDIRS=lang -jck6runtime_lang: jck6runtime - -jck6devtools: JCK6_HOME=$(JCK6DEVTOOLS_HOME) -jck6devtools: JCK_BUNDLE_NAME=devtools -jck6devtools: jck6_tests - -jck6devtools_lang: JCK_BUNDLE_TESTDIRS=lang -jck6devtools_lang: jck6devtools - -PHONY_LIST += jck6compiler jck6runtime jck6devtools jck6_tests \ - jck6compiler_lang jck6runtime_lang jck6devtools_lang - -################################################################ - -# jck7 tests - -JCK7_RELEASE = 7 -JCK7_DEFAULT_HOME = $(SLASH_JAVA)/re/jck/$(JCK7_RELEASE)/archive/fcs/binaries +# Default is to use jck 7 from /java/re +JCK7_DEFAULT_HOME = $(SLASH_JAVA)/re/jck/7/promoted/latest/binaries # Expect JPRT to set JPRT_JCK7COMPILER_HOME. -JCK7COMPILER_HOME = $(JCK7_DEFAULT_HOME)/JCK-compiler-$(JCK7_RELEASE) +JCK7COMPILER_HOME = $(JCK7_DEFAULT_HOME)/JCK-compiler-7 ifdef JPRT_JCK7COMPILER_HOME - JCK7COMPILER_HOME = $(JPRT_JCK7COMPILER_HOME) + JCK7COMPILER_HOME = $(JPRT_JCK7COMPILER_HOME)/JCK-compiler-7 endif # Expect JPRT to set JPRT_JCK7RUNTIME_HOME. -JCK7RUNTIME_HOME = $(JCK7_DEFAULT_HOME)/JCK-runtime-$(JCK7_RELEASE) +JCK7RUNTIME_HOME = $(JCK7_DEFAULT_HOME)/JCK-runtime-7 ifdef JPRT_JCK7RUNTIME_HOME - JCK7RUNTIME_HOME = $(JPRT_JCK7RUNTIME_HOME) + JCK7RUNTIME_HOME = $(JPRT_JCK7RUNTIME_HOME)/JCK-runtime-7 endif # Expect JPRT to set JPRT_JCK7DEVTOOLS_HOME. -JCK7DEVTOOLS_HOME = $(JCK7_DEFAULT_HOME)/JCK-devtools-$(JCK7_RELEASE) +JCK7DEVTOOLS_HOME = $(JCK7_DEFAULT_HOME)/JCK-devtools-7 ifdef JPRT_JCK7DEVTOOLS_HOME - JCK7DEVTOOLS_HOME = $(JPRT_JCK7DEVTOOLS_HOME) + JCK7DEVTOOLS_HOME = $(JPRT_JCK7DEVTOOLS_HOME)/JCK-devtools-7 endif -jck7_tests: JCK_HOME=$(JCK7_HOME) -jck7_tests: JCK_RELEASE=$(JCK7_RELEASE) -jck7_tests: jck_tests +# The jtjck.jar utility to use to run the tests +JTJCK_JAR = $(JCK_HOME)/lib/jtjck.jar +JTJCK_JAVA_ARGS = -XX:MaxPermSize=256m -Xmx512m +JTJCK_OPTIONS = -headless -v -jck7compiler: JCK7_HOME=$(JCK7COMPILER_HOME) -jck7compiler: JCK_BUNDLE_NAME=compiler -jck7compiler: jck7_tests +# Default tests to run +ifndef JCK_COMPILER_TESTS + JCK_COMPILER_TESTS = +endif +ifndef JCK_RUNTIME_TESTS + JCK_RUNTIME_TESTS = +endif +ifndef JCK_DEVTOOLS_TESTS + JCK_DEVTOOLS_TESTS = +endif -jck7compiler_lang: JCK_BUNDLE_TESTDIRS=lang -jck7compiler_lang: jck7compiler +# Generic rule used to run jck tests +_generic_jck_tests: prep $(PRODUCT_HOME) $(EXCLUDELIST) + @$(EXPAND) $(EXCLUDELIST) \ + | $(CUT) -d' ' -f1 \ + | $(SED) -e 's@^@Excluding: @' + ( $(CD) $(ABS_TEST_OUTPUT_DIR) && \ + $(PRODUCT_HOME)/bin/java $(JTJCK_JAVA_ARGS) \ + -jar "$(JTJCK_JAR)" \ + $(JTJCK_OPTIONS) \ + -r:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTreport \ + -w:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTwork \ + -jdk:$(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)") \ + $(TESTDIRS) \ + ) ; $(BUNDLE_UP_AND_EXIT) -jck7runtime: JCK7_HOME=$(JCK7RUNTIME_HOME) -jck7runtime: JCK_BUNDLE_NAME=runtime -jck7runtime: jck7_tests +# JCK7 compiler tests +jck7compiler: + $(MAKE) UNIQUE_DIR=$@ \ + JCK_HOME=$(JCK7COMPILER_HOME) \ + TESTDIRS="$(JCK_COMPILER_TESTS)" \ + _generic_jck_tests -jck7runtime_lang: JCK_BUNDLE_TESTDIRS=lang -jck7runtime_lang: jck7runtime +# JCK7 runtime tests +jck7runtime: + $(MAKE) UNIQUE_DIR=$@ \ + JCK_HOME=$(JCK7RUNTIME_HOME) \ + TESTDIRS="$(JCK_RUNTIME_TESTS)" \ + _generic_jck_tests -jck7devtools: JCK7_HOME=$(JCK7DEVTOOLS_HOME) -jck7devtools: JCK_BUNDLE_NAME=devtools -jck7devtools: jck7_tests +# JCK7 devtools tests +jck7devtools: + $(MAKE) UNIQUE_DIR=$@ \ + JCK_HOME=$(JCK7DEVTOOLS_HOME) \ + TESTDIRS="$(JCK_DEVTOOLS_TESTS)" \ + _generic_jck_tests -jck7devtools_lang: JCK_BUNDLE_TESTDIRS=lang -jck7devtools_lang: jck7devtools +# Run all 3 sets of JCK7 tests +jck_all: jck7runtime jck7devtools jck7compiler -PHONY_LIST += jck7compiler jck7runtime jck7devtools jck7_tests \ - jck7compiler_lang jck7runtime_lang jck7devtools_lang +PHONY_LIST += jck_all _generic_jck_tests \ + jck7compiler jck7runtime jck7devtools ################################################################ diff --git a/jdk/test/ProblemList.txt b/jdk/test/ProblemList.txt index 27518785b07..78ca9534f84 100644 --- a/jdk/test/ProblemList.txt +++ b/jdk/test/ProblemList.txt @@ -1,6 +1,6 @@ ########################################################################### # -# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2011, 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 @@ -690,6 +690,9 @@ sun/tools/jconsole/ResourceCheckTest.sh generic-all # jdk_util +# Filed 7027061 +java/util/Locale/Bug6989440.java windows-all + # Filed 6933803 java/util/concurrent/ThreadPoolExecutor/CoreThreadTimeOut.java generic-all diff --git a/jdk/test/com/sun/awt/Translucency/WindowOpacity.java b/jdk/test/com/sun/awt/Translucency/WindowOpacity.java index a5d80265d60..26c611c35d5 100644 --- a/jdk/test/com/sun/awt/Translucency/WindowOpacity.java +++ b/jdk/test/com/sun/awt/Translucency/WindowOpacity.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2010, 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 diff --git a/jdk/test/com/sun/jdi/NativeInstanceFilter.java b/jdk/test/com/sun/jdi/NativeInstanceFilter.java index 90e714e6889..eaa501a35fe 100644 --- a/jdk/test/com/sun/jdi/NativeInstanceFilter.java +++ b/jdk/test/com/sun/jdi/NativeInstanceFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2011, 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 diff --git a/jdk/test/com/sun/jdi/NativeInstanceFilterTarg.java b/jdk/test/com/sun/jdi/NativeInstanceFilterTarg.java index 48a21b43aba..a3179da7078 100644 --- a/jdk/test/com/sun/jdi/NativeInstanceFilterTarg.java +++ b/jdk/test/com/sun/jdi/NativeInstanceFilterTarg.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2011, 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 diff --git a/jdk/test/com/sun/jdi/PrivateTransportTest.sh b/jdk/test/com/sun/jdi/PrivateTransportTest.sh index 75e666fdb5e..89a306c9ee9 100644 --- a/jdk/test/com/sun/jdi/PrivateTransportTest.sh +++ b/jdk/test/com/sun/jdi/PrivateTransportTest.sh @@ -1,7 +1,7 @@ #!/bin/ksh -p # -# Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2011, 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 @@ -99,6 +99,8 @@ fi libdir=${TESTCLASSES} +is_windows=false +is_cygwin=false case `uname -s` in SunOS) libarch=`uname -p` @@ -126,10 +128,13 @@ case `uname -s` in libloc=`dirname ${xx}` ;; Windows*) + is_windows=true libloc=${jreloc}/bin sep=';' ;; CYGWIN*) + is_windows=true + is_cygwin=true libloc=${jreloc}/bin sep=':' @@ -176,7 +181,18 @@ fi # CP="-classpath \"${TESTCLASSES}\"" # -DEBUGGEEFLAGS="$DEBUGGEEFLAGS -agentlib:jdwp=transport=${private_transport},server=y,suspend=n" +if [ "$is_windows" = "true" ]; then + if [ "$is_cygwin" = "true" ]; then + win_fullpath=`cygpath -m "$fullpath" \ + | sed -e 's#/#\\\\\\\\#g' -e 's/\.dll//'` + else + win_fullpath=`echo "$fullpath" \ + | sed -e 's#/#\\\\\\\\#g' -e 's/\.dll//'` + fi + DEBUGGEEFLAGS="$DEBUGGEEFLAGS -agentlib:jdwp=transport=${win_fullpath},server=y,suspend=n" +else + DEBUGGEEFLAGS="$DEBUGGEEFLAGS -agentlib:jdwp=transport=${private_transport},server=y,suspend=n" +fi echo ${TESTJAVA}/bin/java ${DEBUGGEEFLAGS} ${CP} ${TARGETCLASS} eval ${TESTJAVA}/bin/java ${DEBUGGEEFLAGS} ${CP} ${TARGETCLASS} diff --git a/jdk/test/com/sun/jdi/ProcessAttachTest.sh b/jdk/test/com/sun/jdi/ProcessAttachTest.sh index f0a61113574..d48ea5ec828 100644 --- a/jdk/test/com/sun/jdi/ProcessAttachTest.sh +++ b/jdk/test/com/sun/jdi/ProcessAttachTest.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2010, 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 diff --git a/jdk/test/com/sun/security/auth/module/LdapLoginModule/CheckConfigs.java b/jdk/test/com/sun/security/auth/module/LdapLoginModule/CheckConfigs.java index f74e69079ed..fffcf4a204b 100644 --- a/jdk/test/com/sun/security/auth/module/LdapLoginModule/CheckConfigs.java +++ b/jdk/test/com/sun/security/auth/module/LdapLoginModule/CheckConfigs.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/jdk/test/com/sun/security/auth/module/LdapLoginModule/CheckOptions.java b/jdk/test/com/sun/security/auth/module/LdapLoginModule/CheckOptions.java index 3f7d8e3bac2..7e616ffc51d 100644 --- a/jdk/test/com/sun/security/auth/module/LdapLoginModule/CheckOptions.java +++ b/jdk/test/com/sun/security/auth/module/LdapLoginModule/CheckOptions.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/jdk/test/com/sun/tools/attach/ApplicationSetup.sh b/jdk/test/com/sun/tools/attach/ApplicationSetup.sh index a07fac420e2..9e40c5ddc26 100644 --- a/jdk/test/com/sun/tools/attach/ApplicationSetup.sh +++ b/jdk/test/com/sun/tools/attach/ApplicationSetup.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2010, 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 diff --git a/jdk/test/com/sun/tools/attach/BasicTests.sh b/jdk/test/com/sun/tools/attach/BasicTests.sh index 3f8f8571411..a95060de40e 100644 --- a/jdk/test/com/sun/tools/attach/BasicTests.sh +++ b/jdk/test/com/sun/tools/attach/BasicTests.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2010, 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 diff --git a/jdk/test/com/sun/tools/attach/CommonSetup.sh b/jdk/test/com/sun/tools/attach/CommonSetup.sh index b65d50152bf..b05d5d374e1 100644 --- a/jdk/test/com/sun/tools/attach/CommonSetup.sh +++ b/jdk/test/com/sun/tools/attach/CommonSetup.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2010, 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 diff --git a/jdk/test/com/sun/tools/attach/PermissionTests.sh b/jdk/test/com/sun/tools/attach/PermissionTests.sh index 65d79104fbe..22828dcccea 100644 --- a/jdk/test/com/sun/tools/attach/PermissionTests.sh +++ b/jdk/test/com/sun/tools/attach/PermissionTests.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2010, 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 diff --git a/jdk/test/demo/zipfs/Basic.java b/jdk/test/demo/zipfs/Basic.java index c0e478bc8f2..ae2ad15b52d 100644 --- a/jdk/test/demo/zipfs/Basic.java +++ b/jdk/test/demo/zipfs/Basic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, 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 diff --git a/jdk/test/demo/zipfs/PathOps.java b/jdk/test/demo/zipfs/PathOps.java index ea097396dbb..ec1af09c9c5 100644 --- a/jdk/test/demo/zipfs/PathOps.java +++ b/jdk/test/demo/zipfs/PathOps.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, 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 diff --git a/jdk/test/demo/zipfs/basic.sh b/jdk/test/demo/zipfs/basic.sh index 06353dfa761..1b44152bc51 100644 --- a/jdk/test/demo/zipfs/basic.sh +++ b/jdk/test/demo/zipfs/basic.sh @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2011, 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 diff --git a/jdk/test/java/awt/Container/CheckZOrderChange/CheckZOrderChange.java b/jdk/test/java/awt/Container/CheckZOrderChange/CheckZOrderChange.java index 3c06a523b29..fa888ecfec5 100644 --- a/jdk/test/java/awt/Container/CheckZOrderChange/CheckZOrderChange.java +++ b/jdk/test/java/awt/Container/CheckZOrderChange/CheckZOrderChange.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/awt/FontClass/LCDScale.java b/jdk/test/java/awt/FontClass/LCDScale.java index 5f8d1f6a16d..6a9453e63af 100644 --- a/jdk/test/java/awt/FontClass/LCDScale.java +++ b/jdk/test/java/awt/FontClass/LCDScale.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2011, 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 diff --git a/jdk/test/java/awt/Graphics2D/RenderClipTest/RenderClipTest.java b/jdk/test/java/awt/Graphics2D/RenderClipTest/RenderClipTest.java index e920c448671..29ef55d2ab4 100644 --- a/jdk/test/java/awt/Graphics2D/RenderClipTest/RenderClipTest.java +++ b/jdk/test/java/awt/Graphics2D/RenderClipTest/RenderClipTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2010, 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 diff --git a/jdk/test/java/awt/PrintJob/Text/StringWidth.java b/jdk/test/java/awt/PrintJob/Text/StringWidth.java index e16229eba27..6773b7f6f96 100644 --- a/jdk/test/java/awt/PrintJob/Text/StringWidth.java +++ b/jdk/test/java/awt/PrintJob/Text/StringWidth.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, 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 diff --git a/jdk/test/java/awt/Toolkit/Headless/GetPrintJob/GetPrintJob.java b/jdk/test/java/awt/Toolkit/Headless/GetPrintJob/GetPrintJob.java new file mode 100644 index 00000000000..29a0950bf3b --- /dev/null +++ b/jdk/test/java/awt/Toolkit/Headless/GetPrintJob/GetPrintJob.java @@ -0,0 +1,48 @@ +/* +@test +@bug 7023011 +@library ../../../regtesthelpers +@build Sysout +@summary Toolkit.getPrintJob() throws wrong exceptions +@author andrei dmitriev: area=awt.headless +@run main GetPrintJob + */ + +import java.awt.*; +import java.util.Properties; +import test.java.awt.regtesthelpers.Sysout; +/* + * In headfull mode we should always getting NPE on the getPrintJob() call if frame == null. + */ + +public class GetPrintJob { + + public static void main(String[] s) { + boolean stage1Passed = false; + boolean stage2Passed = false; + + try { + Toolkit.getDefaultToolkit().getPrintJob( + (Frame) null, "title", new Properties()); + } catch (NullPointerException e) { + stage1Passed = true; + Sysout.println("Stage 1 passed. getPrintJob(null, String, property) has thrown NPE."); + } + if (!stage1Passed) { + throw new RuntimeException("getPrintJob() should have thrown NPE but didn't."); + } + + try { + Toolkit.getDefaultToolkit().getPrintJob( + (Frame) null, "title", new JobAttributes(), new PageAttributes()); + } catch (NullPointerException e) { + stage2Passed = true; + Sysout.println("Stage 2 passed. getPrintJob(null, String, jobAttrs, pageAttr) has thrown NPE."); + } + if (!stage2Passed) { + throw new RuntimeException("getPrintJob() should have thrown NPE but didn't."); + } + + Sysout.println("Test PASSED"); + } +} diff --git a/jdk/test/java/awt/Toolkit/Headless/GetPrintJob/GetPrintJobHeadless.java b/jdk/test/java/awt/Toolkit/Headless/GetPrintJob/GetPrintJobHeadless.java new file mode 100644 index 00000000000..c5edf26095f --- /dev/null +++ b/jdk/test/java/awt/Toolkit/Headless/GetPrintJob/GetPrintJobHeadless.java @@ -0,0 +1,50 @@ +/* +@test +@bug 7023011 +@library ../../../regtesthelpers +@build Sysout +@summary Toolkit.getPrintJob() throws wrong exceptions +@author andrei dmitriev: area=awt.headless +@run main/othervm -Djava.awt.headless=true GetPrintJobHeadless + */ + +/* + * In headless mode we should always getting NPE on the getPrintJob() call + */ +import java.awt.*; +import java.util.Properties; +import test.java.awt.regtesthelpers.Sysout; + +public class GetPrintJobHeadless { + + public static void main(String[] s) { + boolean stage1Passed = false; + boolean stage2Passed = false; + + try { + Toolkit.getDefaultToolkit().getPrintJob( + (Frame) null, "title", new Properties()); + } catch (NullPointerException e) { + stage1Passed = true; + e.printStackTrace(); + Sysout.println("Stage 1 passed. getPrintJob(null, String, property) has thrown NPE."); + } + if (!stage1Passed) { + throw new RuntimeException("getPrintJob() should have thrown NPE but didn't."); + } + + try { + Toolkit.getDefaultToolkit().getPrintJob( + (Frame) null, "title", new JobAttributes(), new PageAttributes()); + } catch (NullPointerException e) { + stage2Passed = true; + e.printStackTrace(); + Sysout.println("Stage 2 passed. getPrintJob(null, String, jobAttrs, pageAttr) has thrown NPE."); + } + if (!stage2Passed) { + throw new RuntimeException("getPrintJob() should have thrown NPE but didn't."); + } + + Sysout.println("Test PASSED"); + } +} diff --git a/jdk/test/java/awt/font/FontNames/LocaleFamilyNames.java b/jdk/test/java/awt/font/FontNames/LocaleFamilyNames.java index e6d71feb814..5356464334e 100644 --- a/jdk/test/java/awt/font/FontNames/LocaleFamilyNames.java +++ b/jdk/test/java/awt/font/FontNames/LocaleFamilyNames.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/jdk/test/java/awt/image/GetSamplesTest.java b/jdk/test/java/awt/image/GetSamplesTest.java index 86780c5cf9f..2352f9efce2 100644 --- a/jdk/test/java/awt/image/GetSamplesTest.java +++ b/jdk/test/java/awt/image/GetSamplesTest.java @@ -23,9 +23,9 @@ /* * @test - * @bug 6735275 - * @summary Test verifies that SampleModel.getSamples() throws an appropriate - * exception if coordinates are not in bounds. + * @bug 6735275 6993561 + * @summary Test verifies that SampleModel.getSamples() SampleModel.setSamples() + * throw an appropriate exception if coordinates are not in bounds. * * @run main GetSamplesTest */ @@ -75,6 +75,7 @@ public class GetSamplesTest { try { sm.getSamples(Integer.MAX_VALUE, 0, 1, 1, 0, iArray, db); + sm.setSamples(Integer.MAX_VALUE, 0, 1, 1, 0, iArray, db); } catch (ArrayIndexOutOfBoundsException e) { System.out.println(e.getMessage()); iOk = true; @@ -82,6 +83,7 @@ public class GetSamplesTest { try { sm.getSamples(Integer.MAX_VALUE, 0, 1, 1, 0, fArray, db); + sm.setSamples(Integer.MAX_VALUE, 0, 1, 1, 0, fArray, db); } catch (ArrayIndexOutOfBoundsException e) { System.out.println(e.getMessage()); fOk = true; @@ -89,6 +91,7 @@ public class GetSamplesTest { try { sm.getSamples(0, Integer.MAX_VALUE, 1, 1, 0, dArray, db); + sm.setSamples(0, Integer.MAX_VALUE, 1, 1, 0, dArray, db); } catch (ArrayIndexOutOfBoundsException e) { System.out.println(e.getMessage()); dOk = true; diff --git a/jdk/test/java/awt/xembed/server/TestXEmbedServer.java b/jdk/test/java/awt/xembed/server/TestXEmbedServer.java index 56756526a59..236ce0fd4df 100644 --- a/jdk/test/java/awt/xembed/server/TestXEmbedServer.java +++ b/jdk/test/java/awt/xembed/server/TestXEmbedServer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2010, 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 diff --git a/jdk/test/java/io/File/IsHidden.java b/jdk/test/java/io/File/IsHidden.java index d2b43c5b641..a5b87794af5 100644 --- a/jdk/test/java/io/File/IsHidden.java +++ b/jdk/test/java/io/File/IsHidden.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2011, 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 diff --git a/jdk/test/java/io/File/SetAccess.java b/jdk/test/java/io/File/SetAccess.java index 745deab1f7b..f9287ee5318 100644 --- a/jdk/test/java/io/File/SetAccess.java +++ b/jdk/test/java/io/File/SetAccess.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/jdk/test/java/io/File/SetLastModified.java b/jdk/test/java/io/File/SetLastModified.java index fada781a202..249b7cca94c 100644 --- a/jdk/test/java/io/File/SetLastModified.java +++ b/jdk/test/java/io/File/SetLastModified.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2011, 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 diff --git a/jdk/test/java/io/File/SymLinks.java b/jdk/test/java/io/File/SymLinks.java index 355b28875d4..df78f15529b 100644 --- a/jdk/test/java/io/File/SymLinks.java +++ b/jdk/test/java/io/File/SymLinks.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, 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 diff --git a/jdk/test/java/io/File/basic.sh b/jdk/test/java/io/File/basic.sh index 14e6eefcc2d..4244233e9c0 100644 --- a/jdk/test/java/io/File/basic.sh +++ b/jdk/test/java/io/File/basic.sh @@ -1,7 +1,7 @@ #! /bin/sh # -# Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2010, 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 diff --git a/jdk/test/java/io/FileInputStream/LargeFileAvailable.java b/jdk/test/java/io/FileInputStream/LargeFileAvailable.java index 0e33d9a969f..4f82ec1b78b 100644 --- a/jdk/test/java/io/FileInputStream/LargeFileAvailable.java +++ b/jdk/test/java/io/FileInputStream/LargeFileAvailable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2011, 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 diff --git a/jdk/test/java/io/FileOutputStream/AtomicAppend.java b/jdk/test/java/io/FileOutputStream/AtomicAppend.java index c5f18e6cd98..ccc4b59cdb1 100644 --- a/jdk/test/java/io/FileOutputStream/AtomicAppend.java +++ b/jdk/test/java/io/FileOutputStream/AtomicAppend.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, 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 diff --git a/jdk/test/java/io/OutputStreamWriter/Encode.java b/jdk/test/java/io/OutputStreamWriter/Encode.java index fda2d03cc54..6f7a0269b7e 100644 --- a/jdk/test/java/io/OutputStreamWriter/Encode.java +++ b/jdk/test/java/io/OutputStreamWriter/Encode.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/jdk/test/java/io/PrintStream/EncodingConstructor.java b/jdk/test/java/io/PrintStream/EncodingConstructor.java index a4b9c884295..4aeb225bcc8 100644 --- a/jdk/test/java/io/PrintStream/EncodingConstructor.java +++ b/jdk/test/java/io/PrintStream/EncodingConstructor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/jdk/test/java/io/Serializable/NPEProvoker/NPEProvoker.java b/jdk/test/java/io/Serializable/NPEProvoker/NPEProvoker.java index 47a8516a594..15981432a67 100644 --- a/jdk/test/java/io/Serializable/NPEProvoker/NPEProvoker.java +++ b/jdk/test/java/io/Serializable/NPEProvoker/NPEProvoker.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2010, 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 diff --git a/jdk/test/java/io/Serializable/evolution/RenamePackage/install/SerialDriver.java b/jdk/test/java/io/Serializable/evolution/RenamePackage/install/SerialDriver.java index 47f79ea713d..5a77164a08d 100644 --- a/jdk/test/java/io/Serializable/evolution/RenamePackage/install/SerialDriver.java +++ b/jdk/test/java/io/Serializable/evolution/RenamePackage/install/SerialDriver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2011, 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 diff --git a/jdk/test/java/io/Serializable/evolution/RenamePackage/test/SerialDriver.java b/jdk/test/java/io/Serializable/evolution/RenamePackage/test/SerialDriver.java index 533df16511d..7e312695beb 100644 --- a/jdk/test/java/io/Serializable/evolution/RenamePackage/test/SerialDriver.java +++ b/jdk/test/java/io/Serializable/evolution/RenamePackage/test/SerialDriver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2011, 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 diff --git a/jdk/test/java/lang/Double/ParseDouble.java b/jdk/test/java/lang/Double/ParseDouble.java index 669d078c029..a282a6aac68 100644 --- a/jdk/test/java/lang/Double/ParseDouble.java +++ b/jdk/test/java/lang/Double/ParseDouble.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2011, 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 diff --git a/jdk/test/java/lang/ProcessBuilder/Basic.java b/jdk/test/java/lang/ProcessBuilder/Basic.java index 7ba90e8e8a2..22916929561 100644 --- a/jdk/test/java/lang/ProcessBuilder/Basic.java +++ b/jdk/test/java/lang/ProcessBuilder/Basic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/jdk/test/java/lang/Runtime/exec/Duped.java b/jdk/test/java/lang/Runtime/exec/Duped.java index 2788b77e48c..bef0a0f8a78 100644 --- a/jdk/test/java/lang/Runtime/exec/Duped.java +++ b/jdk/test/java/lang/Runtime/exec/Duped.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/jdk/test/java/lang/Runtime/shutdown/ShutdownHooks.java b/jdk/test/java/lang/Runtime/shutdown/ShutdownHooks.java index bfe2b60e3ee..98c3614cb53 100644 --- a/jdk/test/java/lang/Runtime/shutdown/ShutdownHooks.java +++ b/jdk/test/java/lang/Runtime/shutdown/ShutdownHooks.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, 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 diff --git a/jdk/test/java/lang/System/finalization/FinExit.sh b/jdk/test/java/lang/System/finalization/FinExit.sh index 30a01ccaa31..53bc6756171 100644 --- a/jdk/test/java/lang/System/finalization/FinExit.sh +++ b/jdk/test/java/lang/System/finalization/FinExit.sh @@ -1,7 +1,7 @@ #! /bin/sh # -# Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2010, 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 diff --git a/jdk/test/java/lang/Thread/StartOOMTest.java b/jdk/test/java/lang/Thread/StartOOMTest.java index 57edd723c31..d543749a6a0 100644 --- a/jdk/test/java/lang/Thread/StartOOMTest.java +++ b/jdk/test/java/lang/Thread/StartOOMTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, 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 diff --git a/jdk/test/java/lang/Throwable/SuppressedExceptions.java b/jdk/test/java/lang/Throwable/SuppressedExceptions.java index f1c30b358ad..b987600dca3 100644 --- a/jdk/test/java/lang/Throwable/SuppressedExceptions.java +++ b/jdk/test/java/lang/Throwable/SuppressedExceptions.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2011, 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 @@ -26,7 +26,7 @@ import java.util.*; /* * @test - * @bug 6911258 6962571 6963622 6991528 + * @bug 6911258 6962571 6963622 6991528 7005628 * @summary Basic tests of suppressed exceptions * @author Joseph D. Darcy */ @@ -50,14 +50,6 @@ public class SuppressedExceptions { } catch (IllegalArgumentException iae) { ; // Expected } - - throwable.addSuppressed(null); // Immutable suppression list - try { - throwable.addSuppressed(throwable); - throw new RuntimeException("IllegalArgumentException for self-suppresion not thrown."); - } catch (IllegalArgumentException iae) { - ; // Expected - } } private static void basicSupressionTest() { @@ -153,19 +145,19 @@ public class SuppressedExceptions { (byte)0x02, (byte)0x00, (byte)0x00, (byte)0x78, (byte)0x70, }; - ByteArrayInputStream bais = new ByteArrayInputStream(bytes); - ObjectInputStream ois = new ObjectInputStream(bais); + try(ByteArrayInputStream bais = new ByteArrayInputStream(bytes); + ObjectInputStream ois = new ObjectInputStream(bais)) { + Object o = ois.readObject(); + Throwable throwable = (Throwable) o; - Object o = ois.readObject(); - Throwable throwable = (Throwable) o; + System.err.println("TESTING SERIALIZED EXCEPTION"); - System.err.println("TESTING SERIALIZED EXCEPTION"); - - Throwable[] t0 = throwable.getSuppressed(); - if (t0.length != 0) { // Will fail if t0 is null. - throw new RuntimeException(message); + Throwable[] t0 = throwable.getSuppressed(); + if (t0.length != 0) { // Will fail if t0 is null. + throw new RuntimeException(message); + } + throwable.printStackTrace(); } - throwable.printStackTrace(); } private static void selfReference() { @@ -183,8 +175,7 @@ public class SuppressedExceptions { } private static void noModification() { - Throwable t = new Throwable(); - t.addSuppressed(null); + Throwable t = new NoSuppression(false); Throwable[] t0 = t.getSuppressed(); if (t0.length != 0) @@ -196,5 +187,24 @@ public class SuppressedExceptions { t0 = t.getSuppressed(); if (t0.length != 0) throw new RuntimeException("Bad nonzero length of suppressed exceptions."); + + Throwable suppressed = new ArithmeticException(); + t = new NoSuppression(true); // Suppression enabled + // Make sure addSuppressed(null) throws an NPE + try { + t.addSuppressed(null); + } catch(NullPointerException e) { + ; // Expected + } + t.addSuppressed(suppressed); + t0 = t.getSuppressed(); + if (t0.length != 1 || t0[0] != suppressed) + throw new RuntimeException("Expected suppression did not occur."); + } + + private static class NoSuppression extends Throwable { + public NoSuppression(boolean enableSuppression) { + super("The medium.", null, enableSuppression); + } } } diff --git a/jdk/test/java/lang/annotation/PackageMain.java b/jdk/test/java/lang/annotation/PackageMain.java index 8b3f727d8c7..5c73a9ebb25 100644 --- a/jdk/test/java/lang/annotation/PackageMain.java +++ b/jdk/test/java/lang/annotation/PackageMain.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2011, 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 @@ -21,8 +21,6 @@ * questions. */ -import java.lang.annotation.Documented; - public class PackageMain { public static void main(String[] args) throws Exception { Class c = Class.forName("foo.bar.Baz"); @@ -30,7 +28,7 @@ public class PackageMain { System.out.println("cl=" + c.getClassLoader()); Package p = c.getPackage(); System.out.println("p=" + p); - Documented d = p.getAnnotation(Documented.class); + Deprecated d = p.getAnnotation(Deprecated.class); if (d == null) throw new Error(); } } diff --git a/jdk/test/java/lang/annotation/loaderLeak/LoaderLeak.sh b/jdk/test/java/lang/annotation/loaderLeak/LoaderLeak.sh index 28a7d6c6c48..6c53bf5f9e4 100644 --- a/jdk/test/java/lang/annotation/loaderLeak/LoaderLeak.sh +++ b/jdk/test/java/lang/annotation/loaderLeak/LoaderLeak.sh @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2004, 2010, 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 diff --git a/jdk/test/java/lang/annotation/package-info.java b/jdk/test/java/lang/annotation/package-info.java index f5463672c5c..8b057d87a3d 100644 --- a/jdk/test/java/lang/annotation/package-info.java +++ b/jdk/test/java/lang/annotation/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2011, 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 @@ -31,7 +31,7 @@ * @run main PackageMain */ -@java.lang.annotation.Documented +@Deprecated package foo.bar; class Baz {} diff --git a/jdk/test/java/lang/instrument/BootClassPath/Setup.java b/jdk/test/java/lang/instrument/BootClassPath/Setup.java index 3ef40f13217..409c5940b90 100644 --- a/jdk/test/java/lang/instrument/BootClassPath/Setup.java +++ b/jdk/test/java/lang/instrument/BootClassPath/Setup.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2011, 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 diff --git a/jdk/test/java/lang/instrument/appendToClassLoaderSearch/CommonSetup.sh b/jdk/test/java/lang/instrument/appendToClassLoaderSearch/CommonSetup.sh index 6074b1dc2f9..8b8d8ef3e27 100644 --- a/jdk/test/java/lang/instrument/appendToClassLoaderSearch/CommonSetup.sh +++ b/jdk/test/java/lang/instrument/appendToClassLoaderSearch/CommonSetup.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2010, 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 diff --git a/jdk/test/java/lang/instrument/ilib/Inject.java b/jdk/test/java/lang/instrument/ilib/Inject.java index 5e0caa4e1dd..22acbc9324b 100644 --- a/jdk/test/java/lang/instrument/ilib/Inject.java +++ b/jdk/test/java/lang/instrument/ilib/Inject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/jdk/test/java/lang/instrument/ilib/InjectBytecodes.java b/jdk/test/java/lang/instrument/ilib/InjectBytecodes.java index 35e185889ff..53e6a2feaea 100644 --- a/jdk/test/java/lang/instrument/ilib/InjectBytecodes.java +++ b/jdk/test/java/lang/instrument/ilib/InjectBytecodes.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2010, 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 diff --git a/jdk/test/java/lang/invoke/6987555/Test6987555.java b/jdk/test/java/lang/invoke/6987555/Test6987555.java index 465da236d7c..7a2f45c6efe 100644 --- a/jdk/test/java/lang/invoke/6987555/Test6987555.java +++ b/jdk/test/java/lang/invoke/6987555/Test6987555.java @@ -27,7 +27,7 @@ * @bug 6987555 * @summary JSR 292 unboxing to a boolean value fails on big-endian SPARC * - * @run main/othervm -Xint -ea -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles -XX:+EnableInvokeDynamic -XX:+UnlockDiagnosticVMOptions -XX:+VerifyMethodHandles Test6987555 + * @run main/othervm -Xint -ea -XX:+UnlockDiagnosticVMOptions -XX:+VerifyMethodHandles Test6987555 */ import java.lang.invoke.*; diff --git a/jdk/test/java/lang/invoke/6991596/Test6991596.java b/jdk/test/java/lang/invoke/6991596/Test6991596.java index e02bcfc819e..b349a10c47b 100644 --- a/jdk/test/java/lang/invoke/6991596/Test6991596.java +++ b/jdk/test/java/lang/invoke/6991596/Test6991596.java @@ -27,7 +27,7 @@ * @bug 6991596 * @summary JSR 292 unimplemented adapter_opt_i2i and adapter_opt_l2i on SPARC * - * @run main/othervm -ea -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles -XX:+EnableInvokeDynamic -XX:+UnlockDiagnosticVMOptions -XX:+VerifyMethodHandles Test6991596 + * @run main/othervm -ea -XX:+UnlockDiagnosticVMOptions -XX:+VerifyMethodHandles Test6991596 */ import java.lang.invoke.*; diff --git a/jdk/test/java/lang/invoke/InvokeDynamicPrintArgs.java b/jdk/test/java/lang/invoke/InvokeDynamicPrintArgs.java index 7089e959223..d8a395d2ba4 100644 --- a/jdk/test/java/lang/invoke/InvokeDynamicPrintArgs.java +++ b/jdk/test/java/lang/invoke/InvokeDynamicPrintArgs.java @@ -25,9 +25,9 @@ * @summary smoke test for invokedynamic instructions * @build indify.Indify * @compile InvokeDynamicPrintArgs.java - * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableInvokeDynamic + * @run main/othervm * indify.Indify - * --verify-specifier-count=3 --transitionalJSR292=false + * --verify-specifier-count=3 * --expand-properties --classpath ${test.classes} * --java test.java.lang.invoke.InvokeDynamicPrintArgs --check-output */ @@ -63,7 +63,8 @@ public class InvokeDynamicPrintArgs { String testClassPath = System.getProperty("build.test.classes.dir"); if (testClassPath == null) throw new RuntimeException(); String[] args = new String[]{ - "--verify-specifier-count=3", "--transitionalJSR292=false", + "--verify-specifier-count=3", + "--verbose", "--expand-properties", "--classpath", testClassPath, "--java", "test.java.lang.invoke.InvokeDynamicPrintArgs", "--check-output" }; @@ -159,16 +160,14 @@ public class InvokeDynamicPrintArgs { shouldNotCallThis(); return ((CallSite) MH_bsm2().invokeGeneric(lookup(), "bar", methodType(void.class, String.class, int.class) - , new Object[] { Void.class, "void type!", - 1, 234.5F, 67.5, (long)89 } + , Void.class, "void type!", 1, 234.5F, 67.5, (long)89 )).dynamicInvoker(); } private static MethodHandle INDY_bar2() throws Throwable { shouldNotCallThis(); return ((CallSite) MH_bsm2().invokeGeneric(lookup(), "bar2", methodType(void.class, String.class, int.class) - , new Object[] { Void.class, "void type!", - 1, 234.5F, 67.5, (long)89 } + , Void.class, "void type!", 1, 234.5F, 67.5, (long)89 )).dynamicInvoker(); } private static MethodHandle INDY_baz() throws Throwable { diff --git a/jdk/test/java/lang/invoke/InvokeGenericTest.java b/jdk/test/java/lang/invoke/InvokeGenericTest.java index f1aaf9eaa71..2da9634c464 100644 --- a/jdk/test/java/lang/invoke/InvokeGenericTest.java +++ b/jdk/test/java/lang/invoke/InvokeGenericTest.java @@ -25,8 +25,8 @@ /* @test * @summary unit tests for java.lang.invoke.MethodHandle.invokeGeneric - * @compile -XDallowTransitionalJSR292=no -target 7 InvokeGenericTest.java - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles test.java.lang.invoke.InvokeGenericTest + * @compile -target 7 InvokeGenericTest.java + * @run junit/othervm test.java.lang.invoke.InvokeGenericTest */ package test.java.lang.invoke; diff --git a/jdk/test/java/lang/invoke/JavaDocExamplesTest.java b/jdk/test/java/lang/invoke/JavaDocExamplesTest.java index 7093ea2005a..7810399c62d 100644 --- a/jdk/test/java/lang/invoke/JavaDocExamplesTest.java +++ b/jdk/test/java/lang/invoke/JavaDocExamplesTest.java @@ -25,8 +25,8 @@ /* @test * @summary example code used in javadoc for java.lang.invoke API - * @compile -XDallowTransitionalJSR292=no JavaDocExamplesTest.java - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles test.java.lang.invoke.JavaDocExamplesTest + * @compile JavaDocExamplesTest.java + * @run junit/othervm test.java.lang.invoke.JavaDocExamplesTest */ /* @@ -34,7 +34,6 @@ $ $JAVA7X_HOME/bin/javac -cp $JUNIT4_JAR -d /tmp/Classes \ $DAVINCI/sources/jdk/test/java/lang/invoke/JavaDocExamplesTest.java $ $JAVA7X_HOME/bin/java -cp $JUNIT4_JAR:/tmp/Classes \ - -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles \ -Dtest.java.lang.invoke.JavaDocExamplesTest.verbosity=1 \ test.java.lang.invoke.JavaDocExamplesTest ---- diff --git a/jdk/test/java/lang/invoke/MethodHandlesTest.java b/jdk/test/java/lang/invoke/MethodHandlesTest.java index bae38f766bc..427229de7c3 100644 --- a/jdk/test/java/lang/invoke/MethodHandlesTest.java +++ b/jdk/test/java/lang/invoke/MethodHandlesTest.java @@ -25,8 +25,8 @@ /* @test * @summary unit tests for java.lang.invoke.MethodHandles - * @compile -source 7 -target 7 -XDallowTransitionalJSR292=no MethodHandlesTest.java - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles test.java.lang.invoke.MethodHandlesTest + * @compile -source 7 -target 7 MethodHandlesTest.java + * @run junit/othervm test.java.lang.invoke.MethodHandlesTest */ package test.java.lang.invoke; diff --git a/jdk/test/java/lang/invoke/MethodTypeTest.java b/jdk/test/java/lang/invoke/MethodTypeTest.java index 5cc32771624..037015090af 100644 --- a/jdk/test/java/lang/invoke/MethodTypeTest.java +++ b/jdk/test/java/lang/invoke/MethodTypeTest.java @@ -26,7 +26,7 @@ /* @test * @summary unit tests for java.lang.invoke.MethodType * @compile MethodTypeTest.java - * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles test.java.lang.invoke.MethodTypeTest + * @run junit/othervm test.java.lang.invoke.MethodTypeTest */ package test.java.lang.invoke; diff --git a/jdk/test/java/lang/invoke/indify/Indify.java b/jdk/test/java/lang/invoke/indify/Indify.java index ac0485a5ebc..6c0661dfef6 100644 --- a/jdk/test/java/lang/invoke/indify/Indify.java +++ b/jdk/test/java/lang/invoke/indify/Indify.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2011, 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 @@ -89,19 +89,15 @@ import java.util.regex.*; $ JAVA_HOME=(some recent OpenJDK 7 build) $ ant $ $JAVA_HOME/bin/java -cp build/classes indify.Indify --overwrite --dest build/testout build/classes/indify/Example.class -$ $JAVA_HOME/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableInvokeDynamic -cp build/classes indify.Example +$ $JAVA_HOME/bin/java -cp build/classes indify.Example MT = (java.lang.Object)java.lang.Object MH = adder(int,int)java.lang.Integer adder(1,2) = 3 calling indy: 42 -$ $JAVA_HOME/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableInvokeDynamic -cp build/testout indify.Example +$ $JAVA_HOME/bin/java -cp build/testout indify.Example (same output as above) * *

- * Before OpenJDK build b123, the format of {@code CONSTANT_InvokeDynamic} is in transition, - * and the switch {@code --transitionalJSR292=yes} is recommended. - * It is turned off by default, but users of earlier builds may need to turn it on. - *

* A version of this transformation built on top of http://asm.ow2.org/ would be welcome. * @author John Rose */ @@ -117,7 +113,6 @@ public class Indify { public boolean overwrite = false; public boolean quiet = false; public boolean verbose = false; - public boolean transitionalJSR292 = false; // final version is distributed public boolean all = false; public int verifySpecifierCount = -1; @@ -203,9 +198,6 @@ public class Indify { case "-v": case "--verbose": case "--verbose=": verbose = booleanOption(a2); // more output break; - case "--transitionalJSR292": case "--transitionalJSR292=": - transitionalJSR292 = booleanOption(a2); // use older invokedynamic format - break; default: throw new IllegalArgumentException("unrecognized flag: "+a); } @@ -330,10 +322,14 @@ public class Indify { if (resolve) resolveClass(c); return c; } + } catch (ClassNotFoundException ex) { + // fall through + } catch (IOException ex) { + // fall through } catch (Exception ex) { - if (ex instanceof IllegalArgumentException) - // pass error from reportPatternMethods - throw (IllegalArgumentException) ex; + // pass error from reportPatternMethods, etc. + if (ex instanceof RuntimeException) throw (RuntimeException) ex; + throw new RuntimeException(ex); } } return super.loadClass(name, resolve); @@ -403,8 +399,7 @@ public class Indify { if (blab++ == 0 && !quiet) System.err.println("patching "+cf.nameString()+"."+m); //if (blab == 1) { for (Instruction j = m.instructions(); j != null; j = j.next()) System.out.println(" |"+j); } - if (con.tag == CONSTANT_InvokeDynamic || - con.tag == CONSTANT_InvokeDynamic_17) { + if (con.tag == CONSTANT_InvokeDynamic) { // need to patch the following instruction too, // but there are usually intervening argument pushes too Instruction i2 = findPop(i); @@ -566,7 +561,7 @@ public class Indify { short nt = n12[1]; char cmark = poolMarks[(char)cl]; if (cmark != 0) { - mark = cmark; // it is a java.dyn.* or java.lang.* method + mark = cmark; // it is a java.lang.invoke.* or java.lang.* method break; } String cls = cf.pool.getString(CONSTANT_Class, cl); @@ -597,8 +592,6 @@ public class Indify { if (s.startsWith("MT_")) return 'T'; else if (s.startsWith("MH_")) return 'H'; else if (s.startsWith("INDY_")) return 'I'; - else if (transitionalJSR292 && - s.startsWith("java/dyn/")) return 'D'; else if (s.startsWith("java/lang/invoke/")) return 'D'; else if (s.startsWith("java/lang/")) return 'J'; return 0; @@ -623,10 +616,6 @@ public class Indify { boolean matchType(String descr, String requiredType) { if (descr.equals(requiredType)) return true; - if (transitionalJSR292) { - String oldType = requiredType.replace("Ljava/lang/invoke/", "Ljava/dyn/"); - if (descr.equals(oldType)) return true; - } return false; } @@ -872,6 +861,7 @@ public class Indify { continue; } break; + case "invoke": case "invokeGeneric": case "invokeWithArguments": if (patternMark != 'I') break decode; @@ -1022,7 +1012,7 @@ public class Indify { private Constant makeInvokeDynamicCon(List args) { // E.g.: MH_bsm.invokeGeneric(lookup(), "name", MethodType, "extraArg") removeEmptyJVMSlots(args); - if (args.size() != 4 && args.size() != 5) return null; + if (args.size() < 4) return null; int argi = 0; short nindex, tindex, ntindex, bsmindex; Object con; @@ -1035,22 +1025,17 @@ public class Indify { tindex = ((Constant)con).itemIndex(); ntindex = (short) cf.pool.addConstant(CONSTANT_NameAndType, new Short[]{ nindex, tindex }).index; - if (transitionalJSR292) { - if (argi != args.size()) { - System.err.println("BSM specifier has extra arguments but transitionalJSR292=1"); - return null; - } - return cf.pool.addConstant(CONSTANT_InvokeDynamic_17, - new Short[]{ bsmindex, ntindex }); - } - List extraArgs = Collections.emptyList(); + List extraArgs = new ArrayList(); if (argi < args.size()) { - Object arg = args.get(argi); - if (arg instanceof List) - extraArgs = (List) arg; - else - extraArgs = Arrays.asList(arg); - removeEmptyJVMSlots(args); + extraArgs.addAll(args.subList(argi, args.size() - 1)); + Object lastArg = args.get(args.size() - 1); + if (lastArg instanceof List) { + List lastArgs = (List) lastArg; + removeEmptyJVMSlots(lastArgs); + extraArgs.addAll(lastArgs); + } else { + extraArgs.add(lastArg); + } } List extraArgIndexes = new CountedList<>(Short.class); for (Object x : extraArgs) { @@ -1062,7 +1047,10 @@ public class Indify { if (x instanceof Double) { num = Double.doubleToRawLongBits((Double)x); numTag = CONSTANT_Double; } if (num != null) x = cf.pool.addConstant(numTag, x); } - if (!(x instanceof Constant)) return null; + if (!(x instanceof Constant)) { + System.err.println("warning: unrecognized BSM argument "+x); + return null; + } extraArgIndexes.add((short) ((Constant)x).index); } List specs = bootstrapMethodSpecifiers(true); @@ -1359,7 +1347,6 @@ public class Indify { case CONSTANT_Method: case CONSTANT_InterfaceMethod: case CONSTANT_NameAndType: - case CONSTANT_InvokeDynamic_17: case CONSTANT_InvokeDynamic: // read an ordered pair arg = new Short[] { in.readShort(), in.readShort() }; @@ -1634,7 +1621,6 @@ public class Indify { CONSTANT_NameAndType = 12, CONSTANT_MethodHandle = 15, // JSR 292 CONSTANT_MethodType = 16, // JSR 292 - CONSTANT_InvokeDynamic_17 = 17, // JSR 292, only occurs in old class files CONSTANT_InvokeDynamic = 18; // JSR 292 private static final byte REF_getField = 1, diff --git a/jdk/test/java/nio/BufferPoolMXBean/Basic.java b/jdk/test/java/lang/management/BufferPoolMXBean/Basic.java similarity index 78% rename from jdk/test/java/nio/BufferPoolMXBean/Basic.java rename to jdk/test/java/lang/management/BufferPoolMXBean/Basic.java index 255edae0c8b..a55f50ef0ef 100644 --- a/jdk/test/java/nio/BufferPoolMXBean/Basic.java +++ b/jdk/test/java/lang/management/BufferPoolMXBean/Basic.java @@ -22,20 +22,22 @@ */ /* @test - * @bug 6606598 - * @summary Unit test for java.nio.BufferPoolMXBean + * @bug 6606598 7024172 + * @summary Unit test for java.lang.management.BufferPoolMXBean * @run main/othervm Basic */ import java.nio.ByteBuffer; import java.nio.MappedByteBuffer; -import java.nio.BufferPoolMXBean; +import java.nio.file.Path; +import java.nio.file.Files; +import static java.nio.file.StandardOpenOption.*; import java.nio.channels.FileChannel; -import java.io.File; -import java.io.RandomAccessFile; +import java.lang.management.BufferPoolMXBean; import java.lang.management.ManagementFactory; import javax.management.MBeanServer; import javax.management.ObjectName; +import java.lang.ref.WeakReference; import java.util.*; public class Basic { @@ -78,21 +80,21 @@ public class Basic { totalCapacity += cap; } - // map a file - File f = File.createTempFile("blah", null); - f.deleteOnExit(); - RandomAccessFile raf = new RandomAccessFile(f, "rw"); - FileChannel fc = raf.getChannel(); - mbb = fc.map(FileChannel.MapMode.READ_WRITE, 10, 100); - bufferCount++; - totalCapacity += mbb.capacity(); + // create a mapped buffer + Path tmpfile = Files.createTempFile("blah", null); + tmpfile.toFile().deleteOnExit(); + try (FileChannel fc = FileChannel.open(tmpfile, READ, WRITE)) { + mbb = fc.map(FileChannel.MapMode.READ_WRITE, 10, 100); + bufferCount++; + totalCapacity += mbb.capacity(); + } - // direct + // use platform MXBeans directly List pools = ManagementFactory.getPlatformMXBeans(BufferPoolMXBean.class); check(pools, bufferCount, totalCapacity); - // using MBeanServer + // use MBeanServer MBeanServer server = ManagementFactory.getPlatformMBeanServer(); Set mbeans = server.queryNames( new ObjectName("java.nio:type=BufferPool,*"), null); @@ -103,5 +105,13 @@ public class Basic { pools.add(pool); } check(pools, bufferCount, totalCapacity); + + // attempt to unmap mapped buffer + WeakReference ref = new WeakReference<>(mbb); + mbb = null; + do { + System.gc(); + Thread.sleep(250); + } while (ref.get() != null); } } diff --git a/jdk/test/java/lang/management/ManagementFactory/GetPlatformMXBeans.java b/jdk/test/java/lang/management/ManagementFactory/GetPlatformMXBeans.java index 86acdb95dfd..5e88b469e50 100644 --- a/jdk/test/java/lang/management/ManagementFactory/GetPlatformMXBeans.java +++ b/jdk/test/java/lang/management/ManagementFactory/GetPlatformMXBeans.java @@ -23,23 +23,26 @@ /* * @test - * @bug 6610094 - * @summary Basic unit test of ManagementFactory.getPlatformMXBeans() - * and also PlatformManagedObject.getObjectName() + * @bug 6610094 7024172 + * @summary Basic unit test of ManagementFactory.getPlatformMXBean(s) + * methods and PlatformManagedObject.getObjectName() * @author Mandy Chung * * @run main GetPlatformMXBeans */ import java.lang.management.*; -import static java.lang.management.ManagementFactory.*; +import java.io.IOException; import java.util.*; import javax.management.*; +import static java.lang.management.ManagementFactory.*; + public class GetPlatformMXBeans { private static MBeanServer platformMBeanServer = getPlatformMBeanServer(); public static void main(String[] argv) throws Exception { + // singleton platform MXBean checkPlatformMXBean(getClassLoadingMXBean(), ClassLoadingMXBean.class, CLASS_LOADING_MXBEAN_NAME); @@ -58,17 +61,28 @@ public class GetPlatformMXBeans { checkPlatformMXBean(getThreadMXBean(), ThreadMXBean.class, THREAD_MXBEAN_NAME); + + // the following MXBean can have more than one instances checkGarbageCollectorMXBeans(getGarbageCollectorMXBeans()); checkMemoryManagerMXBeans(getMemoryManagerMXBeans()); checkMemoryPoolMXBeans(getMemoryPoolMXBeans()); + + // check invalid platform MXBean + checkInvalidPlatformMXBean(); } private static - void checkPlatformMXBean(T obj, Class mxbeanInterface, - String mxbeanName) throws Exception + void checkPlatformMXBean(T obj, Class mxbeanInterface, + String mxbeanName) + throws Exception { - int numElements = (obj != null ? 1 : 0); - // verify local list of platform MXBeans + // getPlatformMXBean may return null if the mxbean is not implemented + PlatformManagedObject mxbean = getPlatformMXBean(mxbeanInterface); + if (obj != mxbean) { + throw new RuntimeException("Singleton MXBean returned not matched"); + } + + int numElements = obj == null ? 0 : 1; List mxbeans = getPlatformMXBeans(mxbeanInterface); if (mxbeans.size() != numElements) { @@ -77,24 +91,46 @@ public class GetPlatformMXBeans { } if (obj != null) { - PlatformManagedObject pmo = mxbeans.get(0); - if (obj != pmo) { + if (obj != mxbeans.get(0)) { throw new RuntimeException("The list returned by getPlatformMXBeans" + " not matched"); } ObjectName on = new ObjectName(mxbeanName); - if (!on.equals(pmo.getObjectName())) { + if (!on.equals(mxbean.getObjectName())) { throw new RuntimeException("Unmatched ObjectName " + - pmo.getObjectName() + " Expected = " + on); + mxbean.getObjectName() + " Expected = " + on); } + checkRemotePlatformMXBean(obj, platformMBeanServer, + mxbeanInterface, mxbeanName); + } + } + + // verify platform MXBeans in the platform MBeanServer + private static + void checkRemotePlatformMXBean(T obj, + MBeanServerConnection mbs, + Class mxbeanInterface, + String mxbeanName) + throws Exception + { + PlatformManagedObject mxbean = getPlatformMXBean(mbs, mxbeanInterface); + if ((obj == null && mxbean != null) || (obj != null && mxbean == null)) { + throw new RuntimeException("Singleton MXBean returned not matched"); } - // verify platform MXBeans in the platform MBeanServer - mxbeans = getPlatformMXBeans(platformMBeanServer, mxbeanInterface); + int numElements = obj == null ? 0 : 1; + List mxbeans = + getPlatformMXBeans(mbs, mxbeanInterface); if (mxbeans.size() != numElements) { throw new RuntimeException("Unmatched number of platform MXBeans " + mxbeans.size() + ". Expected = " + numElements); } + + ObjectName on = new ObjectName(mxbeanName); + if (!on.equals(mxbean.getObjectName())) { + throw new RuntimeException("Unmatched ObjectName " + + mxbean.getObjectName() + " Expected = " + on); + } } private static void checkMemoryManagerMXBeans(List objs) @@ -148,6 +184,14 @@ public class GetPlatformMXBeans { void checkPlatformMXBeans(List objs, Class mxbeanInterface) throws Exception { + try { + getPlatformMXBean(mxbeanInterface); + // mxbeanInterface is not a singleton + throw new RuntimeException(mxbeanInterface + ": not a singleton MXBean"); + } catch (IllegalArgumentException e) { + // expect IAE + } + // verify local list of platform MXBeans List mxbeans = getPlatformMXBeans(mxbeanInterface); @@ -177,4 +221,40 @@ public class GetPlatformMXBeans { + mxbeans.size() + ". Expected = " + objs.size()); } } + + interface FakeMXBean extends PlatformManagedObject {}; + + private static void checkInvalidPlatformMXBean() throws IOException { + try { + getPlatformMXBean(FakeMXBean.class); + // mxbeanInterface is not a singleton + throw new RuntimeException("Expect IllegalArgumentException but not thrown"); + } catch (IllegalArgumentException e) { + // expect IAE + } + + try { + getPlatformMXBeans(FakeMXBean.class); + // mxbeanInterface is not a singleton + throw new RuntimeException("Expect IllegalArgumentException but not thrown"); + } catch (IllegalArgumentException e) { + // expect IAE + } + + try { + getPlatformMXBean(platformMBeanServer, FakeMXBean.class); + // mxbeanInterface is not a singleton + throw new RuntimeException("Expect IllegalArgumentException but not thrown"); + } catch (IllegalArgumentException e) { + // expect IAE + } + + try { + getPlatformMXBeans(platformMBeanServer, FakeMXBean.class); + // mxbeanInterface is not a singleton + throw new RuntimeException("Expect IllegalArgumentException but not thrown"); + } catch (IllegalArgumentException e) { + // expect IAE + } + } } diff --git a/jdk/test/java/lang/management/PlatformLoggingMXBean/LoggingMXBeanTest.java b/jdk/test/java/lang/management/PlatformLoggingMXBean/LoggingMXBeanTest.java new file mode 100644 index 00000000000..17569b4cec1 --- /dev/null +++ b/jdk/test/java/lang/management/PlatformLoggingMXBean/LoggingMXBeanTest.java @@ -0,0 +1,229 @@ +/* + * Copyright (c) 2011, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 7024172 + * @summary Test if proxy for PlatformLoggingMXBean is equivalent + * to proxy for LoggingMXBean + * + * @build LoggingMXBeanTest + * @run main LoggingMXBeanTest + */ + +import java.lang.management.*; +import javax.management.MBeanServer; +import java.util.logging.*; +import java.util.ArrayList; +import java.util.List; + +public class LoggingMXBeanTest +{ + static String LOGGER_NAME_1 = "com.sun.management.Logger"; + static String LOGGER_NAME_2 = "com.sun.management.Logger.Logger2"; + static String UNKNOWN_LOGGER_NAME = "com.sun.management.Unknown"; + + public static void main(String[] argv) throws Exception { + MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); + LoggingMXBean proxy = + ManagementFactory.newPlatformMXBeanProxy(mbs, + LogManager.LOGGING_MXBEAN_NAME, + LoggingMXBean.class); + + // test LoggingMXBean proxy + LoggingMXBeanTest p = new LoggingMXBeanTest(proxy); + + // check if the attributes implemented by PlatformLoggingMXBean + // and LoggingMXBean return the same value + PlatformLoggingMXBean mxbean = + ManagementFactory.getPlatformMXBean(mbs, PlatformLoggingMXBean.class); + + checkAttributes(proxy, mxbean); + } + + // same verification as in java/util/logging/LoggingMXBeanTest2 + public LoggingMXBeanTest(LoggingMXBean mbean) throws Exception { + + Logger logger1 = Logger.getLogger( LOGGER_NAME_1 ); + logger1.setLevel(Level.FINE); + Logger logger2 = Logger.getLogger( LOGGER_NAME_2 ); + logger2.setLevel(null); + + /* + * Check for the existence of our new Loggers + */ + System.out.println("Test Logger Name retrieval (getLoggerNames)"); + boolean log1 = false, log2 = false; + List loggers = mbean.getLoggerNames(); + if (loggers == null || loggers.size() < 2) { + throw new RuntimeException( + "Could not Detect the presense of the new Loggers"); + } + + for (String logger : loggers) { + if (logger.equals(LOGGER_NAME_1)) { + log1 = true; + System.out.println(" : Found new Logger : " + logger); + } + if (logger.equals(LOGGER_NAME_2)) { + log2 = true; + System.out.println(" : Found new Logger : " + logger); + } + } + if ( log1 && log2 ) + System.out.println(" : PASSED." ); + else { + System.out.println(" : FAILED. Could not Detect the new Loggers." ); + throw new RuntimeException( + "Could not Detect the presense of the new Loggers"); + } + + System.out.println("Test getLoggerLevel"); + String l1 = mbean.getLoggerLevel(LOGGER_NAME_1); + System.out.println(" : Level for Logger " + LOGGER_NAME_1 + " : " + l1); + if (!l1.equals(Level.FINE.getName())) { + throw new RuntimeException( + "Expected level for " + LOGGER_NAME_1 + " = " + + Level.FINE.getName() + " but got " + l1); + } + String l2 = mbean.getLoggerLevel(LOGGER_NAME_2); + System.out.println(" : Level for Logger " + LOGGER_NAME_2 + " : " + l2); + if (!l2.equals("")) { + throw new RuntimeException( + "Expected level for " + LOGGER_NAME_2 + " = \"\"" + + " but got " + l2); + } + String l3 = mbean.getLoggerLevel(UNKNOWN_LOGGER_NAME); + System.out.println(" : Level for unknown logger : " + l3); + if (l3 != null) { + throw new RuntimeException( + "Expected level for " + UNKNOWN_LOGGER_NAME + " = null" + + " but got " + l3); + } + + System.out.println("Test setLoggerLevel"); + mbean.setLoggerLevel(LOGGER_NAME_1, "INFO"); + System.out.println(" : Set Level for Logger " + LOGGER_NAME_1 + " to: INFO"); + Level l = logger1.getLevel(); + if (l != Level.INFO) { + throw new RuntimeException( + "Expected level for " + LOGGER_NAME_1 + " = " + + Level.INFO + " but got " + l); + } + + mbean.setLoggerLevel(LOGGER_NAME_2, "SEVERE"); + System.out.println(" : Set Level for Logger " + LOGGER_NAME_2 + " to: SERVER"); + l = logger2.getLevel(); + if (l != Level.SEVERE) { + throw new RuntimeException( + "Expected level for " + LOGGER_NAME_2 + " = " + + Level.SEVERE+ " but got " + l); + } + + mbean.setLoggerLevel(LOGGER_NAME_1, null); + System.out.println(" : Set Level for Logger " + LOGGER_NAME_1 + " to: null"); + l = logger1.getLevel(); + if (l != null) { + throw new RuntimeException( + "Expected level for " + LOGGER_NAME_1 + " = null " + + " but got " + l); + } + + boolean iaeCaught = false; + System.out.println(" : Set Level for unknown Logger to: FINE"); + try { + mbean.setLoggerLevel(UNKNOWN_LOGGER_NAME, "FINE"); + } catch (IllegalArgumentException e) { + // expected + iaeCaught = true; + System.out.println(" : IllegalArgumentException caught as expected"); + } + if (!iaeCaught) { + throw new RuntimeException( + "Expected IllegalArgumentException for setting level for " + + UNKNOWN_LOGGER_NAME + " not thrown"); + } + iaeCaught = false; + System.out.println(" : Set Level for Logger " + LOGGER_NAME_1 + " to: DUMMY"); + try { + mbean.setLoggerLevel(LOGGER_NAME_1, "DUMMY"); + } catch (IllegalArgumentException e) { + // expected + iaeCaught = true; + System.out.println(" : IllegalArgumentException caught as expected"); + } + if (!iaeCaught) { + throw new RuntimeException( + "Expected IllegalArgumentException for invalid level."); + } + + + System.out.println("Test getParentLoggerName"); + String p1 = mbean.getParentLoggerName(LOGGER_NAME_2); + System.out.println(" : Parent Logger for " + LOGGER_NAME_2 + " : " + p1); + if (!p1.equals(LOGGER_NAME_1)) { + throw new RuntimeException( + "Expected parent for " + LOGGER_NAME_2 + " = " + + LOGGER_NAME_1 + " but got " + p1); + } + String p2 = mbean.getParentLoggerName(""); + System.out.println(" : Parent Logger for \"\" : " + p2); + if (!p2.equals("")) { + throw new RuntimeException( + "Expected parent for root logger \"\" = \"\"" + + " but got " + p2); + } + String p3 = mbean.getParentLoggerName(UNKNOWN_LOGGER_NAME); + System.out.println(" : Parent Logger for unknown logger : " + p3); + if (p3 != null) { + throw new RuntimeException( + "Expected level for " + UNKNOWN_LOGGER_NAME + " = null" + + " but got " + p3); + } + } + + private static void checkAttributes(LoggingMXBean mxbean1, + PlatformLoggingMXBean mxbean2) { + // verify logger names + List loggers1 = mxbean1.getLoggerNames(); + List loggers2 = mxbean2.getLoggerNames(); + if (loggers1.size() != loggers2.size()) + throw new RuntimeException("LoggerNames: unmatched number of entries"); + List loggers3 = new ArrayList<>(loggers1); + loggers3.removeAll(loggers2); + if (loggers3.size() != 0) + throw new RuntimeException("LoggerNames: unmatched loggers"); + + // verify logger's level and parent + for (String logger : loggers1) { + if (!mxbean1.getLoggerLevel(logger) + .equals(mxbean2.getLoggerLevel(logger))) + throw new RuntimeException( + "LoggerLevel: unmatched level for " + logger); + if (!mxbean1.getParentLoggerName(logger) + .equals(mxbean2.getParentLoggerName(logger))) + throw new RuntimeException( + "ParentLoggerName: unmatched parent logger's name for " + logger); + } + } +} diff --git a/jdk/test/java/util/logging/PlatformLoggingMXBean/PlatformLoggingMXBeanTest.java b/jdk/test/java/lang/management/PlatformLoggingMXBean/PlatformLoggingMXBeanTest.java similarity index 95% rename from jdk/test/java/util/logging/PlatformLoggingMXBean/PlatformLoggingMXBeanTest.java rename to jdk/test/java/lang/management/PlatformLoggingMXBean/PlatformLoggingMXBeanTest.java index f76a3d3ff10..3694641351d 100644 --- a/jdk/test/java/util/logging/PlatformLoggingMXBean/PlatformLoggingMXBeanTest.java +++ b/jdk/test/java/lang/management/PlatformLoggingMXBean/PlatformLoggingMXBeanTest.java @@ -23,10 +23,11 @@ /* * @test - * @bug 6876135 + * @bug 6876135 7024172 * * @summary Test PlatformLoggingMXBean - * This test performs similar testing as LoggingMXBeanTest. + * This test performs similar testing as + * java/util/logging/LoggingMXBeanTest. * * @build PlatformLoggingMXBeanTest * @run main PlatformLoggingMXBeanTest @@ -34,6 +35,7 @@ import javax.management.*; import java.lang.management.ManagementFactory; +import java.lang.management.PlatformLoggingMXBean; import java.util.logging.*; import java.util.List; @@ -247,14 +249,8 @@ public class PlatformLoggingMXBeanTest } public static void main(String[] argv) throws Exception { - List result = - ManagementFactory.getPlatformMXBeans(PlatformLoggingMXBean.class); - if (result.size() != 1) { - throw new RuntimeException("Unexpected number of PlatformLoggingMXBean instances: " + - result.size()); - } - - PlatformLoggingMXBean mbean = result.get(0); + PlatformLoggingMXBean mbean = + ManagementFactory.getPlatformMXBean(PlatformLoggingMXBean.class); ObjectName objname = mbean.getObjectName(); if (!objname.equals(new ObjectName(LogManager.LOGGING_MXBEAN_NAME))) { throw new RuntimeException("Invalid ObjectName " + objname); @@ -263,11 +259,12 @@ public class PlatformLoggingMXBeanTest // check if the PlatformLoggingMXBean is registered in the platform MBeanServer MBeanServer platformMBS = ManagementFactory.getPlatformMBeanServer(); ObjectName objName = new ObjectName(LogManager.LOGGING_MXBEAN_NAME); + // We could call mbs.isRegistered(objName) here. // Calling getMBeanInfo will throw exception if not found. platformMBS.getMBeanInfo(objName); - if (!platformMBS.isInstanceOf(objName, "java.util.logging.PlatformLoggingMXBean") || + if (!platformMBS.isInstanceOf(objName, "java.lang.management.PlatformLoggingMXBean") || !platformMBS.isInstanceOf(objName, "java.util.logging.LoggingMXBean")) { throw new RuntimeException(objName + " is of unexpected type"); } diff --git a/jdk/test/java/lang/reflect/Generics/TestPlainArrayNotGeneric.java b/jdk/test/java/lang/reflect/Generics/TestPlainArrayNotGeneric.java index de25d58b4ab..3f2ef6230b8 100644 --- a/jdk/test/java/lang/reflect/Generics/TestPlainArrayNotGeneric.java +++ b/jdk/test/java/lang/reflect/Generics/TestPlainArrayNotGeneric.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2010, 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 diff --git a/jdk/test/java/lang/reflect/Method/InheritedMethods.java b/jdk/test/java/lang/reflect/Method/InheritedMethods.java index 9da23d69832..ebfdc0823cd 100644 --- a/jdk/test/java/lang/reflect/Method/InheritedMethods.java +++ b/jdk/test/java/lang/reflect/Method/InheritedMethods.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 @@ -23,17 +23,14 @@ /* @test @bug 4471738 - @ignore until 6825739 fixed @summary Failure to properly traverse class hierarchy in Class.getMethod() */ import java.lang.reflect.Method; import java.util.Collection; import java.util.List; -import javax.swing.JPanel; -import javax.swing.JLabel; -public class InheritedMethods extends JPanel { +public class InheritedMethods { public static void main(String[] args) throws Exception { new InheritedMethods(); } InheritedMethods() throws Exception { Class c = Foo.class; @@ -41,7 +38,6 @@ public class InheritedMethods extends JPanel { if (m.getDeclaringClass() != java.util.List.class) { throw new RuntimeException("TEST FAILED"); } - add(new JLabel("Test")); } interface Foo extends List { } } diff --git a/jdk/test/java/math/BigInteger/BigIntegerTest.java b/jdk/test/java/math/BigInteger/BigIntegerTest.java index c23563f2208..3566a1f3619 100644 --- a/jdk/test/java/math/BigInteger/BigIntegerTest.java +++ b/jdk/test/java/math/BigInteger/BigIntegerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2011, 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 diff --git a/jdk/test/java/net/URI/Test.java b/jdk/test/java/net/URI/Test.java index 3f157ea7561..fb0fa332629 100644 --- a/jdk/test/java/net/URI/Test.java +++ b/jdk/test/java/net/URI/Test.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/jdk/test/java/net/URLClassLoader/closetest/CloseTest.java b/jdk/test/java/net/URLClassLoader/closetest/CloseTest.java index fcd8b6b1363..22071944e01 100644 --- a/jdk/test/java/net/URLClassLoader/closetest/CloseTest.java +++ b/jdk/test/java/net/URLClassLoader/closetest/CloseTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, 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 diff --git a/jdk/test/java/nio/MappedByteBuffer/Force.java b/jdk/test/java/nio/MappedByteBuffer/Force.java index 81f908bacee..52717642c94 100644 --- a/jdk/test/java/nio/MappedByteBuffer/Force.java +++ b/jdk/test/java/nio/MappedByteBuffer/Force.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 diff --git a/jdk/test/java/nio/MappedByteBuffer/ZeroMap.java b/jdk/test/java/nio/MappedByteBuffer/ZeroMap.java index 81cd3532d13..7c00bf72750 100644 --- a/jdk/test/java/nio/MappedByteBuffer/ZeroMap.java +++ b/jdk/test/java/nio/MappedByteBuffer/ZeroMap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java b/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java index afe61d6d80a..277ed40d4fe 100644 --- a/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java +++ b/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/channels/AsynchronousSocketChannel/Leaky.java b/jdk/test/java/nio/channels/AsynchronousSocketChannel/Leaky.java index 2606627446d..39b50187242 100644 --- a/jdk/test/java/nio/channels/AsynchronousSocketChannel/Leaky.java +++ b/jdk/test/java/nio/channels/AsynchronousSocketChannel/Leaky.java @@ -28,12 +28,12 @@ */ import java.nio.ByteBuffer; -import java.nio.BufferPoolMXBean; import java.nio.channels.*; import java.net.*; import java.util.List; import java.util.concurrent.Future; import java.util.concurrent.ThreadFactory; +import java.lang.management.BufferPoolMXBean; import java.lang.management.ManagementFactory; /** diff --git a/jdk/test/java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java b/jdk/test/java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java index f4445bb946f..d07df5947ad 100644 --- a/jdk/test/java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java +++ b/jdk/test/java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, 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 diff --git a/jdk/test/java/nio/channels/FileChannel/AtomicAppend.java b/jdk/test/java/nio/channels/FileChannel/AtomicAppend.java index 60bd746f123..25f6b64924c 100644 --- a/jdk/test/java/nio/channels/FileChannel/AtomicAppend.java +++ b/jdk/test/java/nio/channels/FileChannel/AtomicAppend.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2011, 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 diff --git a/jdk/test/java/nio/channels/FileChannel/Position.java b/jdk/test/java/nio/channels/FileChannel/Position.java index c6c674d9f4f..cbb7dd9de6e 100644 --- a/jdk/test/java/nio/channels/FileChannel/Position.java +++ b/jdk/test/java/nio/channels/FileChannel/Position.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/jdk/test/java/nio/channels/FileChannel/Transfer.java b/jdk/test/java/nio/channels/FileChannel/Transfer.java index 565f8ff1007..0807ead8d20 100644 --- a/jdk/test/java/nio/channels/FileChannel/Transfer.java +++ b/jdk/test/java/nio/channels/FileChannel/Transfer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2011, 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 diff --git a/jdk/test/java/nio/charset/coders/CheckSJISMappingProp.sh b/jdk/test/java/nio/charset/coders/CheckSJISMappingProp.sh index 96066b65bc3..dcde1f47c32 100644 --- a/jdk/test/java/nio/charset/coders/CheckSJISMappingProp.sh +++ b/jdk/test/java/nio/charset/coders/CheckSJISMappingProp.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2003, 2010, 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 diff --git a/jdk/test/java/nio/file/DirectoryStream/Basic.java b/jdk/test/java/nio/file/DirectoryStream/Basic.java index ec9d68ffd17..ecc66e4ca5f 100644 --- a/jdk/test/java/nio/file/DirectoryStream/Basic.java +++ b/jdk/test/java/nio/file/DirectoryStream/Basic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/DirectoryStream/DriveLetter.java b/jdk/test/java/nio/file/DirectoryStream/DriveLetter.java index a629a027d39..cf2e7e59132 100644 --- a/jdk/test/java/nio/file/DirectoryStream/DriveLetter.java +++ b/jdk/test/java/nio/file/DirectoryStream/DriveLetter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/DirectoryStream/SecureDS.java b/jdk/test/java/nio/file/DirectoryStream/SecureDS.java index fdfcfd9fdfe..60ca72ec3e6 100644 --- a/jdk/test/java/nio/file/DirectoryStream/SecureDS.java +++ b/jdk/test/java/nio/file/DirectoryStream/SecureDS.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/FileStore/Basic.java b/jdk/test/java/nio/file/FileStore/Basic.java index 8a53ca4a47d..176efef87a2 100644 --- a/jdk/test/java/nio/file/FileStore/Basic.java +++ b/jdk/test/java/nio/file/FileStore/Basic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/Files/CheckPermissions.java b/jdk/test/java/nio/file/Files/CheckPermissions.java index 8137a358d42..ba9536a7de6 100644 --- a/jdk/test/java/nio/file/Files/CheckPermissions.java +++ b/jdk/test/java/nio/file/Files/CheckPermissions.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, 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 @@ -521,19 +521,19 @@ public class CheckPermissions { // -- toRealPath -- prepare(); - file.toRealPath(true); + file.toRealPath(); assertCheckRead(file); prepare(); - file.toRealPath(false); + file.toRealPath(LinkOption.NOFOLLOW_LINKS); assertCheckRead(file); prepare(); - Paths.get(".").toRealPath(true); + Paths.get(".").toRealPath(); assertCheckPropertyAccess("user.dir"); prepare(); - Paths.get(".").toRealPath(false); + Paths.get(".").toRealPath(LinkOption.NOFOLLOW_LINKS); assertCheckPropertyAccess("user.dir"); // -- register -- diff --git a/jdk/test/java/nio/file/Files/CopyAndMove.java b/jdk/test/java/nio/file/Files/CopyAndMove.java index c0d2ba6dd8f..a9cd87b7919 100644 --- a/jdk/test/java/nio/file/Files/CopyAndMove.java +++ b/jdk/test/java/nio/file/Files/CopyAndMove.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/Files/DeleteOnClose.java b/jdk/test/java/nio/file/Files/DeleteOnClose.java index 9b50a30b0be..40310ee4eae 100644 --- a/jdk/test/java/nio/file/Files/DeleteOnClose.java +++ b/jdk/test/java/nio/file/Files/DeleteOnClose.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/Files/FileAttributes.java b/jdk/test/java/nio/file/Files/FileAttributes.java index d8aea7fe3ba..8b179f8efeb 100644 --- a/jdk/test/java/nio/file/Files/FileAttributes.java +++ b/jdk/test/java/nio/file/Files/FileAttributes.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/Files/InterruptCopy.java b/jdk/test/java/nio/file/Files/InterruptCopy.java index 1502d9e824e..467a5eadfdf 100644 --- a/jdk/test/java/nio/file/Files/InterruptCopy.java +++ b/jdk/test/java/nio/file/Files/InterruptCopy.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/Files/Links.java b/jdk/test/java/nio/file/Files/Links.java index 0c19a0c92b5..a87647e08a6 100644 --- a/jdk/test/java/nio/file/Files/Links.java +++ b/jdk/test/java/nio/file/Files/Links.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/Files/Misc.java b/jdk/test/java/nio/file/Files/Misc.java index 1ff9d0af190..785dbefa1d1 100644 --- a/jdk/test/java/nio/file/Files/Misc.java +++ b/jdk/test/java/nio/file/Files/Misc.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/Files/PassThroughFileSystem.java b/jdk/test/java/nio/file/Files/PassThroughFileSystem.java index 31345a8bf36..0a79211cf4b 100644 --- a/jdk/test/java/nio/file/Files/PassThroughFileSystem.java +++ b/jdk/test/java/nio/file/Files/PassThroughFileSystem.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2011, 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 @@ -486,8 +486,8 @@ class PassThroughFileSystem extends FileSystem { } @Override - public Path toRealPath(boolean resolveLinks) throws IOException { - return wrap(delegate.toRealPath(resolveLinks)); + public Path toRealPath(LinkOption... options) throws IOException { + return wrap(delegate.toRealPath(options)); } @Override diff --git a/jdk/test/java/nio/file/Files/SBC.java b/jdk/test/java/nio/file/Files/SBC.java index 6dcf1a92fc0..ab467266edf 100644 --- a/jdk/test/java/nio/file/Files/SBC.java +++ b/jdk/test/java/nio/file/Files/SBC.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/Files/TemporaryFiles.java b/jdk/test/java/nio/file/Files/TemporaryFiles.java index 254f874175a..4e971bc5427 100644 --- a/jdk/test/java/nio/file/Files/TemporaryFiles.java +++ b/jdk/test/java/nio/file/Files/TemporaryFiles.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/Files/delete_on_close.sh b/jdk/test/java/nio/file/Files/delete_on_close.sh index 1f3fb67ea58..7ffa009a817 100644 --- a/jdk/test/java/nio/file/Files/delete_on_close.sh +++ b/jdk/test/java/nio/file/Files/delete_on_close.sh @@ -1,5 +1,5 @@ # -# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/Files/probeContentType/Basic.java b/jdk/test/java/nio/file/Files/probeContentType/Basic.java index ce692121d1c..3980637a77e 100644 --- a/jdk/test/java/nio/file/Files/probeContentType/Basic.java +++ b/jdk/test/java/nio/file/Files/probeContentType/Basic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/Files/probeContentType/ForceLoad.java b/jdk/test/java/nio/file/Files/probeContentType/ForceLoad.java index a4bfe5915a1..5bb19ddaaa0 100644 --- a/jdk/test/java/nio/file/Files/probeContentType/ForceLoad.java +++ b/jdk/test/java/nio/file/Files/probeContentType/ForceLoad.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/Files/probeContentType/SimpleFileTypeDetector.java b/jdk/test/java/nio/file/Files/probeContentType/SimpleFileTypeDetector.java index a6b0e76ecd8..858b6a19485 100644 --- a/jdk/test/java/nio/file/Files/probeContentType/SimpleFileTypeDetector.java +++ b/jdk/test/java/nio/file/Files/probeContentType/SimpleFileTypeDetector.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/Files/walkFileTree/CreateFileTree.java b/jdk/test/java/nio/file/Files/walkFileTree/CreateFileTree.java index c00f058152d..9911bfa405a 100644 --- a/jdk/test/java/nio/file/Files/walkFileTree/CreateFileTree.java +++ b/jdk/test/java/nio/file/Files/walkFileTree/CreateFileTree.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/Files/walkFileTree/MaxDepth.java b/jdk/test/java/nio/file/Files/walkFileTree/MaxDepth.java index 9fab42b2740..ce0d15592d7 100644 --- a/jdk/test/java/nio/file/Files/walkFileTree/MaxDepth.java +++ b/jdk/test/java/nio/file/Files/walkFileTree/MaxDepth.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2011, 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 diff --git a/jdk/test/java/nio/file/Files/walkFileTree/PrintFileTree.java b/jdk/test/java/nio/file/Files/walkFileTree/PrintFileTree.java index 048298bcb19..11fec7cd6a0 100644 --- a/jdk/test/java/nio/file/Files/walkFileTree/PrintFileTree.java +++ b/jdk/test/java/nio/file/Files/walkFileTree/PrintFileTree.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/Files/walkFileTree/SkipSiblings.java b/jdk/test/java/nio/file/Files/walkFileTree/SkipSiblings.java index 36231987280..cca004427c4 100644 --- a/jdk/test/java/nio/file/Files/walkFileTree/SkipSiblings.java +++ b/jdk/test/java/nio/file/Files/walkFileTree/SkipSiblings.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/Files/walkFileTree/TerminateWalk.java b/jdk/test/java/nio/file/Files/walkFileTree/TerminateWalk.java index d72c8816f72..134d68b749d 100644 --- a/jdk/test/java/nio/file/Files/walkFileTree/TerminateWalk.java +++ b/jdk/test/java/nio/file/Files/walkFileTree/TerminateWalk.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/Files/walkFileTree/WalkWithSecurity.java b/jdk/test/java/nio/file/Files/walkFileTree/WalkWithSecurity.java index 91e61c476be..9cfc682c956 100644 --- a/jdk/test/java/nio/file/Files/walkFileTree/WalkWithSecurity.java +++ b/jdk/test/java/nio/file/Files/walkFileTree/WalkWithSecurity.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2011, 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 diff --git a/jdk/test/java/nio/file/Files/walkFileTree/walk_file_tree.sh b/jdk/test/java/nio/file/Files/walkFileTree/walk_file_tree.sh index da3ad3bb593..dee0dd06f71 100644 --- a/jdk/test/java/nio/file/Files/walkFileTree/walk_file_tree.sh +++ b/jdk/test/java/nio/file/Files/walkFileTree/walk_file_tree.sh @@ -1,5 +1,5 @@ # -# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/Path/Misc.java b/jdk/test/java/nio/file/Path/Misc.java index b2bf03e3510..424a60d6bdc 100644 --- a/jdk/test/java/nio/file/Path/Misc.java +++ b/jdk/test/java/nio/file/Path/Misc.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 @@ -22,12 +22,13 @@ */ /* @test - * @bug 4313887 6838333 + * @bug 4313887 6838333 7029979 * @summary Unit test for miscellenous java.nio.file.Path methods * @library .. */ import java.nio.file.*; +import static java.nio.file.LinkOption.*; import java.io.*; public class Misc { @@ -96,65 +97,65 @@ public class Misc { final Path link = dir.resolve("link"); /** - * Test: totRealPath(true) will access same file as toRealPath(false) + * Test: totRealPath() will access same file as toRealPath(NOFOLLOW_LINKS) */ - assertTrue(Files.isSameFile(file.toRealPath(true), file.toRealPath(false))); + assertTrue(Files.isSameFile(file.toRealPath(), file.toRealPath(NOFOLLOW_LINKS))); /** * Test: toRealPath should fail if file does not exist */ Path doesNotExist = dir.resolve("DoesNotExist"); try { - doesNotExist.toRealPath(true); + doesNotExist.toRealPath(); throw new RuntimeException("IOException expected"); } catch (IOException expected) { } try { - doesNotExist.toRealPath(false); + doesNotExist.toRealPath(NOFOLLOW_LINKS); throw new RuntimeException("IOException expected"); } catch (IOException expected) { } /** - * Test: toRealPath(true) should resolve links + * Test: toRealPath() should resolve links */ if (supportsLinks) { Files.createSymbolicLink(link, file.toAbsolutePath()); - assertTrue(link.toRealPath(true).equals(file.toRealPath(true))); + assertTrue(link.toRealPath().equals(file.toRealPath())); Files.delete(link); } /** - * Test: toRealPath(false) should not resolve links + * Test: toRealPath(NOFOLLOW_LINKS) should not resolve links */ if (supportsLinks) { Files.createSymbolicLink(link, file.toAbsolutePath()); - assertTrue(link.toRealPath(false).getFileName().equals(link.getFileName())); + assertTrue(link.toRealPath(NOFOLLOW_LINKS).getFileName().equals(link.getFileName())); Files.delete(link); } /** - * Test: toRealPath(false) with broken link + * Test: toRealPath(NOFOLLOW_LINKS) with broken link */ if (supportsLinks) { Path broken = Files.createSymbolicLink(link, doesNotExist); - assertTrue(link.toRealPath(false).getFileName().equals(link.getFileName())); + assertTrue(link.toRealPath(NOFOLLOW_LINKS).getFileName().equals(link.getFileName())); Files.delete(link); } /** * Test: toRealPath should eliminate "." */ - assertTrue(dir.resolve(".").toRealPath(true).equals(dir.toRealPath(true))); - assertTrue(dir.resolve(".").toRealPath(false).equals(dir.toRealPath(false))); + assertTrue(dir.resolve(".").toRealPath().equals(dir.toRealPath())); + assertTrue(dir.resolve(".").toRealPath(NOFOLLOW_LINKS).equals(dir.toRealPath(NOFOLLOW_LINKS))); /** * Test: toRealPath should eliminate ".." when it doesn't follow a * symbolic link */ Path subdir = Files.createDirectory(dir.resolve("subdir")); - assertTrue(subdir.resolve("..").toRealPath(true).equals(dir.toRealPath(true))); - assertTrue(subdir.resolve("..").toRealPath(false).equals(dir.toRealPath(false))); + assertTrue(subdir.resolve("..").toRealPath().equals(dir.toRealPath())); + assertTrue(subdir.resolve("..").toRealPath(NOFOLLOW_LINKS).equals(dir.toRealPath(NOFOLLOW_LINKS))); Files.delete(subdir); // clean-up diff --git a/jdk/test/java/nio/file/Path/PathOps.java b/jdk/test/java/nio/file/Path/PathOps.java index 00264201201..03177f05d2c 100644 --- a/jdk/test/java/nio/file/Path/PathOps.java +++ b/jdk/test/java/nio/file/Path/PathOps.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/Path/UriImportExport.java b/jdk/test/java/nio/file/Path/UriImportExport.java index 1db4d85d19e..934098096b6 100644 --- a/jdk/test/java/nio/file/Path/UriImportExport.java +++ b/jdk/test/java/nio/file/Path/UriImportExport.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/TestUtil.java b/jdk/test/java/nio/file/TestUtil.java index f77d8f1adb3..66cf21bfb35 100644 --- a/jdk/test/java/nio/file/TestUtil.java +++ b/jdk/test/java/nio/file/TestUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/WatchService/Basic.java b/jdk/test/java/nio/file/WatchService/Basic.java index 1b4c526dbd8..a51b07f4588 100644 --- a/jdk/test/java/nio/file/WatchService/Basic.java +++ b/jdk/test/java/nio/file/WatchService/Basic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/WatchService/FileTreeModifier.java b/jdk/test/java/nio/file/WatchService/FileTreeModifier.java index cde17db1124..dfca07f5aeb 100644 --- a/jdk/test/java/nio/file/WatchService/FileTreeModifier.java +++ b/jdk/test/java/nio/file/WatchService/FileTreeModifier.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/WatchService/LotsOfEvents.java b/jdk/test/java/nio/file/WatchService/LotsOfEvents.java index 96fb4d81783..3512d0e7e6c 100644 --- a/jdk/test/java/nio/file/WatchService/LotsOfEvents.java +++ b/jdk/test/java/nio/file/WatchService/LotsOfEvents.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2011, 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 diff --git a/jdk/test/java/nio/file/WatchService/SensitivityModifier.java b/jdk/test/java/nio/file/WatchService/SensitivityModifier.java index 47ff2b69bcf..a6f5d8a4ae7 100644 --- a/jdk/test/java/nio/file/WatchService/SensitivityModifier.java +++ b/jdk/test/java/nio/file/WatchService/SensitivityModifier.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/attribute/AclFileAttributeView/Basic.java b/jdk/test/java/nio/file/attribute/AclFileAttributeView/Basic.java index bc32699cbfa..aa613e22b78 100644 --- a/jdk/test/java/nio/file/attribute/AclFileAttributeView/Basic.java +++ b/jdk/test/java/nio/file/attribute/AclFileAttributeView/Basic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/attribute/BasicFileAttributeView/Basic.java b/jdk/test/java/nio/file/attribute/BasicFileAttributeView/Basic.java index 794a42c1c46..dd005c2c326 100644 --- a/jdk/test/java/nio/file/attribute/BasicFileAttributeView/Basic.java +++ b/jdk/test/java/nio/file/attribute/BasicFileAttributeView/Basic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/attribute/DosFileAttributeView/Basic.java b/jdk/test/java/nio/file/attribute/DosFileAttributeView/Basic.java index 702c95050cc..b00ceb56d25 100644 --- a/jdk/test/java/nio/file/attribute/DosFileAttributeView/Basic.java +++ b/jdk/test/java/nio/file/attribute/DosFileAttributeView/Basic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/attribute/FileTime/Basic.java b/jdk/test/java/nio/file/attribute/FileTime/Basic.java index f907c00f871..9a8bdf68205 100644 --- a/jdk/test/java/nio/file/attribute/FileTime/Basic.java +++ b/jdk/test/java/nio/file/attribute/FileTime/Basic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, 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 diff --git a/jdk/test/java/nio/file/attribute/PosixFileAttributeView/Basic.java b/jdk/test/java/nio/file/attribute/PosixFileAttributeView/Basic.java index 7d948b9bd3e..1ce0c6031cd 100644 --- a/jdk/test/java/nio/file/attribute/PosixFileAttributeView/Basic.java +++ b/jdk/test/java/nio/file/attribute/PosixFileAttributeView/Basic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/attribute/UserDefinedFileAttributeView/Basic.java b/jdk/test/java/nio/file/attribute/UserDefinedFileAttributeView/Basic.java index c8c07b4d8e4..69393a30a61 100644 --- a/jdk/test/java/nio/file/attribute/UserDefinedFileAttributeView/Basic.java +++ b/jdk/test/java/nio/file/attribute/UserDefinedFileAttributeView/Basic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/spi/SetDefaultProvider.java b/jdk/test/java/nio/file/spi/SetDefaultProvider.java index e21be72985a..10629f89b1d 100644 --- a/jdk/test/java/nio/file/spi/SetDefaultProvider.java +++ b/jdk/test/java/nio/file/spi/SetDefaultProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/nio/file/spi/TestProvider.java b/jdk/test/java/nio/file/spi/TestProvider.java index a604b6dfe7e..b2744f4c0e5 100644 --- a/jdk/test/java/nio/file/spi/TestProvider.java +++ b/jdk/test/java/nio/file/spi/TestProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/security/Security/ClassLoaderDeadlock/Deadlock2.sh b/jdk/test/java/security/Security/ClassLoaderDeadlock/Deadlock2.sh index f084942af21..e067300ba4f 100644 --- a/jdk/test/java/security/Security/ClassLoaderDeadlock/Deadlock2.sh +++ b/jdk/test/java/security/Security/ClassLoaderDeadlock/Deadlock2.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2010, 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 diff --git a/jdk/test/java/util/Arrays/Sorting.java b/jdk/test/java/util/Arrays/Sorting.java index 9eac7989e12..9d56b20d1c5 100644 --- a/jdk/test/java/util/Arrays/Sorting.java +++ b/jdk/test/java/util/Arrays/Sorting.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, 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 diff --git a/jdk/test/java/util/Collection/MOAT.java b/jdk/test/java/util/Collection/MOAT.java index ce7975635a8..3953240bda3 100644 --- a/jdk/test/java/util/Collection/MOAT.java +++ b/jdk/test/java/util/Collection/MOAT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/jdk/test/java/util/Currency/ValidateISO4217.java b/jdk/test/java/util/Currency/ValidateISO4217.java index 486741fdd2c..cfbe28b8312 100644 --- a/jdk/test/java/util/Currency/ValidateISO4217.java +++ b/jdk/test/java/util/Currency/ValidateISO4217.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, 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 diff --git a/jdk/test/java/util/Locale/LocaleEnhanceTest.java b/jdk/test/java/util/Locale/LocaleEnhanceTest.java index 23445d5afc0..d2d997b78b6 100644 --- a/jdk/test/java/util/Locale/LocaleEnhanceTest.java +++ b/jdk/test/java/util/Locale/LocaleEnhanceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2011, 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 diff --git a/jdk/test/java/util/Locale/LocaleTest.java b/jdk/test/java/util/Locale/LocaleTest.java index 0c21a8ef354..88a01657191 100644 --- a/jdk/test/java/util/Locale/LocaleTest.java +++ b/jdk/test/java/util/Locale/LocaleTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2010, 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 diff --git a/jdk/test/java/util/Objects/BasicObjectsTest.java b/jdk/test/java/util/Objects/BasicObjectsTest.java index bf025a8ad2c..695b57a96bf 100644 --- a/jdk/test/java/util/Objects/BasicObjectsTest.java +++ b/jdk/test/java/util/Objects/BasicObjectsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, 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 diff --git a/jdk/test/java/util/ResourceBundle/Bug6204853.java b/jdk/test/java/util/ResourceBundle/Bug6204853.java index 4ba5386c8e5..2bd0ce8575d 100644 --- a/jdk/test/java/util/ResourceBundle/Bug6204853.java +++ b/jdk/test/java/util/ResourceBundle/Bug6204853.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, 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 diff --git a/jdk/test/java/util/WeakHashMap/GCDuringIteration.java b/jdk/test/java/util/WeakHashMap/GCDuringIteration.java index 482d04426ca..4744ecce181 100644 --- a/jdk/test/java/util/WeakHashMap/GCDuringIteration.java +++ b/jdk/test/java/util/WeakHashMap/GCDuringIteration.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, 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 diff --git a/jdk/test/java/util/concurrent/Executors/AutoShutdown.java b/jdk/test/java/util/concurrent/Executors/AutoShutdown.java index fb4976ff878..eff57592397 100644 --- a/jdk/test/java/util/concurrent/Executors/AutoShutdown.java +++ b/jdk/test/java/util/concurrent/Executors/AutoShutdown.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2011, 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 diff --git a/jdk/test/java/util/concurrent/ThreadPoolExecutor/CoreThreadTimeOut.java b/jdk/test/java/util/concurrent/ThreadPoolExecutor/CoreThreadTimeOut.java index 547cd2130f0..944b466beb0 100644 --- a/jdk/test/java/util/concurrent/ThreadPoolExecutor/CoreThreadTimeOut.java +++ b/jdk/test/java/util/concurrent/ThreadPoolExecutor/CoreThreadTimeOut.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/jdk/test/java/util/jar/JarEntry/GetMethodsReturnClones.java b/jdk/test/java/util/jar/JarEntry/GetMethodsReturnClones.java index dfbeeee0a80..80ec16e1473 100644 --- a/jdk/test/java/util/jar/JarEntry/GetMethodsReturnClones.java +++ b/jdk/test/java/util/jar/JarEntry/GetMethodsReturnClones.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/jdk/test/java/util/jar/JarFile/MevNPE.java b/jdk/test/java/util/jar/JarFile/MevNPE.java new file mode 100644 index 00000000000..f8627d33324 --- /dev/null +++ b/jdk/test/java/util/jar/JarFile/MevNPE.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2011, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test + * @bug 7023056 + * @summary NPE from sun.security.util.ManifestEntryVerifier.verify during Maven build + */ +import java.io.*; +import java.util.jar.*; + +public class MevNPE { + public static void main(String[] args) throws Exception { + File f = new File(System.getProperty("test.src", "."), "Signed.jar"); + try (JarFile jf = new JarFile(f, true)) { + try (InputStream s1 = jf.getInputStream( + jf.getJarEntry(JarFile.MANIFEST_NAME))) { + s1.read(new byte[10000]); + }; + try (InputStream s2 = jf.getInputStream( + jf.getJarEntry(JarFile.MANIFEST_NAME))) { + s2.read(new byte[10000]); + }; + } + } +} diff --git a/jdk/test/java/util/jar/JarFile/ScanSignedJar.java b/jdk/test/java/util/jar/JarFile/ScanSignedJar.java index b13a2313418..fe49cea24aa 100644 --- a/jdk/test/java/util/jar/JarFile/ScanSignedJar.java +++ b/jdk/test/java/util/jar/JarFile/ScanSignedJar.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/jdk/test/java/util/logging/ClassLoaderLeakTest.java b/jdk/test/java/util/logging/ClassLoaderLeakTest.java index bc29876510d..a1c56fa6abe 100644 --- a/jdk/test/java/util/logging/ClassLoaderLeakTest.java +++ b/jdk/test/java/util/logging/ClassLoaderLeakTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, 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 diff --git a/jdk/test/java/util/logging/SimpleFormatterFormat.java b/jdk/test/java/util/logging/SimpleFormatterFormat.java new file mode 100644 index 00000000000..fc786a0f092 --- /dev/null +++ b/jdk/test/java/util/logging/SimpleFormatterFormat.java @@ -0,0 +1,159 @@ +/* + * Copyright (c) 2011, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 6381464 + * @summary Test the custom simple formatter output + * + * @run main/othervm SimpleFormatterFormat + */ + +import java.io.*; +import java.util.logging.*; +import java.util.regex.*; + +public class SimpleFormatterFormat { + private static final String key = "java.util.logging.SimpleFormatter.format"; + private static final String origFormat = System.getProperty(key); + private static final PrintStream err = System.err; + public static void main(String[] args) throws Exception { + try { + File dir = new File(System.getProperty("user.dir", ".")); + File log = new File(dir, "simpleformat.txt"); + java.nio.file.Files.deleteIfExists(log.toPath()); + PrintStream logps = new PrintStream(log); + System.setProperty(key, "%3$s:%4$s: %5$s [%1$tc] source: %2$s%6$s%n"); + writeLogRecords(logps); + checkLogRecords(log); + } finally { + if (origFormat == null) { + System.clearProperty(key); + } else { + System.setProperty(key, origFormat); + } + System.setErr(err); + } + } + + private static String[] loggers = new String[] { + "test.foo", + "test.foo", + "test.bar", + "test.bar" + }; + private static String[] messages = new String[] { + "severe hello world", + "warning lost connection", + "info welcome", + "warning exception thrown", + }; + private static void writeLogRecords(PrintStream logps) throws Exception { + try { + System.setErr(logps); + + Logger foo = Logger.getLogger("test.foo"); + foo.log(Level.SEVERE, "{0} {1} {2}", new Object[] {"severe", "hello", "world"}); + foo.warning(messages[1]); + + Logger bar = Logger.getLogger("test.bar"); + bar.finest("Dummy message"); + bar.info(messages[2]); + bar.log(Level.WARNING, messages[3], new IllegalArgumentException()); + + } finally { + logps.flush(); + logps.close(); + System.setErr(err); + } + } + + private static void checkLogRecords(File log) throws Exception { + System.out.println("Checking log records in file: " + log); + Pattern p = Pattern.compile("([\\.a-zA-Z:]+) (.*) \\[.*\\] source: (.*)"); + + try (FileInputStream in = new FileInputStream(log)) { + BufferedReader reader = new BufferedReader(new InputStreamReader(in)); + String line; + int i = 0; + while (i < messages.length && + (line = reader.readLine()) != null) { + String expectedLogger = loggers[i]; + String expectedMsg = messages[i]; + i++; + + line = line.trim(); + System.out.println(line); + + Matcher m = p.matcher(line); + if (!m.matches()) { + throw new RuntimeException("Unexpected output format"); + } + if (m.groupCount() != 3) { + throw new RuntimeException("Unexpected group count = " + + m.groupCount()); + } + // verify logger name and level + String[] ss = m.group(1).split(":"); + int len = ss.length; + if (len != 2) { + throw new RuntimeException("Unexpected logger name and level" + + m.group(1)); + } + + verify(expectedLogger, expectedMsg, ss[0], ss[1], m.group(2), m.group(3)); + } + + // expect IllegalArgumentException following it + line = reader.readLine().trim(); + if (!line.equals("java.lang.IllegalArgumentException")) { + throw new RuntimeException("Invalid line: " + line); + } + } + } + + private static void verify(String expectedLogger, String expectedMsg, + String logger, String level, + String msg, String source) { + if (!logger.equals(expectedLogger)) { + throw new RuntimeException("Unexpected logger: " + logger); + } + if (!msg.equals(expectedMsg)) { + throw new RuntimeException("Unexpected message: " + msg); + } + + String[] ss = expectedMsg.split("\\s+"); + String expectedLevel = ss[0].toUpperCase(); + if (!level.equals(expectedLevel)) { + throw new RuntimeException("Unexpected level: " + level); + } + + ss = source.split("\\s+"); + int len = ss.length; + if (!(len == 2 && + ss[0].equals("SimpleFormatterFormat") && + ss[1].equals("writeLogRecords"))) { + throw new RuntimeException("Unexpected source: " + source); + } + } +} diff --git a/jdk/test/java/util/regex/RegExTest.java b/jdk/test/java/util/regex/RegExTest.java index e323066c3a2..b444ab4816c 100644 --- a/jdk/test/java/util/regex/RegExTest.java +++ b/jdk/test/java/util/regex/RegExTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/jdk/test/java/util/zip/Available.java b/jdk/test/java/util/zip/Available.java index 2a78bd0d8e8..f2272243101 100644 --- a/jdk/test/java/util/zip/Available.java +++ b/jdk/test/java/util/zip/Available.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2011, 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 diff --git a/jdk/test/java/util/zip/FileBuilder.java b/jdk/test/java/util/zip/FileBuilder.java index 7a01a215970..68512321f17 100644 --- a/jdk/test/java/util/zip/FileBuilder.java +++ b/jdk/test/java/util/zip/FileBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/jdk/test/java/util/zip/FlaterCriticalArray.java b/jdk/test/java/util/zip/FlaterCriticalArray.java new file mode 100644 index 00000000000..3d90195dea2 --- /dev/null +++ b/jdk/test/java/util/zip/FlaterCriticalArray.java @@ -0,0 +1,295 @@ +/* + * Copyright (c) 2011, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * ZIP inflater/deflater performance. + */ + +/* + * Run this test on JDK 6 and on later + * JDKs to compare results: + * java -server -Xms1024M -Xmx1024M -Ddebug=true FlaterCriticalArray + * + * The performance issues can be readily seen on JDK 6, and so this code is + * written to compile on that platform: it does *not* use any JDK 7 - specific + * features. + */ + +import java.io.*; +import java.nio.*; +import java.util.*; +import java.util.zip.*; + +public class FlaterCriticalArray { + // If true, print information about performance + private static final boolean debug = System.getProperty("debug") != null; + + private static void debug(String s) { + if (debug) System.out.println(s); + } + + private static void debug(String name, String inOut, long time, int length) { + debug(name + ": Duration of " + inOut + "(in ms): " + time); + debug(name + ": " + inOut + "d data length: " + length + " bytes"); + } + + private static byte[] grow(byte[] a, int capacity) { + while (a.length < capacity) { + byte[] a2 = new byte[a.length * 2]; + System.arraycopy(a, 0, a2, 0, a.length); + a = a2; + } + return a; + } + + private static byte[] trim(byte[] a, int length) { + byte[] res = new byte[length]; + System.arraycopy(a, 0, res, 0, length); + return res; + } + + /* + * Base class for individual test cases + */ + abstract static private class TestCase { + protected String name; // For information in debug messages + protected byte data[]; // Data to be deflated and subsequently inflated + protected int level; // Compression level for deflater + + protected TestCase(String name, byte data[]) { + this(name, data, -1); + } + + protected TestCase(String name, byte data[], int level) { + this.name = name; + this.data = data; + this.level = level; + } + + public void runTest() throws Throwable { + long time0, time1; + byte deflated[], inflated[]; + + debug(""); + + time0 = System.currentTimeMillis(); + deflated = deflate(data, level); + time1 = System.currentTimeMillis(); + inform("Deflate", time1 - time0, deflated.length); + + time0 = System.currentTimeMillis(); + inflated = inflate(deflated); + time1 = System.currentTimeMillis(); + inform("Inflate", time1 - time0, inflated.length); + + check(Arrays.equals(data, inflated), + name + ": Inflated and deflated arrays do not match"); + } + + private void inform(String inOut, long duration, int length) { + debug(name, inOut, duration, length); + } + + abstract protected byte[] deflate(byte data[], int level) throws Throwable; + + abstract protected byte[] inflate(byte deflated[]) throws Throwable; + } + + /* + * Following are the individual test cases + */ + + private static class StrideTest extends TestCase { + static final int STRIDE = 1024; + + public StrideTest(byte data[], int level) { + super("STRIDE", data, level); + } + + protected byte[] deflate(byte in[], int level) throws Throwable { + final int len = in.length; + final Deflater deflater = new Deflater(level); + final byte[] smallBuffer = new byte[32]; + byte[] flated = new byte[32]; + int count = 0; + for (int i = 0; i 0); + return trim(flated, count); + } + + protected byte[] inflate(byte in[]) throws Throwable { + final int len = in.length; + final Inflater inflater = new Inflater(); + final byte[] smallBuffer = new byte[3200]; + + byte[] flated = new byte[32]; + int count = 0; + + for (int i = 0; i 0) { + flated = grow(flated, count + n); + System.arraycopy(smallBuffer, 0, flated, count, n); + count += n; + } + } + } + return trim(flated, count); + } + } + + private static class NoStrideTest extends TestCase { + public NoStrideTest(byte data[], int level) { + super("NO STRIDE", data, level); + } + + public byte[] deflate(byte in[], int level) throws Throwable { + final Deflater flater = new Deflater(level); + flater.setInput(in); + flater.finish(); + final byte[] smallBuffer = new byte[32]; + byte[] flated = new byte[32]; + int count = 0; + int n; + while ((n = flater.deflate(smallBuffer)) > 0) { + flated = grow(flated, count + n); + System.arraycopy(smallBuffer, 0, flated, count, n); + count += n; + } + return trim(flated, count); + } + + public byte[] inflate(byte in[]) throws Throwable { + final Inflater flater = new Inflater(); + flater.setInput(in); + final byte[] smallBuffer = new byte[32]; + byte[] flated = new byte[32]; + int count = 0; + int n; + while ((n = flater.inflate(smallBuffer)) > 0) { + flated = grow(flated, count + n); + System.arraycopy(smallBuffer, 0, flated, count, n); + count += n; + } + return trim(flated, count); + } + } + + /** + * Check Deflater{In,Out}putStream by way of GZIP{In,Out}putStream + */ + private static class GZIPTest extends TestCase { + public GZIPTest(byte data[]) { + super("GZIP", data); + } + + public byte[] deflate(byte data[], int ignored) throws Throwable { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + OutputStream gzos = new GZIPOutputStream(baos); + gzos.write(data, 0, data.length); + gzos.close(); + return baos.toByteArray(); + } + + public byte[] inflate(byte deflated[]) throws Throwable { + InputStream bais = new ByteArrayInputStream(deflated); + GZIPInputStream gzis = new GZIPInputStream(bais); + byte[] inflated = new byte[data.length]; + int numRead = 0; + int count = 0; + while ((numRead = gzis.read(inflated, count, data.length - count)) > 0) { + count += numRead; + } + check(count == data.length, name + ": Read " + count + "; expected " + data.length); + return inflated; + } + } + + public static void realMain(String[] args) throws Throwable { + byte data[]; + int level = -1; + if (args.length > 0) { + level = Integer.parseInt(args[0]); + } + debug("Using level " + level); + + if (args.length > 1) { + FileInputStream fis = new FileInputStream(args[1]); + int len = fis.available(); + data = new byte[len]; + check(fis.read(data, 0, len) == len, "Did not read complete file"); + debug("Original data from " + args[1]); + fis.close(); + } else { + ByteBuffer bb = ByteBuffer.allocate(8); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + for (int i = 0; i < 1024 * 64; i++) { // data length + bb.putDouble(0, Math.random()); + baos.write(bb.array(), 0, 8); + } + data = baos.toByteArray(); + debug("Original data from random byte array"); + } + debug("Original data length: " + data.length + " bytes"); + + new StrideTest(data, level).runTest(); + new NoStrideTest(data, level).runTest(); + new GZIPTest(data).runTest(); + } + + //--------------------- Infrastructure --------------------------- + static volatile int passed = 0, failed = 0; + static void pass() {passed++;} + static void pass(String msg) {System.out.println(msg); passed++;} + static void fail() {failed++; Thread.dumpStack();} + static void fail(String msg) {System.out.println(msg); fail();} + static void unexpected(Throwable t) {failed++; t.printStackTrace();} + static void unexpected(Throwable t, String msg) { + System.out.println(msg); failed++; t.printStackTrace();} + static boolean check(boolean cond) {if (cond) pass(); else fail(); return cond;} + static boolean check(boolean cond, String msg) {if (cond) pass(); else fail(msg); return cond;} + static void equal(Object x, Object y) { + if (x == null ? y == null : x.equals(y)) pass(); + else fail(x + " not equal to " + y);} + public static void main(String[] args) throws Throwable { + try {realMain(args);} catch (Throwable t) {unexpected(t);} + System.out.println("\nPassed = " + passed + " failed = " + failed); + if (failed > 0) throw new AssertionError("Some tests failed");} +} diff --git a/jdk/test/java/util/zip/GZIP/Accordion.java b/jdk/test/java/util/zip/GZIP/Accordion.java index ec02625a48f..fa5399e6221 100644 --- a/jdk/test/java/util/zip/GZIP/Accordion.java +++ b/jdk/test/java/util/zip/GZIP/Accordion.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/jdk/test/java/util/zip/GZIP/GZIPInputStreamRead.java b/jdk/test/java/util/zip/GZIP/GZIPInputStreamRead.java index 6eac7489872..ba87f78373a 100644 --- a/jdk/test/java/util/zip/GZIP/GZIPInputStreamRead.java +++ b/jdk/test/java/util/zip/GZIP/GZIPInputStreamRead.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2011, 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 diff --git a/jdk/test/java/util/zip/InflaterBufferSize.java b/jdk/test/java/util/zip/InflaterBufferSize.java new file mode 100644 index 00000000000..cf5363fca3e --- /dev/null +++ b/jdk/test/java/util/zip/InflaterBufferSize.java @@ -0,0 +1,163 @@ +/* + * Copyright (c) 2011, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @bug 6571338 + * @summary Inflater should not require a buffer to the inflate() methods + * larger than 1 byte. + */ + +import java.io.*; +import java.nio.*; +import java.util.*; +import java.util.zip.*; + +public class InflaterBufferSize { + private static final int DATA_LEN = 1024 *64; + private static byte[] data; + + // If true, print extra info. + private static final boolean debug = System.getProperty("debug") != null; + + private static void debug(String s) { + if (debug) System.out.println(s); + } + + private static void createData() { + ByteBuffer bb = ByteBuffer.allocate(8); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + for (int i = 0; i < DATA_LEN; i++) { + bb.putDouble(0, Math.random()); + baos.write(bb.array(), 0, 8); + } + data = baos.toByteArray(); + } + + private static byte[] grow(byte[] a, int capacity) { + while (a.length < capacity) { + byte[] a2 = new byte[a.length * 2]; + System.arraycopy(a, 0, a2, 0, a.length); + a = a2; + } + return a; + } + + private static byte[] trim(byte[] a, int length) { + byte[] res = new byte[length]; + System.arraycopy(a, 0, res, 0, length); + return res; + } + + private static byte[] deflate(byte[] in, int level) throws Throwable { + final Deflater flater = new Deflater(level); + flater.setInput(in); + flater.finish(); + final byte[] smallBuffer = new byte[32]; + byte[] flated = new byte[32]; + int count = 0; + int n; + while ((n = flater.deflate(smallBuffer)) > 0) { + flated = grow(flated, count + n); + System.arraycopy(smallBuffer, 0, flated, count, n); + count += n; + } + return trim(flated, count); + } + + private static byte[] inflate(byte[] in) throws Throwable { + final Inflater flater = new Inflater(); + flater.setInput(in); + // This is the buffer of interest. It should be possible to use any + // non-zero size. + final byte[] smallBuffer = new byte[1]; + byte[] flated = new byte[32]; + int count = 0; + int n; + while ((n = flater.inflate(smallBuffer)) > 0) { + flated = grow(flated, count + n); + System.arraycopy(smallBuffer, 0, flated, count, n); + count += n; + } + return trim(flated, count); + } + + public static void realMain(String[] args) throws Throwable { + byte deflated[], inflated[]; + + int level = -1; + if (args.length > 0) { + level = Integer.parseInt(args[0]); + } + debug("Using level " + level); + + if (args.length > 1) { + FileInputStream fis = new FileInputStream(args[1]); + int len = fis.available(); + data = new byte[len]; + check(fis.read(data, 0, len) == len, "Did not read complete file"); + debug("Original data from " + args[1]); + fis.close(); + } else { + createData(); + debug("Original data from random byte array"); + } + debug("Original data length: " + data.length + " bytes"); + + debug(""); + deflated = deflate(data, level); + debug("Deflated data length: " + deflated.length + " bytes"); + + inflated = inflate(deflated); + debug("Inflated data length: "+ inflated.length + " bytes" ); + + if (!check(Arrays.equals(data, inflated), + "Inflated and deflated arrays do not match")) { + OutputStream os = new BufferedOutputStream(new FileOutputStream("deflated.zip")); + try { + os.write(deflated); + } finally { + os.close(); + } + } + } + + //--------------------- Infrastructure --------------------------- + static volatile int passed = 0, failed = 0; + static void pass() {passed++;} + static void pass(String msg) {System.out.println(msg); passed++;} + static void fail() {failed++; Thread.dumpStack();} + static void fail(String msg) {System.out.println(msg); fail();} + static void unexpected(Throwable t) {failed++; t.printStackTrace();} + static void unexpected(Throwable t, String msg) { + System.out.println(msg); failed++; t.printStackTrace();} + static boolean check(boolean cond) {if (cond) pass(); else fail(); return cond;} + static boolean check(boolean cond, String msg) {if (cond) pass(); else fail(msg); return cond;} + static void equal(Object x, Object y) { + if (x == null ? y == null : x.equals(y)) pass(); + else fail(x + " not equal to " + y);} + public static void main(String[] args) throws Throwable { + try {realMain(args);} catch (Throwable t) {unexpected(t);} + System.out.println("\nPassed = " + passed + " failed = " + failed); + if (failed > 0) throw new AssertionError("Some tests failed");} +} diff --git a/jdk/test/java/util/zip/InfoZip.java b/jdk/test/java/util/zip/InfoZip.java index c7abba251ef..4d9811d99b8 100644 --- a/jdk/test/java/util/zip/InfoZip.java +++ b/jdk/test/java/util/zip/InfoZip.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/jdk/test/java/util/zip/LargeZip.java b/jdk/test/java/util/zip/LargeZip.java index a4f00d23a41..7d34fd1bc24 100644 --- a/jdk/test/java/util/zip/LargeZip.java +++ b/jdk/test/java/util/zip/LargeZip.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, 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 diff --git a/jdk/test/java/util/zip/TestEmptyZip.java b/jdk/test/java/util/zip/TestEmptyZip.java index ff4406c976c..11d74424685 100644 --- a/jdk/test/java/util/zip/TestEmptyZip.java +++ b/jdk/test/java/util/zip/TestEmptyZip.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/java/util/zip/ZipCoding.java b/jdk/test/java/util/zip/ZipCoding.java index a21a8f2b31f..281df21a204 100644 --- a/jdk/test/java/util/zip/ZipCoding.java +++ b/jdk/test/java/util/zip/ZipCoding.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, 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 diff --git a/jdk/test/java/util/zip/ZipFile/Assortment.java b/jdk/test/java/util/zip/ZipFile/Assortment.java index bb0d9fa8eb4..7e0d4055f03 100644 --- a/jdk/test/java/util/zip/ZipFile/Assortment.java +++ b/jdk/test/java/util/zip/ZipFile/Assortment.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/jdk/test/java/util/zip/ZipFile/Comment.java b/jdk/test/java/util/zip/ZipFile/Comment.java index 61a02521caa..d9eff5c9d94 100644 --- a/jdk/test/java/util/zip/ZipFile/Comment.java +++ b/jdk/test/java/util/zip/ZipFile/Comment.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/jdk/test/java/util/zip/ZipFile/CopyJar.java b/jdk/test/java/util/zip/ZipFile/CopyJar.java index 217fd730531..abeb1f3c462 100644 --- a/jdk/test/java/util/zip/ZipFile/CopyJar.java +++ b/jdk/test/java/util/zip/ZipFile/CopyJar.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/jdk/test/java/util/zip/ZipFile/CorruptedZipFiles.java b/jdk/test/java/util/zip/ZipFile/CorruptedZipFiles.java index 51d17508fb8..6ef3ec5d8f6 100644 --- a/jdk/test/java/util/zip/ZipFile/CorruptedZipFiles.java +++ b/jdk/test/java/util/zip/ZipFile/CorruptedZipFiles.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/jdk/test/java/util/zip/ZipFile/DeleteTempJar.java b/jdk/test/java/util/zip/ZipFile/DeleteTempJar.java index 9d504cb7e92..ae071d82804 100644 --- a/jdk/test/java/util/zip/ZipFile/DeleteTempJar.java +++ b/jdk/test/java/util/zip/ZipFile/DeleteTempJar.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/jdk/test/java/util/zip/ZipFile/EnumAfterClose.java b/jdk/test/java/util/zip/ZipFile/EnumAfterClose.java index 5d112dea12e..38c00466e8f 100644 --- a/jdk/test/java/util/zip/ZipFile/EnumAfterClose.java +++ b/jdk/test/java/util/zip/ZipFile/EnumAfterClose.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 diff --git a/jdk/test/java/util/zip/ZipFile/FinalizeZipFile.java b/jdk/test/java/util/zip/ZipFile/FinalizeZipFile.java index ab89803e5a4..56ac12efb34 100644 --- a/jdk/test/java/util/zip/ZipFile/FinalizeZipFile.java +++ b/jdk/test/java/util/zip/ZipFile/FinalizeZipFile.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2011, 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 diff --git a/jdk/test/java/util/zip/ZipFile/GetDirEntry.java b/jdk/test/java/util/zip/ZipFile/GetDirEntry.java index 0b2af4ffe28..e74fa6b3154 100644 --- a/jdk/test/java/util/zip/ZipFile/GetDirEntry.java +++ b/jdk/test/java/util/zip/ZipFile/GetDirEntry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/jdk/test/java/util/zip/ZipFile/LargeZipFile.java b/jdk/test/java/util/zip/ZipFile/LargeZipFile.java index 2df4ca75486..b88ff5b4541 100644 --- a/jdk/test/java/util/zip/ZipFile/LargeZipFile.java +++ b/jdk/test/java/util/zip/ZipFile/LargeZipFile.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, 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 diff --git a/jdk/test/java/util/zip/ZipFile/ManyEntries.java b/jdk/test/java/util/zip/ZipFile/ManyEntries.java index df741ad0dce..4334489e294 100644 --- a/jdk/test/java/util/zip/ZipFile/ManyEntries.java +++ b/jdk/test/java/util/zip/ZipFile/ManyEntries.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/jdk/test/java/util/zip/ZipFile/ManyZipFiles.java b/jdk/test/java/util/zip/ZipFile/ManyZipFiles.java index 27f35b77368..7f64681c11e 100644 --- a/jdk/test/java/util/zip/ZipFile/ManyZipFiles.java +++ b/jdk/test/java/util/zip/ZipFile/ManyZipFiles.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2011, 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 diff --git a/jdk/test/java/util/zip/ZipFile/ReadAfterClose.java b/jdk/test/java/util/zip/ZipFile/ReadAfterClose.java index 4391db7e9e2..34882451751 100644 --- a/jdk/test/java/util/zip/ZipFile/ReadAfterClose.java +++ b/jdk/test/java/util/zip/ZipFile/ReadAfterClose.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 diff --git a/jdk/test/java/util/zip/ZipFile/ReadZip.java b/jdk/test/java/util/zip/ZipFile/ReadZip.java index 9ee4cccfc75..b0e757158f7 100644 --- a/jdk/test/java/util/zip/ZipFile/ReadZip.java +++ b/jdk/test/java/util/zip/ZipFile/ReadZip.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 diff --git a/jdk/test/java/util/zip/ZipFile/ShortRead.java b/jdk/test/java/util/zip/ZipFile/ShortRead.java index e857f7f552a..32913394ff4 100644 --- a/jdk/test/java/util/zip/ZipFile/ShortRead.java +++ b/jdk/test/java/util/zip/ZipFile/ShortRead.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 diff --git a/jdk/test/java/util/zip/zip.java b/jdk/test/java/util/zip/zip.java index 62fb71398a7..878e976d7ea 100644 --- a/jdk/test/java/util/zip/zip.java +++ b/jdk/test/java/util/zip/zip.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, 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 diff --git a/jdk/test/javax/imageio/stream/StreamCloserLeak/run_test.sh b/jdk/test/javax/imageio/stream/StreamCloserLeak/run_test.sh index c9dcb393be5..95f0049bb83 100644 --- a/jdk/test/javax/imageio/stream/StreamCloserLeak/run_test.sh +++ b/jdk/test/javax/imageio/stream/StreamCloserLeak/run_test.sh @@ -1,6 +1,6 @@ #!/bin/ksh -p # -# Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2010, 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 diff --git a/jdk/test/javax/print/DialogMargins.java b/jdk/test/javax/print/DialogMargins.java index 30c15b6d1dd..41b35866d79 100644 --- a/jdk/test/javax/print/DialogMargins.java +++ b/jdk/test/javax/print/DialogMargins.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2011, 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 diff --git a/jdk/test/javax/print/attribute/ServiceDialogTest.java b/jdk/test/javax/print/attribute/ServiceDialogTest.java index 184c8c0687c..bce24e749cf 100644 --- a/jdk/test/javax/print/attribute/ServiceDialogTest.java +++ b/jdk/test/javax/print/attribute/ServiceDialogTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2011, 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 diff --git a/jdk/test/javax/script/CommonSetup.sh b/jdk/test/javax/script/CommonSetup.sh index 26af6f09c0e..54276a60f77 100644 --- a/jdk/test/javax/script/CommonSetup.sh +++ b/jdk/test/javax/script/CommonSetup.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2010, 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 diff --git a/jdk/test/javax/script/VersionTest.java b/jdk/test/javax/script/VersionTest.java index ff28c2c2e17..374f43be51c 100644 --- a/jdk/test/javax/script/VersionTest.java +++ b/jdk/test/javax/script/VersionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2010, 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 diff --git a/jdk/test/javax/sound/sampled/Clip/ClipSetPos.java b/jdk/test/javax/sound/sampled/Clip/ClipSetPos.java index 2968c9b735f..715274fe65f 100644 --- a/jdk/test/javax/sound/sampled/Clip/ClipSetPos.java +++ b/jdk/test/javax/sound/sampled/Clip/ClipSetPos.java @@ -33,6 +33,7 @@ import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.Clip; +import javax.sound.sampled.DataLine; import javax.sound.sampled.LineUnavailableException; public class ClipSetPos { @@ -48,12 +49,16 @@ public class ClipSetPos { boolean testPassed = true; Clip clip = null; try { - clip = AudioSystem.getClip(); + clip = (Clip)AudioSystem.getLine(new DataLine.Info(Clip.class, audioFormat)); clip.open(audioFormat, dataBuffer, 0, dataBuffer.length); } catch (LineUnavailableException ex) { log(ex); log("Cannot test (this is not failure)"); return; + } catch (IllegalArgumentException ex) { + log(ex); + log("Cannot test (this is not failure)"); + return; } log("clip: " + clip.getClass().getName()); diff --git a/jdk/test/javax/swing/JFileChooser/6342301/bug6342301.java b/jdk/test/javax/swing/JFileChooser/6342301/bug6342301.java index 54b4128d966..c2d665525a8 100644 --- a/jdk/test/javax/swing/JFileChooser/6342301/bug6342301.java +++ b/jdk/test/javax/swing/JFileChooser/6342301/bug6342301.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2011, 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 diff --git a/jdk/test/javax/swing/JFileChooser/6798062/bug6798062.java b/jdk/test/javax/swing/JFileChooser/6798062/bug6798062.java index 45df0b643de..a43ba18d9e4 100644 --- a/jdk/test/javax/swing/JFileChooser/6798062/bug6798062.java +++ b/jdk/test/javax/swing/JFileChooser/6798062/bug6798062.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, 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 diff --git a/jdk/test/javax/swing/JLabel/7004134/bug7004134.java b/jdk/test/javax/swing/JLabel/7004134/bug7004134.java index 09be54bee06..2768263e458 100644 --- a/jdk/test/javax/swing/JLabel/7004134/bug7004134.java +++ b/jdk/test/javax/swing/JLabel/7004134/bug7004134.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2011, 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 diff --git a/jdk/test/javax/swing/JScrollBar/6542335/bug6542335.java b/jdk/test/javax/swing/JScrollBar/6542335/bug6542335.java index b71ae1cde51..1aa5ba18ad9 100644 --- a/jdk/test/javax/swing/JScrollBar/6542335/bug6542335.java +++ b/jdk/test/javax/swing/JScrollBar/6542335/bug6542335.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2011, 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 diff --git a/jdk/test/javax/swing/UIDefaults/6795356/bug6795356.java b/jdk/test/javax/swing/UIDefaults/6795356/bug6795356.java index 698dc00e22f..f22e5883250 100644 --- a/jdk/test/javax/swing/UIDefaults/6795356/bug6795356.java +++ b/jdk/test/javax/swing/UIDefaults/6795356/bug6795356.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, 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 diff --git a/jdk/test/javax/swing/border/Test4856008.java b/jdk/test/javax/swing/border/Test4856008.java index a98e474fbaf..7c0da08e930 100644 --- a/jdk/test/javax/swing/border/Test4856008.java +++ b/jdk/test/javax/swing/border/Test4856008.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, 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 @@ -23,7 +23,7 @@ /* * @test - * @bug 4856008 + * @bug 4856008 7025987 * @summary Tests border insets * @author Sergey Malenkov */ @@ -59,6 +59,7 @@ import javax.swing.plaf.basic.BasicBorders; import javax.swing.plaf.basic.BasicToolBarUI; import javax.swing.plaf.metal.MetalBorders; import javax.swing.plaf.metal.MetalComboBoxEditor; +import javax.swing.plaf.nimbus.NimbusLookAndFeel; import sun.swing.plaf.synth.SynthFileChooserUI; @@ -134,6 +135,9 @@ public class Test4856008 { //+ SynthFileChooserUI.UIBorder: new SynthFileChooser().getUIBorder(), + + //+ LoweredBorder: + new NimbusLookAndFeel().getDefaults().getBorder("TitledBorder.border"), }; public static void main(String[] args) { diff --git a/jdk/test/javax/swing/border/Test6978482.java b/jdk/test/javax/swing/border/Test6978482.java index 8bf6b9b33d4..804970f2210 100644 --- a/jdk/test/javax/swing/border/Test6978482.java +++ b/jdk/test/javax/swing/border/Test6978482.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2011, 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 @@ -23,7 +23,7 @@ /* * @test - * @bug 6978482 + * @bug 6978482 7025987 * @summary Tests unchecked casts * @author Sergey Malenkov */ @@ -58,6 +58,7 @@ import javax.swing.plaf.basic.BasicBorders; import javax.swing.plaf.basic.BasicToolBarUI; import javax.swing.plaf.metal.MetalBorders; import javax.swing.plaf.metal.MetalComboBoxEditor; +import javax.swing.plaf.nimbus.NimbusLookAndFeel; import sun.swing.plaf.synth.SynthFileChooserUI; @@ -132,6 +133,9 @@ public class Test6978482 { //+ SynthFileChooserUI.UIBorder: new SynthFileChooser().getUIBorder(), + + //+ LoweredBorder: + new NimbusLookAndFeel().getDefaults().getBorder("TitledBorder.border"), }; public static void main(String[] args) { diff --git a/jdk/test/javax/swing/text/NavigationFilter/6735293/bug6735293.java b/jdk/test/javax/swing/text/NavigationFilter/6735293/bug6735293.java index 4d077ceba15..08658b4f35d 100644 --- a/jdk/test/javax/swing/text/NavigationFilter/6735293/bug6735293.java +++ b/jdk/test/javax/swing/text/NavigationFilter/6735293/bug6735293.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2011, 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 diff --git a/jdk/test/javax/swing/text/html/parser/Parser/6990651/bug6990651.java b/jdk/test/javax/swing/text/html/parser/Parser/6990651/bug6990651.java index e956140aee7..60378e23b2f 100644 --- a/jdk/test/javax/swing/text/html/parser/Parser/6990651/bug6990651.java +++ b/jdk/test/javax/swing/text/html/parser/Parser/6990651/bug6990651.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2011, 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 diff --git a/jdk/test/sun/java2d/SunGraphicsEnvironment/TestSGEuseAlternateFontforJALocales.java b/jdk/test/sun/java2d/SunGraphicsEnvironment/TestSGEuseAlternateFontforJALocales.java new file mode 100644 index 00000000000..46092bb8360 --- /dev/null +++ b/jdk/test/sun/java2d/SunGraphicsEnvironment/TestSGEuseAlternateFontforJALocales.java @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2011, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @bug 7032930 + * + * @summary verify the existence of the method + * SunGraphicsEnvironment.useAlternateFontforJALocales + * + * @run main/othervm TestSGEuseAlternateFontforJALocales + * @run main/othervm -Dfile.encoding=windows-31j -Duser.language=ja -Duser.country=JA TestSGEuseAlternateFontforJALocales + * + */ + +import java.lang.reflect.Method; +import java.nio.charset.Charset; +import java.util.Locale; +import java.awt.Font; +import java.awt.FontMetrics; +import java.awt.Graphics2D; +import java.awt.GraphicsEnvironment; +import java.awt.image.BufferedImage; + +public class TestSGEuseAlternateFontforJALocales { + + public static void main(String args[]) throws Exception { + System.out.println("Default Charset = " + + Charset.defaultCharset().name()); + System.out.println("Locale = " + Locale.getDefault()); + String os = System.getProperty("os.name"); + String encoding = System.getProperty("file.encoding"); + /* Want to test the JA locale uses alternate font for DialogInput. */ + boolean jaTest = encoding.equalsIgnoreCase("windows-31j"); + if (!os.startsWith("Win") && jaTest) { + System.out.println("Skipping Windows only test"); + return; + } + + String className = "sun.java2d.SunGraphicsEnvironment"; + String methodName = "useAlternateFontforJALocales"; + Class sge = Class.forName(className); + Method uafMethod = sge.getMethod(methodName, (Class[])null); + Object ret = uafMethod.invoke(null); + GraphicsEnvironment ge = + GraphicsEnvironment.getLocalGraphicsEnvironment(); + ge.preferLocaleFonts(); + ge.preferProportionalFonts(); + if (jaTest) { + Font msMincho = new Font("MS Mincho", Font.PLAIN, 12); + if (!msMincho.getFamily(Locale.ENGLISH).equals("MS Mincho")) { + System.out.println("MS Mincho not installed. Skipping test"); + return; + } + Font dialogInput = new Font("DialogInput", Font.PLAIN, 12); + Font courierNew = new Font("Courier New", Font.PLAIN, 12); + Font msGothic = new Font("MS Gothic", Font.PLAIN, 12); + BufferedImage bi = new BufferedImage(1,1,1); + Graphics2D g2d = bi.createGraphics(); + FontMetrics cnMetrics = g2d.getFontMetrics(courierNew); + FontMetrics diMetrics = g2d.getFontMetrics(dialogInput); + FontMetrics mmMetrics = g2d.getFontMetrics(msMincho); + FontMetrics mgMetrics = g2d.getFontMetrics(msGothic); + // This tests to make sure we at least have applied + // "preferLocaleFonts for Japanese + if (cnMetrics.charWidth('A') == diMetrics.charWidth('A')) { + throw new RuntimeException + ("Courier New should not be used for DialogInput"); + } + // This is supposed to make sure we are using MS Mincho instead + // of MS Gothic. However they are metrics identical so its + // not definite proof. + if (diMetrics.charWidth('A') != mmMetrics.charWidth('A')) { + throw new RuntimeException + ("MS Mincho should be used for DialogInput"); + } + } + } +} diff --git a/jdk/test/sun/java2d/XRenderBlitsTest.java b/jdk/test/sun/java2d/XRenderBlitsTest.java new file mode 100644 index 00000000000..bcab57e71f9 --- /dev/null +++ b/jdk/test/sun/java2d/XRenderBlitsTest.java @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2011, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* +* @test +* @bug 6985593 +* @summary Test verifies that rendering standard images to screen does +* not caiuse a crash in case of XRender. +* @run main/othervm -Dsun.java2d.xrender=True XRenderBlitsTest +*/ + +import java.awt.Color; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.Frame; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; +import java.util.ArrayList; +import java.util.concurrent.CountDownLatch; + +public class XRenderBlitsTest { + + private static final int w = 10; + private static final int h = 10; + + public static void main(String[] args) { + final CountDownLatch done = new CountDownLatch(1); + + final ArrayList images = new ArrayList(); + + int type = BufferedImage.TYPE_INT_RGB; + do { + BufferedImage img = new BufferedImage(w, h, type++); + Graphics2D g2d = img.createGraphics(); + g2d.setColor(Color.pink); + g2d.fillRect(0, 0, w, h); + g2d.dispose(); + + images.add(img); + } while (type <= BufferedImage.TYPE_BYTE_INDEXED); + + Frame f = new Frame("Draw images"); + Component c = new Component() { + + @Override + public Dimension getPreferredSize() { + return new Dimension(w * images.size(), h); + } + + @Override + public void paint(Graphics g) { + int x = 0; + for (BufferedImage img : images) { + System.out.println("Draw image " + img.getType()); + g.drawImage(img, x, 0, this); + x += w; + } + done.countDown(); + } + }; + f.add("Center", c); + f.pack(); + f.setVisible(true); + + // now wait for test results + try { + done.await(); + } catch (InterruptedException e) { + } + System.out.println("Test passed"); + f.dispose(); + } +} diff --git a/jdk/test/sun/java2d/pipe/RegionOps.java b/jdk/test/sun/java2d/pipe/RegionOps.java index e02f280b1fe..418b73f3515 100644 --- a/jdk/test/sun/java2d/pipe/RegionOps.java +++ b/jdk/test/sun/java2d/pipe/RegionOps.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, 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 diff --git a/jdk/test/sun/misc/URLClassPath/ClassnameCharTest.sh b/jdk/test/sun/misc/URLClassPath/ClassnameCharTest.sh index 7f29ca26b48..6325e5732c5 100644 --- a/jdk/test/sun/misc/URLClassPath/ClassnameCharTest.sh +++ b/jdk/test/sun/misc/URLClassPath/ClassnameCharTest.sh @@ -1,7 +1,7 @@ #! /bin/sh # -# Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2004, 2010, 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 diff --git a/jdk/test/sun/misc/Version/Version.java b/jdk/test/sun/misc/Version/Version.java index 6e7d3626d9f..16ecd1ea9c8 100644 --- a/jdk/test/sun/misc/Version/Version.java +++ b/jdk/test/sun/misc/Version/Version.java @@ -142,15 +142,21 @@ public class Version { // non-product VM will have -debug|-release appended cs = cs.subSequence(1, cs.length()); String[] res = cs.toString().split("-"); - for (String s : res) { + for (int i = res.length - 1; i >= 0; i--) { + String s = res[i]; if (s.charAt(0) == 'b') { - build = - Integer.valueOf(s.substring(1, s.length())).intValue(); - break; + try { + build = Integer.parseInt(s.substring(1, s.length())); + break; + } catch (NumberFormatException nfe) { + // ignore + } } } } } - return new VersionInfo(major, minor, micro, update, special, build); + VersionInfo vi = new VersionInfo(major, minor, micro, update, special, build); + System.out.printf("newVersionInfo: input=%s output=%s\n", version, vi); + return vi; } } diff --git a/jdk/test/sun/net/InetAddress/nameservice/chaining/Providers.java b/jdk/test/sun/net/InetAddress/nameservice/chaining/Providers.java index 590f4e25a94..351a1bef19f 100644 --- a/jdk/test/sun/net/InetAddress/nameservice/chaining/Providers.java +++ b/jdk/test/sun/net/InetAddress/nameservice/chaining/Providers.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, 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 diff --git a/jdk/test/sun/net/InetAddress/nameservice/chaining/Simple1NameServiceDescriptor.java b/jdk/test/sun/net/InetAddress/nameservice/chaining/Simple1NameServiceDescriptor.java index 6785cc76c3b..b2572817fb3 100644 --- a/jdk/test/sun/net/InetAddress/nameservice/chaining/Simple1NameServiceDescriptor.java +++ b/jdk/test/sun/net/InetAddress/nameservice/chaining/Simple1NameServiceDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2011, 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 diff --git a/jdk/test/sun/net/InetAddress/nameservice/chaining/Simple2NameServiceDescriptor.java b/jdk/test/sun/net/InetAddress/nameservice/chaining/Simple2NameServiceDescriptor.java index dcfcdd4b3ba..91eae198d44 100644 --- a/jdk/test/sun/net/InetAddress/nameservice/chaining/Simple2NameServiceDescriptor.java +++ b/jdk/test/sun/net/InetAddress/nameservice/chaining/Simple2NameServiceDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2011, 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 diff --git a/jdk/test/sun/net/InetAddress/nameservice/chaining/SimpleNameService.java b/jdk/test/sun/net/InetAddress/nameservice/chaining/SimpleNameService.java index 1c65578c58c..b3697f2f3db 100644 --- a/jdk/test/sun/net/InetAddress/nameservice/chaining/SimpleNameService.java +++ b/jdk/test/sun/net/InetAddress/nameservice/chaining/SimpleNameService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2011, 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 diff --git a/jdk/test/sun/net/InetAddress/nameservice/simple/CacheTest.java b/jdk/test/sun/net/InetAddress/nameservice/simple/CacheTest.java index 0aadfd399ca..48745ced557 100644 --- a/jdk/test/sun/net/InetAddress/nameservice/simple/CacheTest.java +++ b/jdk/test/sun/net/InetAddress/nameservice/simple/CacheTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 diff --git a/jdk/test/sun/net/InetAddress/nameservice/simple/DefaultCaching.java b/jdk/test/sun/net/InetAddress/nameservice/simple/DefaultCaching.java index f1010daa55f..4b42af174eb 100644 --- a/jdk/test/sun/net/InetAddress/nameservice/simple/DefaultCaching.java +++ b/jdk/test/sun/net/InetAddress/nameservice/simple/DefaultCaching.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2011, 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 diff --git a/jdk/test/sun/net/InetAddress/nameservice/simple/SimpleNameService.java b/jdk/test/sun/net/InetAddress/nameservice/simple/SimpleNameService.java index 98ba870d33f..9d584558b30 100644 --- a/jdk/test/sun/net/InetAddress/nameservice/simple/SimpleNameService.java +++ b/jdk/test/sun/net/InetAddress/nameservice/simple/SimpleNameService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 diff --git a/jdk/test/sun/net/InetAddress/nameservice/simple/SimpleNameServiceDescriptor.java b/jdk/test/sun/net/InetAddress/nameservice/simple/SimpleNameServiceDescriptor.java index 466661ac8c7..373d10b2dc7 100644 --- a/jdk/test/sun/net/InetAddress/nameservice/simple/SimpleNameServiceDescriptor.java +++ b/jdk/test/sun/net/InetAddress/nameservice/simple/SimpleNameServiceDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 diff --git a/jdk/test/sun/security/ec/TestEC.java b/jdk/test/sun/security/ec/TestEC.java index fe075cd3f0a..3c4a8950627 100644 --- a/jdk/test/sun/security/ec/TestEC.java +++ b/jdk/test/sun/security/ec/TestEC.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, 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 @@ -25,8 +25,6 @@ * @test * @bug 6840752 * @summary Provide out-of-the-box support for ECC algorithms - * @ignore JSSE supported cipher suites are changed with CR 6916074, - * need to update this test case in JDK 7 soon * @library ../pkcs11 * @library ../pkcs11/ec * @library ../pkcs11/sslecc diff --git a/jdk/test/sun/security/jgss/GssNPE.java b/jdk/test/sun/security/jgss/GssNPE.java index bacf60c5f34..d2723ba625c 100644 --- a/jdk/test/sun/security/jgss/GssNPE.java +++ b/jdk/test/sun/security/jgss/GssNPE.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, 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 @@ -24,6 +24,7 @@ /* * @test * @bug 6345338 + * @run main/othervm GssNPE * @summary GSS throws NPE when the JAAS config file does not exist */ diff --git a/jdk/test/sun/security/jgss/spnego/NoSpnegoAsDefMech.java b/jdk/test/sun/security/jgss/spnego/NoSpnegoAsDefMech.java index 13b9ee9d47b..998f50d339f 100644 --- a/jdk/test/sun/security/jgss/spnego/NoSpnegoAsDefMech.java +++ b/jdk/test/sun/security/jgss/spnego/NoSpnegoAsDefMech.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, 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 @@ -24,6 +24,7 @@ /* * @test * @bug 6770883 + * @run main/othervm NoSpnegoAsDefMech * @summary Infinite loop if SPNEGO specified as sun.security.jgss.mechanism */ diff --git a/jdk/test/sun/security/krb5/ConfPlusProp.java b/jdk/test/sun/security/krb5/ConfPlusProp.java index e29637b1b15..9fe1adcf455 100644 --- a/jdk/test/sun/security/krb5/ConfPlusProp.java +++ b/jdk/test/sun/security/krb5/ConfPlusProp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, 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 @@ -25,6 +25,7 @@ * @bug 6857795 * @bug 6858589 * @bug 6972005 + * @run main/othervm ConfPlusProp * @summary krb5.conf ignored if system properties on realm and kdc are provided */ diff --git a/jdk/test/sun/security/krb5/ConfigWithQuotations.java b/jdk/test/sun/security/krb5/ConfigWithQuotations.java index adf3919b9a0..c1286f8cb3a 100644 --- a/jdk/test/sun/security/krb5/ConfigWithQuotations.java +++ b/jdk/test/sun/security/krb5/ConfigWithQuotations.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, 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 @@ -23,6 +23,7 @@ /* * @test * @bug 6714845 + * @run main/othervm ConfigWithQuotations * @summary Quotes in Kerberos configuration file are included in the values */ diff --git a/jdk/test/sun/security/krb5/DnsFallback.java b/jdk/test/sun/security/krb5/DnsFallback.java index e305ac85699..3a48b05d837 100644 --- a/jdk/test/sun/security/krb5/DnsFallback.java +++ b/jdk/test/sun/security/krb5/DnsFallback.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 @@ -24,6 +24,7 @@ * @test * @bug 6673164 * @bug 6552334 + * @run main/othervm DnsFallback * @summary fix dns_fallback parse error, and use dns by default */ diff --git a/jdk/test/sun/security/krb5/IPv6.java b/jdk/test/sun/security/krb5/IPv6.java index 4b4f2a88767..d1a8bf260bc 100644 --- a/jdk/test/sun/security/krb5/IPv6.java +++ b/jdk/test/sun/security/krb5/IPv6.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, 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 @@ -24,6 +24,7 @@ /* * @test * @bug 6877357 6885166 + * @run main/othervm IPv6 * @summary IPv6 address does not work */ diff --git a/jdk/test/sun/security/krb5/ParseCAPaths.java b/jdk/test/sun/security/krb5/ParseCAPaths.java index ec6f73257fb..f8c30bd7b7d 100644 --- a/jdk/test/sun/security/krb5/ParseCAPaths.java +++ b/jdk/test/sun/security/krb5/ParseCAPaths.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, 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 @@ -23,6 +23,7 @@ /* * @test * @bug 6789935 + * @run main/othervm ParseCAPaths * @summary cross-realm capath search error */ @@ -30,9 +31,10 @@ import java.util.Arrays; import sun.security.krb5.Realm; public class ParseCAPaths { - static boolean failed = false; + static Exception failed = null; public static void main(String[] args) throws Exception { - System.setProperty("java.security.krb5.conf", System.getProperty("test.src", ".") +"/krb5-capaths.conf"); + System.setProperty("java.security.krb5.conf", + System.getProperty("test.src", ".") +"/krb5-capaths.conf"); //System.setProperty("sun.security.krb5.debug", "true"); // Standard example @@ -59,9 +61,13 @@ public class ParseCAPaths { check("G1.COM", "G3.COM", "G1.COM", "COM"); check("H1.COM", "H3.COM", "H1.COM"); check("I1.COM", "I4.COM", "I1.COM", "I5.COM"); - - if (failed) { - throw new Exception("Failed somewhere."); + // J2=J1 is the same as J2=. + check("J1.COM", "J2.COM", "J1.COM"); + // 7019384 + check("A9.PRAGUE.XXX.CZ", "SERVIS.XXX.CZ", + "A9.PRAGUE.XXX.CZ", "PRAGUE.XXX.CZ", "ROOT.XXX.CZ"); + if (failed != null) { + throw failed; } } @@ -69,10 +75,10 @@ public class ParseCAPaths { try { check2(from, to, paths); } catch (Exception e) { - failed = true; - e.printStackTrace(); + failed = e; } } + static void check2(String from, String to, String... paths) throws Exception { System.out.println(from + " -> " + to); diff --git a/jdk/test/sun/security/krb5/ParseConfig.java b/jdk/test/sun/security/krb5/ParseConfig.java index d4aa590eb2a..43c5ce39f3a 100644 --- a/jdk/test/sun/security/krb5/ParseConfig.java +++ b/jdk/test/sun/security/krb5/ParseConfig.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, 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 @@ -23,6 +23,7 @@ /* * @test * @bug 6319046 + * @run main/othervm ParseConfig * @summary Problem with parsing krb5.conf */ diff --git a/jdk/test/sun/security/krb5/RFC396xTest.java b/jdk/test/sun/security/krb5/RFC396xTest.java index 2bd3f235a9f..76016c38817 100644 --- a/jdk/test/sun/security/krb5/RFC396xTest.java +++ b/jdk/test/sun/security/krb5/RFC396xTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, 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 @@ -23,6 +23,7 @@ /* * @test * @bug 6862679 + * @run main/othervm RFC396xTest * @summary ESC: AD Authentication with user with umlauts fails */ diff --git a/jdk/test/sun/security/krb5/TimeInCCache.java b/jdk/test/sun/security/krb5/TimeInCCache.java index e0e420f33e0..6c33d2eae3f 100644 --- a/jdk/test/sun/security/krb5/TimeInCCache.java +++ b/jdk/test/sun/security/krb5/TimeInCCache.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, 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 @@ -23,6 +23,7 @@ /* * @test * @bug 6590930 + * @run main/othervm TimeInCCache * @summary read/write does not match for ccache */ diff --git a/jdk/test/sun/security/krb5/auto/Context.java b/jdk/test/sun/security/krb5/auto/Context.java index 4c67109121f..676042ba993 100644 --- a/jdk/test/sun/security/krb5/auto/Context.java +++ b/jdk/test/sun/security/krb5/auto/Context.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/sun/security/krb5/auto/HttpNegotiateServer.java b/jdk/test/sun/security/krb5/auto/HttpNegotiateServer.java index 423ef0d853d..aab6b92137e 100644 --- a/jdk/test/sun/security/krb5/auto/HttpNegotiateServer.java +++ b/jdk/test/sun/security/krb5/auto/HttpNegotiateServer.java @@ -74,11 +74,10 @@ public class HttpNegotiateServer { final static char[] WEB_PASS = "webby".toCharArray(); final static String PROXY_USER = "pro"; final static char[] PROXY_PASS = "proxy".toCharArray(); - final static int WEB_PORT = 17840; + final static String WEB_HOST = "host.web.domain"; final static String PROXY_HOST = "host.proxy.domain"; - final static int PROXY_PORT = 17841; // web page content final static String CONTENT = "Hello, World!"; @@ -86,18 +85,11 @@ public class HttpNegotiateServer { // For 6829283, count how many times the Authenticator is called. static int count = 0; + static int webPort, proxyPort; + // URLs for web test, proxy test. The proxy server is not a real proxy // since it fakes the same content for any URL. :) - final static URL webUrl, proxyUrl; - static { - URL u1 = null, u2 = null; - try { - u1 = new URL("http://" + WEB_HOST +":" + WEB_PORT + "/a/b/c"); - u2 = new URL("http://nosuchplace/a/b/c"); - } catch (Exception e) { - } - webUrl = u1; proxyUrl = u2; - } + static URL webUrl, proxyUrl; /** * This Authenticator checks everything: @@ -127,7 +119,7 @@ public class HttpNegotiateServer { if (!this.getRequestingHost().equalsIgnoreCase(PROXY_HOST)) { throw new RuntimeException("Bad host"); } - if (this.getRequestingPort() != PROXY_PORT) { + if (this.getRequestingPort() != proxyPort) { throw new RuntimeException("Bad port"); } if (!this.getRequestingURL().equals(proxyUrl)) { @@ -188,10 +180,15 @@ public class HttpNegotiateServer { fos.close(); f.deleteOnExit(); - HttpServer h1 = httpd(WEB_PORT, "Negotiate", false, + HttpServer h1 = httpd("Negotiate", false, "HTTP/" + WEB_HOST + "@" + REALM_WEB, KRB5_TAB); - HttpServer h2 = httpd(PROXY_PORT, "Negotiate", true, + webPort = h1.getAddress().getPort(); + HttpServer h2 = httpd("Negotiate", true, "HTTP/" + PROXY_HOST + "@" + REALM_PROXY, KRB5_TAB); + proxyPort = h2.getAddress().getPort(); + + webUrl = new URL("http://" + WEB_HOST +":" + webPort + "/a/b/c"); + proxyUrl = new URL("http://nosuchplace/a/b/c"); try { Exception e1 = null, e2 = null; @@ -230,7 +227,7 @@ public class HttpNegotiateServer { reader = new BufferedReader(new InputStreamReader( proxyUrl.openConnection( new Proxy(Proxy.Type.HTTP, - new InetSocketAddress(PROXY_HOST, PROXY_PORT))) + new InetSocketAddress(PROXY_HOST, proxyPort))) .getInputStream())); if (!reader.readLine().equals(CONTENT)) { throw new RuntimeException("Bad content"); @@ -258,10 +255,10 @@ public class HttpNegotiateServer { * @param principal the krb5 service principal the server runs with * @return the server */ - public static HttpServer httpd(int port, String scheme, boolean proxy, + public static HttpServer httpd(String scheme, boolean proxy, String principal, String ktab) throws Exception { MyHttpHandler h = new MyHttpHandler(); - HttpServer server = HttpServer.create(new InetSocketAddress(port), 0); + HttpServer server = HttpServer.create(new InetSocketAddress(0), 0); HttpContext hc = server.createContext("/", h); hc.setAuthenticator(new MyServerAuthenticator( proxy, scheme, principal, ktab)); diff --git a/jdk/test/sun/security/krb5/auto/KDC.java b/jdk/test/sun/security/krb5/auto/KDC.java index 36dc08b4ae6..5d2ff476ea6 100644 --- a/jdk/test/sun/security/krb5/auto/KDC.java +++ b/jdk/test/sun/security/krb5/auto/KDC.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2011, 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 diff --git a/jdk/test/sun/security/krb5/etype/ETypeOrder.java b/jdk/test/sun/security/krb5/etype/ETypeOrder.java index cb854acf7f5..9437b16ed05 100644 --- a/jdk/test/sun/security/krb5/etype/ETypeOrder.java +++ b/jdk/test/sun/security/krb5/etype/ETypeOrder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2011, 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 @@ -23,6 +23,7 @@ /* * @test * @bug 6844907 + * @run main/othervm ETypeOrder * @summary krb5 etype order should be from strong to weak */ diff --git a/jdk/test/sun/security/krb5/krb5-capaths.conf b/jdk/test/sun/security/krb5/krb5-capaths.conf index db672820b7d..eead02c0b34 100644 --- a/jdk/test/sun/security/krb5/krb5-capaths.conf +++ b/jdk/test/sun/security/krb5/krb5-capaths.conf @@ -85,3 +85,13 @@ I1.COM = { I3.COM = I2.COM I4.COM = I2.COM I5.COM } + +J1.COM = { + J2.COM=J1.COM +} + +A9.PRAGUE.XXX.CZ = { + PRAGUE.XXX.CZ = . + ROOT.XXX.CZ = PRAGUE.XXX.CZ + SERVIS.XXX.CZ = ROOT.XXX.CZ +} diff --git a/jdk/test/sun/security/krb5/ktab/HighestKvno.java b/jdk/test/sun/security/krb5/ktab/HighestKvno.java index 9636bb1b576..92e3aebd630 100644 --- a/jdk/test/sun/security/krb5/ktab/HighestKvno.java +++ b/jdk/test/sun/security/krb5/ktab/HighestKvno.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, 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 @@ -24,6 +24,7 @@ * @test * @bug 6867665 * @bug 6875033 + * @run main/othervm HighestKvno * @summary Problem with keytabs with multiple kvno's (key versions) */ diff --git a/jdk/test/sun/security/krb5/tools/KtabCheck.java b/jdk/test/sun/security/krb5/tools/KtabCheck.java index e82b83ac740..ebd18fd70d8 100644 --- a/jdk/test/sun/security/krb5/tools/KtabCheck.java +++ b/jdk/test/sun/security/krb5/tools/KtabCheck.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2011, 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 diff --git a/jdk/test/sun/security/pkcs11/fips/CipherTest.java b/jdk/test/sun/security/pkcs11/fips/CipherTest.java index 3736aa07d08..8dad4a76dcc 100644 --- a/jdk/test/sun/security/pkcs11/fips/CipherTest.java +++ b/jdk/test/sun/security/pkcs11/fips/CipherTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 @@ -114,19 +114,7 @@ public class CipherTest { } boolean isEnabled() { - // ignore SCSV - if (cipherSuite.equals("TLS_EMPTY_RENEGOTIATION_INFO_SCSV")) { - return false; - } - - // ignore exportable cipher suite for TLSv1.1 - if (protocol.equals("TLSv1.1")) { - if(cipherSuite.indexOf("_EXPORT_") != -1) { - return false; - } - } - - return true; + return TLSCipherStatus.isEnabled(cipherSuite, protocol); } public String toString() { @@ -137,6 +125,114 @@ public class CipherTest { return s; } + static enum TLSCipherStatus { + // cipher suites supported since TLS 1.2 + CS_01("TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384", 0x0303, 0xFFFF), + CS_02("TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384", 0x0303, 0xFFFF), + CS_03("TLS_RSA_WITH_AES_256_CBC_SHA256", 0x0303, 0xFFFF), + CS_04("TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384", 0x0303, 0xFFFF), + CS_05("TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384", 0x0303, 0xFFFF), + CS_06("TLS_DHE_RSA_WITH_AES_256_CBC_SHA256", 0x0303, 0xFFFF), + CS_07("TLS_DHE_DSS_WITH_AES_256_CBC_SHA256", 0x0303, 0xFFFF), + + CS_08("TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", 0x0303, 0xFFFF), + CS_09("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256", 0x0303, 0xFFFF), + CS_10("TLS_RSA_WITH_AES_128_CBC_SHA256", 0x0303, 0xFFFF), + CS_11("TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256", 0x0303, 0xFFFF), + CS_12("TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256", 0x0303, 0xFFFF), + CS_13("TLS_DHE_RSA_WITH_AES_128_CBC_SHA256", 0x0303, 0xFFFF), + CS_14("TLS_DHE_DSS_WITH_AES_128_CBC_SHA256", 0x0303, 0xFFFF), + + CS_15("TLS_DH_anon_WITH_AES_256_CBC_SHA256", 0x0303, 0xFFFF), + CS_16("TLS_DH_anon_WITH_AES_128_CBC_SHA256", 0x0303, 0xFFFF), + CS_17("TLS_RSA_WITH_NULL_SHA256", 0x0303, 0xFFFF), + + // cipher suites obsoleted since TLS 1.2 + CS_50("SSL_RSA_WITH_DES_CBC_SHA", 0x0000, 0x0303), + CS_51("SSL_DHE_RSA_WITH_DES_CBC_SHA", 0x0000, 0x0303), + CS_52("SSL_DHE_DSS_WITH_DES_CBC_SHA", 0x0000, 0x0303), + CS_53("SSL_DH_anon_WITH_DES_CBC_SHA", 0x0000, 0x0303), + CS_54("TLS_KRB5_WITH_DES_CBC_SHA", 0x0000, 0x0303), + CS_55("TLS_KRB5_WITH_DES_CBC_MD5", 0x0000, 0x0303), + + // cipher suites obsoleted since TLS 1.1 + CS_60("SSL_RSA_EXPORT_WITH_RC4_40_MD5", 0x0000, 0x0302), + CS_61("SSL_DH_anon_EXPORT_WITH_RC4_40_MD5", 0x0000, 0x0302), + CS_62("SSL_RSA_EXPORT_WITH_DES40_CBC_SHA", 0x0000, 0x0302), + CS_63("SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA", 0x0000, 0x0302), + CS_64("SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA", 0x0000, 0x0302), + CS_65("SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA", 0x0000, 0x0302), + CS_66("TLS_KRB5_EXPORT_WITH_RC4_40_SHA", 0x0000, 0x0302), + CS_67("TLS_KRB5_EXPORT_WITH_RC4_40_MD5", 0x0000, 0x0302), + CS_68("TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA", 0x0000, 0x0302), + CS_69("TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5", 0x0000, 0x0302), + + // ignore TLS_EMPTY_RENEGOTIATION_INFO_SCSV always + CS_99("TLS_EMPTY_RENEGOTIATION_INFO_SCSV", 0xFFFF, 0x0000); + + // the cipher suite name + final String cipherSuite; + + // supported since protocol version + final int supportedSince; + + // obsoleted since protocol version + final int obsoletedSince; + + TLSCipherStatus(String cipherSuite, + int supportedSince, int obsoletedSince) { + this.cipherSuite = cipherSuite; + this.supportedSince = supportedSince; + this.obsoletedSince = obsoletedSince; + } + + static boolean isEnabled(String cipherSuite, String protocol) { + int versionNumber = toVersionNumber(protocol); + + if (versionNumber < 0) { + return true; // unlikely to happen + } + + for (TLSCipherStatus status : TLSCipherStatus.values()) { + if (cipherSuite.equals(status.cipherSuite)) { + if ((versionNumber < status.supportedSince) || + (versionNumber >= status.obsoletedSince)) { + return false; + } + + return true; + } + } + + return true; + } + + private static int toVersionNumber(String protocol) { + int versionNumber = -1; + + switch (protocol) { + case "SSLv2Hello": + versionNumber = 0x0002; + break; + case "SSLv3": + versionNumber = 0x0300; + break; + case "TLSv1": + versionNumber = 0x0301; + break; + case "TLSv1.1": + versionNumber = 0x0302; + break; + case "TLSv1.2": + versionNumber = 0x0303; + break; + default: + // unlikely to happen + } + + return versionNumber; + } + } } private List tests; diff --git a/jdk/test/sun/security/pkcs11/sslecc/CipherTest.java b/jdk/test/sun/security/pkcs11/sslecc/CipherTest.java index 09ab1c66ffb..64153f58d20 100644 --- a/jdk/test/sun/security/pkcs11/sslecc/CipherTest.java +++ b/jdk/test/sun/security/pkcs11/sslecc/CipherTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 @@ -114,19 +114,7 @@ public class CipherTest { } boolean isEnabled() { - // ignore SCSV - if (cipherSuite.equals("TLS_EMPTY_RENEGOTIATION_INFO_SCSV")) { - return false; - } - - // ignore exportable cipher suite for TLSv1.1 - if (protocol.equals("TLSv1.1")) { - if(cipherSuite.indexOf("_EXPORT_") != -1) { - return false; - } - } - - return true; + return TLSCipherStatus.isEnabled(cipherSuite, protocol); } public String toString() { @@ -137,6 +125,114 @@ public class CipherTest { return s; } + static enum TLSCipherStatus { + // cipher suites supported since TLS 1.2 + CS_01("TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384", 0x0303, 0xFFFF), + CS_02("TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384", 0x0303, 0xFFFF), + CS_03("TLS_RSA_WITH_AES_256_CBC_SHA256", 0x0303, 0xFFFF), + CS_04("TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384", 0x0303, 0xFFFF), + CS_05("TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384", 0x0303, 0xFFFF), + CS_06("TLS_DHE_RSA_WITH_AES_256_CBC_SHA256", 0x0303, 0xFFFF), + CS_07("TLS_DHE_DSS_WITH_AES_256_CBC_SHA256", 0x0303, 0xFFFF), + + CS_08("TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", 0x0303, 0xFFFF), + CS_09("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256", 0x0303, 0xFFFF), + CS_10("TLS_RSA_WITH_AES_128_CBC_SHA256", 0x0303, 0xFFFF), + CS_11("TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256", 0x0303, 0xFFFF), + CS_12("TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256", 0x0303, 0xFFFF), + CS_13("TLS_DHE_RSA_WITH_AES_128_CBC_SHA256", 0x0303, 0xFFFF), + CS_14("TLS_DHE_DSS_WITH_AES_128_CBC_SHA256", 0x0303, 0xFFFF), + + CS_15("TLS_DH_anon_WITH_AES_256_CBC_SHA256", 0x0303, 0xFFFF), + CS_16("TLS_DH_anon_WITH_AES_128_CBC_SHA256", 0x0303, 0xFFFF), + CS_17("TLS_RSA_WITH_NULL_SHA256", 0x0303, 0xFFFF), + + // cipher suites obsoleted since TLS 1.2 + CS_50("SSL_RSA_WITH_DES_CBC_SHA", 0x0000, 0x0303), + CS_51("SSL_DHE_RSA_WITH_DES_CBC_SHA", 0x0000, 0x0303), + CS_52("SSL_DHE_DSS_WITH_DES_CBC_SHA", 0x0000, 0x0303), + CS_53("SSL_DH_anon_WITH_DES_CBC_SHA", 0x0000, 0x0303), + CS_54("TLS_KRB5_WITH_DES_CBC_SHA", 0x0000, 0x0303), + CS_55("TLS_KRB5_WITH_DES_CBC_MD5", 0x0000, 0x0303), + + // cipher suites obsoleted since TLS 1.1 + CS_60("SSL_RSA_EXPORT_WITH_RC4_40_MD5", 0x0000, 0x0302), + CS_61("SSL_DH_anon_EXPORT_WITH_RC4_40_MD5", 0x0000, 0x0302), + CS_62("SSL_RSA_EXPORT_WITH_DES40_CBC_SHA", 0x0000, 0x0302), + CS_63("SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA", 0x0000, 0x0302), + CS_64("SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA", 0x0000, 0x0302), + CS_65("SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA", 0x0000, 0x0302), + CS_66("TLS_KRB5_EXPORT_WITH_RC4_40_SHA", 0x0000, 0x0302), + CS_67("TLS_KRB5_EXPORT_WITH_RC4_40_MD5", 0x0000, 0x0302), + CS_68("TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA", 0x0000, 0x0302), + CS_69("TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5", 0x0000, 0x0302), + + // ignore TLS_EMPTY_RENEGOTIATION_INFO_SCSV always + CS_99("TLS_EMPTY_RENEGOTIATION_INFO_SCSV", 0xFFFF, 0x0000); + + // the cipher suite name + final String cipherSuite; + + // supported since protocol version + final int supportedSince; + + // obsoleted since protocol version + final int obsoletedSince; + + TLSCipherStatus(String cipherSuite, + int supportedSince, int obsoletedSince) { + this.cipherSuite = cipherSuite; + this.supportedSince = supportedSince; + this.obsoletedSince = obsoletedSince; + } + + static boolean isEnabled(String cipherSuite, String protocol) { + int versionNumber = toVersionNumber(protocol); + + if (versionNumber < 0) { + return true; // unlikely to happen + } + + for (TLSCipherStatus status : TLSCipherStatus.values()) { + if (cipherSuite.equals(status.cipherSuite)) { + if ((versionNumber < status.supportedSince) || + (versionNumber >= status.obsoletedSince)) { + return false; + } + + return true; + } + } + + return true; + } + + private static int toVersionNumber(String protocol) { + int versionNumber = -1; + + switch (protocol) { + case "SSLv2Hello": + versionNumber = 0x0002; + break; + case "SSLv3": + versionNumber = 0x0300; + break; + case "TLSv1": + versionNumber = 0x0301; + break; + case "TLSv1.1": + versionNumber = 0x0302; + break; + case "TLSv1.2": + versionNumber = 0x0303; + break; + default: + // unlikely to happen + } + + return versionNumber; + } + } } private List tests; @@ -170,11 +266,13 @@ public class CipherTest { // no client with anonymous ciphersuites continue; } + tests.add(new TestParameters(cipherSuite, protocol, clientAuth)); } } } + testIterator = tests.iterator(); } diff --git a/jdk/test/sun/security/ssl/sanity/interop/CipherTest.java b/jdk/test/sun/security/ssl/sanity/interop/CipherTest.java index c7b544260ae..9c5af7eda4a 100644 --- a/jdk/test/sun/security/ssl/sanity/interop/CipherTest.java +++ b/jdk/test/sun/security/ssl/sanity/interop/CipherTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 @@ -115,19 +115,7 @@ public class CipherTest { } boolean isEnabled() { - // ignore SCSV - if (cipherSuite.equals("TLS_EMPTY_RENEGOTIATION_INFO_SCSV")) { - return false; - } - - // ignore exportable cipher suite for TLSv1.1 - if (protocol.equals("TLSv1.1")) { - if(cipherSuite.indexOf("_EXPORT_") != -1) { - return false; - } - } - - return true; + return TLSCipherStatus.isEnabled(cipherSuite, protocol); } public String toString() { @@ -138,6 +126,114 @@ public class CipherTest { return s; } + static enum TLSCipherStatus { + // cipher suites supported since TLS 1.2 + CS_01("TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384", 0x0303, 0xFFFF), + CS_02("TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384", 0x0303, 0xFFFF), + CS_03("TLS_RSA_WITH_AES_256_CBC_SHA256", 0x0303, 0xFFFF), + CS_04("TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384", 0x0303, 0xFFFF), + CS_05("TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384", 0x0303, 0xFFFF), + CS_06("TLS_DHE_RSA_WITH_AES_256_CBC_SHA256", 0x0303, 0xFFFF), + CS_07("TLS_DHE_DSS_WITH_AES_256_CBC_SHA256", 0x0303, 0xFFFF), + + CS_08("TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", 0x0303, 0xFFFF), + CS_09("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256", 0x0303, 0xFFFF), + CS_10("TLS_RSA_WITH_AES_128_CBC_SHA256", 0x0303, 0xFFFF), + CS_11("TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256", 0x0303, 0xFFFF), + CS_12("TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256", 0x0303, 0xFFFF), + CS_13("TLS_DHE_RSA_WITH_AES_128_CBC_SHA256", 0x0303, 0xFFFF), + CS_14("TLS_DHE_DSS_WITH_AES_128_CBC_SHA256", 0x0303, 0xFFFF), + + CS_15("TLS_DH_anon_WITH_AES_256_CBC_SHA256", 0x0303, 0xFFFF), + CS_16("TLS_DH_anon_WITH_AES_128_CBC_SHA256", 0x0303, 0xFFFF), + CS_17("TLS_RSA_WITH_NULL_SHA256", 0x0303, 0xFFFF), + + // cipher suites obsoleted since TLS 1.2 + CS_50("SSL_RSA_WITH_DES_CBC_SHA", 0x0000, 0x0303), + CS_51("SSL_DHE_RSA_WITH_DES_CBC_SHA", 0x0000, 0x0303), + CS_52("SSL_DHE_DSS_WITH_DES_CBC_SHA", 0x0000, 0x0303), + CS_53("SSL_DH_anon_WITH_DES_CBC_SHA", 0x0000, 0x0303), + CS_54("TLS_KRB5_WITH_DES_CBC_SHA", 0x0000, 0x0303), + CS_55("TLS_KRB5_WITH_DES_CBC_MD5", 0x0000, 0x0303), + + // cipher suites obsoleted since TLS 1.1 + CS_60("SSL_RSA_EXPORT_WITH_RC4_40_MD5", 0x0000, 0x0302), + CS_61("SSL_DH_anon_EXPORT_WITH_RC4_40_MD5", 0x0000, 0x0302), + CS_62("SSL_RSA_EXPORT_WITH_DES40_CBC_SHA", 0x0000, 0x0302), + CS_63("SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA", 0x0000, 0x0302), + CS_64("SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA", 0x0000, 0x0302), + CS_65("SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA", 0x0000, 0x0302), + CS_66("TLS_KRB5_EXPORT_WITH_RC4_40_SHA", 0x0000, 0x0302), + CS_67("TLS_KRB5_EXPORT_WITH_RC4_40_MD5", 0x0000, 0x0302), + CS_68("TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA", 0x0000, 0x0302), + CS_69("TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5", 0x0000, 0x0302), + + // ignore TLS_EMPTY_RENEGOTIATION_INFO_SCSV always + CS_99("TLS_EMPTY_RENEGOTIATION_INFO_SCSV", 0xFFFF, 0x0000); + + // the cipher suite name + final String cipherSuite; + + // supported since protocol version + final int supportedSince; + + // obsoleted since protocol version + final int obsoletedSince; + + TLSCipherStatus(String cipherSuite, + int supportedSince, int obsoletedSince) { + this.cipherSuite = cipherSuite; + this.supportedSince = supportedSince; + this.obsoletedSince = obsoletedSince; + } + + static boolean isEnabled(String cipherSuite, String protocol) { + int versionNumber = toVersionNumber(protocol); + + if (versionNumber < 0) { + return true; // unlikely to happen + } + + for (TLSCipherStatus status : TLSCipherStatus.values()) { + if (cipherSuite.equals(status.cipherSuite)) { + if ((versionNumber < status.supportedSince) || + (versionNumber >= status.obsoletedSince)) { + return false; + } + + return true; + } + } + + return true; + } + + private static int toVersionNumber(String protocol) { + int versionNumber = -1; + + switch (protocol) { + case "SSLv2Hello": + versionNumber = 0x0002; + break; + case "SSLv3": + versionNumber = 0x0300; + break; + case "TLSv1": + versionNumber = 0x0301; + break; + case "TLSv1.1": + versionNumber = 0x0302; + break; + case "TLSv1.2": + versionNumber = 0x0303; + break; + default: + // unlikely to happen + } + + return versionNumber; + } + } } private List tests; diff --git a/jdk/test/sun/security/ssl/sanity/interop/ClientJSSEServerJSSE.java b/jdk/test/sun/security/ssl/sanity/interop/ClientJSSEServerJSSE.java index 74564602d00..953d2ea8e5f 100644 --- a/jdk/test/sun/security/ssl/sanity/interop/ClientJSSEServerJSSE.java +++ b/jdk/test/sun/security/ssl/sanity/interop/ClientJSSEServerJSSE.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2011, 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 @@ -25,8 +25,6 @@ * @test * @bug 4496785 * @summary Verify that all ciphersuites work in all configurations - * @ignore JSSE supported cipher suites are changed with CR 6916074, - * need to update this test case in JDK 7 soon * @author Andreas Sterbenz * @run main/othervm/timeout=300 ClientJSSEServerJSSE */ diff --git a/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/CookieHandlerTest.java b/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/CookieHandlerTest.java index 6b966fc2c79..66637201d33 100644 --- a/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/CookieHandlerTest.java +++ b/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/CookieHandlerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2011, 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 diff --git a/jdk/test/sun/text/resources/LocaleData b/jdk/test/sun/text/resources/LocaleData index 0f538113beb..95078736233 100644 --- a/jdk/test/sun/text/resources/LocaleData +++ b/jdk/test/sun/text/resources/LocaleData @@ -6446,3 +6446,499 @@ CurrencyNames//wst=Samoan Tala CurrencyNames//xxx=Unknown Currency CurrencyNames//yum=Yugoslavian New Dinar (1994-2002) CurrencyNames//zwd=Zimbabwean Dollar (1980-2008) + +# bug 7020583 +CurrencyNames/de/azm=Aserbaidschan-Manat (1993-2006) +CurrencyNames/de/azn=Aserbaidschan-Manat +CurrencyNames/de/csd=Alter Serbischer Dinar +CurrencyNames/de/cyp=Zypern-Pfund +CurrencyNames/de/esp=Spanische Peseta +CurrencyNames/de/fjd=Fidschi-Dollar +CurrencyNames/de/fkp=Falkland-Pfund +CurrencyNames/de/ghs=Ghanaische Cedi +CurrencyNames/de/gip=Gibraltar-Pfund +CurrencyNames/de/gnf=Guinea-Franc +CurrencyNames/de/gyd=Guyana-Dollar +CurrencyNames/de/hkd=Hongkong-Dollar +CurrencyNames/de/itl=Italienische Lira +CurrencyNames/de/jmd=Jamaika-Dollar +CurrencyNames/de/kes=Kenia-Schilling +CurrencyNames/de/mgf=Madagaskar-Franc +CurrencyNames/de/mur=Mauritius-Rupie +CurrencyNames/de/mzm=Alter Metical +CurrencyNames/de/mzn=Metical +CurrencyNames/de/nad=Namibia-Dollar +CurrencyNames/de/nzd=Neuseeland-Dollar +CurrencyNames/de/ron=Rum\u00e4nischer Leu +CurrencyNames/de/rsd=Serbischer Dinar +CurrencyNames/de/rwf=Ruanda-Franc +CurrencyNames/de/sbd=Salomonen-Dollar +CurrencyNames/de/scr=Seychellen-Rupie +CurrencyNames/de/sdg=Sudanesisches Pfund +CurrencyNames/de/sgd=Singapur-Dollar +CurrencyNames/de/sos=Somalia-Schilling +CurrencyNames/de/srd=Surinamischer Dollar +CurrencyNames/de/tpe=Timor-Escudo +CurrencyNames/de/trl=Alte T\u00fcrkische Lira +CurrencyNames/de/try=T\u00fcrkische Lira +CurrencyNames/de/ttd=Trinidad- und Tobago-Dollar +CurrencyNames/de/twd=Neuer Taiwan-Dollar +CurrencyNames/de/tzs=Tansania-Schilling +CurrencyNames/de/ugx=Uganda-Schilling +CurrencyNames/de/usd=US-Dollar +CurrencyNames/de/vef=Bol\u00edvar Fuerte +CurrencyNames/de/xag=Unze Silber +CurrencyNames/de/xau=Unze Gold +CurrencyNames/de/xbb=Europ\u00e4ische W\u00e4hrungseinheit (XBB) +CurrencyNames/de/xpd=Unze Palladium +CurrencyNames/de/xpt=Unze Platin +CurrencyNames/de/xts=Testw\u00e4hrung +CurrencyNames/de/xxx=Unbekannte W\u00e4hrung +CurrencyNames/de/yer=Jemen-Rial +CurrencyNames/de/zar=S\u00fcdafrikanischer Rand +CurrencyNames/de/zwd=Simbabwe-Dollar + +CurrencyNames/es/aed=d\u00edrham de los Emiratos \u00c1rabes Unidos +CurrencyNames/es/azm=manat azer\u00ed (1993-2006) +CurrencyNames/es/azn=manat azer\u00ed +CurrencyNames/es/csd=antiguo dinar serbio +CurrencyNames/es/ghc=cedi ghan\u00e9s (1979-2007) +CurrencyNames/es/ghs=cedi ghan\u00e9s +CurrencyNames/es/mzm=antiguo metical mozambique\u00f1o +CurrencyNames/es/mzn=metical mozambique\u00f1o +CurrencyNames/es/rsd=dinar serbio +CurrencyNames/es/sdg=libra sudanesa +CurrencyNames/es/trl=lira turca antigua +CurrencyNames/es/vef=bol\u00edvar fuerte venezolano + +CurrencyNames/fr/afa=afghani (1927\u20132002) +CurrencyNames/fr/all=lek albanais +CurrencyNames/fr/ang=florin antillais +CurrencyNames/fr/awg=florin arubais +CurrencyNames/fr/azm=manat az\u00e9ri (1993-2006) +CurrencyNames/fr/azn=manat az\u00e9ri +CurrencyNames/fr/bam=mark convertible bosniaque +CurrencyNames/fr/bbd=dollar barbadien +CurrencyNames/fr/bdt=taka bangladeshi +CurrencyNames/fr/bgl=lev bulgare (1962\u20131999) +CurrencyNames/fr/bgn=nouveau lev bulgare +CurrencyNames/fr/bhd=dinar bahre\u00efni +CurrencyNames/fr/bif=franc burundais +CurrencyNames/fr/bmd=dollar bermudien +CurrencyNames/fr/bnd=dollar brun\u00e9ien +CurrencyNames/fr/bov=mvdol bolivien +CurrencyNames/fr/brl=r\u00e9al br\u00e9silien +CurrencyNames/fr/bsd=dollar baham\u00e9en +CurrencyNames/fr/btn=ngultrum bouthanais +CurrencyNames/fr/bwp=pula botswanais +CurrencyNames/fr/bzd=dollar b\u00e9liz\u00e9en +CurrencyNames/fr/cny=yuan renminbi chinois +CurrencyNames/fr/crc=col\u00f3n costaricain +CurrencyNames/fr/csd=dinar serbo-mont\u00e9n\u00e9grin +CurrencyNames/fr/cve=escudo capverdien +CurrencyNames/fr/cyp=livre chypriote +CurrencyNames/fr/dem=mark allemand +CurrencyNames/fr/djf=franc djiboutien +CurrencyNames/fr/ern=nafka \u00e9rythr\u00e9en +CurrencyNames/fr/etb=birr \u00e9thiopien +CurrencyNames/fr/fjd=dollar fidjien +CurrencyNames/fr/fkp=livre des Falkland +CurrencyNames/fr/gel=lari g\u00e9orgien +CurrencyNames/fr/ghs=c\u00e9di ghan\u00e9en +CurrencyNames/fr/gmd=dalasi gambien +CurrencyNames/fr/grd=drachme grecque +CurrencyNames/fr/gtq=quetzal guat\u00e9malt\u00e8que +CurrencyNames/fr/gwp=peso bissau-guin\u00e9en +CurrencyNames/fr/hnl=lempira hondurien +CurrencyNames/fr/hrk=kuna croate +CurrencyNames/fr/htg=gourde ha\u00eftienne +CurrencyNames/fr/huf=forint hongrois +CurrencyNames/fr/idr=roupie indon\u00e9sienne +CurrencyNames/fr/ils=nouveau shekel isra\u00e9lien +CurrencyNames/fr/iqd=dinar irakien +CurrencyNames/fr/jpy=yen japonais +CurrencyNames/fr/kes=shilling k\u00e9nyan +CurrencyNames/fr/kgs=som kirghize +CurrencyNames/fr/khr=riel cambodgien +CurrencyNames/fr/kmf=franc comorien +CurrencyNames/fr/kwd=dinar kowe\u00eftien +CurrencyNames/fr/kzt=tenge kazakh +CurrencyNames/fr/lak=kip loatien +CurrencyNames/fr/lkr=roupie srilankaise +CurrencyNames/fr/lsl=loti lesothan +CurrencyNames/fr/mga=ariary malgache +CurrencyNames/fr/mkd=denar mac\u00e9donien +CurrencyNames/fr/mmk=kyat myanmarais +CurrencyNames/fr/mnt=tugrik mongol +CurrencyNames/fr/mop=pataca macanaise +CurrencyNames/fr/mro=ouguiya mauritanien +CurrencyNames/fr/mvr=rufiyaa maldivienne +CurrencyNames/fr/mwk=kwacha malawite +CurrencyNames/fr/myr=ringgit malais +CurrencyNames/fr/mzn=metical mozambicain +CurrencyNames/fr/ngn=naira nig\u00e9rian +CurrencyNames/fr/nio=c\u00f3rdoba oro nicaraguayen +CurrencyNames/fr/npr=roupie n\u00e9palaise +CurrencyNames/fr/pab=balboa panam\u00e9en +CurrencyNames/fr/pgk=kina papouan-n\u00e9o-guin\u00e9en +CurrencyNames/fr/pkr=roupie pakistanaise +CurrencyNames/fr/pln=zloty polonais +CurrencyNames/fr/pyg=guaran\u00ed paraguayen +CurrencyNames/fr/qar=rial qatari +CurrencyNames/fr/ron=leu roumain +CurrencyNames/fr/rsd=dinar serbe +CurrencyNames/fr/rub=rouble russe +CurrencyNames/fr/rur=rouble russe (1991\u20131998) +CurrencyNames/fr/sbd=dollar des \u00eeles Salomon +CurrencyNames/fr/sdg=livre soudanaise +CurrencyNames/fr/sit=tolar slov\u00e8ne +CurrencyNames/fr/sll=leone sierra-l\u00e9onais +CurrencyNames/fr/sos=shilling somalien +CurrencyNames/fr/srg=florin surinamais +CurrencyNames/fr/std=dobra santom\u00e9en +CurrencyNames/fr/svc=col\u00f3n salvadorien +CurrencyNames/fr/szl=lilangeni swazi +CurrencyNames/fr/thb=baht tha\u00eflandais +CurrencyNames/fr/tjs=somoni tadjik +CurrencyNames/fr/tmm=manat turkm\u00e8ne +CurrencyNames/fr/top=pa\u2019anga tongan +CurrencyNames/fr/tpe=escudo timorais +CurrencyNames/fr/ttd=dollar trinidadien +CurrencyNames/fr/twd=nouveau dollar ta\u00efwanais +CurrencyNames/fr/tzs=shilling tanzanien +CurrencyNames/fr/uah=hryvnia ukrainienne +CurrencyNames/fr/uzs=sum ouzbek +CurrencyNames/fr/vef=bolivar fuerte v\u00e9n\u00e9zu\u00e9lien +CurrencyNames/fr/vnd=d\u00f4ng vietnamien +CurrencyNames/fr/vuv=vatu vanuatuan +CurrencyNames/fr/wst=tala samoan +CurrencyNames/fr/xts=(devise de test) +CurrencyNames/fr/xxx=devise inconnue ou non valide +CurrencyNames/fr/yer=rial y\u00e9m\u00e9nite +CurrencyNames/fr/zar=rand sud-africain +CurrencyNames/fr/zmk=kwacha zambien +CurrencyNames/fr/zwd=dollar zimbabw\u00e9en + +CurrencyNames/it/azm=Manat Azero (1993-2006) +CurrencyNames/it/ghs=Cedi ghanese +CurrencyNames/it/iep=Sterlina irlandese +CurrencyNames/it/mzn=Metical del Mozambico +CurrencyNames/it/rsd=Dinaro serbo +CurrencyNames/it/sdg=Sterlina sudanese +CurrencyNames/it/srd=Dollaro surinamese +CurrencyNames/it/vef=Bol\u00edvar venezuelano forte +CurrencyNames/it/xag=Argento +CurrencyNames/it/xpd=Palladio + +CurrencyNames/ja/azm=\u30a2\u30bc\u30eb\u30d0\u30a4\u30b8\u30e3\u30f3 \u30de\u30ca\u30c8 (1993-2006) +CurrencyNames/ja/azn=\u30a2\u30bc\u30eb\u30d0\u30a4\u30b8\u30e3\u30f3 \u30de\u30ca\u30c8 +CurrencyNames/ja/ghc=\u30ac\u30fc\u30ca \u30bb\u30c7\u30a3 (1979-2007) +CurrencyNames/ja/ghs=\u30ac\u30fc\u30ca \u30bb\u30c7\u30a3 +CurrencyNames/ja/mzn=\u30e2\u30b6\u30f3\u30d3\u30fc\u30af \u30e1\u30c6\u30a3\u30ab\u30eb +CurrencyNames/ja/rol=\u30eb\u30fc\u30de\u30cb\u30a2 \u65e7\u30ec\u30a4 +CurrencyNames/ja/ron=\u30eb\u30fc\u30de\u30cb\u30a2 \u30ec\u30a4 +CurrencyNames/ja/rsd=\u30c7\u30a3\u30ca\u30fc\u30eb (\u30bb\u30eb\u30d3\u30a2) +CurrencyNames/ja/sdg=\u30b9\u30fc\u30c0\u30f3 \u30dd\u30f3\u30c9 +CurrencyNames/ja/srd=\u30b9\u30ea\u30ca\u30e0 \u30c9\u30eb +CurrencyNames/ja/vef=\u30d9\u30cd\u30ba\u30a8\u30e9 \u30dc\u30ea\u30d0\u30eb\u30d5\u30a8\u30eb\u30c6 +CurrencyNames/ja/xag=\u9280 +CurrencyNames/ja/xpd=\u30d1\u30e9\u30b8\u30a6\u30e0 +CurrencyNames/ja/xpt=\u30d7\u30e9\u30c1\u30ca +CurrencyNames/ja/xts=\u30c6\u30b9\u30c8\u7528\u901a\u8ca8\u30b3\u30fc\u30c9 +CurrencyNames/ja/xxx=\u4e0d\u660e\u307e\u305f\u306f\u7121\u52b9\u306a\u901a\u8ca8 +CurrencyNames/ja/zmk=\u30b6\u30f3\u30d3\u30a2 \u30af\u30ef\u30c1\u30e3 + +CurrencyNames/ko/aed=\uc544\ub78d\uc5d0\ubbf8\ub9ac\ud2b8 \ub514\ub974\ud568 +CurrencyNames/ko/ang=\ub124\ub35c\ub780\ub4dc\ub839 \uc548\ud2f8\ub808\uc2a4 \uae38\ub354 +CurrencyNames/ko/azm=\uc544\uc81c\ub974\ubc14\uc774\uc820 \ub9c8\ub098\ud2b8(1993-2006) +CurrencyNames/ko/azn=\uc544\uc81c\ub974\ubc14\uc774\uc794 \ub9c8\ub098\ud2b8 +CurrencyNames/ko/bov=\ubcfc\ub9ac\ube44\uc544\ub178 Mvdol(\uae30\uae08) +CurrencyNames/ko/chf=\uc2a4\uc704\uc2a4 \ud504\ub791 +CurrencyNames/ko/clf=\uce60\ub808 UF (Unidades de Fomento) +CurrencyNames/ko/csd=\uace0 \uc138\ub974\ube44\uc544 \ub514\ub098\ub974 +CurrencyNames/ko/ghc=\uac00\ub098 \uc2dc\ub514 (1979-2007) +CurrencyNames/ko/ghs=\uac00\ub098 \uc2dc\ub514 +CurrencyNames/ko/mxv=\uba55\uc2dc\ucf54 UDI(Unidad de Inversion) +CurrencyNames/ko/myr=\ub9d0\ub808\uc774\uc2dc\uc544 \ub9c1\uae43 +CurrencyNames/ko/mzm=\uace0 \ubaa8\uc7a0\ube44\ud06c \uba54\ud2f0\uce7c +CurrencyNames/ko/mzn=\ubaa8\uc7a0\ube44\ud06c \uba54\ud2f0\uce7c +CurrencyNames/ko/ron=\ub8e8\ub9c8\ub2c8\uc544 \ub808\uc6b0 +CurrencyNames/ko/rsd=\uc138\ub974\ube44\uc544 \ub514\ub098\ub974 +CurrencyNames/ko/sdg=\uc218\ub2e8 \ud30c\uc6b4\ub4dc +CurrencyNames/ko/srd=\uc218\ub9ac\ub0a8 \ub2ec\ub7ec +CurrencyNames/ko/top=\ud1b5\uac00 \ud30c\uc559\uac00 +CurrencyNames/ko/trl=\ud130\ud0a4 \ub9ac\ub77c +CurrencyNames/ko/try=\uc2e0 \ud130\ud0a4 \ub9ac\ub77c +CurrencyNames/ko/usn=\ubbf8\uad6d \ub2ec\ub7ec(\ub2e4\uc74c\ub0a0) +CurrencyNames/ko/uss=\ubbf8\uad6d \ub2ec\ub7ec(\ub2f9\uc77c) +CurrencyNames/ko/vef=\ubca0\ub124\uc8fc\uc5d8\ub77c \ubcfc\ub9ac\ubc14\ub974 \ud478\uc5d0\ub974\ub5bc +CurrencyNames/ko/xaf=CFA \ud504\ub791 BEAC +CurrencyNames/ko/xag=\uc740\ud654 +CurrencyNames/ko/xba=\uc720\ub974\ucf54 (\uc720\ub7fd \ud68c\uacc4 \ub2e8\uc704) +CurrencyNames/ko/xbb=\uc720\ub7fd \ud1b5\ud654 \ub3d9\ub9f9 +CurrencyNames/ko/xbc=\uc720\ub7fd \uacc4\uc0b0 \ub2e8\uc704 (XBC) +CurrencyNames/ko/xbd=\uc720\ub7fd \uacc4\uc0b0 \ub2e8\uc704 (XBD) +CurrencyNames/ko/xof=CFA \ud504\ub791 BCEAO +CurrencyNames/ko/xpd=\ud314\ub77c\ub4d0 +CurrencyNames/ko/xpf=CFP \ud504\ub791 +CurrencyNames/ko/xpt=\ubc31\uae08 +CurrencyNames/ko/xts=\ud14c\uc2a4\ud2b8 \ud1b5\ud654 \ucf54\ub4dc +CurrencyNames/ko/xxx=\uc54c\uc218\uc5c6\uac70\ub098 \uc720\ud6a8\ud558\uc9c0\uc54a\uc740 \ud1b5\ud654\ub2e8\uc704 +CurrencyNames/ko/zwd=\uc9d0\ubc14\ube0c\uc6e8 \ub2ec\ub7ec + +CurrencyNames/sv/adp=andorransk peseta +CurrencyNames/sv/aed=F\u00f6renade Arabemiratens dirham +CurrencyNames/sv/afa=afghani (1927-2002) +CurrencyNames/sv/afn=afghani +CurrencyNames/sv/all=albansk lek +CurrencyNames/sv/amd=armenisk dram +CurrencyNames/sv/ang=Nederl\u00e4ndska Antillernas gulden +CurrencyNames/sv/aoa=angolansk kwanza +CurrencyNames/sv/ars=argentinsk peso +CurrencyNames/sv/ats=\u00f6sterrikisk schilling +CurrencyNames/sv/aud=australisk dollar +CurrencyNames/sv/awg=Aruba-gulden +CurrencyNames/sv/azm=azerbajdzjansk manat (1993-2006) +CurrencyNames/sv/azn=azerbajdzjansk manat +CurrencyNames/sv/bam=bosnisk-hercegovinsk mark (konvertibel) +CurrencyNames/sv/bbd=Barbados-dollar +CurrencyNames/sv/bdt=bangladeshisk taka +CurrencyNames/sv/bef=belgisk franc +CurrencyNames/sv/bgn=bulgarisk ny lev +CurrencyNames/sv/bhd=Bahrain-dinar +CurrencyNames/sv/bif=burundisk franc +CurrencyNames/sv/bnd=Brunei-dollar +CurrencyNames/sv/bob=boliviano +CurrencyNames/sv/bov=boliviansk mvdol +CurrencyNames/sv/brl=brasiliansk real +CurrencyNames/sv/bsd=Bahamas-dollar +CurrencyNames/sv/btn=bhutanesisk ngultrum +CurrencyNames/sv/bwp=botswansk pula +CurrencyNames/sv/byb=vitrysk ny rubel (1994-1999) +CurrencyNames/sv/byr=vitrysk rubel +CurrencyNames/sv/bzd=belizisk dollar +CurrencyNames/sv/cad=kanadensisk dollar +CurrencyNames/sv/cdf=kongolesisk franc +CurrencyNames/sv/chf=schweizisk franc +CurrencyNames/sv/clf=chilensk unidad de fomento +CurrencyNames/sv/clp=chilensk peso +CurrencyNames/sv/cny=kinesisk yuan renminbi +CurrencyNames/sv/cop=colombiansk peso +CurrencyNames/sv/crc=costarikansk col\u00f3n +CurrencyNames/sv/csd=jugoslavisk dinar +CurrencyNames/sv/cup=kubansk peso +CurrencyNames/sv/cve=kapverdisk escudo +CurrencyNames/sv/cyp=cypriotiskt pund +CurrencyNames/sv/czk=tjeckisk koruna +CurrencyNames/sv/dem=tysk mark +CurrencyNames/sv/djf=djiboutisk franc +CurrencyNames/sv/dkk=dansk krona +CurrencyNames/sv/dop=dominikansk peso +CurrencyNames/sv/dzd=algerisk dinar +CurrencyNames/sv/eek=estnisk krona +CurrencyNames/sv/egp=egyptiskt pund +CurrencyNames/sv/ern=eritreansk nakfa +CurrencyNames/sv/esp=spansk peseta +CurrencyNames/sv/etb=etiopisk birr +CurrencyNames/sv/eur=euro +CurrencyNames/sv/fim=finsk mark +CurrencyNames/sv/fjd=Fiji-dollar +CurrencyNames/sv/frf=fransk franc +CurrencyNames/sv/gbp=brittiskt pund sterling +CurrencyNames/sv/gel=georgisk lari +CurrencyNames/sv/ghc=ghanansk cedi (1979-2007) +CurrencyNames/sv/ghs=ghanansk cedi +CurrencyNames/sv/gip=gibraltiskt pund +CurrencyNames/sv/gmd=gambisk dalasi +CurrencyNames/sv/gnf=guineansk franc +CurrencyNames/sv/grd=grekisk drachma +CurrencyNames/sv/gtq=guatemalansk quetzal +CurrencyNames/sv/gyd=guyanansk dollar +CurrencyNames/sv/hnl=honduransk lempira +CurrencyNames/sv/hrk=kroatisk kuna +CurrencyNames/sv/htg=haitisk gourde +CurrencyNames/sv/huf=ungersk forint +CurrencyNames/sv/idr=indonesisk rupiah +CurrencyNames/sv/iep=irl\u00e4ndskt pund +CurrencyNames/sv/ils=israelisk ny shekel +CurrencyNames/sv/inr=indisk rupie +CurrencyNames/sv/iqd=irakisk dinar +CurrencyNames/sv/irr=iransk rial +CurrencyNames/sv/isk=isl\u00e4ndsk krona +CurrencyNames/sv/itl=italiensk lira +CurrencyNames/sv/jmd=Jamaica-dollar +CurrencyNames/sv/jod=jordansk dinar +CurrencyNames/sv/jpy=japansk yen +CurrencyNames/sv/kes=kenyansk shilling +CurrencyNames/sv/kgs=kirgizisk som +CurrencyNames/sv/khr=kambodjansk riel +CurrencyNames/sv/kmf=komorisk franc +CurrencyNames/sv/kpw=nordkoreansk won +CurrencyNames/sv/krw=sydkoreansk won +CurrencyNames/sv/kwd=kuwaitisk dinar +CurrencyNames/sv/kzt=kazakisk tenge +CurrencyNames/sv/lak=laotisk kip +CurrencyNames/sv/lbp=libanesiskt pund +CurrencyNames/sv/lkr=srilankesisk rupie +CurrencyNames/sv/lrd=Liberia-dollar +CurrencyNames/sv/lsl=lesothisk loti +CurrencyNames/sv/ltl=litauisk litas +CurrencyNames/sv/luf=luxemburgsk franc +CurrencyNames/sv/lvl=lettisk lats +CurrencyNames/sv/lyd=libysk dinar +CurrencyNames/sv/mad=marockansk dirham +CurrencyNames/sv/mdl=moldavisk leu +CurrencyNames/sv/mga=madagaskisk ariary +CurrencyNames/sv/mgf=madagaskisk franc +CurrencyNames/sv/mkd=makedonisk denar +CurrencyNames/sv/mmk=myanmarisk kyat +CurrencyNames/sv/mnt=mongolisk tugrik +CurrencyNames/sv/mop=Macao-pataca +CurrencyNames/sv/mro=mauretansk ouguiya +CurrencyNames/sv/mtl=maltesisk lira +CurrencyNames/sv/mur=mauritisk rupie +CurrencyNames/sv/mvr=maldivisk rufiyaa +CurrencyNames/sv/mwk=malawisk kwacha +CurrencyNames/sv/mxn=mexikansk peso +CurrencyNames/sv/mxv=mexikansk unidad de inversion +CurrencyNames/sv/myr=malaysisk ringgit +CurrencyNames/sv/mzm=gammal mo\u00e7ambikisk metical +CurrencyNames/sv/mzn=mo\u00e7ambikisk metical +CurrencyNames/sv/nad=Namibia-dollar +CurrencyNames/sv/ngn=nigeriansk naira +CurrencyNames/sv/nio=nicaraguansk c\u00f3rdoba oro +CurrencyNames/sv/nlg=nederl\u00e4ndsk gulden +CurrencyNames/sv/nok=norsk krona +CurrencyNames/sv/npr=nepalesisk rupie +CurrencyNames/sv/nzd=nyzeel\u00e4ndsk dollar +CurrencyNames/sv/omr=omansk rial +CurrencyNames/sv/pab=panamansk balboa +CurrencyNames/sv/pen=peruansk sol nuevo +CurrencyNames/sv/pgk=papuansk kina +CurrencyNames/sv/php=filippinsk peso +CurrencyNames/sv/pkr=pakistansk rupie +CurrencyNames/sv/pln=polsk zloty +CurrencyNames/sv/pte=portugisisk escudo +CurrencyNames/sv/pyg=paraguaysk guarani +CurrencyNames/sv/qar=qatarisk rial +CurrencyNames/sv/rol=gammal rum\u00e4nsk leu +CurrencyNames/sv/ron=rum\u00e4nsk leu +CurrencyNames/sv/rsd=Serbisk dinar +CurrencyNames/sv/rub=rysk rubel +CurrencyNames/sv/rur=rysk rubel (1991-1998) +CurrencyNames/sv/rwf=rwandisk franc +CurrencyNames/sv/sar=saudisk riyal +CurrencyNames/sv/scr=seychellisk rupie +CurrencyNames/sv/sdd=sudanesisk dinar +CurrencyNames/sv/sdg=sudanesiskt pund +CurrencyNames/sv/sek=svensk krona +CurrencyNames/sv/sgd=Singapore-dollar +CurrencyNames/sv/sit=slovensk tolar +CurrencyNames/sv/skk=slovakisk koruna +CurrencyNames/sv/sll=sierraleonsk leone +CurrencyNames/sv/sos=somalisk shilling +CurrencyNames/sv/srd=Surinam-dollar +CurrencyNames/sv/srg=surinamesisk gulden +CurrencyNames/sv/svc=salvadoransk col\u00f3n +CurrencyNames/sv/syp=syriskt pund +CurrencyNames/sv/szl=swazil\u00e4ndsk lilangeni +CurrencyNames/sv/thb=thail\u00e4ndsk baht +CurrencyNames/sv/tjs=tadzjikisk somoni +CurrencyNames/sv/tmm=turkmensk manat +CurrencyNames/sv/tnd=tunisisk dinar +CurrencyNames/sv/top=tongansk pa\u02bbanga +CurrencyNames/sv/tpe=timoriansk escudo +CurrencyNames/sv/trl=gammal turkisk lira +CurrencyNames/sv/try=ny turkisk lira +CurrencyNames/sv/ttd=Trinidad ochTobago-dollar +CurrencyNames/sv/twd=taiwanesisk ny dollar +CurrencyNames/sv/tzs=tanzanisk shilling +CurrencyNames/sv/uah=ukrainsk hryvnia +CurrencyNames/sv/ugx=ugandisk shilling +CurrencyNames/sv/uyu=uruguayansk peso +CurrencyNames/sv/uzs=uzbekisk sum +CurrencyNames/sv/veb=venezuelansk bolivar +CurrencyNames/sv/vef=venezuelansk bolivar fuerte +CurrencyNames/sv/vnd=vietnamesisk dong +CurrencyNames/sv/vuv=vanuatisk vatu +CurrencyNames/sv/wst=v\u00e4stsamoansk tala +CurrencyNames/sv/xag=silver +CurrencyNames/sv/xau=guld +CurrencyNames/sv/xba=europeisk kompositenhet +CurrencyNames/sv/xbb=europeisk monet\u00e4r enhet +CurrencyNames/sv/xbc=europeisk kontoenhet (XBC) +CurrencyNames/sv/xbd=europeisk kontoenhet (XBD) +CurrencyNames/sv/xcd=\u00f6stkaribisk dollar +CurrencyNames/sv/xdr=IMF s\u00e4rskild dragningsr\u00e4tt +CurrencyNames/sv/xfo=fransk guldfranc +CurrencyNames/sv/xpd=palladium +CurrencyNames/sv/xpt=platina +CurrencyNames/sv/xts=test-valutakod +CurrencyNames/sv/xxx=ok\u00e4nd eller ogiltig valuta +CurrencyNames/sv/yer=jemenitisk rial +CurrencyNames/sv/yum=jugoslavisk ny dinar +CurrencyNames/sv/zar=sydafrikansk rand +CurrencyNames/sv/zmk=zambisk kwacha +CurrencyNames/sv/zwd=Zimbabwe-dollar + +CurrencyNames/zh_CN/ang=\u8377\u5170\u5b89\u66ff\u5170\u76fe +CurrencyNames/zh_CN/azm=\u963f\u585e\u62dc\u7586\u9a6c\u7eb3\u7279 (1993-2006) +CurrencyNames/zh_CN/azn=\u963f\u585e\u62dc\u7586\u9a6c\u7eb3\u7279 +CurrencyNames/zh_CN/csd=\u65e7\u585e\u5c14\u7ef4\u4e9a\u7b2c\u7eb3\u5c14 +CurrencyNames/zh_CN/ghs=\u52a0\u7eb3\u585e\u5730 +CurrencyNames/zh_CN/mzm=\u65e7\u83ab\u6851\u6bd4\u514b\u7f8e\u63d0\u5361 +CurrencyNames/zh_CN/mzn=\u83ab\u6851\u6bd4\u514b\u7f8e\u63d0\u5361 +CurrencyNames/zh_CN/ron=\u7f57\u9a6c\u5c3c\u4e9a\u5217\u4f0a +CurrencyNames/zh_CN/rsd=\u585e\u5c14\u7ef4\u4e9a\u7b2c\u7eb3\u5c14 +CurrencyNames/zh_CN/shp=\u5723\u8d6b\u52d2\u62ff\u7fa4\u5c9b\u78c5 +CurrencyNames/zh_CN/twd=\u65b0\u53f0\u5e01 +CurrencyNames/zh_CN/vef=\u59d4\u5185\u745e\u62c9\u5f3a\u52bf\u73bb\u5229\u74e6 +CurrencyNames/zh_CN/xxx=\u8d27\u5e01\u672a\u77e5\u6216\u65e0\u6548 + +CurrencyNames/zh_TW/afa=\u963f\u5bcc\u6c57\u5c3c (1927-2002) +CurrencyNames/zh_TW/ang=\u53e4\u82f1\u6587 +CurrencyNames/zh_TW/azm=\u4e9e\u585e\u62dc\u7136\u99ac\u7d0d\u7279 (1993-2006) +CurrencyNames/zh_TW/azn=\u4e9e\u585e\u62dc\u7136\u99ac\u7d0d\u7279 +CurrencyNames/zh_TW/bwp=\u6ce2\u672d\u90a3\u666e\u62c9 +CurrencyNames/zh_TW/bzd=\u8c9d\u91cc\u65af\u5143 +CurrencyNames/zh_TW/csd=\u65e7\u585e\u5c14\u7ef4\u4e9a\u7b2c\u7eb3\u5c14 +CurrencyNames/zh_TW/cyp=\u8cfd\u666e\u52d2\u65af\u938a +CurrencyNames/zh_TW/ghc=\u8fe6\u7d0d\u4ed9\u8515 (1979-2007) +CurrencyNames/zh_TW/ghs=\u8fe6\u7d0d\u4ed9\u8515 +CurrencyNames/zh_TW/gwp=\u5e7e\u5167\u4e9e\u6bd4\u7d22\u62ab\u7d22 +CurrencyNames/zh_TW/huf=\u5308\u7259\u5229\u798f\u6797 +CurrencyNames/zh_TW/idr=\u5370\u5c3c\u76fe +CurrencyNames/zh_TW/inr=\u5370\u5ea6\u76e7\u6bd4 +CurrencyNames/zh_TW/kpw=\u5317\u97d3\u571c +CurrencyNames/zh_TW/krw=\u97d3\u571c +CurrencyNames/zh_TW/lak=\u8001\u631d\u57fa\u666e +CurrencyNames/zh_TW/mad=\u6469\u6d1b\u54e5\u8fea\u62c9\u59c6 +CurrencyNames/zh_TW/mxn=\u58a8\u897f\u54e5\u62ab\u7d22 +CurrencyNames/zh_TW/mxv=\u58a8\u897f\u54e5 Unidad de Inversion (UDI)\uff08\u8d44\u91d1\uff09 +CurrencyNames/zh_TW/myr=\u99ac\u4f86\u897f\u4e9e\u4ee4\u5409 +CurrencyNames/zh_TW/mzn=\u83ab\u4e09\u6bd4\u514b\u7f8e\u63d0\u5361 +CurrencyNames/zh_TW/nio=\u5c3c\u52a0\u62c9\u74dc\u91d1\u79d1\u591a\u5df4 +CurrencyNames/zh_TW/rol=\u65e7\u7f57\u9a6c\u5c3c\u4e9a\u5217\u4f0a +CurrencyNames/zh_TW/ron=\u7f85\u99ac\u5c3c\u4e9e\u5217\u4f0a +CurrencyNames/zh_TW/rsd=\u585e\u723e\u7dad\u4e9e\u6234\u7d0d +CurrencyNames/zh_TW/scr=\u585e\u5e2d\u723e\u76e7\u6bd4 +CurrencyNames/zh_TW/sdg=\u8607\u4e39\u938a +CurrencyNames/zh_TW/shp=\u5723\u8d6b\u52d2\u62ff\u7fa4\u5c9b\u78c5 +CurrencyNames/zh_TW/srd=\u82cf\u91cc\u5357\u5143 +CurrencyNames/zh_TW/srg=\u8607\u5229\u5357\u57fa\u723e +CurrencyNames/zh_TW/svc=\u8428\u5c14\u74e6\u591a\u79d1\u6717 +CurrencyNames/zh_TW/szl=\u65af\u5a01\u58eb\u5170\u91cc\u5170\u5409\u5c3c +CurrencyNames/zh_TW/tpe=\u5e1d\u6c76\u57c3\u65af\u5e93\u591a +CurrencyNames/zh_TW/ttd=\u7279\u7acb\u5c3c\u8fbe\u548c\u591a\u5df4\u54e5\u5143 +CurrencyNames/zh_TW/tzs=\u5766\u6851\u5c3c\u4e9a\u5148\u4ee4 +CurrencyNames/zh_TW/uzs=\u70cf\u8332\u5225\u514b\u7d22\u59c6 +CurrencyNames/zh_TW/veb=\u59d4\u5167\u745e\u62c9\u73bb\u5229\u74e6 +CurrencyNames/zh_TW/vef=\u59d4\u5167\u745e\u62c9\u5f37\u52e2\u73bb\u5229\u74e6 +CurrencyNames/zh_TW/xaf=\u897f\u975e\u6cd5\u90ce BEAC +CurrencyNames/zh_TW/xag=XAG +CurrencyNames/zh_TW/xof=\u897f\u975e\u6cd5\u90ce BCEAO +CurrencyNames/zh_TW/xpd=\u94af +CurrencyNames/zh_TW/xpt=\u94c2 +CurrencyNames/zh_TW/xts=XTS +CurrencyNames/zh_TW/xxx=XXX +CurrencyNames/zh_TW/yer=\u8449\u9580\u91cc\u96c5 diff --git a/jdk/test/sun/text/resources/LocaleDataTest.java b/jdk/test/sun/text/resources/LocaleDataTest.java index 311b08a9125..30e65c52ab5 100644 --- a/jdk/test/sun/text/resources/LocaleDataTest.java +++ b/jdk/test/sun/text/resources/LocaleDataTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, 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 @@ -33,7 +33,7 @@ * 6379214 6485516 6486607 4225362 4494727 6533691 6531591 6531593 6570259 * 6509039 6609737 6610748 6645271 6507067 6873931 6450945 6645268 6646611 * 6645405 6650730 6910489 6573250 6870908 6585666 6716626 6914413 6916787 - * 6919624 6998391 7019267 7020960 7025837 + * 6919624 6998391 7019267 7020960 7025837 7020583 * @summary Verify locale data * */ diff --git a/jdk/test/sun/tools/native2ascii/Native2AsciiTests.sh b/jdk/test/sun/tools/native2ascii/Native2AsciiTests.sh index 82ee282bda3..f656bbc8da2 100644 --- a/jdk/test/sun/tools/native2ascii/Native2AsciiTests.sh +++ b/jdk/test/sun/tools/native2ascii/Native2AsciiTests.sh @@ -1,7 +1,7 @@ #! /bin/sh -e # -# Copyright (c) 2002, 2005, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2002, 2011, 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 diff --git a/jdk/test/sun/util/logging/PlatformLoggerTest.java b/jdk/test/sun/util/logging/PlatformLoggerTest.java index 35fccfc00e6..9e7435d4045 100644 --- a/jdk/test/sun/util/logging/PlatformLoggerTest.java +++ b/jdk/test/sun/util/logging/PlatformLoggerTest.java @@ -26,10 +26,11 @@ * @bug 6882376 6985460 * @summary Test if java.util.logging.Logger is created before and after * logging is enabled. Also validate some basic PlatformLogger - * operations. + * operations. othervm mode to make sure java.util.logging + * is not initialized. * * @compile -XDignore.symbol.file PlatformLoggerTest.java - * @run main PlatformLoggerTest + * @run main/othervm PlatformLoggerTest */ import java.util.logging.*; diff --git a/jdk/test/tools/launcher/Arrrghs.java b/jdk/test/tools/launcher/Arrrghs.java index 1db933833ea..c9b82e7f6b7 100644 --- a/jdk/test/tools/launcher/Arrrghs.java +++ b/jdk/test/tools/launcher/Arrrghs.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, 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 diff --git a/jdk/test/tools/launcher/ClassPathWildCard.sh b/jdk/test/tools/launcher/ClassPathWildCard.sh index c6b57d4b8d9..78c03c8a574 100644 --- a/jdk/test/tools/launcher/ClassPathWildCard.sh +++ b/jdk/test/tools/launcher/ClassPathWildCard.sh @@ -6,7 +6,7 @@ # @author Kumar Srinivasan # -# Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2007, 2010, 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 diff --git a/jdk/test/tools/launcher/MiscTests.java b/jdk/test/tools/launcher/MiscTests.java index 1d7fcf9514b..55d3e8b44e2 100644 --- a/jdk/test/tools/launcher/MiscTests.java +++ b/jdk/test/tools/launcher/MiscTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2011, 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 diff --git a/jdk/test/tools/pack200/CommandLineTests.java b/jdk/test/tools/pack200/CommandLineTests.java index fefefd2a860..74a1524fa39 100644 --- a/jdk/test/tools/pack200/CommandLineTests.java +++ b/jdk/test/tools/pack200/CommandLineTests.java @@ -120,9 +120,9 @@ public class CommandLineTests { // make a backup copy for re-use File bakFile = new File(f.getName() + ".bak"); if (!bakFile.exists()) { // backup - Utils.copyFile(f.getAbsoluteFile(), bakFile.getAbsoluteFile()); + Utils.copyFile(f, bakFile); } else { // restore - Utils.copyFile(bakFile.getAbsoluteFile(), f.getAbsoluteFile()); + Utils.copyFile(bakFile, f); } cmdsList.clear(); cmdsList.add(Utils.getPack200Cmd()); diff --git a/jdk/test/tools/pack200/TimeStamp.java b/jdk/test/tools/pack200/TimeStamp.java index 3d099e2141c..aa82fbb4e16 100644 --- a/jdk/test/tools/pack200/TimeStamp.java +++ b/jdk/test/tools/pack200/TimeStamp.java @@ -56,7 +56,7 @@ public class TimeStamp { // make a local copy of our test file File srcFile = Utils.locateJar("golden.jar"); File goldenFile = new File("golden.jar"); - Utils.copyFile(srcFile, goldenFile.getAbsoluteFile()); + Utils.copyFile(srcFile, goldenFile); JarFile goldenJarFile = new JarFile(goldenFile); File packFile = new File("golden.pack"); diff --git a/jdk/test/tools/pack200/Utils.java b/jdk/test/tools/pack200/Utils.java index 5cf7663d201..53c1a1baa0b 100644 --- a/jdk/test/tools/pack200/Utils.java +++ b/jdk/test/tools/pack200/Utils.java @@ -21,18 +21,18 @@ * questions. */ +import java.nio.file.Path; import java.io.BufferedReader; import java.io.ByteArrayOutputStream; import java.io.Closeable; import java.io.File; import java.io.FileFilter; -import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintStream; -import java.nio.channels.FileChannel; +import java.nio.file.Files; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -44,6 +44,8 @@ import java.util.jar.Pack200; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; +import static java.nio.file.StandardCopyOption.*; + /** * * @author ksrini @@ -180,45 +182,12 @@ class Utils { } }; - private static void setFileAttributes(File src, File dst) throws IOException { - dst.setExecutable(src.canExecute()); - dst.setReadable(src.canRead()); - dst.setWritable(src.canWrite()); - dst.setLastModified(src.lastModified()); - } - static void copyFile(File src, File dst) throws IOException { - if (src.isDirectory()) { - dst.mkdirs(); - setFileAttributes(src, dst); - return; - } else { - File baseDirFile = dst.getParentFile(); - if (!baseDirFile.exists()) { - baseDirFile.mkdirs(); - } + Path parent = dst.toPath().getParent(); + if (parent != null) { + Files.createDirectories(parent); } - FileInputStream in = null; - FileOutputStream out = null; - FileChannel srcChannel = null; - FileChannel dstChannel = null; - try { - in = new FileInputStream(src); - out = new FileOutputStream(dst); - srcChannel = in.getChannel(); - dstChannel = out.getChannel(); - - long retval = srcChannel.transferTo(0, src.length(), dstChannel); - if (src.length() != dst.length()) { - throw new IOException("file copy failed for " + src); - } - } finally { - close(srcChannel); - close(dstChannel); - close(in); - close(out); - } - setFileAttributes(src, dst); + Files.copy(src.toPath(), dst.toPath(), COPY_ATTRIBUTES, REPLACE_EXISTING); } static String baseName(File file, String extension) { diff --git a/make/Defs-internal.gmk b/make/Defs-internal.gmk index c55675f79e0..89ca1c179ec 100644 --- a/make/Defs-internal.gmk +++ b/make/Defs-internal.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1995, 2011, 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 diff --git a/make/corba-rules.gmk b/make/corba-rules.gmk index 13671ee6eca..7bfeddea627 100644 --- a/make/corba-rules.gmk +++ b/make/corba-rules.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2001, 2011, 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 diff --git a/make/deploy-rules.gmk b/make/deploy-rules.gmk index 003698cf56e..fede83a2f3f 100644 --- a/make/deploy-rules.gmk +++ b/make/deploy-rules.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2002, 2011, 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 diff --git a/make/hotspot-rules.gmk b/make/hotspot-rules.gmk index 8bc6e75a666..437f05d38f1 100644 --- a/make/hotspot-rules.gmk +++ b/make/hotspot-rules.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2001, 2011, 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 diff --git a/make/install-rules.gmk b/make/install-rules.gmk index 932985ed07d..609cc2abd19 100644 --- a/make/install-rules.gmk +++ b/make/install-rules.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2002, 2011, 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 diff --git a/make/jaxp-rules.gmk b/make/jaxp-rules.gmk index 625b2ec7bc8..8f542fa7a2c 100644 --- a/make/jaxp-rules.gmk +++ b/make/jaxp-rules.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2001, 2011, 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 diff --git a/make/jaxws-rules.gmk b/make/jaxws-rules.gmk index 4956a983b91..59e33f3fbe6 100644 --- a/make/jaxws-rules.gmk +++ b/make/jaxws-rules.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2001, 2011, 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 diff --git a/make/jdk-rules.gmk b/make/jdk-rules.gmk index cfc56ed127e..35d78904bf2 100644 --- a/make/jdk-rules.gmk +++ b/make/jdk-rules.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2001, 2011, 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 diff --git a/make/jprt.properties b/make/jprt.properties index 777e27c8a2f..950fc52cede 100644 --- a/make/jprt.properties +++ b/make/jprt.properties @@ -323,6 +323,21 @@ jprt.make.rule.all.test.targets= \ ${jprt.my.windows.i586}-product-c1-jdk_tools2, \ windows_x64_5.2-product-c2-jdk_tools2 +# JCK test targets in test/Makefile (no fastdebug & limited c2, windows broken) +jprt.my.jck.test.target.set= \ + solaris_sparc_5.10-product-c1-JCK7TESTRULE, \ + solaris_sparcv9_5.10-product-c2-JCK7TESTRULE, \ + solaris_i586_5.10-product-c1-JCK7TESTRULE, \ + solaris_x64_5.10-product-c2-JCK7TESTRULE, \ + linux_i586_2.6-product-c1-JCK7TESTRULE, \ + linux_x64_2.6-product-c2-JCK7TESTRULE + +# JCK testset targets (e.g. jprt submit -testset jck ... ) +jprt.make.rule.jck.test.targets= \ + ${jprt.my.jck.test.target.set:JCK7TESTRULE=jck7devtools}, \ + ${jprt.my.jck.test.target.set:JCK7TESTRULE=jck7runtime}, \ + ${jprt.my.jck.test.target.set:JCK7TESTRULE=jck7compiler} + # Select list to use (allow for testset to be empty too) jprt.make.rule..test.targets=${jprt.make.rule.default.test.targets} jprt.make.rule.test.targets=${jprt.make.rule.${jprt.my.test.set}.test.targets} @@ -333,4 +348,3 @@ jprt.test.targets=${jprt.vm.test.targets} # Directories to be excluded from the source bundles jprt.bundle.exclude.src.dirs=build dist webrev - diff --git a/make/langtools-rules.gmk b/make/langtools-rules.gmk index a0b2649ec47..ea962959867 100644 --- a/make/langtools-rules.gmk +++ b/make/langtools-rules.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2001, 2011, 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 diff --git a/make/scripts/update_copyright_year.sh b/make/scripts/update_copyright_year.sh index cd8b0a07e2f..a3df5d0fdf6 100644 --- a/make/scripts/update_copyright_year.sh +++ b/make/scripts/update_copyright_year.sh @@ -1,4 +1,4 @@ -#!/bin/sh -f +#!/bin/bash -f # # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. @@ -152,14 +152,24 @@ if [ -s ${all_changesets} ] ; then echo "------------------------------------------------" hg log --rev ${changeset} --template '{desc}\n' > ${desc} printf "%d: %s\n%s\n" ${index} "${changeset}" "`cat ${desc}|head -1`" - if cat ${desc} | fgrep -i "Added tag" > /dev/null ; then - printf " EXCLUDED tag changeset.\n" - elif cat ${desc} | fgrep -i rebrand > /dev/null ; then - printf " EXCLUDED rebrand changeset.\n" - elif cat ${desc} | fgrep -i copyright > /dev/null ; then - printf " EXCLUDED copyright changeset.\n" + if [ "${year}" = "2010" ] ; then + if cat ${desc} | fgrep -i "Added tag" > /dev/null ; then + printf " EXCLUDED tag changeset.\n" + elif cat ${desc} | fgrep -i rebrand > /dev/null ; then + printf " EXCLUDED rebrand changeset.\n" + elif cat ${desc} | fgrep -i copyright > /dev/null ; then + printf " EXCLUDED copyright changeset.\n" + else + updateChangesetFiles ${changeset} + fi else - updateChangesetFiles ${changeset} + if cat ${desc} | fgrep -i "Added tag" > /dev/null ; then + printf " EXCLUDED tag changeset.\n" + elif cat ${desc} | fgrep -i "copyright year" > /dev/null ; then + printf " EXCLUDED copyright year changeset.\n" + else + updateChangesetFiles ${changeset} + fi fi rm -f ${desc} done diff --git a/make/sponsors-rules.gmk b/make/sponsors-rules.gmk index 4fd60ea684d..a3813b51da2 100644 --- a/make/sponsors-rules.gmk +++ b/make/sponsors-rules.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2006, 2009, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2006, 2011, 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 diff --git a/test/Makefile b/test/Makefile index 26d00bb4994..5ff5254dfd4 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2010, 2011, 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 @@ -73,13 +73,16 @@ JDK_TEST_LIST2 = \ jdk_rmi \ jdk_swing +# These are the current jck test targets in the jdk repository +JDK_JCK7_LIST = jck7devtools jck7compiler jck7runtime + # Default test target (everything) all: $(JDK_TEST_LIST) $(LANGTOOLS_TEST_LIST) # Test targets $(LANGTOOLS_TEST_LIST): @$(NO_STOPPING)$(call SUBDIR_TEST, $(LANGTOOLS_DIR), $(subst langtools_,,$@)) -$(JDK_TEST_LIST) $(JDK_TEST_LIST2): +$(JDK_TEST_LIST) $(JDK_TEST_LIST2) $(JDK_JCK7_LIST): @$(NO_STOPPING)$(call SUBDIR_TEST, $(JDK_DIR), $@) clean: @@ -87,7 +90,9 @@ clean: ################################################################ # Phony targets (e.g. these are not filenames) -.PHONY: all clean $(JDK_TEST_LIST) $(LANGTOOLS_TEST_LIST) +.PHONY: all clean \ + $(JDK_TEST_LIST) $(JDK_TEST_LIST2) $(JDK_JCK7_LIST) \ + $(LANGTOOLS_TEST_LIST) ################################################################