<commit_before>---

Copyright 2013 Mentor Graphics Corp.  All Rights Reserved.

---

# Prevent illegal argument exception during upgrade
### xtUML Project Implementation Note

1. Abstract
-----------
This note describes the changes required to prevent an illegal argument
exception during upgrade.

2. Document References
----------------------
[1] Issues 97, https://github.com/xtuml/doc/issues/97  
[2] CQ Issue, dts0101010638  

3. Background
-------------
Release candidate testing has shown a problem that prevents model upgrade from
occuring.  The problem is related to an illegal argument exception.

4. Requirements
---------------
4.1 Model upgrade should work for large sets of models

5. Work Required
----------------
5.1. Prevent illegal argument exception

The root cause of the exception is from eclipse preventing developers from
resetting a running job's scheduling rule.  The code in UpgradeUtil currently
schedules a shared job and sets the scheduling rule every time notification of
a project addition is received.  If the job has already been started on another
thread we need to skip setting the scheduling rule.  This changes is made by
only setting the scheduling rule if the shared job's state is Job.None, meaning
it has not be started yet.  

6. Implementation Comments
--------------------------

7. Unit Test
------------
_- Start with a clean workspace
_- clone git models (or add it from local repo)
_- open the error log view so you can watch it
_- clear the error log view
_- import projects into workspace (do NOT select the option to include nested projects)
_R No errors occur (no Unable to perform model upgrade entries in the error log)

8. Code Changes
---------------
Branch name: 97_upgrade_exceptions

com.mentor.nucleus.bp.io.mdl/src/com/mentor/nucleus/bp/io/mdl/upgrade/
	UpgradeUtil.java

End
---
<commit_msg>Job: #97 Fix md issues<commit_after>---

Copyright 2013 Mentor Graphics Corp.  All Rights Reserved.

---

# Prevent illegal argument exception during upgrade
### xtUML Project Implementation Note

1. Abstract
-----------
This note describes the changes required to prevent an illegal argument
exception during upgrade.

2. Document References
----------------------
[1] Issues 97, https://github.com/xtuml/doc/issues/97  
[2] CQ Issue, dts0101010638  

3. Background
-------------
Release candidate testing has shown a problem that prevents model upgrade from
occuring.  The problem is related to an illegal argument exception.

4. Requirements
---------------
4.1 Model upgrade should work for large sets of models

5. Work Required
----------------
5.1. Prevent illegal argument exception

The root cause of the exception is from eclipse preventing developers from
resetting a running job's scheduling rule.  The code in UpgradeUtil currently
schedules a shared job and sets the scheduling rule every time notification of
a project addition is received.  If the job has already been started on another
thread we need to skip setting the scheduling rule.  This changes is made by
only setting the scheduling rule if the shared job's state is Job.None, meaning
it has not be started yet.  

6. Implementation Comments
--------------------------

7. Unit Test
------------
_- Start with a clean workspace   
_- clone git models (or add it from local repo)   
_- open the error log view so you can watch it   
_- clear the error log view   
_- import projects into workspace (do NOT select the option to include nested projects)   
_R No errors occur (no Unable to perform model upgrade entries in the error log)   

8. Code Changes
---------------
Branch name: 97_upgrade_exceptions

com.mentor.nucleus.bp.io.mdl/src/com/mentor/nucleus/bp/io/mdl/upgrade/    
	UpgradeUtil.java

End
---

{'fraction_non_alphanumeric': 0.11339930462690559, 'fraction_numerical': 0.018721583311045734, 'mean_word_length': 2.828045035823951, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5393756', 'n_tokens_mistral': 1001, 'n_tokens_neox': 921, 'n_words': 494}