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
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
// 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
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
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
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
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)
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
12 matches
Mail list logo