Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Alignment API
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
moex
Alignment API
Commits
8fd096c8
Commit
8fd096c8
authored
15 years ago
by
Jérôme Euzenat
Browse files
Options
Downloads
Patches
Plain Diff
- added annotations on unchecked lint warnings
parent
eeea3176
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/fr/inrialpes/exmo/align/impl/BasicParameters.java
+16
-5
16 additions, 5 deletions
src/fr/inrialpes/exmo/align/impl/BasicParameters.java
src/fr/inrialpes/exmo/align/impl/Extensions.java
+2
-1
2 additions, 1 deletion
src/fr/inrialpes/exmo/align/impl/Extensions.java
with
18 additions
and
6 deletions
src/fr/inrialpes/exmo/align/impl/BasicParameters.java
+
16
−
5
View file @
8fd096c8
...
...
@@ -47,6 +47,13 @@ import org.semanticweb.owl.align.Parameters;
* Standard parameter list structure to be used everywhere.
* By default and for means of communication, parameter names and values
* are Strings (even if their type is Object).
*
* [JE:2010] A note about unchecked warnings
* java.util.Properties is declared as hashtable<Object,Object>
* However all its accessors can only put String as key in the hashtable
* But propertyNames returns Enumeration and not Enumeration<String>
* Using keySet will not change anything, because it will be Set<Object>
* Java 6 introduces Set<String> stringPropertyNames() !!
*
* @author Jrme Euzenat
* @version $Id$
...
...
@@ -60,9 +67,10 @@ public class BasicParameters extends Properties implements Parameters, Cloneable
//Hashtable<String,Object> parameters = null;
public
BasicParameters
()
{}
@SuppressWarnings
(
"unchecked"
)
public
BasicParameters
(
Properties
prop
)
{
for
(
Enumeration
<
String
>
e
=
(
Enumeration
<
String
>)
prop
.
propertyNames
();
e
.
hasMoreElements
();
)
{
for
(
Enumeration
<
String
>
e
=
(
Enumeration
<
String
>)
prop
.
propertyNames
();
e
.
hasMoreElements
();
)
{
//[W:unchecked]
String
k
=
e
.
nextElement
();
setProperty
(
k
,
prop
.
getProperty
(
k
)
);
}
...
...
@@ -84,19 +92,21 @@ public class BasicParameters extends Properties implements Parameters, Cloneable
return
getProperty
(
name
);
}
@SuppressWarnings
(
"unchecked"
)
public
Enumeration
<
String
>
getNames
(){
//return parameters.keys();
return
(
Enumeration
<
String
>)
propertyNames
();
return
(
Enumeration
<
String
>)
propertyNames
();
//[W:unchecked]
}
public
Collection
getValues
(){
return
values
();
}
@SuppressWarnings
(
"unchecked"
)
public
void
write
(){
System
.
out
.
println
(
"<?xml version='1.0' ?>"
);
System
.
out
.
println
(
"<Parameters>"
);
for
(
Enumeration
<
String
>
e
=
(
Enumeration
<
String
>)
propertyNames
();
e
.
hasMoreElements
();
)
{
for
(
Enumeration
<
String
>
e
=
(
Enumeration
<
String
>)
propertyNames
();
e
.
hasMoreElements
();
)
{
//[W:unchecked]
String
k
=
e
.
nextElement
();
System
.
out
.
println
(
" <param name='"
+
k
+
"'>"
+
getProperty
(
k
)+
"</param>"
);
}
...
...
@@ -106,9 +116,10 @@ public class BasicParameters extends Properties implements Parameters, Cloneable
/**
* displays the current parameters (debugging)
*/
@SuppressWarnings
(
"unchecked"
)
public
void
displayParameters
(
PrintStream
stream
){
stream
.
println
(
"Parameters:"
);
for
(
Enumeration
<
String
>
e
=
(
Enumeration
<
String
>)
propertyNames
();
e
.
hasMoreElements
();)
{
for
(
Enumeration
<
String
>
e
=
(
Enumeration
<
String
>)
propertyNames
();
e
.
hasMoreElements
();)
{
//[W:unchecked]
String
k
=
e
.
nextElement
();
stream
.
println
(
" "
+
k
+
" = "
+
getProperty
(
k
));
}
...
...
This diff is collapsed.
Click to expand it.
src/fr/inrialpes/exmo/align/impl/Extensions.java
+
2
−
1
View file @
8fd096c8
...
...
@@ -72,7 +72,8 @@ public class Extensions {
return
table
.
values
();
}
@SuppressWarnings
(
"unchecked"
)
public
Object
clone
()
{
return
new
Extensions
(
(
Hashtable
<
String
,
String
[]>)
table
.
clone
()
);
return
new
Extensions
(
(
Hashtable
<
String
,
String
[]>)
table
.
clone
()
);
//[W:unchecked]
}
}
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