Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Devrim Gunyel
core
Commits
57927d13
Commit
57927d13
authored
Sep 17, 2019
by
Piotr Gawron
Browse files
clear column names are used to report to the user
parent
27724aed
Changes
3
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
57927d13
...
...
@@ -4,6 +4,8 @@ minerva (14.0.0~beta.2) unstable; urgency=low
*
Bug
fix
:
validation
of
project
name
length
is
provided
(#
950
)
*
Bug
fix
:
after
reducing
privileges
on
himself
interface
is
refreshed
(#
948
)
*
Bug
fix
:
removing
overlays
as
curator
in
admin
panel
fixed
(#
944
)
*
Bug
fix
:
information
about
deprecated
column
is
more
clear
about
column
names
(#
958
)
--
Piotr
Gawron
<
piotr
.
gawron
@
uni
.
lu
>
Mon
,
16
Sep
2019
21
:
00
:
00
+
0200
...
...
rest-api/src/main/java/lcsb/mapviewer/api/projects/overlays/OverlayRestImpl.java
View file @
57927d13
...
...
@@ -106,8 +106,8 @@ public class OverlayRestImpl extends BaseRestImpl {
private
List
<
String
>
getDeprecatedColumns
(
Layout
overlay
)
{
try
{
List
<
String
>
result
=
new
ArrayList
<>();
for
(
ColorSchemaColumn
column
:
new
ColorSchemaReader
().
getDeprecatedColumns
(
overlay
))
{
result
.
add
(
column
.
name
());
for
(
Pair
<
ColorSchemaColumn
,
String
>
entry
:
new
ColorSchemaReader
().
getDeprecatedColumns
(
overlay
))
{
result
.
add
(
entry
.
getRight
());
}
return
result
;
}
catch
(
IOException
|
InvalidColorSchemaException
e
)
{
...
...
service/src/main/java/lcsb/mapviewer/services/utils/ColorSchemaReader.java
View file @
57927d13
...
...
@@ -814,9 +814,9 @@ public class ColorSchemaReader {
return
readColorSchema
(
new
ByteArrayInputStream
(
inputData
),
params
);
}
public
List
<
ColorSchemaColumn
>
getDeprecatedColumns
(
Layout
overlay
)
public
List
<
Pair
<
ColorSchemaColumn
,
String
>
>
getDeprecatedColumns
(
Layout
overlay
)
throws
IOException
,
InvalidColorSchemaException
{
List
<
ColorSchemaColumn
>
result
=
new
ArrayList
<>();
List
<
Pair
<
ColorSchemaColumn
,
String
>
>
result
=
new
ArrayList
<>();
if
(
overlay
.
getInputData
()
!=
null
)
{
BufferedReader
br
=
new
BufferedReader
(
new
InputStreamReader
(
new
ByteArrayInputStream
(
overlay
.
getInputData
().
getFileContent
())));
...
...
@@ -843,13 +843,14 @@ public class ColorSchemaReader {
Map
<
ColorSchemaColumn
,
Integer
>
schemaColumns
=
new
HashMap
<>();
parseColumns
(
columns
,
schemaColumns
,
type
);
for
(
ColorSchemaColumn
column
:
schemaColumns
.
keySet
())
{
Pair
<
ColorSchemaColumn
,
String
>
entry
=
new
Pair
<>(
column
,
columns
[
schemaColumns
.
get
(
column
)]);
try
{
Field
f
=
ColorSchemaColumn
.
class
.
getField
(
column
.
name
());
if
(
f
.
isAnnotationPresent
(
Deprecated
.
class
))
{
result
.
add
(
column
);
result
.
add
(
entry
);
}
else
if
(
column
.
getDepractedColumnName
()
!=
null
&&
column
.
getDepractedColumnName
().
equalsIgnoreCase
(
columns
[
schemaColumns
.
get
(
column
)]))
{
result
.
add
(
column
);
result
.
add
(
entry
);
}
}
catch
(
NoSuchFieldException
|
SecurityException
e
)
{
throw
new
InvalidStateException
(
e
);
...
...
Write
Preview
Markdown
is supported
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