I tried to include all the feedback here: http://cr.openjdk.java.net/~reinhapa/reviews/8161230/webrev.04
-Patrick On 08.09.2016 20:09, Paul Sandoz wrote: >> On 8 Sep 2016, at 08:20, Patrick Reinhart <patr...@reini.net> wrote: >>> And one more thing. Because we have now only one method to get a >>> stream I think the constant RESOURCE_CHARACTERISTICS should be defined >>> inside the #resources()-method. It is not needed to define it as a >>> static final field. >> The reason is to have the computation of the characteristics only at compile >> time not on each method call. >> > It’s ok, since the characteristics are constant the java compiler is free to > constant fold and compute results and use that instead in the byte code > (which is why for independent compilation it is dangerous to change the > values of static final fields of certain types, such as stuff that can be > represented directly in the constant pool or byte code). > > So there is no need to increase the static size of the ClassLoader class with > a new static final field, although it probably makes little difference in > this case. > > Paul.