|
1 | 1 | /*
|
2 |
| - * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 1996, 2020, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
4 | 4 | *
|
5 | 5 | * This code is free software; you can redistribute it and/or modify it
|
@@ -1925,28 +1925,31 @@ private boolean hasKeyAttributes() {
|
1925 | 1925 | Boolean b = hasKeyAttributes;
|
1926 | 1926 | if (b == null) {
|
1927 | 1927 | synchronized (this) {
|
1928 |
| - String s; |
1929 |
| - s = getAttribute("SupportedKeyFormats"); |
1930 |
| - if (s != null) { |
1931 |
| - supportedFormats = s.split("\\|"); |
1932 |
| - } |
1933 |
| - s = getAttribute("SupportedKeyClasses"); |
1934 |
| - if (s != null) { |
1935 |
| - String[] classNames = s.split("\\|"); |
1936 |
| - List<Class<?>> classList = |
1937 |
| - new ArrayList<>(classNames.length); |
1938 |
| - for (String className : classNames) { |
1939 |
| - Class<?> clazz = getKeyClass(className); |
1940 |
| - if (clazz != null) { |
1941 |
| - classList.add(clazz); |
| 1928 | + b = hasKeyAttributes; |
| 1929 | + if (b == null) { |
| 1930 | + String s; |
| 1931 | + s = getAttribute("SupportedKeyFormats"); |
| 1932 | + if (s != null) { |
| 1933 | + supportedFormats = s.split("\\|"); |
| 1934 | + } |
| 1935 | + s = getAttribute("SupportedKeyClasses"); |
| 1936 | + if (s != null) { |
| 1937 | + String[] classNames = s.split("\\|"); |
| 1938 | + List<Class<?>> classList = |
| 1939 | + new ArrayList<>(classNames.length); |
| 1940 | + for (String className : classNames) { |
| 1941 | + Class<?> clazz = getKeyClass(className); |
| 1942 | + if (clazz != null) { |
| 1943 | + classList.add(clazz); |
| 1944 | + } |
1942 | 1945 | }
|
| 1946 | + supportedClasses = classList.toArray(CLASS0); |
1943 | 1947 | }
|
1944 |
| - supportedClasses = classList.toArray(CLASS0); |
| 1948 | + boolean bool = (supportedFormats != null) |
| 1949 | + || (supportedClasses != null); |
| 1950 | + b = Boolean.valueOf(bool); |
| 1951 | + hasKeyAttributes = b; |
1945 | 1952 | }
|
1946 |
| - boolean bool = (supportedFormats != null) |
1947 |
| - || (supportedClasses != null); |
1948 |
| - b = Boolean.valueOf(bool); |
1949 |
| - hasKeyAttributes = b; |
1950 | 1953 | }
|
1951 | 1954 | }
|
1952 | 1955 | return b.booleanValue();
|
|
0 commit comments