Hi Jon,
I understand that service providers have a different set of rules (they
are usually not universally accessible classes) and therefore the
requirement for them to have public access modifier is merely a choice
JLS made to enforce a certain degree of strictness. Classes with default
(pa
Peter,
The circumstances of the analysis of service providers are very
different to the normal JLS rules regarding visibility and accessibility
of named items.
I know that we have some cleanup to do, for javac to "catch up" with the
latest updates to JLS, especially with regards to the diffe
Hi,
Just wanted to note that the confusing javac error message is not
specific to services and service providers.
Take the following example:
src/moda/module-info.java:
module moda {
exports pkga;
}
src/moda/pkga/Outer.java:
package pkga;
class Outer {
public static class Untouchab
// Rewording and resending to avoid confusion.
On 2/9/2017 4:21 PM, Jonathan Gibbons wrote:
On 2/9/17 3:07 PM, Alex Buckley wrote:
All the JLS wants is for the class to be 'public'.
Does that just apply locally to the declaration of the class itself, or
does it also indirectly apply to any enc
On 2/9/2017 4:21 PM, Jonathan Gibbons wrote:
On 2/9/17 3:07 PM, Alex Buckley wrote:
All the JLS wants is for the class to be 'public'.
Does that just apply locally to the declaration of the class itself, or
does it also indirectly apply to any enclosing classes, in the case of a
nested class?
On 2/9/17 3:07 PM, Alex Buckley wrote:
All the JLS wants is for the class to be 'public'.
Alex:
Does that just apply locally to the declaration of the class itself, or
does it also indirectly apply to any enclosing classes, in the case of a
nested class?
-- Jon
Hi Alex,
Thanks for your answer,
Vicente
On 02/09/2017 06:07 PM, Alex Buckley wrote:
On 2/9/2017 2:49 PM, Vicente Romero wrote:
Just to double check, the right javac behavior in this case should be to
issue similar errors in both cases like:
some position here: error: ServiceImpl is not publi
On 2/9/2017 2:49 PM, Vicente Romero wrote:
Just to double check, the right javac behavior in this case should be to
issue similar errors in both cases like:
some position here: error: ServiceImpl is not public in
com.example.internal; cannot be accessed from outside package
It's correct to giv
Hi Alex,
Just to double check, the right javac behavior in this case should be to
issue similar errors in both cases like:
some position here: error: ServiceImpl is not public in
com.example.internal; cannot be accessed from outside package
some other position here: error: Outer.ServiceImpl i
On 2/7/2017 1:11 AM, Gunnar Morling wrote:
---
package com.example;
public interface SomeService {
public void foo();
}
---
package com.example.internal;
class Outer {
public static class ServiceImpl implements com.example.SomeService {
Hi Alex,
Yes, I meant a nested class and default access, sorry for not being
precise with the terms. These are the concerned types:
---
package com.example;
public interface SomeService {
public void foo();
}
---
package com.example.internal;
class Outer {
On 2/6/2017 1:33 PM, Gunnar Morling wrote:
I have a service provider which is a public static inner class of an
outer class with default visibility.
I think you mean public static _nested_ class, since an inner class
isn't static by definition.
Also I think you mean default (package) access.
Hi,
I have a service provider which is a public static inner class of an
outer class with default visibility.
As per the ServiceLoader docs, service providers must be public
classes, so this provider is rightfully rejected by javac when
referenced in module-info.java. But the error message is rat
13 matches
Mail list logo