For everyone involved in the Adopt OpenJDK project!
See all
Members (207)
Edward Yue Shung Wong's profile photo
Richard Warburton's profile photo
kaushal Singh's profile photo
Stuart Marks's profile photo
Martijn Verburg's profile photo
Daniel Bryant's profile photo
Mani Sarkar's profile photo
Tibor Blénessy's profile photo
Jesus Luna Quiroga's profile photo
Christer Henriksson's profile photo
Salma Marwa Zamzam's profile photo
Kenneth Jaeger's profile photo
Jad El Omeiri's profile photo
Judy Lipinski's profile photo
Ivan St. Ivanov's profile photo
onder sezgin's profile photo
William Shackleford's profile photo
Federico Carbonell's profile photo
Constantin DRABO's profile photo
Nayden Gochev's profile photo
Krzysiek Kondracki's profile photo
Tobias F's profile photo
Dave Snowdon's profile photo
Patrick Reinhart's profile photo

Stream

Join this community to post or comment

Ahmed Mazher

Discussion  - 
 
i have some small ideas to improve java i really don't know where is the appropriate place to share this ideas the oracle guild seems complicates to me with many to read and million of links that made me lost so i will post my ideas here hopping that some one knowing what to do adopts this ideas if beneficial

1) my first idea about the restriction that the call of super() must be the first statement in the child constructor, i think _ according to my understanding _ this can be lessened to the call of super must come before any other method invocation e.g looking for the following example

class SuperClass {

public SuperClass() {
someMethod();//calling overridable method -> an error prone code
}

void someMethod() {
//doing some thing
}

}

class SubClass extends SuperClass {

Object someVar;

public SubClass(Object someVal) {
super();//this what happen behind the scene
this.someVar = someVal;
}

@Override
void someMethod() {
String s = someVar.toString();//referencing field variable
//doing some thing
}

}

in the super class when we call an overridable method in the constructor we are risking our self as if the child class override this method and in its implementation it refer to its field "someVar" when the child is created the super class constructor will be invoked first "super()" this will invoke the overridden version of method "someMethod" and as the child have not been initialized this will to error at the line
String s = someVar.toString(); due to trying to deference a null pointer

now back to my suggestion the above example can be written like this

class SubClass extends SuperClass {

Object someVar;

public SubClass(Object someVal) {
this.someVar = someVal;//according to new role this should be accepted
this.someVar = doSomeThing(someVal);//this should be not accepted
super();//call of super() can be done after child field initialization
this.someVar = doSomeThing(someVal);//this should be accepted now
}

@Override
void someMethod() {
String s = someVar.toString();//referencing field variable
//doing some thing
}

}

now with the new role its possible to call any overridable in the super constructor with out making any subclass suffer the consequences of overriding the super class method as now the child can initialize its field fairly easily before going and constructing the super class

2)about creating array of generic type
the argument as said in doc https://docs.oracle.com/javase/tutorial/java/generics/restrictions.html#createArrays

"If you try the same thing with a generic list, there would be a problem:

Object[] stringLists = new List<String>[]; // compiler error, but pretend it's allowed
stringLists[0] = new ArrayList<String>(); // OK
stringLists[1] = new ArrayList<Integer>(); // An ArrayStoreException should be thrown,
// but the runtime can't detect it.

"If arrays of parameterized lists were allowed, the previous code would fail to throw the desired ArrayStoreException."

also here https://docs.oracle.com/javase/tutorial/extra/generics/fineprint.html

The component type of an array object may not be a type variable or a parameterized type, unless it is an (unbounded) wildcard type.You can declare array types whose element type is a type variable or a parameterized type, but not array objects.

This is annoying, to be sure. This restriction is necessary to avoid situations like:

// Not really allowed.
List<String>[] lsa = new List<String>[10];
Object o = lsa;
Object[] oa = (Object[]) o;
List<Integer> li = new ArrayList<Integer>();
li.add(new Integer(3));
// Unsound, but passes run time store check
oa[1] = li;

// Run-time error: ClassCastException.
String s = lsa[1].get(0);

If arrays of parameterized type were allowed, the previous example would compile without any unchecked warnings, and yet fail at run-time. We've had type-safety as a primary design goal of generics. In particular, the language is designed to guarantee that if your entire application has been compiled without unchecked warnings using javac -source 1.5, it is type safe."

according to the previous two quota the creation of arrays of parameterized type is prohibited to avoid problems but i really believe this was exaggeration and the real cause of problem is assigning parameterized to a non-parameterized type as in the second example `Object o = lsa;` the solution is to make compiler complain about this warning the user that this will abolish type checking for any following use of the parameterized type e.g at the line `String s = lsa[1].get(0);` the compiler should raise warning that lsa are no longer type save and unchecked warning should be raised hope those ideas will be useful

This beginner Java tutorial describes fundamentals of programming in the Java programming language
1
Add a comment...
 
Hi all,

I want to use jtreg which is built by Adopt OpenJDK CI server [1].
However, build process has failed because it could not download testng binary[2].

Could you fix it?

