Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Intellij Community
Commits
d070b811
Commit
d070b811
authored
9 years ago
by
Sergey Tselovalnikov
Browse files
Options
Download
Email Patches
Plain Diff
Fixes
parent
c69aa16b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
platform/reactivemodel/src/com/jetbrains/reactivemodel/mapping/model/ModelMapper.kt
+1
-1
.../com/jetbrains/reactivemodel/mapping/model/ModelMapper.kt
platform/reactivemodel/src/com/jetbrains/reactivemodel/util/Primitives.java
+10
-0
...odel/src/com/jetbrains/reactivemodel/util/Primitives.java
with
11 additions
and
1 deletion
+11
-1
platform/reactivemodel/src/com/jetbrains/reactivemodel/mapping/model/ModelMapper.kt
+
1
-
1
View file @
d070b811
...
...
@@ -92,7 +92,7 @@ public object ModelMapper {
throw
RuntimeException
(
"No getter presents for field ${it.getName()}"
);
}
sb
.
append
(
";\n"
)
if
(
it
.
getType
()
!
in
Primitives
.
TYP
ES
)
sb
.
append
(
"if ($varName != null)\n"
)
if
(
it
.
getType
()
!
in
Primitives
.
JAVA_PRIMITIV
ES
)
sb
.
append
(
"if ($varName != null)\n"
)
sb
.
append
(
"map.put(\"${it.getName()}\", ${ModelMapper::class.java.getName()}.map($varName));\n"
);
sb
.
toString
()
}.
join
(
""
)
...
...
This diff is collapsed.
Click to expand it.
platform/reactivemodel/src/com/jetbrains/reactivemodel/util/Primitives.java
+
10
-
0
View file @
d070b811
...
...
@@ -32,6 +32,16 @@ public class Primitives {
short
.
class
,
Short
.
class
,
String
.
class
));
public
static
final
List
<?
extends
Class
<?>>
JAVA_PRIMITIVES
=
Collections
.
unmodifiableList
(
asList
(
boolean
.
class
,
byte
.
class
,
char
.
class
,
double
.
class
,
float
.
class
,
int
.
class
,
long
.
class
,
short
.
class
));
private
Primitives
()
{
}
}
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help