Skip to content

Commit

Permalink
Fix lazyInitializerRegex and broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel-Darbord committed Apr 12, 2024
1 parent d020617 commit 45fb82c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ CBLazyInitializerRegexTest >> javaSourceCode1 [

^ javaModel newSourceTextAnchor
source: 'public void myAttribute()
if (myAttribute == nul ) {
if (myAttribute == null) {
myAttribute = this.initializeMyAttribute;
}
return myAttribute ;
Expand All @@ -28,7 +28,7 @@ CBLazyInitializerRegexTest >> javaSourceCode2 [
source: 'public void myAttribute()
if (
myAttribute == nul ) {
myAttribute == null) {
myAttribute = this.initializeMyAttribute;
}
Expand All @@ -42,7 +42,7 @@ CBLazyInitializerRegexTest >> javaSourceCode3 [

^ javaModel newSourceTextAnchor
source: 'public void myAttribute() {
if ( myAttribute == nul ) {
if ( myAttribute == null ) {
myAttribute = this.initializeMyAttribute;
}
return myAttribute ;
Expand Down
2 changes: 1 addition & 1 deletion Moose-Blueprint-Models/FamixJavaMethod.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,5 @@ FamixJavaMethod >> isSubPublic [
{ #category : #'*Moose-Blueprint-Models' }
FamixJavaMethod >> lazyInitializerRegex [

^ '.*if\s*\(\s*(this\.)?\w+\s*==\s*null\s*\)\s*\{\s*(this\.)?\w+\s*=.*;\s*\}\s*return\s*(this\.)\w+\s*;\s*\}\s*'
^ '.*if\s*\(\s*(this\.)?\w+\s*==\s*null\s*\)\s*\{\s*(this\.)?\w+\s*=.*;\s*\}\s*return\s+(this\.)?\w+\s*;\s*\}\s*'
]

0 comments on commit 45fb82c

Please sign in to comment.