This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!

Ronwaldo Cruz

Ranch Hand
+ Follow
since Oct 17, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ronwaldo Cruz

Hi,

I have an old eclipse java project which is stored in SVN. I wish to create a new one based on the old one but without the SVN files. I'll be doing some experimental changes to it and I want to have the old one as backup basically. Anyone can give advice on how to do this?
Hi,

Ok. I understand what you mean. abc would be "sort of" a directory structure and then inside it is another abc "directory." But the thing is this is the situation I'm in. I have a url where someString in test/someString/test is a value that can have a slash in it. That is the business requirement. Is there any way of forcing the issue here and extracting someString from the path?
8 years ago
Hi,

I'm new to Spring 3. I'm trying to use @PathVariable as follows:



It works well for URLs like /test/someValueHere/test. However when someString needs to have a slash in it like /test/abc/abc/test, Spring doesn't recognize it anymore as matching the pattern. Previously I do it like /test/**/test in Spring 2.5 but this time I need to use PathVariable to easily extract out the someString value.

Anyone can help? Thanks
8 years ago
Hi,

I'm trying to do partial mocking in PowerMockito v 1.2.5 with the following code:



I get the following error:



It seems to me like PowerMockito mocked the whole object and not just the method. When running methodA, nothing inside it gets executed hence the exception because methodB was never called.

Anybody has an idea? Thanks

8 years ago
I'm a Java Developer who have a few months experience in .NET. Since everybody is pointing out that we can't compare Java and .NET (since C# is just a language) in one too simplistic statement, why don't we make the comparisons a little bit more nuanced? If the question is "which is better?" and the answer is "it depends on what you want to do?", why don't we make a list of which tool (platform) is better than the other for what purpose?

In my experience, C# language since it came later had the benefit of hindsight and so beats Java the language in almost every way
- Properties, Delegates, Virtual keyword since it implements tighter control for subclassing, implementation of Generics

If you're going to use Windows, Windows Forms definitely beat out Java Swing, if only for IDE support (drag and drop really makes for fast development). If not, then of course Swing beats out Windows Forms.

My main skills are primarily J2EE web development but the problem is I don't know ASP.NET so I can't really make a comparison

.NET produces added features and functionalities efficiently because Microsoft unilaterally makes the decision. On the Java side, there is a bit more mess with the Open Source Democracy going on. But I feel like the Open Source model produces more innovation. The problem for the Java Developer is you're on your own to assess the pros and cons of all the frameworks walking around while in Microsoft everything is delivered out of the box.

It would be great to hear other insights

9 years ago
What happens if you try to remove the mappedName attribute inside the Stateless annotation?
Hi,

I have done this and I get null pointer exception on my servlet because the container did not inject the EJB into the servlet.

For EJB to EJB DI it works ok. I can also find the EJB remotely through JNDI.

Seems DI doesn't work in Glassfish for Web and EJB
Hi,

Currently I'm getting a nullpointer exception on my servlet that uses an EJB.

Here is my servlet



Here is my EJB





Here's my application.xml


I have deployed both the war file and the ejb jar file into a single EAR file. Is there something more I need to do? Thank you.



Thanks. This answered my question
9 years ago


From what I understand of the rules, if a method is an instance method what is executed is the type of the object and not of the reference. But here I'm confused that b1.print(new Base()); would print "super." I thought what happened here was that the print method from the SuperBase class was overloaded by the print method from the Base class. And given that the print(Base) method was the more specific of the two should have been executed.

But I was wrong as it printed "super." Further, I changed the reference for b1 to Base and run it again. This time it printed "base." So it seems like the reference is what matters to the determination of the method to be executed, which I'm not sure why it's the case since it's an instance method.

Anybody has an idea?

Thanks
9 years ago
This helped. Thanks
9 years ago
Hi, I have written a piece of code show below:



The problem is that the interface method Dog.getOwner seems to have been successfully "implemented" by ConcreteDog.getHunter. However, Dog.setOwner doesn't seem to recognize ConcreteDog.setHunter as a suitable implementation. The 2 looks the same to me. Can somebody please help?

9 years ago
Hi,

I'm having trouble dividing a List of Objects into several chunks. I have an ArrayList of unknown(variable) no. of objects and I want to split them into groups of 300. So suppose I receive a List of 1000 objects I need a method that will return a List of Lists (List of 4 Lists containing 300, 300, 300, & 100 objects respectively)

public List<List> split(List bigChunk)
{

}

Does anybody have an idea?
9 years ago