Jacob Sonia

Ranch Hand
+ Follow
since Jun 28, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jacob Sonia

Hi I m running tests that calls real API calls. I want to make sure the api endpoint returns 200 before I run the tests. I would want to retry couple of times every few mins if it returns 500 or 503. What is the best way to do this in junit. Any pointers appreciated.
4 years ago
I am trying to extend NotNull for additional fieldName so that i could extract the field and have all messages as one custom message for all required fields. I am doing this:


How can i use isValid implementation of NotNull.
I am getting error that the default message is not defined. Will i have to redefine everything
7 years ago
I have this custom message in my ValidationMessage.properties ->
missing.startDate= startDate is a required field.

I have this on my request
@NotNull(message="{missing.startDate}")

Now, this forces me to create a message for each field. If i could do something like this
In ValidationMessage.properties
missing = fieldName is a required field. OR
missing = {0} is a required field.

@NotNull(field="startDate") or just have it as @NotNull

@NotNull is for javax
7 years ago
How can we substitute the field name being validation with {0} when emitting out the message.
7 years ago
I have a use case wherein i have multiple classes and i am trying to annotate all of those classes. I am trying to build a map of all the annotated fields of all the classes at startup with the actual field names so that when a user gives me annotated field name i can map it to actual field names.
So my first start was to create my own annotation class and annotate all the fields of the classes with it providing a name. But how do i build a map and find out all the classes that are annotated with my annotation.
7 years ago
Thanks Mike, this helped. I didn't know about how we could merge two regex patterns.
8 years ago
How will you combine it..this doesn't work
8 years ago
The starting string is Android/2.9.1
so i tried to do this but it is not printing the right result
8 years ago
Actually the real problem is that the following should match
2.9
2.9.1
2.9.2
and so on
3.1
3.1.1
3.2.1
so from 3 onwards any digit could match
but for ones starting with 2, the only digit allowed next is 9
8 years ago
if i try [2-9][1-9][1-9], in that case 2.1.1 will match, but i want to match the only conditions mentioned in the subject
8 years ago
Hi,

I created a threadsafe async client using a factory.
I create a request builder after that and set header and url.
should i use factory to invoke the boundrequestbuilder, for reference here is the code:


Here is the code for creating threadsafe async client
9 years ago
Hi,

I created a threadsafe async client using a factory.
I create a request builder after that and set header and url.
should i use factory to invoke the boundrequestbuilder, for reference here is the code:


Here is the code for creating threadsafe async client
I have a date in this format ->SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm Z");

How can i extract just Z ie. Zone from it, is it possible with stringifying and extracting it.
10 years ago
I have this program



Here i am getting a time with a timezone and the timezone is in UTC, is that a correct assumption
the output is as follows, why is not as per the input
2013-10-15T12:43 -0600
1381862580000
2013-10-15T12:43 -0600


10 years ago
I am in US and i am unable to find the exact place where to buy the voucher for scwcd certification, the oracle site is also very slow.
could someone please help me the exact place i need to buy this.