Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
18c9a1ce
Commit
18c9a1ce
authored
17 years ago
by
brinn
Browse files
Options
Downloads
Patches
Plain Diff
change: improve error message
SVN: 1522
parent
c554e4d0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/source/java/ch/systemsx/cisd/common/parser/AbstractParserObjectFactory.java
+16
-2
16 additions, 2 deletions
...temsx/cisd/common/parser/AbstractParserObjectFactory.java
with
16 additions
and
2 deletions
common/source/java/ch/systemsx/cisd/common/parser/AbstractParserObjectFactory.java
+
16
−
2
View file @
18c9a1ce
...
@@ -126,11 +126,25 @@ public abstract class AbstractParserObjectFactory<E> implements IParserObjectFac
...
@@ -126,11 +126,25 @@ public abstract class AbstractParserObjectFactory<E> implements IParserObjectFac
propertyNames
.
removeAll
(
propertyDescriptors
.
keySet
());
propertyNames
.
removeAll
(
propertyDescriptors
.
keySet
());
if
(
propertyNames
.
size
()
>
0
)
if
(
propertyNames
.
size
()
>
0
)
{
{
throw
UserFailureException
.
fromTemplate
(
"
F
ollowing
properties '%s'
are not part of '%s'
."
,
propertyNames
,
throw
UserFailureException
.
fromTemplate
(
"
The f
ollowing
header columns
are not part of '%s'
: %s"
,
clazz
.
getSimpleName
());
clazz
.
getSimpleName
()
,
format
(
propertyNames
)
);
}
}
}
}
private
final
String
format
(
Set
<
String
>
set
)
{
final
StringBuilder
builder
=
new
StringBuilder
();
for
(
String
s
:
set
)
{
builder
.
append
(
"'"
);
builder
.
append
(
s
);
builder
.
append
(
"', "
);
}
// Remove trailing ", "
builder
.
setLength
(
builder
.
length
()
-
2
);
return
builder
.
toString
();
}
/**
/**
* Analyzes given <code>Class</code> and returns a <code>Map</code> containing the mandatory <code>Field</code>s
* Analyzes given <code>Class</code> and returns a <code>Map</code> containing the mandatory <code>Field</code>s
* keyed by {@link Field#getName()}.
* keyed by {@link Field#getName()}.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment