This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 132846 - Wrong Validation Error on repeatEvery
Summary: Wrong Validation Error on repeatEvery
Status: VERIFIED FIXED
Alias: None
Product: soa
Classification: Unclassified
Component: BPEL Validation (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Vladimir Yaroslavskiy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-15 09:26 UTC by Vitaly Bychkov
Modified: 2008-04-17 09:10 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Test project (6.82 KB, application/x-compressed)
2008-04-15 12:34 UTC, Vladimir Yaroslavskiy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vitaly Bychkov 2008-04-15 09:26:26 UTC
The next construction 
   <eventHandlers>
       <onAlarm>
           <repeatEvery>$OnAlarmWSDLOperationIn.duration</repeatEvery>


is correct but matched as invalid.

Validation error says:
ERROR: The duration for the <repeatEvery> can not be zero or negative.
Comment 1 Vladimir Yaroslavskiy 2008-04-15 09:57:49 UTC
diff in release61:

private void checkNegative(RepeatEvery repeatEvery) {
   String value = repeatEvery.getContent();

+  if (value == null) {
+    return;
+  }
+  if ( !(value.startsWith("'") && value.endsWith("'"))) {
+    return;
+  }
   try {
     Duration duration = DurationUtil.parseDuration(value, true);

     if (duration.hasMinus() || isZero(duration)) {
       addError("FIX_Negative_RepeatEvery", repeatEvery); // NOI18N
     }
   }
   catch (IllegalArgumentException e) {}
} 
Comment 2 Vladimir Yaroslavskiy 2008-04-15 09:58:54 UTC
fixed in release61: 8ddd378eb44b
also fixed in trunk.

P1 - there is no workaround.
Comment 3 Vladimir Yaroslavskiy 2008-04-15 12:34:33 UTC
Created attachment 60197 [details]
Test project
Comment 4 Andrei Chistiakov 2008-04-17 09:10:01 UTC
Verified with NetBeans IDE 6.1 RC2 (Build 200804170002)