After merging Jigsaw, we cannot use the latest jtreg binary on Adopt OpenJDK.
I'm jdk 9 committer and I use jtreg. So I'm very happy if it is fixed.


Thanks,

Yasumasa

[1] https://adopt-openjdk.ci.cloudbees.com/view/OpenJDK%20code-tools/job/jtreg/
[2] https://adopt-openjdk.ci.cloudbees.com/view/OpenJDK%20code-tools/job/jtreg/lastBuild/console
W, Description, %. Build stability: All recent builds failed. 0. Build History. x. Failed > Console Output · #520 · Apr 11, 2016 1:47 PM · Failed > Console Output · #519 · Apr 10, 2016 9:12 PM · Failed > Console Output · #518 · Apr 10, 2016 3:32 PM · Failed > Console Output ...
1
Martijn Verburg's profile photo
 
Apologies - we need to resolve a bunch of CI issues
Add a comment...

Anatole Tresch

Discussion  - 
 
I was reading through the docs from Oracle how to register ResourceBundleControl transparently in JDK 9 and also started to write some tests. I was really disappointed that the whole mechanism is working only by implementing JDK extensions. In our company (Credit Suisse) this is more or less not usable, since JDK and application software stack are managed and delivered by separate organizational units. Why we cannot allow ResourceBundleControl instances also to be registered using the ServiceLoader...? WDYT? Should we ask for improvement here?
1
Add a comment...

Anatole Tresch

Discussion  - 
 
All Java Enthusiast from Switzerland, and especially within the region of Zurich are invited to join us!
Zurich Java Community
Community for Java enthusiasts actively contribute to the Java ecosystem.
View community
1
Rajmahendra's profile photoAnatole Tresch's profile photo
4 comments
 
;-) -
Anatole Tresch
Glärnischweg 10
8620 Wetzikon
Tel +41 (43) 317 05 30
-
Send from Mobile
Add a comment...

Mani Sarkar
moderator

Discussion  - 
OpenJDK: Attila Szegedi's talk on Nashorn is out! mani, 6/21/13 11:52 PM, Hi all, If you haven't been to the Nashorn Hackday in March 2013 or missed it at Devoxx UK, here's another chance to witness Nashorn from one of the authors! https://twitter.com/DevoxxUK/statuses/347613987506102272 Cheers ...
1
NORJGiX Afranś Tė-Cöle's profile photo
Add a comment...

Edward Yue Shung Wong
owner

Discussion  - 
 
I'm out on holiday this Bank Holiday weekend from tomorrow! Please post your thoughts on this week's reading here so to help out Ged with the Skimmer's Guide XD

Personally I am loving the return to "real" functional programming and focussing more on the key abstractions. How is everyone else finding it?
1
Add a comment...
 
Set up a channel for build discussions, here is the link to the instructions!

https://java.net/projects/adoptopenjdk/pages/YourOwnEnvironment
Building your own environment. You'll want to make sure that your hardware is fairly modern. Minimum Requirements. 2GB RAM, 100GB HDD space. Recommended Requirements. Multi-core processor(s), lots of RAM (4GB+ recommended) and some decent HDD space (100GB+ recommended).
1
1
Add a comment...

About this community

Nowadays a lot of projects are opening their source code and letting those who are interested in the development of it edit the code. We’ll…
1
Add a comment...

Poonam Gupta

Discussion  - 
 
Hi Everyone,

We are looking for reviewers for our newly published book. I'll be happy to provide a free eBook copy to anyone interested in writing a review for this book on Amazon and/or Blog/Websites within 2 weeks after receiving the eBook copy.
All the information about the book is here: bit.ly/1vkX1VL
Please leave your request message with your email address here for an e-copy within a week.
I shall get back to you as quickly as I can.

Note - Limited Copies Available !
3
1
Add a comment...

Mani Sarkar
moderator

Discussion  - 
 
The #Adopt  dukes have launched the  #AdoptOpenJDK & #Adoptajsr (news)papers:

https://groups.google.com/d/msg/adopt-openjdk/yVGZeWzVeKo/fTSjAaB-7j0J

Read! Subscribe! Enjoy! Share!
2
1
Add a comment...
 
Betterrev initial design for Pull Review overview page.
1
Ged Byrne's profile photoEdward Yue Shung Wong's profile photo
2 comments
 
Part of the betterrev project we are doing. (Google , its on BitBucket)
Add a comment...

Edward Yue Shung Wong
owner

Discussion  - 
 
This is a blog post I wrote about the OpenJDK Test Fest which was held just before DevOxx UK 2013.

I've also set up a very basic seed project for getting started with JTReg here:
https://github.com/arkangelofkaos/OpenJdkTesting

http://arkangelofkaos.blogspot.co.uk/2013/05/openjdk-test-fest-23rd-march-2013.html
Better late than never, I'm writing about my very first hack-day working on OpenJDK testing :). Introduction. After LJC Conf 2012 I got interested in the Adopt OpenJDK project. Sadly it was only in early 2013 when I finally managed to get fully set up for the project. (Building Java has gotten a ...
1
Mani Sarkar's profile photo
 
I'll send you my notes soon! Ping me if I don't!
Add a comment...