Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Access modifiers ignored !?!

843798Jun 24 2001 — edited Jun 25 2001
Hi

please, have a look at the code below and let me know your opinions

// ------------- source file 1 ------------------------
package pckg1;

public class Dog {

final public static void main (String[] args) {

pckg2.Puppy puppy = new pckg2.Puppy("Spot");
System.out.println(puppy.getName());

}
}

// ------------- source file 2 --------------------
package pckg2;

class Puppy {

String name;

public Puppy(String name) {
this.name = name;
}

String getName() {return name;}

}

Each class belongs to a different package. Obviously if you compile Puppy first and attempt compiling Dog the compiler will complain about several things (class Puppy not being public, method getName() not being public, etc...).

Now,
if you change the Puppy class so that the necessary bits are public, re-compile Puppy and then Dog it will work.
When you subsequently go back to Puppy and remove the added public access modifiers and re-compile JUST the Puppy class and try running Dog IT WILL STILL WORK AS IF EVERYTHING IN THE PUPPY CLASS WERE PUBLIC.

I don't thing this is right. If the access modifiers cannot be relied on then the whole system is flawed.

PS: Running on W2K, the behaviour observed on JRE 1.2.2_007, 1.3.0_02 as well as on 1.4.0-beta-b65.

Cheers

Ales Krestan

Comments

Adding in @"Christian Neumueller-Oracle" ...

Answer

Hi,

Linkedin requires client_secret as POST parameter for the token request. This does not conform to the OAuth2 standard (see https://tools.ietf.org/html/rfc6749#section-4.3.1) and is currently not supported. I filed bug #28199613 for this issue.

Regards,

Christian

Marked as Answer by Mahmoud_Rabie · Sep 27 2020
Mahmoud_Rabie

Carsten and Christian,

Thanks a lot.

Is there any suggested workaround to log in with a LinkedIn Profile and grasp its data?

Hi Mahmoud,

sorry, no workaround right now.

Regards,

Christian

1 - 4
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 23 2001
Added on Jun 24 2001
2 comments
93 views