src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/OptimizedAccessorFactory.java

changeset 408
b0610cd08440
parent 368
0989ad8c0860
child 637
9c07ef4934dd
equal deleted inserted replaced
405:cc682329886b 408:b0610cd08440
1 /* 1 /*
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this 7 * published by the Free Software Foundation. Oracle designates this
125 125
126 if(opt==null) 126 if(opt==null)
127 return null; 127 return null;
128 128
129 Accessor<B,V> acc = instanciate(opt); 129 Accessor<B,V> acc = instanciate(opt);
130 if(acc!=null) 130 if (acc!=null) {
131 logger.log(Level.FINE,"Using optimized Accessor for "+getter+" and "+setter); 131 if (logger.isLoggable(Level.FINE)) {
132 logger.log(Level.FINE, "Using optimized Accessor for {0} and {1}", new Object[]{getter, setter});
133 }
134 }
132 return acc; 135 return acc;
133 } 136 }
134 137
135 138
136 /** 139 /**
172 175
173 if(opt==null) 176 if(opt==null)
174 return null; 177 return null;
175 178
176 Accessor<B,V> acc = instanciate(opt); 179 Accessor<B,V> acc = instanciate(opt);
177 if(acc!=null) 180 if (acc!=null) {
178 logger.log(Level.FINE,"Using optimized Accessor for "+field); 181 if (logger.isLoggable(Level.FINE)) {
182 logger.log(Level.FINE, "Using optimized Accessor for {0}", field);
183 }
184 }
179 return acc; 185 return acc;
180 } 186 }
181 187
182 private static <B,V> Accessor<B,V> instanciate(Class opt) { 188 private static <B,V> Accessor<B,V> instanciate(Class opt) {
183 try { 189 try {

mercurial