-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/atomic factory #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| package fr.sandro642.github.provider; | ||
|
|
||
| import fr.sandro642.github.api.ApiFactory; | ||
|
|
||
| import java.util.Map; | ||
|
|
||
| public abstract class AtomicFactory { | ||
|
|
||
| private ApiFactory apiFactory; | ||
|
|
||
| protected void getPhysx(ApiFactory apiFactory) { | ||
| this.apiFactory = apiFactory; | ||
| } | ||
|
|
||
| protected Map<?,?> rawPhysx() { | ||
| return apiFactory.getRawData(); | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -6,6 +6,7 @@ | |||||||||||||||||||||
| import fr.sandro642.github.enums.LangType; | ||||||||||||||||||||||
| import fr.sandro642.github.enums.MethodType; | ||||||||||||||||||||||
| import fr.sandro642.github.enums.ResourceType; | ||||||||||||||||||||||
| import fr.sandro642.github.provider.AtomicFactory; | ||||||||||||||||||||||
| import fr.sandro642.github.provider.RouteImport; | ||||||||||||||||||||||
| import fr.sandro642.github.provider.URLProvider; | ||||||||||||||||||||||
| import fr.sandro642.github.provider.VersionProvider; | ||||||||||||||||||||||
|
|
@@ -43,6 +44,19 @@ public String getRoute() { | |||||||||||||||||||||
| } | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| public class ClassheritFromFactory extends AtomicFactory { | ||||||||||||||||||||||
|
||||||||||||||||||||||
| public class ClassheritFromFactory extends AtomicFactory { | |
| public static class ClassheritFromFactory extends AtomicFactory { |
Copilot
AI
Nov 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in class name: "Classherit" should be "ClassInherit" or "ClassThatInherits". The current name appears to be missing "In" between "Class" and "herit".
| public class ClassheritFromFactory extends AtomicFactory { | |
| public ClassheritFromFactory(ApiFactory apiFactory) { | |
| public class ClassInheritFromFactory extends AtomicFactory { | |
| public ClassInheritFromFactory(ApiFactory apiFactory) { |
Copilot
AI
Nov 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in type reference: "ClassheritFromFactory" should be "ClassInheritFromFactory" to match proper spelling.
Copilot
AI
Nov 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in type reference: "ClassheritFromFactory" should be "ClassInheritFromFactory" to match proper spelling.
Copilot
AI
Nov 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in variable name: "classherit" should be "classInherit" to match proper spelling and be consistent with the class name correction.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
rawPhysx()method doesn't check ifapiFactoryis null before callinggetRawData(). If this method is called beforegetPhysx()is invoked, it will throw a NullPointerException. Consider adding a null check or initializing the field appropriately.