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

Summary: Wrong Validation Error on repeatEvery
Product: soa Reporter: Vitaly Bychkov <lativ>
Component: BPEL ValidationAssignee: Vladimir Yaroslavskiy <yaroslavskiy>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P1    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Test project

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)